depwait

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package depwait resolves a controller's NamedResource dependencies for the dag scheduler: Classify decides, WITHOUT blocking, whether each dep is Ready, terminally Failed, or still blocked (parkable). The shared readiness predicates (readyNow, the ReadyExpr evaluator, discovery-record promotion) live here so the gate semantics are single-sourced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockedError

type BlockedError struct {
	Deps []manifest.NamedResource
}

BlockedError MUST remain separate from user-facing failure sentinels.

func (*BlockedError) Error

func (e *BlockedError) Error() string

type Classification

type Classification struct {
	Kind    schedule.Kind
	Subject *manifest.DiagnosticIdentity
	Message string
	Causes  []manifest.DiagnosticReason
	Err     error
}

Classification retains one dependency's readiness decision. Successful decisions MUST not carry an expanded DiagnosticReason.

func (Classification) DiagnosticReason

DiagnosticReason returns captured failure context for the raw dependency id. id MUST be the raw dependency passed to Classify.

type DataDependency

type DataDependency struct {
	manifest.Reference

	Input  store.ReferenceFacts
	Result values.Result
}

DataDependency MUST retain the authored reference with its captured facts.

type ExistenceLookup

type ExistenceLookup interface {
	// IsFileIndexed reports whether id has a raw-file discovery record.
	IsFileIndexed(id manifest.NamedResource) bool
	// Promote attempts to materialize id into the Store from the
	// discovery index. Returns true when promotion succeeded
	// and id is now reachable via store.GetObject.
	Promote(context.Context, selection.PrepareRequest, manifest.NamedResource) (bool, error)
}

ExistenceLookup is the seam Classify uses to resolve missing dependencies. Bundled into one interface so the orchestrator (and any future embedder) wires a single object through the controller Options pipe instead of two parallel closures.

The orchestrator's implementation reads from the loader's discovery index — file-indexed objects (CMs/Secrets/HRs the discovery loader kept out of the Store) get lazy-promoted the moment a depwait edge needs them, while render-only ids (no file record) stay absent until a parent render's emitRenderedChildren chain produces them.

type MissingPolicy

type MissingPolicy struct {
	// contains filtered or unexported fields
}

MissingPolicy MUST remain immutable after construction.

func NewMissingPolicy

func NewMissingPolicy(kinds []string) *MissingPolicy

NewMissingPolicy MUST snapshot selections before concurrent assessment.

func (*MissingPolicy) Admission

Admission MUST project values policy without importing values into selection.

func (*MissingPolicy) AllowsKind

func (p *MissingPolicy) AllowsKind(kind string) bool

AllowsKind MUST share the invocation selection with source acquisition.

type Waiter

type Waiter struct {
	Admission selection.PrepareRequest
	Store     stateReader
	Parent    manifest.NamedResource
	Missing   *MissingPolicy

	// Materializer requires readiness even for existence-only dependency kinds.
	Materializer bool

	// Existence, when non-nil, lets Classify lazy-promote a missing dep
	// from the loader's discovery records before deciding it is
	// absent. The orchestrator wires this against the discovery index;
	// tests supply stubs. When nil, an absent dep is simply absent.
	//
	// See ExistenceLookup for the decision matrix.
	Existence ExistenceLookup
}

Waiter holds the parameters for one dependency-classification operation.

func (*Waiter) Assess

func (w *Waiter) Assess(ctx context.Context, reads *store.ReadSet, level manifest.DrainLevel) error

Assess preserves readiness and dependency provenance without publishing live status.

func (*Waiter) Available

func (w *Waiter) Available(ctx context.Context, dep DataDependency, level manifest.DrainLevel) availability

Available MUST combine structural settlement with the captured values decision.

func (*Waiter) Classify

Classify resolves readiness and required content from one captured snapshot.

func (*Waiter) Prediction

func (w *Waiter) Prediction(
	ctx context.Context,
	reads *store.ReadSet,
	references iter.Seq[manifest.Reference],
) error

Prediction assesses captured references without promotion, publication, or execution authority.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL