Documentation
¶
Overview ¶
Package coordination is the multi-repository coordination core (v4 design MR1–MR17): one confirmed change across exactly two public repositories, each child under its own repository's authority. It holds the neutral data contracts, the execute gate, the plan's strict decoding and deterministic validation, its canonical hash and child fingerprints, and the fixed materiality table (MR12); the planner tool and the controllers come later, switched off by default.
Index ¶
- Constants
- Variables
- func AcceptVersion(cs *v1alpha1.CoordinationStatus, next v1alpha1.CoordinationPlan, m Materiality)
- func Allocated(p v1alpha1.CoordinationPlan) (int64, bool)
- func AllocationLeft(t *v1alpha1.Task) int64
- func AllocationSpent(t *v1alpha1.Task) int64
- func AuthorizationsFor(next v1alpha1.CoordinationPlan, previous []v1alpha1.ChildAuthorization, ...) []v1alpha1.ChildAuthorization
- func Canonical(p v1alpha1.CoordinationPlan) ([]byte, error)
- func CanonicalManifest(m IntegrationManifest) ([]byte, error)
- func CheckConfirmation(planHash, childFingerprint string, c CoordinationConfirmation) error
- func ChildFingerprint(p v1alpha1.CoordinationPlan, childID string) string
- func ChildTask(ns string, cfg *config.Config, parent *v1alpha1.Task, ...) *v1alpha1.Task
- func ChildTasks(ctx context.Context, c client.Reader, ns, parent string) ([]v1alpha1.Task, error)
- func Complete(cs *v1alpha1.CoordinationStatus) bool
- func ConsumedArtifacts(c v1alpha1.CoordinationChild, landed []v1alpha1.LandedArtifact) ([]v1alpha1.LandedArtifact, bool)
- func DecodePlan(r io.Reader) (v1alpha1.CoordinationPlan, error)
- func GateExecute(ctx context.Context, mode string, p ExecutionPrerequisites, ...) error
- func IntegrationAttemptAllowed(cs *v1alpha1.CoordinationStatus) error
- func IntegrationBudget(p v1alpha1.CoordinationPlan) v1alpha1.Budget
- func IntegrationTask(ns string, cfg *config.Config, parent *v1alpha1.Task, m IntegrationManifest, ...) *v1alpha1.Task
- func LandedRef(landed []v1alpha1.LandedArtifact, from, name string) (v1alpha1.LandedArtifact, bool)
- func LifetimeSpent(tasks []v1alpha1.Task, id string) int64
- func LimitAllocation(t *v1alpha1.Task, left int64)
- func MaintainerLogin(c v1alpha1.CoordinationChild) string
- func ManifestHash(m IntegrationManifest) string
- func Pending(cs *v1alpha1.CoordinationStatus, id string) *v1alpha1.PendingGeneration
- func PlanChild(cs *v1alpha1.CoordinationStatus, id string) (v1alpha1.CoordinationChild, bool)
- func PlanHash(p v1alpha1.CoordinationPlan) string
- func PrimaryChild(cs *v1alpha1.CoordinationStatus) string
- func ProducedSpec(p v1alpha1.CoordinationChild, name string) (v1alpha1.ArtifactSpec, bool)
- func ProposeRecovery(parent *v1alpha1.Task, children []v1alpha1.Task, integrations []v1alpha1.Task, ...) *v1alpha1.RecoveryProposal
- func ReadyForExecute(ctx context.Context, p ExecutionPrerequisites, repositories []string) error
- func Reason(err error) string
- func ReasonOf(err error) string
- func SameRecovery(a, b *v1alpha1.RecoveryProposal) bool
- func Validate(ctx context.Context, p v1alpha1.CoordinationPlan, mode Mode, ...) (v1alpha1.CoordinationPlan, error)
- func ValidateManifest(m IntegrationManifest, cs *v1alpha1.CoordinationStatus) error
- func ValidateWithIncrease(ctx context.Context, p v1alpha1.CoordinationPlan, mode Mode, ...) (v1alpha1.CoordinationPlan, error)
- func VerifyArtifact(ctx context.Context, fx ArtifactReader, child v1alpha1.CoordinationChild, ...) (v1alpha1.LandedArtifact, error)
- type Actor
- type ArtifactReader
- type CheckForge
- type CheckoutChild
- type CheckoutManifest
- type ChildAuthorization
- type ClassAuthority
- type ComposeInput
- type CoordinationBudgetView
- type CoordinationChildView
- type CoordinationConfirmation
- type CoordinationDraft
- type CoordinationIncident
- type CoordinationView
- type Diagnostic
- type DraftArtifact
- type DraftChild
- type DraftIntegration
- type DraftScope
- type ExecutionPrerequisites
- type GitHubChecks
- type IntegrationAttemptView
- type IntegrationManifest
- func BeforeDependentManifest(parent string, cs *v1alpha1.CoordinationStatus, dependent, head string, ...) (IntegrationManifest, error)
- func FinalManifest(parent string, cs *v1alpha1.CoordinationStatus, merges map[string]string) (IntegrationManifest, error)
- func ManifestOf(t *v1alpha1.Task, cs *v1alpha1.CoordinationStatus) (IntegrationManifest, error)
- type IssueForge
- type LedgerUsage
- type Materiality
- type Metrics
- type Mode
- type ParentConfirmation
- type PlanAttempt
- type PlanError
- type PlanningReconciliation
- type Prerequisites
- type RepositoryChecks
- type RepositoryPolicy
- type ResolvePolicy
- type RunUsage
- type Service
- func (s *Service) Confirm(ctx context.Context, actor Actor, in CoordinationConfirmation) (CoordinationConfirmation, error)
- func (s *Service) Draft(ctx context.Context, actor Actor, p v1alpha1.CoordinationPlan, hash string, ...) (CoordinationConfirmation, error)
- func (s *Service) ExecuteReady(ctx context.Context, cfg *config.Config, cs *v1alpha1.CoordinationStatus, ...) error
- func (s *Service) File(ctx context.Context, cfg *config.Config, parentTask string) error
- func (s *Service) Recover(ctx context.Context, actor Actor, parentTask, code string, planVersion int32) error
- func (s *Service) RecoveryRepository(ctx context.Context, parentTask string) (string, error)
Constants ¶
const ( // ReasonAwaitingConfirmation is a draft missing the parent's confirmation or a child's // authorization of the current plan. ReasonAwaitingConfirmation = "awaiting_confirmation" // ReasonConfirmed is every confirmation of the current plan present under plan mode: nothing // files. ReasonConfirmed = "confirmed" // ReasonFilingEligible is every confirmation present under execute, with the prerequisites and // every repository check passing at that moment. ReasonFilingEligible = "filing_eligible" )
The parent's bounded reasons while it is Coordinating (MR2).
const ( // ReasonFilingIncomplete is a filing that has started and not finished: visibly linked issues // may exist, and no child Task starts until every marker is durable. ReasonFilingIncomplete = "filing_incomplete" // ReasonFiled is every issue filed and recorded: the parent may admit its children. ReasonFiled = "filed" )
The parent's filing reasons (v4 Issues and confirmations).
const ( PurposeBeforeDependentMerge = "beforeDependentMerge" PurposeFinal = "final" ResultPending = "pending" ResultPassed = "passed" ResultFailed = "failed" )
The integration purposes and result states (MR10), as the CRD enumerates them.
const ( RecoveryRetryChild = "retry_child" RecoveryResumeChild = "resume_child" RecoveryRevisePlan = "revise_plan" RecoveryIncreaseBudget = "increase_budget" RecoveryRetryProducer = "retry_producer" RecoveryRetryDependent = "retry_dependent" RecoveryRetryIntegration = "retry_integration" RecoveryRerunIntegration = "rerun_integration" RecoveryAuthorizeChild = "authorize_child" )
The recovery codes (MR11): status.coordination.recovery names exactly one.
const DiagnosticMaintainerProposed = "maintainer_proposed"
DiagnosticMaintainerProposed marks a child whose maintainer is the requester only as a proposal: that child's own linked maintainer authorizes it separately (MR5).
const MaxArtifactBytes = 65536
MaxArtifactBytes is the initial file artifact bound (MR7): 64 KiB.
const MaxBudgetMicroUSD = 1_000_000_000
MaxBudgetMicroUSD is the CRD's bound on any one amount, and so on the family total that every allocation sums under.
const MaxPlanBytes = 64 << 10
MaxPlanBytes bounds a plan document before it is parsed: two bounded children, their scopes and the integration acceptance fit well inside it.
const ReasonGenerationPending = "generation_pending"
ReasonGenerationPending is an affected child's entry after a material edit (MR8, MR12): its old generation is stopping and no replacement starts until that generation has drained and the new version's confirmations exist.
const ReasonPrerequisites = "coordination_prerequisites"
ReasonPrerequisites is the bounded reason an execute-time admission refused for missing or regressed capabilities (MR16). plan stays available.
const SystemPrompt = `` /* 1921-byte string literal not displayed */
SystemPrompt asks the governed route for one CoordinationDraft and nothing else (MR4, CD18). The reply is decoded with unknown fields refused, so a reply naming roles, money, a tier or a maintainer is refused whole: config and people own those (CD17), never the model.
Variables ¶
var ( // ErrAllocationBelowSpend is an edit reducing a child's allocation below what its Task has // settled plus what its live run still holds. ErrAllocationBelowSpend = errors.New("allocation_below_spend") // ErrIntegrationRunsExhausted is an integration attempt past integration.maxRuns. ErrIntegrationRunsExhausted = errors.New("integration_runs_exhausted") )
The fixed-allocation refusals (MR8).
var ( // ErrRepositoryNotAllowed is a repository the factory config does not list. ErrRepositoryNotAllowed = errors.New("repository_not_allowed") // ErrPrivateRepository is a private repository: a family is public only in this release. ErrPrivateRepository = errors.New("private_repository_unsupported") // ErrRepositoryPermission is an actor who is not that repository's configured maintainer with // current GitHub write, or who has no linked GitHub login. ErrRepositoryPermission = errors.New("repository_permission") // ErrAccessUnverified is a permission or fence read that failed: no answer, never a guess. ErrAccessUnverified = errors.New("access_unverified") // ErrRepositoryNotOwned is a fence that names another factory, or none. ErrRepositoryNotOwned = errors.New("repository_not_owned") ErrAppUnavailable = errors.New("app_unavailable") // ErrClassNotAllowed is a class the repository does not allow under the central guardrails. ErrClassNotAllowed = errors.New("class_not_allowed") // ErrPolicyChanged is a fence that differs from the one the child's maintainer authorized at. ErrPolicyChanged = errors.New("policy_changed") )
The bounded reasons a repository check refuses (MR5, MR6, MR16). Each is checked fresh, at its own repository through its own App connection, at confirmation, filing, admission and resume: a cached success never admits anything.
var ( // ErrCoordinationOff is any coordination call while the switch is off. ErrCoordinationOff = errors.New("coordination_off") // ErrParentConflict is a draft id naming a Task that is not a coordination parent. ErrParentConflict = errors.New("coordination_parent_conflict") // ErrParentNotFound is a confirmation of a plan no draft holds. ErrParentNotFound = errors.New("coordination_not_found") // ErrParentTerminal is a draft or a confirmation of a parent that has ended. ErrParentTerminal = errors.New("coordination_parent_terminal") // ErrPlanningBudgetExhausted is planning reserved plus settled above planningMicroUSD (MR8). ErrPlanningBudgetExhausted = errors.New("planning_budget_exhausted") )
The service's own refusals, beside the plan's and the repository checks'.
var ( // ErrIntegrationManifest is a manifest that does not name its inputs exactly: a subject with // both or neither SHA, a wrong repository, a missing dependency merge or artifact, or another // plan's acceptance. ErrIntegrationManifest = errors.New("integration_manifest_invalid") // ErrIntegrationStale is an integration Task whose manifest its parent no longer holds: the // plan was replaced, or a recorded artifact is gone. It never runs. ErrIntegrationStale = errors.New("integration_stale") )
var ( // ErrInvalidPlan is a shape or bound the typed plan breaks (MR12): an unknown field, a second // document, a duplicate id or repository, a third child, a non-file or oversize artifact. ErrInvalidPlan = errors.New("invalid_plan") // ErrInvalidDependency is a dependency that is not one backward edge carried by a produced and // consumed artifact (MR7): forward, cyclic, multiple or without its artifact. ErrInvalidDependency = errors.New("invalid_dependency") // ErrIncompletePlan is an execute-mode plan without exactly two children (MR1). ErrIncompletePlan = errors.New("incomplete_plan") // ErrPolicyUnresolved is a ResolvePolicy failure; the resolver's own error stays in the chain. ErrPolicyUnresolved = errors.New("policy_unresolved") // ErrUnknownClass is what a ResolvePolicy returns for a class the repository does not allow. ErrUnknownClass = errors.New("unknown_class") // ErrPolicyMismatch is a resolved policy for another repository, class or tier than asked. ErrPolicyMismatch = errors.New("policy_mismatch") // ErrRolesMismatch is a role list other than the resolved class harness, in its order. ErrRolesMismatch = errors.New("roles_mismatch") // ErrAllocationBelowRun is a child allocation that cannot pay for one run at its tier. ErrAllocationBelowRun = errors.New("allocation_below_run") // ErrAllocationAboveCeiling is a child allocation above its task ceiling without an explicit // increase (ValidateWithIncrease). ErrAllocationAboveCeiling = errors.New("allocation_above_ceiling") // ErrBudgetOverflow is a budget sum that overflows int64. ErrBudgetOverflow = errors.New("budget_overflow") // ErrBudgetExceeded is planning + children + integration above budget.totalMicroUSD (MR8). ErrBudgetExceeded = errors.New("budget_exceeded") // ErrStalePlan is a confirmation of a plan hash or child fingerprint that is no longer current. ErrStalePlan = errors.New("stale_plan") // ErrPlanVersion is an edit that is not the same plan at exactly the next version. ErrPlanVersion = errors.New("plan_version") // ErrPrimaryRequiresNewParent is an edit of the primary repository: a new parent, not an edit. ErrPrimaryRequiresNewParent = errors.New("primary_requires_new_parent") // ErrInvalidConfirmation is a confirmation naming neither, or both, a parent and a child. ErrInvalidConfirmation = errors.New("invalid_confirmation") // ErrPlanningCostUnverified is a planning attempt carrying a reservation or settlement // identifier without its amount: a cost nobody can reconcile against planningMicroUSD. ErrPlanningCostUnverified = errors.New("planning_cost_unverified") )
The bounded reasons a plan, an edit or a confirmation is refused. Each is a sentinel callers branch on with errors.Is; a *PlanError carries it with the offending field.
var ( // ErrRecoveryNotProposed is a recovery call naming a code the parent does not propose now. ErrRecoveryNotProposed = errors.New("recovery_not_proposed") // ErrPlanRevisionRequired is revise_plan or increase_budget through the recovery route: both // are a new plan version and its confirmations, never an action the parent takes (MR11). ErrPlanRevisionRequired = errors.New("plan_revision_required") )
The recovery refusals.
var ErrArtifactUnverified = errors.New("artifact_unverified")
ErrArtifactUnverified is a producer's artifact that is not the exact declared file at its landed merge commit: missing, not a file, the wrong path, size or digest. No reference is recorded and its dependent is not admitted (MR7, Review Focus 3).
var ErrNotExecuting = errors.New("coordination_not_executing")
ErrNotExecuting is GateExecute's refusal under off or plan: nothing is filed and nothing runs.
var ErrPrerequisites = errors.New(ReasonPrerequisites)
ErrPrerequisites is the refusal ReadyForExecute wraps; callers branch on it with errors.Is.
Functions ¶
func AcceptVersion ¶ added in v0.39.0
func AcceptVersion(cs *v1alpha1.CoordinationStatus, next v1alpha1.CoordinationPlan, m Materiality)
AcceptVersion applies an accepted version next to cs, a parent's status already holding next as its plan: every release an affected child or a changed integration rested on is dropped at once; each child whose fingerprint changed and has a Task gets one PendingGeneration naming that Task as stopping, and its entry generation_pending; a child with no Task yet takes the new fingerprint, so its first admission is under next. An unaffected child keeps its Task, entry and fingerprint. Nothing is replaced in place: the reconciler stops the old Task and creates CoordinationChildKey(..., version, generation+1) only once the old one drained.
func Allocated ¶ added in v0.39.0
func Allocated(p v1alpha1.CoordinationPlan) (int64, bool)
Allocated is p's static allocations, checked: planning + every child + maxRuns × runMicroUSD. ok is false on overflow; Validate refuses such a plan, and the sum within the total.
func AllocationLeft ¶ added in v0.39.0
AllocationLeft is what t's own lifetime allocation (spec.budget.taskMicroUSD, a child's confirmed budgetMicroUSD) still holds after its spend and the next run's whole reservation: negative when the next run does not fit (MR8). It reads t alone, so no sibling's unspent allocation is ever borrowed.
func AllocationSpent ¶ added in v0.39.0
AllocationSpent is what t's runs hold of its lifetime allocation: each ended run's priced cost, an unpriced one's tokens at the reference rate (never $0), and a live run's whole reservation, which the meter may still spend.
func AuthorizationsFor ¶
func AuthorizationsFor(next v1alpha1.CoordinationPlan, previous []v1alpha1.ChildAuthorization, m Materiality) []v1alpha1.ChildAuthorization
AuthorizationsFor is the previous child authorizations that survive into next under m: a child still in next, at the same repository, not in m.Reauthorize, and at the fingerprint next gives it. Nothing survives a new parent. Each kept record is unchanged, still naming the version its maintainer authorized.
func Canonical ¶
func Canonical(p v1alpha1.CoordinationPlan) ([]byte, error)
Canonical is the plan's canonical JSON (MR12): compact, object keys sorted, HTML unescaped, children sorted by id, artifacts by name, dependency and consumer edges sorted; scope.plan, the role list and mergeOrder keep their order because their order is meaning. A null, an empty list and an absent field are the same bytes, and a nil beforeDependents is its default, true. It covers only typed fields: a plan has no timestamp, diagnostic or comment to leak in. p is not modified.
func CanonicalManifest ¶ added in v0.39.0
func CanonicalManifest(m IntegrationManifest) ([]byte, error)
CanonicalManifest is m's canonical JSON: subjects sorted by child, artifacts by child and name, acceptance in its confirmed order, object keys sorted, as Canonical does for a plan.
func CheckConfirmation ¶
func CheckConfirmation(planHash, childFingerprint string, c CoordinationConfirmation) error
CheckConfirmation refuses with ErrStalePlan a confirmation of anything but the current plan: its plan must hash to planHash, and a parent confirmation must name planHash, a child authorization childFingerprint. It reads c only, so a stale confirmation changes nothing. One naming neither or both is ErrInvalidConfirmation.
func ChildFingerprint ¶
func ChildFingerprint(p v1alpha1.CoordinationPlan, childID string) string
ChildFingerprint is what childID's maintainer authorizes (MR5, MR12): the family id, the child's repository, maintainer, scope, class, tier, roles, allocation, produced and consumed artifacts (with the consumed artifact's own spec), dependencies and merge position. Rationales, the title, the version and the family-level integration and budget are outside it: they move no child's authority. An absent child has no fingerprint, "".
func ChildTask ¶ added in v0.39.0
func ChildTask(ns string, cfg *config.Config, parent *v1alpha1.Task, c v1alpha1.CoordinationChild, issue int, gen int32) *v1alpha1.Task
ChildTask is generation gen of child c of parent, filed as issue: an ordinary issue Task in c's own repository with the confirmed plan's frozen scope, class, template and allocation, requested by c's authorizer and hashed to the confirmed plan (v4 MR2, MR5). It carries LabelCoordinationParent and spec.coordinationParent, never the splitter's lineage, so it runs no C7, scoper or split. Its name is the key's, so a replay creates nothing twice.
func ChildTasks ¶ added in v0.39.0
ChildTasks is every generation's Task of parent: its implementation children, never an integration Task.
func Complete ¶ added in v0.39.0
func Complete(cs *v1alpha1.CoordinationStatus) bool
Complete is whether cs's current plan has its parent's confirmation and every child's authorization at its current fingerprint.
func ConsumedArtifacts ¶ added in v0.39.0
func ConsumedArtifacts(c v1alpha1.CoordinationChild, landed []v1alpha1.LandedArtifact) ([]v1alpha1.LandedArtifact, bool)
ConsumedArtifacts is c's required consumes, each as recorded in landed; ok is false while any is not yet landed. An optional consume is not handed over in this release (MR7: required edges alone gate admission).
func DecodePlan ¶
func DecodePlan(r io.Reader) (v1alpha1.CoordinationPlan, error)
DecodePlan reads one plan document, YAML or JSON, bounded by MaxPlanBytes. It refuses a second document, a duplicate key and an unknown field anywhere: a plan must never read differently from what its author sees. It checks no invariant; that is Validate's.
func GateExecute ¶
func GateExecute(ctx context.Context, mode string, p ExecutionPrerequisites, repositories []string) error
GateExecute is the execute gate by mode: off and plan refuse with ErrNotExecuting without consulting p; execute is ReadyForExecute.
func IntegrationAttemptAllowed ¶ added in v0.39.0
func IntegrationAttemptAllowed(cs *v1alpha1.CoordinationStatus) error
IntegrationAttemptAllowed refuses an integration attempt past the plan's maxRuns: a failed attempt still consumes one.
func IntegrationBudget ¶ added in v0.39.0
func IntegrationBudget(p v1alpha1.CoordinationPlan) v1alpha1.Budget
IntegrationBudget is one integration attempt's caps: a single run of integration.runMicroUSD, which is also the attempt's whole task cap, so a retry is a new attempt counted against maxRuns.
func IntegrationTask ¶ added in v0.39.0
func IntegrationTask(ns string, cfg *config.Config, parent *v1alpha1.Task, m IntegrationManifest, attempt int) *v1alpha1.Task
IntegrationTask is attempt n of manifest m under parent (MR2, MR10, MR17): a read-only Task in the primary repository, requested by the parent's confirmer and hashed to the confirmed plan, with one attempt's fixed cap, the primary child's tier, no issue, template, scope or branch, and its own Room under its own name, never the parent's. Its name is its key's.
func LandedRef ¶ added in v0.39.0
func LandedRef(landed []v1alpha1.LandedArtifact, from, name string) (v1alpha1.LandedArtifact, bool)
LandedRef is producer from's artifact name among landed.
func LifetimeSpent ¶ added in v0.39.0
LifetimeSpent is what every generation of child id holds of its lifetime allocation (MR8): each generation's AllocationSpent, over tasks, a parent's children by LabelCoordinationParent.
func LimitAllocation ¶ added in v0.39.0
LimitAllocation caps replacement generation t at left, what its child's lifetime allocation still holds after every earlier generation (MR8), never below zero: queued then refuses a run that does not fit as allocation_exhausted, never borrowing a sibling's share.
func MaintainerLogin ¶ added in v0.39.0
func MaintainerLogin(c v1alpha1.CoordinationChild) string
MaintainerLogin is c's maintainer's GitHub login, without its github: prefix.
func ManifestHash ¶ added in v0.39.0
func ManifestHash(m IntegrationManifest) string
ManifestHash is the lowercase hex SHA-256 of CanonicalManifest(m).
func Pending ¶ added in v0.39.0
func Pending(cs *v1alpha1.CoordinationStatus, id string) *v1alpha1.PendingGeneration
Pending is child id's pending generation on cs, nil for none.
func PlanChild ¶ added in v0.39.0
func PlanChild(cs *v1alpha1.CoordinationStatus, id string) (v1alpha1.CoordinationChild, bool)
PlanChild is child id of cs's current plan.
func PlanHash ¶
func PlanHash(p v1alpha1.CoordinationPlan) string
PlanHash is the lowercase hex SHA-256 of Canonical(p): id, version, title, primary, every child, dependencies, integration and budget.
func PrimaryChild ¶ added in v0.39.0
func PrimaryChild(cs *v1alpha1.CoordinationStatus) string
PrimaryChild is the plan's child in its primary repository: the one whose execute authority an integration attempt re-reads.
func ProducedSpec ¶ added in v0.39.0
func ProducedSpec(p v1alpha1.CoordinationChild, name string) (v1alpha1.ArtifactSpec, bool)
ProducedSpec is producer p's declared artifact name.
func ProposeRecovery ¶ added in v0.39.0
func ProposeRecovery(parent *v1alpha1.Task, children []v1alpha1.Task, integrations []v1alpha1.Task, now time.Time) *v1alpha1.RecoveryProposal
ProposeRecovery is parent's one proposed next action (MR11), selected from persisted control state by the design's fixed table, never by a model: the first failed child in mergeOrder, then the newest integration attempt of the current plan, then budget. children are the parent's current child Tasks, integrations its integration Tasks. A child with a pending generation is already being replaced, and a superseded Task is no failure. A terminal parent proposes nothing: a later revert there is an incident. It never bundles a second action.
func ReadyForExecute ¶
func ReadyForExecute(ctx context.Context, p ExecutionPrerequisites, repositories []string) error
ReadyForExecute asks p about every repository, at every admission, and refuses with ErrPrerequisites on a false, an error, a nil port or no repository at all: nothing is cached, so a regression refuses the next admission.
func Reason ¶ added in v0.39.0
Reason is err's bounded reason code: a repository check's first, since a resolver failure carries one under policy_unresolved, then the service's, then the plan's; "" for none.
func SameRecovery ¶ added in v0.39.0
func SameRecovery(a, b *v1alpha1.RecoveryProposal) bool
SameRecovery is whether a and b propose the same action for the same reason under the same plan: a parent keeps its proposal's createdAt while it stands.
func Validate ¶
func Validate(ctx context.Context, p v1alpha1.CoordinationPlan, mode Mode, resolve ResolvePolicy) (v1alpha1.CoordinationPlan, error)
Validate checks p for mode and returns its fully resolved snapshot: each child's class, tier and roles as ResolvePolicy answers for that child's own repository, and beforeDependents defaulted true (MR4, MR12). It is deterministic, calls no model, and never modifies p. An allocation above a child's task ceiling is refused; ValidateWithIncrease is the one path that admits it.
func ValidateManifest ¶ added in v0.39.0
func ValidateManifest(m IntegrationManifest, cs *v1alpha1.CoordinationStatus) error
ValidateManifest proves m names its inputs exactly under cs's current plan: its plan hash and version, each subject a plan child at its own repository with exactly one 40-hex SHA, the purpose's subject set (a pre-dependent manifest: the dependent's head and each dependency's merge; a final one: every child's merge), the plan's acceptance and the recorded artifacts at the subjects' merges.
func ValidateWithIncrease ¶
func ValidateWithIncrease(ctx context.Context, p v1alpha1.CoordinationPlan, mode Mode, resolve ResolvePolicy, confirmed map[string]bool) (v1alpha1.CoordinationPlan, error)
ValidateWithIncrease is Validate admitting an allocation above the task ceiling for each child confirmed[childID] marks. It only records the proposal: execution still needs the parent's and that child maintainer's confirmations of the version carrying it (MR8).
func VerifyArtifact ¶ added in v0.39.0
func VerifyArtifact(ctx context.Context, fx ArtifactReader, child v1alpha1.CoordinationChild, spec v1alpha1.ArtifactSpec, mergeSHA string) (v1alpha1.LandedArtifact, error)
VerifyArtifact reads spec, produced by child, at child's landed merge commit mergeSHA through fx, the producer's own client, and answers its immutable reference (MR7). Only the file at that commit counts: a PR head, a newer default branch or a prose handoff never does. The bytes' git blob id and size must be the ones GitHub declared, the size within spec.MaxBytes and 64 KiB. Anything else is ErrArtifactUnverified with no reference; a failed read is a plain error to retry.
Types ¶
type Actor ¶ added in v0.39.0
Actor is who confirms or drafts: the authenticated principal and the GitHub login its token's ZITADEL link resolves to. It is resolved by the factory API from the token, never read from a request body.
type ArtifactReader ¶ added in v0.39.0
type ArtifactReader interface {
FileAtCommit(ctx context.Context, sha, path string) (forge.FileContent, bool, error)
}
ArtifactReader is the producer repository's own factory App client: the only one an artifact is read through, so no consumer credential ever touches it.
type CheckForge ¶ added in v0.39.0
type CheckForge interface {
RepositoryInfo(ctx context.Context) (forge.RepositoryInfo, error)
DefaultBranchFile(ctx context.Context, path string) (text, sha string, found bool, err error)
Permission(ctx context.Context, login string) (string, error)
}
CheckForge is the reads a repository check makes through that repository's own factory App connection, never the primary's: forge.GitHub implements it.
type CheckoutChild ¶
type CheckoutChild struct {
ID string `json:"id"`
Repository string `json:"repository"`
Worktree string `json:"worktree"`
Room string `json:"room"`
Issue string `json:"issue"`
PR string `json:"pr"`
DependsOn []string `json:"dependsOn"`
Artifacts []v1alpha1.LandedArtifact `json:"artifacts"`
HeadSHA string `json:"headSHA,omitempty"`
MergeCommitSHA string `json:"mergeCommitSHA,omitempty"`
}
CheckoutChild is one child's verified worktree in a checkout. Issue and PR are validated URLs, not numbers.
type CheckoutManifest ¶
type CheckoutManifest struct {
ParentTask string `json:"parentTask"`
PlanVersion int32 `json:"planVersion"`
PlanHash string `json:"planHash"`
Children []CheckoutChild `json:"children"`
}
CheckoutManifest is the parent checkout's contract (MR14): a declaration only, with no checkout behavior in this plan.
type ChildAuthorization ¶
type ChildAuthorization = v1alpha1.ChildAuthorization
ChildAuthorization is the CRD record itself: one representation only.
type ClassAuthority ¶ added in v0.40.0
type ClassAuthority interface {
Authoritative(ctx context.Context, repository string) (bool, error)
}
ClassAuthority answers whether repository's class policy is authoritative (merge policy self-service, stage 4): the first half of ExecutionPrerequisites. No production one exists yet.
type ComposeInput ¶
type ComposeInput struct {
ID string
Version int32
Primary string
Maintainer string
Tier string
Candidates []string
Resolve ResolvePolicy
Attempt PlanningReconciliation
}
ComposeInput is what deterministic code owns: the draft id and version, the person-chosen primary, the maintainer proposed for every child, the tier each child resolves at, the guard's candidates, the policy resolver and the attempt's reconciliation.
type CoordinationBudgetView ¶
type CoordinationBudgetView struct {
PlanningMicroUSD int64 `json:"planningMicroUSD"`
PlanningReservedMicroUSD int64 `json:"planningReservedMicroUSD"`
PlanningSettledMicroUSD int64 `json:"planningSettledMicroUSD"`
TotalMicroUSD int64 `json:"totalMicroUSD"`
AllocatedMicroUSD int64 `json:"allocatedMicroUSD"`
ChildrenReservedMicroUSD int64 `json:"childrenReservedMicroUSD"`
ChildrenSettledMicroUSD int64 `json:"childrenSettledMicroUSD"`
IntegrationReservedMicroUSD int64 `json:"integrationReservedMicroUSD"`
IntegrationSettledMicroUSD int64 `json:"integrationSettledMicroUSD"`
IntegrationMaxRuns int `json:"integrationMaxRuns"`
IntegrationRuns int `json:"integrationRuns"`
}
CoordinationBudgetView is the family's allocations beside their reserved and settled spend.
type CoordinationChildView ¶
type CoordinationChildView struct {
ID string `json:"id"`
Repository string `json:"repository"`
Task string `json:"task"`
Room string `json:"room"`
IssueURL string `json:"issueURL"`
PRURL string `json:"prURL,omitempty"`
Phase string `json:"phase"`
Reason string `json:"reason"`
Fingerprint string `json:"fingerprint"`
DependsOn []string `json:"dependsOn"`
Consumes []string `json:"consumes"`
HeadSHA string `json:"headSHA,omitempty"`
MergeCommitSHA string `json:"mergeCommitSHA,omitempty"`
AllocationMicroUSD int64 `json:"allocationMicroUSD"`
SettledMicroUSD int64 `json:"settledMicroUSD"`
ReservedMicroUSD int64 `json:"reservedMicroUSD"`
IntegrationAcceptedHead string `json:"integrationAcceptedHead,omitempty"`
IntegrationRelease *v1alpha1.IntegrationRelease `json:"integrationRelease,omitempty"`
}
CoordinationChildView is one child as a view shows it. DependsOn holds child ids; Consumes holds <from>/<artifact> ids.
type CoordinationConfirmation ¶
type CoordinationConfirmation struct {
Plan v1alpha1.CoordinationPlan `json:"plan"`
PlanHash string `json:"planHash"`
Parent *ParentConfirmation `json:"parent,omitempty"`
Child *ChildAuthorization `json:"child,omitempty"`
Planning PlanningReconciliation `json:"planning"`
}
CoordinationConfirmation is one confirmation request: the plan and hash it confirms, and either the parent's confirmation or one child's authorization (MR5).
type CoordinationDraft ¶
type CoordinationDraft struct {
Title string `json:"title"`
PrimaryRationale string `json:"primaryRationale"`
Children []DraftChild `json:"children"`
MergeOrder []string `json:"mergeOrder"`
Integration DraftIntegration `json:"integration"`
}
CoordinationDraft is the model's reply, strictly decoded: the coherent two-repository reading and nothing a config or a person owns. It has no id, version, primary, maintainer, tier, roles or amount: ComposeCoordination writes those deterministically.
type CoordinationIncident ¶
type CoordinationIncident = v1alpha1.CoordinationIncident //nolint:revive // the plan's contract name, imported as is
CoordinationIncident is the CRD record itself: a post-completion revert that never reopens Done.
type CoordinationView ¶
type CoordinationView struct {
ParentTask string `json:"parentTask"`
Phase string `json:"phase"`
Reason string `json:"reason"`
Plan v1alpha1.CoordinationPlan `json:"plan"`
PlanHash string `json:"planHash"`
ParentConfirmation *ParentConfirmation `json:"parentConfirmation,omitempty"`
ChildAuthorizations []ChildAuthorization `json:"childAuthorizations"`
Children []CoordinationChildView `json:"children"`
Artifacts []v1alpha1.LandedArtifact `json:"artifacts"`
IntegrationAttempts []IntegrationAttemptView `json:"integrationAttempts"`
MergeOrder []string `json:"mergeOrder"`
Budget CoordinationBudgetView `json:"budget"`
Recovery *v1alpha1.RecoveryProposal `json:"recovery,omitempty"`
PostCompletionIncidents []CoordinationIncident `json:"postCompletionIncidents,omitempty"`
}
CoordinationView is a parent's whole state for a consumer to filter and render.
func View ¶ added in v0.39.0
func View(parent v1alpha1.Task, children, integrations []v1alpha1.Task, ledger LedgerUsage) CoordinationView
View derives a parent's whole CoordinationView from the parent Task, its implementation children (by LabelCoordinationParent), its integration Tasks and the ledger's per-run spend. It is deterministic and UNFILTERED: an experience consumer must filter every child by the viewer's GitHub read before exposing anything (MR13). No human route serves this value.
type Diagnostic ¶
type Diagnostic struct {
Code string `json:"code"`
Field string `json:"field"`
Sentence string `json:"sentence"`
}
Diagnostic is one note on a composed plan that does not refuse it: a code a client branches on, the plan field it concerns, and one sentence for the person. It never carries plan text.
type DraftArtifact ¶
type DraftArtifact struct {
Name string `json:"name"`
Path string `json:"path"`
MediaType string `json:"mediaType"`
MaxBytes int64 `json:"maxBytes"`
}
DraftArtifact is a produced file; its kind is always file, and an absent bound is the 64 KiB one.
type DraftChild ¶
type DraftChild struct {
ID string `json:"id"`
Repository string `json:"repository"`
Rationale string `json:"rationale"`
Class string `json:"class"`
Scope DraftScope `json:"scope"`
Produces []DraftArtifact `json:"produces"`
DependsOn []string `json:"dependsOn"`
Consumes []v1alpha1.ArtifactConsumer `json:"consumes"`
}
DraftChild is one repository-local change as the model proposes it.
type DraftIntegration ¶
type DraftIntegration struct {
BeforeDependents *bool `json:"beforeDependents"`
BeforeDependentsRationale string `json:"beforeDependentsRationale"`
Acceptance []v1alpha1.TaskAcceptance `json:"acceptance"`
}
DraftIntegration is the family's read-only acceptance as the model proposes it; its role, run price and run count are fixed here.
type DraftScope ¶
type DraftScope struct {
Task string `json:"task"`
Touches []string `json:"touches"`
Leave []string `json:"leave"`
Plan []string `json:"plan"`
Assumptions []string `json:"assumptions"`
Acceptance []v1alpha1.TaskAcceptance `json:"acceptance"`
}
DraftScope is a child's TaskScope without its state: a planned child is always frozen ready.
type ExecutionPrerequisites ¶
type ExecutionPrerequisites interface {
Ready(ctx context.Context, repository string) (repositoryClasses bool, hardenedOutputs bool, err error)
}
ExecutionPrerequisites proves, for one repository, the two capabilities execute needs (MR16): repository-declared class authority (v4 item 3) and hardened safe outputs with threat checks for every child and integration input (v4 item 4). It is a capability check, never a release string or the stage-1 mergepolicy.Watch observation.
type GitHubChecks ¶ added in v0.39.0
type GitHubChecks struct {
// Forges is repository's own App connection, nil when it has none.
Forges func(repository string) CheckForge
}
GitHubChecks is RepositoryChecks against GitHub, every read live: the App's repository read (the installation check), the fence on the default branch, the class under the central guardrails, and the actor's collaborator permission. It caches nothing, so a lost App, fence, maintainer, permission or class refuses the very next check.
func (GitHubChecks) Check ¶ added in v0.39.0
func (g GitHubChecks) Check(ctx context.Context, cfg *config.Config, actor Actor, c v1alpha1.CoordinationChild, auth *v1alpha1.ChildAuthorization) (RepositoryPolicy, error)
Check implements RepositoryChecks.
type IntegrationAttemptView ¶
type IntegrationAttemptView struct {
Task string `json:"task"`
Purpose string `json:"purpose"`
PlanHash string `json:"planHash"`
ManifestHash string `json:"manifestHash"`
State string `json:"state"`
Reason string `json:"reason"`
Subjects []v1alpha1.IntegrationSubject `json:"subjects"`
RunMicroUSD int64 `json:"runMicroUSD"`
CostMicroUSD int64 `json:"costMicroUSD"`
}
IntegrationAttemptView is one integration Task as a view shows it.
type IntegrationManifest ¶ added in v0.39.0
type IntegrationManifest struct {
ParentTask string `json:"parentTask"`
PlanVersion int32 `json:"planVersion"`
PlanHash string `json:"planHash"`
Purpose string `json:"purpose"`
Subjects []v1alpha1.IntegrationSubject `json:"subjects"`
Acceptance []v1alpha1.TaskAcceptance `json:"acceptance"`
Artifacts []v1alpha1.LandedArtifact `json:"artifacts,omitempty"`
}
IntegrationManifest is one integration attempt's immutable inputs (MR10): the exact child heads before a dependent merge, or every child's merge commit after the last, the confirmed plan's hash and acceptance, and the landed artifacts at the subjects' merge commits. Its canonical JSON is what the run's claim carries; nothing else is an input.
func BeforeDependentManifest ¶ added in v0.39.0
func BeforeDependentManifest(parent string, cs *v1alpha1.CoordinationStatus, dependent, head string, merges map[string]string) (IntegrationManifest, error)
BeforeDependentManifest is dependent's pre-merge manifest (MR9): every dependency at the merge commit merges records for it, and dependent at its exact pull request head.
func FinalManifest ¶ added in v0.39.0
func FinalManifest(parent string, cs *v1alpha1.CoordinationStatus, merges map[string]string) (IntegrationManifest, error)
FinalManifest is the family's final manifest (MR10): every child at its landed merge commit.
func ManifestOf ¶ added in v0.39.0
func ManifestOf(t *v1alpha1.Task, cs *v1alpha1.CoordinationStatus) (IntegrationManifest, error)
ManifestOf is integration Task t's manifest as its parent's status cs holds it now: ok only while cs is the plan t was created for and still records every artifact its subjects landed.
type IssueForge ¶ added in v0.39.0
type IssueForge interface {
CreateIssue(ctx context.Context, title, body string, labels []string) (forge.Issue, error)
IssuesLabelled(ctx context.Context, label string) ([]forge.Issue, error)
Comment(ctx context.Context, number int, body string) error
RecentComments(ctx context.Context, number int) ([]forge.Comment, error)
}
IssueForge is the writes filing makes in one repository, through that repository's own factory App connection; forge.GitHub implements it.
type LedgerUsage ¶ added in v0.39.0
LedgerUsage is the ledger's per-run spend, keyed by run id; a run it does not hold counts zero.
type Materiality ¶
type Materiality struct {
ChangedSections []string `json:"changedSections,omitempty"`
ParentRequired bool `json:"parentRequired,omitempty"`
NewParentRequired bool `json:"newParentRequired,omitempty"`
}
Materiality is what an accepted edit changed and who must confirm again (MR12). ChangedSections names the table's sections, sorted: title, primary.rationale, children.<id>.<subfield>, integration.<field>, budget.<field>. ParentRequired is a new parent execution confirmation; a title- or rationale-only edit needs only the parent's review of the repost. Reauthorize is the sorted child ids whose maintainers authorize again. NewParentRequired is a primary change: a new parent and every authorization, never an edit.
func ComparePlans ¶
func ComparePlans(old, next v1alpha1.CoordinationPlan) (Materiality, error)
ComparePlans applies the design's fixed materiality table to two full snapshots of one plan, next exactly one version after old. It compares typed fields only: no patch language, similarity score or model decides. A version other than old's plus one, or another plan id, is ErrPlanVersion; a primary change is ErrPrimaryRequiresNewParent with NewParentRequired set.
type Metrics ¶ added in v0.39.0
type Metrics interface {
CoordinationFamily(ctx context.Context, repository, outcome string)
CoordinationPlanVersion(ctx context.Context, repository, outcome string)
CoordinationChild(ctx context.Context, repository, class, outcome string)
CoordinationWait(ctx context.Context, repository, reason string, d time.Duration)
}
Metrics is what the service counts (v4 observability), each after the write that records it: *fmetrics.Set implements it. Labels are configured repositories and bounded codes only.
type Mode ¶
type Mode string
Mode is the coordination mode a plan is validated for (MR16). off validates nothing: it serves no coordination surface at all.
The modes a plan validates under: plan keeps an incomplete one-child draft editable; execute needs the whole two-child family.
type ParentConfirmation ¶
type ParentConfirmation = v1alpha1.ParentConfirmation
ParentConfirmation is the CRD record itself: one representation only.
type PlanAttempt ¶
type PlanAttempt struct {
Plan v1alpha1.CoordinationPlan `json:"plan"`
Hash string `json:"hash"`
Diagnostics []Diagnostic `json:"diagnostics"`
Reconciliation PlanningReconciliation `json:"planning"`
}
PlanAttempt is one planning attempt's answer: the validated plan snapshot, its canonical hash, the diagnostics and the attempt's cost reconciliation. It files nothing.
func ComposeCoordination ¶
func ComposeCoordination(ctx context.Context, d CoordinationDraft, in ComposeInput) (PlanAttempt, error)
ComposeCoordination turns a model draft into a validated plan-mode snapshot (MR4, MR8). The model's repositories must be candidates and are rewritten to the candidate's spelling; roles come from the resolver; each child is allocated its task ceiling; planning and every integration run are priced at one run of the primary's class; the total is the checked sum. Validate then holds every invariant, so a draft that breaks one is refused with its reason, never repaired.
type PlanError ¶
type PlanError struct {
Code string
Field string
Detail string
// contains filtered or unexported fields
}
PlanError is one refusal: its bounded reason code (one of the sentinels above), the field it concerns and, for a resolver failure, the cause. Field and Detail name plan structure, never plan text, so a log or a diagnostic may carry them.
type PlanningReconciliation ¶
type PlanningReconciliation struct {
AttemptID string `json:"attemptID"`
EffectiveRequester string `json:"effectiveRequester"`
ReservationID string `json:"reservationID,omitempty"`
SettlementID string `json:"settlementID,omitempty"`
ReservedMicroUSD int64 `json:"reservedMicroUSD"`
SettledMicroUSD int64 `json:"settledMicroUSD"`
}
PlanningReconciliation is the planning attempt's cost as the shared intake route accounts it: its identifiers when it supplies them, never an invented AgentRun id.
type Prerequisites ¶ added in v0.40.0
type Prerequisites struct {
Classes ClassAuthority
Hardening hardening.Readiness
}
Prerequisites is the production ExecutionPrerequisites: class authority composed with hardening readiness (hardening design, execution prerequisites). It adds nothing to ReadyForExecute's fail-closed contract, and a Report's Missing never reaches the refusal text.
type RepositoryChecks ¶ added in v0.39.0
type RepositoryChecks interface {
Check(ctx context.Context, cfg *config.Config, actor Actor, child v1alpha1.CoordinationChild, auth *v1alpha1.ChildAuthorization) (RepositoryPolicy, error)
}
RepositoryChecks is one child repository's authority, read fresh: the repository is listed, public, installed and fenced to this factory, the child's class resolves there, and, for an actor with a linked login, that login is a configured maintainer holding GitHub write. auth, when given, binds the answer to the fence its maintainer authorized at (ErrPolicyChanged). An actor with no login asks for the repository's policy alone, as plan validation does.
type RepositoryPolicy ¶
type RepositoryPolicy struct {
Repository, Class, Tier, FenceSHA string
Roles []string
RunMicroUSD, TaskMicroUSD int64
// Public is the repository's live visibility, AppRepository the full name its App connection
// answered for, and Permission the actor's GitHub permission when an actor was checked.
Public bool
AppRepository string
Permission string
}
RepositoryPolicy is one repository's resolved facts for one child: its class, tier and the class harness's roles in order, the fence blob they were read at, the run and task ceilings of that tier in micro-USD (MR6, MR8), and what a RepositoryChecks read alongside.
type ResolvePolicy ¶
type ResolvePolicy func(ctx context.Context, repository, class, tier string) (RepositoryPolicy, error)
ResolvePolicy resolves a class and tier at repository's confirmed policy and the central guardrails, returning ErrUnknownClass for a class the repository does not allow. It is the only source of roles and ceilings: a plan never declares them (MR4).
type RunUsage ¶ added in v0.39.0
type RunUsage struct {
ReservedMicroUSD int64 `json:"reservedMicroUSD"`
SettledMicroUSD int64 `json:"settledMicroUSD"`
}
RunUsage is one run's spend as the day ledger holds it: what its reservation still holds and what its meter settled.
type Service ¶ added in v0.39.0
type Service struct {
Client client.Client
Namespace string
Cfg config.Source
Checks RepositoryChecks
Prerequisites ExecutionPrerequisites
Now func() time.Time
// Forges is each repository's own factory App connection for filing, nil when it has none.
Forges func(repository string) IssueForge
// Metrics records the service's coordination series; nil records nothing.
Metrics Metrics
}
Service drafts and confirms coordination plans on their parent Task (MR4, MR5): full snapshots bound to their hash, the parent's confirmation and each child's authorization as separate records by the actor the token resolves to. Execute eligibility re-reads every authority and the capability gate; with no Prerequisites port execute always refuses.
func (*Service) Confirm ¶ added in v0.39.0
func (s *Service) Confirm(ctx context.Context, actor Actor, in CoordinationConfirmation) (CoordinationConfirmation, error)
Confirm records in's one confirmation of the parent's current plan, by actor: the parent's by a configured maintainer of the primary holding GitHub write, or one child's by that child's own maintainer holding write on that child's repository. One login confirming both makes two calls and two records. Once every confirmation is present under execute, the capability gate and every repository check decide whether filing is eligible; a refusal there is returned after the confirmation is recorded, and nothing is filed.
func (*Service) Draft ¶ added in v0.39.0
func (s *Service) Draft(ctx context.Context, actor Actor, p v1alpha1.CoordinationPlan, hash string, planning PlanningReconciliation) (CoordinationConfirmation, error)
Draft stores p as its parent Task's current plan: it creates the parent on the first version, replays an identical version, and accepts exactly the next version through the materiality table, keeping only the authorizations it allows. The parent is Coordinating with no issue, run or pull request. Drafting needs a linked actor; the caller has checked their write on the primary.
func (*Service) ExecuteReady ¶ added in v0.39.0
func (s *Service) ExecuteReady(ctx context.Context, cfg *config.Config, cs *v1alpha1.CoordinationStatus, ids []string) error
ExecuteReady re-reads every authority execute rests on, for the children ids names (every child when nil): the full plan validates for execute with each confirmed increase, the capability gate passes for every repository, the parent confirmer still maintains and writes the primary, and each child's authorizer still maintains and writes its repository at the fence they authorized. Nothing is cached: a regression refuses the next filing or admission.
func (*Service) File ¶ added in v0.39.0
File files the parent issue in the primary, then one child issue per repository, then the plan repost, recording each issue in the parent's status as soon as it exists (v4 Issues and confirmations). Every authority and the capability gate are re-read before the first write. A crash leaves the parent filing_incomplete; a replay adopts each issue by its factory author and first-line marker instead of filing it twice. Only when all are recorded is the parent filed.
func (*Service) Recover ¶ added in v0.39.0
func (s *Service) Recover(ctx context.Context, actor Actor, parentTask, code string, planVersion int32) error
Recover performs parentTask's one proposed recovery, by actor, exactly as code names it under planVersion (MR11). The authority is the selected ordinary path's: a child action needs that child's own maintainer holding GitHub write on its repository now; an integration or plan action the primary's maintainer holding write there. It binds the current plan version (else stale_plan) and the current proposal (else recovery_not_proposed), then takes one action through the existing machinery: a child retry is that child's next generation through the generation barrier, authorize_child a fresh authorization at the repository's current fence, an integration retry one new attempt within maxRuns behind the execute gate. revise_plan and increase_budget are a new plan version, never taken here. Nothing here reverts, merges or reaches another repository's running child.
func (*Service) RecoveryRepository ¶ added in v0.39.0
RecoveryRepository is the repository whose authority parentTask's current proposal needs: the child's for a child action, else the primary. The caller resolves the actor's login there; Recover re-reads the authority itself.