package work type EvolutionRunStage string const ( EvolutionNeedRecorded EvolutionRunStage = "IMPROVEMENT_NEED" EvolutionCandidateBuilt EvolutionRunStage = "CANDIDATE" EvolutionIndependentlyEvaluated EvolutionRunStage = "INDEPENDENT_EVALUATION" EvolutionSandboxed EvolutionRunStage = "SANDBOX_BUILD" EvolutionBenchmarked EvolutionRunStage = "BENCHMARK" EvolutionCanaried EvolutionRunStage = "CANARY" EvolutionPromoted EvolutionRunStage = "PROMOTION" EvolutionRolledBack EvolutionRunStage = "ROLLBACK" ) type GovernedEvolutionResult struct { NeedRef string CandidateRef string EvaluationRef string Stages []EvolutionRunStage EvidenceRefs []EvidenceRef LearningLedgerOutcomeRef string Promoted bool RollbackRef string } // GovernedEvolutionOps are explicit gates. The caller supplies existing // development executor/supervisor operations; this interface grants no new // authority and has no autonomous promotion implementation. type GovernedEvolutionOps struct { CreateCandidate func() (EvolutionCandidate, error) Evaluate func(EvolutionCandidate) (EvolutionEvaluation, error) SandboxBuild func(EvolutionCandidate) (EvidenceRef, error) Benchmark func(EvolutionCandidate) (EvidenceRef, bool, error) Canary func(EvolutionCandidate) (EvidenceRef, bool, error) Promote func(EvolutionCandidate, EvolutionEvaluation) (string, error) Rollback func(EvolutionCandidate) (string, error) LearningLedgerOutcome func(GovernedEvolutionResult) (string, error) }