selection

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 19 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 selection owns render membership. Physical acquisition and storage remain with their factual owners.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Declarations

func Declarations(documents []store.Child) iter.Seq[store.Child]

Declarations excludes executable raw siblings from dependency acquisition.

func EntryMembershipFailure added in v0.8.1

func EntryMembershipFailure(path string, owner, child manifest.NamedResource) error

EntryMembershipFailure attributes unresolved membership to its owning package.

func HasPhysicalDeclaration added in v0.8.1

func HasPhysicalDeclaration(path, builder string) bool

HasPhysicalDeclaration reports whether a declaration has a raw file or a prepared builder.

func LookupPackageMatches added in v0.8.1

func LookupPackageMatches(
	target manifest.NamedResource, policy *manifest.EmissionPolicy, source manifest.NamedResource, reachable bool,
) bool

LookupPackageMatches consumes source reach evidence and the qualified producer's namespace policy.

func PendingPackageProductions added in v0.8.1

func PendingPackageProductions(
	id manifest.NamedResource, record *manifest.DiscoveryRecord,
) iter.Seq2[manifest.NamedResource, *manifest.Production]

PendingPackageProductions traverses discovered package ownership for a declaration that needs a build.

func Project

func Project(
	runs []Snapshot,
	runErr error,
	request Request,
) ([]*Result, ProjectionErrors)

Project projects one render, or two ordered orig/current renders, onto requested kinds with a common namespace and name. Labels filter output objects, while Counts and fatal scope retain the roots matched before labels. Incomplete inputs yield only warnings and their original errors. Unchanged catalog-only objects contain reporting facts, not complete specs; select them for render to obtain full specs. Borrowed objects, graphs and document batches MUST remain immutable in use. ProjectionErrors separates selected failures from non-resource diagnostics.

func ProjectIndex

func ProjectIndex(index *manifest.DiscoveryIndex, decision *Decision) *manifest.DiscoveryIndex

ProjectIndex prunes excluded reader edges without mutating the borrowed index.

func ReduceStatic

func ReduceStatic[S staticScope](ctx context.Context, scope S) iter.Seq2[string, error]

ReduceStatic yields exact parent-directory reads to its caller. The caller MUST complete each read before resuming and exhaust the iterator before publication. No borrowed input or mutable result escapes this construction call.

Types

type Acquisition

type Acquisition struct {
	Demand    Demand
	Child     store.Child
	Root      string
	Available bool
	Reads     *store.ReadSet
}

Acquisition borrows an exact driver's result until its preparation consumes it.

type Admission

type Admission struct {
	Needed       []manifest.NamedResource
	Selected     []manifest.NamedResource
	Dirty        []manifest.NamedResource
	Ordinary     []manifest.NamedResource
	Readiness    []manifest.NamedResource
	Fatal        []manifest.NamedResource
	Objects      []store.Child
	Blocked      []string
	Revision     uint64
	Namespaces   []string
	EntryReceipt *manifest.EntryApplication

	Request PrepareRequest
	// contains filtered or unexported fields
}

Admission is a temporary proposal computed outside execution-membership locks.

func (*Admission) Demands

func (a *Admission) Demands() iter.Seq[Demand]

Demands borrow proposal storage until Retire.

func (*Admission) Retire

func (a *Admission) Retire()

Retire ends proposal payload access, preserving borrowed guards and identity results.

type AdmissionOptions

type AdmissionOptions struct {
	Request      PrepareRequest
	Previous     *AdmissionResult
	Stage        CommitStage
	Authority    *store.ReadSet
	EntryHistory struct {
		Owner   manifest.NamedResource
		Records iter.Seq2[manifest.NamedResource, manifest.DiscoveryRecord]
	}
}

AdmissionOptions MUST retain the request and original caller authority across retries.

type AdmissionResult

type AdmissionResult struct {
	Request      PrepareRequest
	EntryReceipt *manifest.EntryApplication
	Objects      []store.Child
	Demands      []Demand
	Absent       []manifest.NamedResource
	Needed       []manifest.NamedResource
	Selected     []manifest.NamedResource
	Dirty        []manifest.NamedResource
	Ordinary     []manifest.NamedResource
	Blocked      []string
	Revision     uint64
	Namespaces   []string

	OrderingChanged map[manifest.NamedResource]bool
	// contains filtered or unexported fields
}

AdmissionResult owns immutable observations from a settled proposal, beyond proposal retirement.

type CommitStage

type CommitStage uint8

CommitStage separates construction admission from execution membership.

const (
	// Construction admits dependencies without execution membership.
	Construction CommitStage = iota
	// Execution commits the settled invocation selection.
	Execution
)

type Decision

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

Decision MUST remain immutable after publication, including every borrowed bucket.

func (*Decision) Assess added in v0.8.1

func (d *Decision) Assess(id manifest.NamedResource) bool

Assess also dispatches readers reached only for failure reporting.

func (*Decision) Changed

func (d *Decision) Changed(id manifest.NamedResource) bool

Changed treats unrestricted execution as changed.

func (*Decision) EvaluationOnly added in v0.8.1

func (d *Decision) EvaluationOnly(id manifest.NamedResource) bool

EvaluationOnly applies the change boundary to ordering prerequisites.

func (*Decision) HasOrdering added in v0.8.1

func (d *Decision) HasOrdering() bool

HasOrdering avoids capturing prior inventories when no ordering edges can be withdrawn.

func (*Decision) MatchesOrdering added in v0.8.1

func (d *Decision) MatchesOrdering(reads *store.ReadSet) bool

MatchesOrdering rejects stale authored edges after effective inputs are available.

func (*Decision) OrderingDeclaration added in v0.8.1

func (d *Decision) OrderingDeclaration(
	reads *store.ReadSet, id manifest.NamedResource, expressionOperand bool,
) manifest.BaseManifest

OrderingDeclaration keeps indexed evidence subordinate to accepted producer ownership.

func (*Decision) OrdinaryDemand

func (d *Decision) OrdinaryDemand(id manifest.NamedResource) bool

OrdinaryDemand permits ordinary execution when the decision is nil.

func (*Decision) Output

func (d *Decision) Output(id manifest.NamedResource) bool

Output includes every identity when the decision is nil.

func (*Decision) ProjectOrderingFailures added in v0.8.1

func (d *Decision) ProjectOrderingFailures(failed map[manifest.NamedResource]store.StatusInfo)

ProjectOrderingFailures retains the captured intermediate failures of unelected prerequisites.

func (*Decision) ReadinessDemand added in v0.8.1

func (d *Decision) ReadinessDemand(id manifest.NamedResource) bool

ReadinessDemand includes prerequisites that can fail without contributing output.

func (*Decision) Reconcile

func (d *Decision) Reconcile(id manifest.NamedResource) bool

Reconcile admits every identity when the decision is nil.

type DeclarationDemand

type DeclarationDemand struct {
	Changes *change.Set
	Side    manifest.TreeSide
	Files   map[manifest.NamedResource][]string
}

DeclarationDemand borrows immutable comparison and census evidence until completion returns.

func DemandDeclarations

func DemandDeclarations(side manifest.TreeSide, changes *change.Set, index *manifest.DiscoveryIndex) DeclarationDemand

DemandDeclarations MUST include every possible location of an unindexed declaration move.

type DeclarationLocation added in v0.8.1

type DeclarationLocation struct {
	Index           *manifest.DiscoveryIndex
	Objects         rootReader
	Root            func(manifest.NamedResource) RootEvidence
	Productions     func(manifest.NamedResource) []manifest.Production
	ConfiguredInput *store.SourceArtifact
	Initial         bool
}

DeclarationLocation borrows the index and reads from one construction or admission view.

func (*DeclarationLocation) Located added in v0.8.1

Located accepts projected declarations only through production evidence from the same view.

type Demand

type Demand struct {
	Identity    manifest.NamedResource
	Occurrence  OccurrenceFacts
	Application OccurrenceID
	Source      manifest.NamedResource
	Root        string
	History     bool
	Materialize bool
	Artifact    *store.SourceArtifact
	Reads       *store.ReadSet
	Witness     manifest.BaseManifest
}

Demand borrows its artifact and capture until the successor preparation consumes its acquisition.

type DocumentFact

type DocumentFact struct {
	Document         map[string]any
	Original         map[string]any
	Identity         manifest.NamedResource
	Child            manifest.NamedResource
	GeneratedOverlap bool
}

DocumentFact MUST preserve the accepted child identity for producer conflicts.

type DocumentMetadata added in v0.8.1

type DocumentMetadata struct {
	Producer *manifest.DiagnosticIdentity
	Original map[string]any
}

DocumentMetadata borrows read-only comparison data for one accepted document.

type EmissionFacts

type EmissionFacts struct {
	Emitter          manifest.BaseManifest
	Parent           manifest.BaseManifest
	Documents        []DocumentFact
	ParentAttributed bool
	ParentRecorded   bool
}

EmissionFacts MUST retain actual emitter and reporting parent separately.

type EntryFailure

type EntryFailure struct {
	File       string
	Coordinate string
	Evidence   RootEvidence
	Occurrence manifest.DocOccurrence
}

EntryFailure borrows a retained document failure and its physical root evidence.

type EntryIdentity

type EntryIdentity struct {
	Producer, Key, Source manifest.NamedResource
	Descendant            string
	Documents             map[manifest.NamedResource]struct{}
}

EntryIdentity MUST retain both the physical producer and its comparison key.

type EntryReach added in v0.8.1

type EntryReach struct {
	Producer manifest.NamedResource
	Possible func([]manifest.BaseManifest) bool
}

EntryReach binds immutable reach evidence to the current qualification producer.

type EntryRoute

type EntryRoute struct {
	Application            *manifest.EntryApplication
	Selected               bool
	Winners                *map[OccurrenceID]manifest.NamedResource
	PreviousGeneratedEntry bool
	Previous               manifest.NamedResource
	Producer               manifest.NamedResource
	Root                   manifest.NamedResource
	Replay                 manifest.NamedResource
	Reads                  *store.ReadSet
	Reach                  *EntryReach
	Bound                  bool
	Changed                bool
	Projected              bool
	ProjectedPatches       bool
}

EntryRoute borrows discovery's immutable matched support and its captured observations.

type EntryScope added in v0.8.1

type EntryScope struct {
	Children    map[manifest.NamedResource]bool
	Support     *store.ReadSet
	Source      *store.SourceArtifact
	SourceID    manifest.NamedResource
	Preparation *store.ReadSet
}

EntryScope MUST hold for the current source and owning declaration before it admits a child.

func (*EntryScope) Allows added in v0.8.1

func (s *EntryScope) Allows(child manifest.NamedResource) bool

Allows treats absent scope as unrestricted and pending scope as empty.

func (*EntryScope) Current added in v0.8.1

func (s *EntryScope) Current() bool

Current requires the owner and material read by the proof to remain current.

func (*EntryScope) Same added in v0.8.1

func (s *EntryScope) Same(next *EntryScope) bool

Same permits reusing a proof only while its support remains current.

type EntryScopes added in v0.8.1

type EntryScopes map[manifest.NamedResource]*EntryScope

EntryScopes MUST remain immutable after publication.

func (*EntryScopes) Scope added in v0.8.1

func (s *EntryScopes) Scope(owner manifest.NamedResource) *EntryScope

Scope preserves the distinction between absent and empty owner membership.

type FailuresError

type FailuresError struct{ Message string }

FailuresError retains the domain identity of resource reconciliation failures.

func (*FailuresError) Error

func (e *FailuresError) Error() string

func (*FailuresError) Unwrap

func (*FailuresError) Unwrap() error

type InputAdmission

type InputAdmission uint8

InputAdmission MUST expose only the effect that selection needs.

const (
	AvailableInput InputAdmission = iota + 1
	OptionalInput
	RequiredInput
)

Admission effects MUST not expose data classification across the policy seam.

type LookupFailure added in v0.8.1

type LookupFailure struct {
	Package manifest.DiagnosticIdentity
	Path    string
	Cause   error
}

LookupFailure captures a failed exploratory render with current discovery support.

type LookupSource added in v0.8.1

type LookupSource struct {
	Source, Materializer manifest.NamedResource
}

LookupSource identifies generated material and its known producer.

type NativeRootFacts

type NativeRootFacts struct {
	Path       string
	Identities []manifest.NamedResource
	Owners     []manifest.NamedResource
	Index      *manifest.DiscoveryIndex
	Entry      bool
	Built      bool
	Selected   bool
	Excluded   bool
	Component  bool
}

NativeRootFacts borrows one physical package's graph membership and construction state.

type OccurrenceFacts

type OccurrenceFacts struct {
	Declaration     OccurrenceID
	Identity        manifest.NamedResource
	Authored        manifest.NamedResource
	Object          manifest.BaseManifest
	Catalog         manifest.BaseManifest
	Parsed          manifest.BaseManifest
	Source          manifest.NamedResource
	Path            string
	HasPath         bool
	Application     bool
	Namespaced      bool
	Uncertain       bool
	RequiresBuild   bool
	OrderingKnown   bool
	Retained        bool
	Structural      *manifest.Kustomization
	NeedsCandidates bool
	Labels          map[string]string
	Labeled         bool
	Traversed       bool
	Mounted         *store.SourceArtifact
	Witness         any
	Located         bool
	CatalogKnown    bool
	ImplicitGate    *manifest.Reference
	Refs            []manifest.Reference
	Reverse         []manifest.NamedResource
	TemplateInputs  []manifest.TemplateInput
	TemplateObjects []manifest.BaseManifest
	Roots           []string
	Targets         []manifest.ProducerTarget
	AuthoredTargets []manifest.ProducerTarget
	Policy          *manifest.EmissionPolicy
}

OccurrenceFacts borrows immutable parsed data; its collections must not be mutated.

func (*OccurrenceFacts) EffectiveObject added in v0.8.1

func (o *OccurrenceFacts) EffectiveObject() manifest.BaseManifest

EffectiveObject preserves the borrowed object when its namespace already matches.

func (*OccurrenceFacts) EntryApplication added in v0.8.1

func (o *OccurrenceFacts) EntryApplication() (manifest.EntryApplication, bool)

EntryApplication requires application eligibility in addition to a source and path.

func (*OccurrenceFacts) SourcePath

func (o *OccurrenceFacts) SourcePath() (manifest.NamedResource, string, bool)

SourcePath reads the source and path resolved by the loader.

func (*OccurrenceFacts) VisitReferences added in v0.8.1

func (o *OccurrenceFacts) VisitReferences(view manifest.ReferenceView, yield func(manifest.Reference) bool) bool

VisitReferences keeps reconciliation gates outside the relation view.

type OccurrenceID

type OccurrenceID struct {
	Source   string
	File     string
	Document int
	Item     int
}

OccurrenceID preserves document and List-item coordinates within a source.

type Preparation

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

Preparation MUST remain with one logical admission owner until its final consumer.

func (*Preparation) Retire

func (p *Preparation) Retire()

Retire MUST follow every active proposal and preserve accepted store borrowers.

type PrepareRequest

type PrepareRequest struct {
	Preparation   **Preparation
	ReadHistory   func(context.Context, *Demand) (iter.Seq2[manifest.NamedResource, manifest.DiscoveryRecord], bool)
	Changes       *change.Set
	HistoryOwners map[manifest.NamedResource][]manifest.SourceEvidence
	LookupSources []LookupSource
	Acquired      []Acquisition
	// Missing MUST retain one immutable policy pointer across proposal retries.
	Missing missingPolicy
	// Generation MUST remain immutable until its preparation retires.
	Generation         []store.Child
	Owner              manifest.NamedResource
	Reads              *store.ReadSet
	Invocation         bool
	CompleteGeneration bool
	// AwaitEmission binds child activation to the pending store publication.
	AwaitEmission bool
	// OrderingCandidates asks for changed producer identities without publishing demand.
	OrderingCandidates []manifest.NamedResource
	History            map[manifest.NamedResource]struct {
		Records  iter.Seq2[manifest.NamedResource, manifest.DiscoveryRecord]
		Complete bool
	}
	// contains filtered or unexported fields
}

PrepareRequest describes the evidence and selection intent for an admission proposal.

type ProducerFacts

type ProducerFacts struct {
	Declaration manifest.BaseManifest
	Derived     bool
	Occurrence  OccurrenceFacts
}

ProducerFacts preserves an immutable producer projection and its derivation witness.

type ProjectionErrors

type ProjectionErrors struct {
	Selected  error
	Remaining error
}

ProjectionErrors keeps selected failures separate from diagnostics outside the projection.

type Request

type Request struct {
	Roots   []manifest.NamedResource
	Changed bool
	Labels  map[string]string
}

Request containers MUST remain immutable for the invocation.

func (Request) AllRoots added in v0.8.1

func (s Request) AllRoots() bool

AllRoots reports whether all root identities are eligible before change filtering.

func (Request) Matches

func (s Request) Matches(id manifest.NamedResource) bool

Matches reports whether an identity is eligible under the requested roots. Namespace restrictions retain cluster-scoped output; complete render-kind requests include standalone output.

func (Request) MatchesScope

func (s Request) MatchesScope(id manifest.NamedResource) bool

MatchesScope reports whether a kind and namespace belong to the requested output scope.

func (Request) RestrictedPackageLookup added in v0.8.1

func (s Request) RestrictedPackageLookup() bool

RestrictedPackageLookup reports whether a render request limits names or namespaces.

type Result

type Result struct {
	LookupMatched bool
	LookupFailed  bool
	// Subjects maps raw identities to captured display context.
	Subjects        map[manifest.NamedResource]manifest.DiagnosticIdentity
	Manifests       []manifest.DocumentBatch
	Failed          map[manifest.NamedResource]store.StatusInfo
	Blocked         map[manifest.NamedResource][]manifest.NamedResource
	Warnings        []manifest.Warning
	ClusterWarnings []manifest.Warning
	// Objects contains selected roots after metadata filtering, grouped by requested kind.
	// Unchanged catalog-only roots expose reporting facts, never complete specs or execution authority.
	Objects []manifest.BaseManifest
	// Counts records matched roots per requested kind before label filtering.
	Counts map[string]int
	// Statuses contains roster statuses and eligible diagnostic failures. Blocked
	// messages are prepared for test reports without changing dependency identity.
	Statuses map[manifest.NamedResource]store.StatusInfo
	// ChartVersions contains versions resolved from selected HR chartRef sources.
	ChartVersions map[manifest.NamedResource]string
	// Causes maps prepared failure roots to sorted distinct blocked victims.
	// Missing roots have no Failed entry; closed cycle roots carry prepared Failed messages.
	Causes map[manifest.NamedResource][]manifest.NamedResource
	// Unavailable contains canonical failure, soft-skip or suspension evidence for
	// paired producer output, independently of fatal namespace scope.
	Unavailable map[manifest.NamedResource]store.StatusInfo
	Bindings    store.ProducerBindings
	// Unrelated contains prepared advisories for failures outside named fatal scope.
	Unrelated []manifest.Warning
	// External contains paired external-source skip disclosures, honoring explicit namespace scope.
	External         []manifest.Warning
	DocumentMetadata map[int]map[int]DocumentMetadata
}

Result contains the objects and diagnostics projected onto requested roots. Borrowed manifests and document batches MUST remain immutable in use.

func (*Result) BlockedCount

func (r *Result) BlockedCount() int

BlockedCount excludes dependency-cycle roots promoted to primary failures.

func (*Result) Diagnostic

Diagnostic returns prepared display context, including ordinary absent objects.

type RootCoveringOwner

type RootCoveringOwner struct {
	Identity     manifest.NamedResource
	Object       manifest.BaseManifest
	Productions  []manifest.Production
	Source       manifest.NamedResource
	Path         string
	Root         string
	Applications map[manifest.NamedResource]manifest.DiscoveryRecord
	Replaced     bool
	Output       *store.Emission
	Input        *store.SourceArtifact
	// contains filtered or unexported fields
}

RootCoveringOwner borrows producer ancestry and captured output authority.

type RootEligibility

type RootEligibility uint8

RootEligibility MUST preserve its order because propagation only raises eligibility.

const (
	RootUnknown RootEligibility = iota
	RootInactive
	RootEligible
	RootIndependent
)

Static reduction MUST start at RootUnknown for each construction generation.

type RootEvidence

type RootEvidence struct {
	Native            *NativeRootFacts
	Identity          manifest.NamedResource
	Record            RootRecord
	StaticRecord      *RootRecord
	Occurrence        OccurrenceFacts
	Scope             RootScopeFacts
	InitialScope      *RootScopeFacts
	InitialOccurrence *OccurrenceFacts
	Productions       []manifest.Production
	LiveProductions   []manifest.Production
	Declaration       manifest.BaseManifest
	Sources           [2]RootSourceSupport
	CoveringOwners    []RootCoveringOwner
	Supplied          bool
	Incoming          bool
	Needed            bool
	StaticOwner       bool
	DeclarationSource string
	Captured          bool
	Stale             bool
	PreparedRoot      string
	EntryScope        *EntryScope
	BuiltChild        store.Child
	BuiltCurrent      bool
}

RootEvidence combines immutable discovery facts with captured current support.

func CaptureRoot added in v0.8.1

func CaptureRoot(facts RootEvidence, objects rootReader, index *manifest.DiscoveryIndex) RootEvidence

CaptureRoot MUST borrow immutable discovery and production facts.

type RootOwnerFacts

type RootOwnerFacts struct {
	Identity manifest.NamedResource
	Path     string
	Indexed  bool
	Initial  bool
}

RootOwnerFacts borrows a scope owner's indexed path.

type RootRecord

type RootRecord struct {
	Builder      string
	Authored     manifest.NamedResource
	Path         string
	Parent       manifest.NamedResource
	BuilderOwner manifest.NamedResource
}

RootRecord retains only the coordinates used for root classification and support.

func RootRecordFrom

func RootRecordFrom(record *manifest.DiscoveryRecord) RootRecord

RootRecordFrom excludes declaration payloads from retained root evidence.

type RootResult

type RootResult struct {
	NeedsOwnerSupport  bool
	Construction       bool
	InitialAdmitted    bool
	InitialIndependent bool
	InitialEntry       bool
	Owner              manifest.NamedResource
	Occurrence         OccurrenceFacts
	Admitted           bool
	Independent        bool
	Entry              bool
	PackageRoot        bool
}

RootResult keeps physical availability, independent membership and entry qualification distinct.

func Root

func Root(facts RootEvidence) RootResult

Root decides membership and qualification from one immutable factual snapshot.

type RootScopeFacts

type RootScopeFacts struct {
	Path              string
	Eligibility       RootEligibility
	Owners            []RootOwnerFacts
	Peers             [][]manifest.NamedResource
	Records           map[manifest.NamedResource]manifest.DiscoveryRecord
	Claims            map[string][]manifest.NamedResource
	Claim             string
	ApplicationSource manifest.NamedResource
	ApplicationPath   string
	Loaded            bool
	Bootstrap         bool
	Initial           bool
	Terminal          bool
	NamespaceEligible bool
	NativeOperand     bool
	NativeEntry       bool
	EntryKustomize    bool
	OutsideInventory  bool
	Application       bool
	LocalApplication  bool
	InputApplication  bool
	SameEntryOrigin   bool
	Prepared          bool
	Candidate         bool
	Compact           bool
	PackageKnown      bool
	PackagePaths      []string
	PackageOwners     [][]int
	PackageIndex      int
	PackageRoot       bool
	PackageEligible   bool
	PackageRunnable   bool
	NativePackage     bool
}

RootScopeFacts borrows physical scope relationships without membership verdicts.

func (*RootScopeFacts) OutsideInventorySource added in v0.8.1

func (s *RootScopeFacts) OutsideInventorySource(id manifest.NamedResource) bool

OutsideInventorySource excludes checkout sources already handled by bootstrap.

type RootSourceSupport

type RootSourceSupport struct {
	Source    manifest.NamedResource
	Allowed   bool
	Available bool
	Path      string
	Origin    string
}

RootSourceSupport captures authority from one source generation.

type Session

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

Session publishes immutable decisions from guarded admission proposals.

func New

func New(st *store.Store, facts census, request Request) (*Session, error)

New MUST retain an admission session for every request.

func (*Session) Admit

func (s *Session) Admit(ctx context.Context, options AdmissionOptions) (AdmissionResult, bool, error)

Admit MUST capture accepted observations before retiring the proposal.

func (*Session) BindKustomizeInputs added in v0.8.1

func (s *Session) BindKustomizeInputs(
	read func(context.Context, manifest.NamedResource, manifest.BaseManifest, *SourceFacts) ([2]SourceReadPaths, bool),
)

BindKustomizeInputs MUST run at a quiescent construction boundary.

func (*Session) ComparesDeclarations

func (s *Session) ComparesDeclarations() bool

ComparesDeclarations MUST follow the immutable invocation request.

func (*Session) DeferEntryComparison added in v0.8.1

func (s *Session) DeferEntryComparison()

DeferEntryComparison MUST precede dispatch of both trees.

func (*Session) DiscardConstruction

func (s *Session) DiscardConstruction()

DiscardConstruction ends an aborted invocation without changing accepted execution membership.

func (*Session) EntryComparisonPending added in v0.8.1

func (s *Session) EntryComparisonPending() bool

EntryComparisonPending reports whether root outputs are still being collected.

func (*Session) EntryFailure

func (s *Session) EntryFailure(ctx context.Context, failures iter.Seq[EntryFailure]) error

EntryFailure selects failures under the invocation's roots and qualified comparison.

func (*Session) EntryReplay added in v0.8.1

func (s *Session) EntryReplay(id manifest.NamedResource) bool

EntryReplay reports a producer needed to restore a validated entry route.

func (*Session) Include

func (s *Session) Include(id manifest.NamedResource, incoming ...manifest.BaseManifest)

Include MUST precede an execution's capture of a newly arrived identity.

func (*Session) PendingRoots

func (s *Session) PendingRoots() *store.ReadSet

PendingRoots returns a captured acquisition frontier; the caller MUST retire it after admission.

func (*Session) Prepare

func (l *Session) Prepare(
	ctx context.Context,
	request PrepareRequest,
) (*Admission, error)

Prepare computes the local declaration and input closure without publishing membership or objects. History is invocation-local borrowed evidence; complete inventories replace only their owner's support.

func (*Session) PublishEntry

func (s *Session) PublishEntry(route *EntryRoute)

PublishEntry MUST receive a completed immutable route from the entry qualification owner.

func (*Session) QualifiedEntryReach added in v0.8.1

func (s *Session) QualifiedEntryReach(id manifest.NamedResource) func([]manifest.BaseManifest) bool

QualifiedEntryReach borrows the evidence for the current qualification candidate.

func (*Session) RefreshProducers

func (s *Session) RefreshProducers(
	ctx context.Context,
	previous *AdmissionResult,
	request PrepareRequest,
) (*Admission, error)

RefreshProducers MUST recheck the exact pending production after its native prerequisite changes. The caller retains its logical Preparation and retires the result after consuming its demands.

func (*Session) RequestsNamedRoot added in v0.8.1

func (s *Session) RequestsNamedRoot(id manifest.NamedResource) bool

RequestsNamedRoot requires an explicit name in the invocation request.

func (*Session) ResolveEntryComparison added in v0.8.1

func (s *Session) ResolveEntryComparison(compared bool)

ResolveEntryComparison MUST run after every render task in the pair drains.

func (*Session) SetOrderingComparison added in v0.8.1

func (s *Session) SetOrderingComparison(owners []manifest.NamedResource)

SetOrderingComparison MUST precede the next construction or execution round.

func (*Session) Snapshot

func (s *Session) Snapshot() *Decision

Snapshot permits nil sessions and returns an immutable decision.

type Snapshot

type Snapshot struct {
	Store            *store.Store
	Index            *manifest.DiscoveryIndex
	Facts            projectionFacts
	EntryScopes      *EntryScopes
	Decision         *Decision
	RestrictedLookup bool
	Entry            EntryIdentity
	Emissions        []EmissionFacts
	Manifests        []manifest.DocumentBatch

	Failed           map[manifest.NamedResource]store.StatusInfo
	LookupFailures   []manifest.NamedResource
	LookupEvidence   []LookupFailure
	Blocked          map[manifest.NamedResource][]manifest.NamedResource
	Warnings         []manifest.Warning
	ClusterWarnings  []manifest.Warning
	ChangeNamespaces []string
	Err              error
	ErrorIdentity    error
	Complete         bool
	HasResult        bool
	Absent           bool
	// contains filtered or unexported fields
}

Snapshot borrows completed storage. Its owners MUST remain immutable through projection.

func (*Snapshot) CollectEmissions

func (s *Snapshot) CollectEmissions(other *Snapshot)

CollectEmissions applies committed membership without mutating the captured emission facts.

func (*Snapshot) Predictions

Predictions retains diagnostic membership without admitting declarations for execution.

func (*Snapshot) ReportCounts

func (s *Snapshot) ReportCounts(request Request) map[string]int

ReportCounts requires unchanged-parent evidence before counting unpublished declarations.

func (*Snapshot) UnchangedDeclarations

func (s *Snapshot) UnchangedDeclarations(request Request) iter.Seq[manifest.BaseManifest]

UnchangedDeclarations MUST retain current parent authority throughout iteration.

type SourceContext

type SourceContext struct {
	Root                       string
	Roots                      []NativeRootFacts
	InputReaders, InputObjects map[manifest.NamedResource][]manifest.NamedResource
	TransformingProducers      []manifest.NamedResource
	TemplateProjections        map[manifest.NamedResource]manifest.TemplateProjection
	EntryPath                  string
	NativeEntry                bool
	PlainEntry                 bool
	Frozen                     bool
	SideKnown                  bool
	Side                       manifest.TreeSide
}

SourceContext borrows construction facts shared by one preparation.

type SourceFacts

type SourceFacts struct {
	Comparison           *change.Set
	Context              SourceContext
	EntryScopes          *atomic.Pointer[EntryScopes]
	Source               manifest.NamedResource
	Changes, Delta       *change.Set
	Snapshots            [2]*store.SourceArtifact
	Declarations         [2]manifest.BaseManifest
	Declaration          manifest.BaseManifest
	Input, Initial       *store.SourceArtifact
	ConfiguredInput      *store.SourceArtifact
	Origin               string
	Path                 string
	Files                []SourceFile
	Paired, InitialKnown bool
	Pinned, External     bool
	PendingGeneration    bool
	Derived              bool
	// CurrentSnapshot qualifies material and the declaration against the active side.
	CurrentSnapshot bool
}

SourceFacts borrows the source owner's immutable qualified comparison.

type SourceFile

type SourceFile struct {
	Path    string
	Indexed string
}

SourceFile preserves both source-relative and census-relative coordinates.

type SourceReadPaths added in v0.8.1

type SourceReadPaths struct {
	Files []string
	Roots []string
}

SourceReadPaths distinguishes exact files from subtrees.

type StaticContribution

type StaticContribution struct {
	Owner, Source            manifest.NamedResource
	ClaimSource              manifest.NamedResource
	Visits                   int
	Unshared, MembershipOnly bool
}

StaticContribution retains source identity even when owners share physical visits.

type StaticFile

type StaticFile struct {
	Eligibility  RootEligibility
	Loaded       bool
	ObjectsKnown bool
	HasObjects   bool
}

StaticFile borrows presence facts; it MUST NOT retain or expose parsed document objects.

type StaticTraversal

type StaticTraversal struct {
	Reached    RootEligibility
	Controlled bool
}

StaticTraversal contains only mutable reduction results, never physical visits.

type StaticVisit

type StaticVisit struct {
	File, LocalFile, Origin, Dir string
	Resource                     bool
}

StaticVisit coordinates MUST stay in the original source view.

Jump to

Keyboard shortcuts

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