Add repo deployment wrapper modes

This commit is contained in:
Meta Vens 2026-06-21 11:05:46 +01:00
commit 4086c8e217
4 changed files with 107 additions and 6 deletions

View file

@ -170,6 +170,7 @@ remembers doctrine; the branch remembers the blade.
- 2026-06-21: Idunn-hosted repo-work queue-run lifecycle now has bounded launch proof. `tools/epiphany_local_run.ps1 -Mode repo-work-service-launch` reuses the `epiphany-repo-work-queue-runner` service id and launches the exact `epiphany-work queue-run --workspace <repo> --local-verse-store <repo>\.epiphany\local-verse.ccmp --runtime-id <id> --max-items <n>` command through `epiphany-daemon-supervisor service-launch --wait-child`; it writes an Idunn service lifecycle receipt and does not install a Windows service, elevate, publish, merge, cross repos, or expose private state. Native smoke `.epiphany-smoke\repo-work-service-lifecycle-20260621-002707` proves plan/runbook/launch with launch exit code `0`, runbook receipt-directory readback before launch, launch readback after launch, `mutatesServiceManager=false`, `launchesService=true`, `waitChild=true`, and `privateStateExposed=false`. Wrapper proof `local-20260621-012741-653-dd4fdae2` prints `status=completed`, `exitCode=0`, `owner=Idunn`, `hostedBody=repo-work`, and `serviceManagerMutation=false`.
- 2026-06-21: Idunn-hosted repo-work queue-run lifecycle now has audit/readiness closure. `epiphany-daemon-supervisor repo-work-service-audit` reads the typed service lifecycle receipts for `epiphany-repo-work-queue-runner`, requires planned install-plan, written local runbook artifact, completed launch with exit code `0`, and no private-state exposure, then writes a `repo-work-service-audit` receipt. Native smoke `.epiphany-smoke\repo-work-service-lifecycle-20260621-004202` proves plan/runbook/launch/audit with `auditStatus=complete`, `auditRunbookArtifactStatus=present`, `auditLaunchExitCode=0`, `mutatesServiceManager=false`, `requiresElevatedAuthority=false`, and `privateStateExposed=false`. Wrapper proofs `local-20260621-014302-362-31bbef47`, `local-20260621-014337-108-cbd99615`, `local-20260621-014413-125-09e183c5`, and `local-20260621-014558-197-f6951806` prove plan/runbook/launch/audit ergonomics; the final audit summary reports `missing=none`, `failed=none`, and `nextSafeMove=continue repo-swarm MVP planner/interpreter hardening`. Remaining Idunn service work is optional elevated install/start execution under explicit operator authority, not Self scheduling.
- 2026-06-21: Repo-work MVP readiness sight now has a first-class local wrapper. `tools/epiphany_local_run.ps1 -Mode repo-work-readiness -Workspace <repo> -RepoWorkItem <item>` invokes `epiphany-work readiness`, accepts optional `-RepoWorkPublicProof`, `-RepoWorkIdunnLifecycleReceipt`, and `-RepoWorkToolDirectoryReceipt`, and prints satisfied/missing readiness rows plus authority denials. It writes readiness sight only: no readiness approval, publication, service lifecycle, Hands action, deployment, cross-body mutation, or private-state exposure. Wrapper proof `local-20260621-105433-017-b1c2bbd9` against `.epiphany-smoke\repo-work-readiness-20260621-094043\repo-body` reported `status=not-ready`, missing `bifrost-publication`, `upstream-main-sync`, `idunn-lifecycle`, and `tool-directory`, while all authority booleans stayed false. `gjallar`/`swarm-overview` and `swarm-triage` wrapper summaries now forward Rust-owned `repoWorkReadinessTuiRows`; proof `local-20260621-105450-620-0fc13242` printed the compact `REPO-WORK-READINESS` row through Gjallar.
- 2026-06-21: Repo deployment handoff/readback now has first-class local wrappers. `tools/epiphany_local_run.ps1 -Mode repo-deployment-config-audit`, `-Mode repo-deployment-runbook`, and `-Mode repo-deployment-aftercare-audit` invoke the existing Rust `epiphany-work` deployment audit, operator runbook, and aftercare audit surfaces, adding compact summaries for Idunn readiness, the exact operator `git push` route, runbook SHA-256, CultMesh receipt refs, and authority denials. Wrapper proofs `local-20260621-110141-130-fa8f91d7`, `local-20260621-110200-679-a03614ce`, and `local-20260621-110219-492-c870e2da` against `.epiphany-smoke\repo-deployment-config-family-20260620-223203\repo-body` reported `ready-for-idunn-review`, `ready-for-operator-git-push`, and complete Idunn aftercare with deployment/git-push/service/Hands/private-state authority false. These wrappers do not SSH, deploy, or run `git push`; they are the operator/Idunn handoff and aftercare sight rite.
- 2026-06-20: Mind now has explicit repo-work safe-family and requested-path guards before branch-local Hands authority. `adopt --from-plan` treats unsupported plan-derived safe-family labels as refused interpreter decisions, writes `epiphany.repo_work_mind_adoption_decision.v0` with `status=refused-unsupported-safe-family`, keeps `actionItemAccepted=false` and `safeFamilyRecognized=false`, grants no Hands/durable-state/service/publication/cross-body/private-state authority, and writes no normal adoption receipt. It also compares the sorted action-item `requestedPaths` against the sorted plan action `changedPaths`; mismatches write `status=refused-requested-path-mismatch`, keep `safeFamilyRecognized=true` but `requestedPathsMatchPlan=false`, point the next gate at `imagination.replan_with_matching_requested_paths`, and grant no Hands/durable-state/service/publication/cross-body/private-state authority. Focused smokes `.epiphany-smoke\repo-mind-safe-family-guard-20260620-194425` and `.epiphany-smoke\repo-mind-path-guard-20260620-194239` prove both refusal paths; earlier positive smokes `.epiphany-smoke\repo-planning-facets-20260620-190916` and `.epiphany-smoke\closure-model-gate-20260620-190916` prove recognized planning facets and closure model gates still pass. Current remaining repo-swarm MVP organs are deeper interpreter semantics beyond adoption refusal, more useful repo-owned configuration/action families, richer closure depth, and Idunn-owned queue-run service lifecycle under explicit operator authority.
- 2026-06-20: Mind now also refuses plan-derived repo work that is not evidence-ready. `derive-plan` embeds verification asks in the Imagination action-item receipt, `adopt --from-plan` records verification asks and planning evidence needs in `epiphany.repo_work_mind_interpretation.v0`, and empty verification asks or evidence needs write `status=refused-missing-evidence-needs` with next gate `imagination.replan_with_explicit_soul_evidence_needs`. The refusal grants no Hands, durable-state, service, publication, cross-body, or private-state authority and writes no adoption receipt. Focused proof `.epiphany-smoke\repo-mind-evidence-guard-20260620-224426` tampers both arrays empty and proves the refusal; regression `.epiphany-smoke\repo-planning-facets-20260620-224428` proves normal planning facets still close through Soul/Modeling/Mind.
- 2026-06-20: `repo-eve-surface` is now live as repo-owned Eve/CultUI surface contract cargo. `epiphany-work derive-plan --action-family repo-eve-surface` writes `.epiphany/eve-surfaces/<item>.toml` with safe family `repo.eve_surface`, compact agent TUI and GUI lowering contracts, local/public Verse routing, Odin discovery, provider-owned surface identity, Persona/human collaboration flags, feedback routing to Imagination, and denials for renderer ownership, rendering/state/publication/service/cross-body authority, private Verse rummaging, and private-state exposure. Soul closure assertions inspect schema, family, summary, surface routing, Verse routing, CultUI contracts, collaboration route, authority seals, and private-state seal. Focused smoke `.epiphany-smoke\repo-eve-surface-family-20260620-165927` ran init -> online -> accept -> repo-eve-surface derive-plan -> tick run/adopt/execute/close; Hands committed only `.epiphany/eve-surfaces/repo-eve-surface-family.toml`, Soul passed with `pathScopeMatched=true`, `familyAssertions.status=passed`, `hasCultUiContracts=true`, `hasVerseRouting=true`, `odinDiscoverable=true`, `feedbackRoutesToImagination=true`, `rendererOwnsTruth=false`, `renderingAuthority=false`, `stateAuthority=false`, `publicationAuthority=false`, `serviceLifecycleAuthority=false`, `crossBodyMutationAuthority=false`, `privateVerseRummaging=false`, and `privateStateExposed=false`. Current remaining repo-swarm MVP organs are deeper interpreter/adoption semantics, more useful repo-owned configuration/action families, and Idunn-owned queue-run service lifecycle under explicit operator authority.

Binary file not shown.

View file

@ -649,5 +649,5 @@ current_status:
- `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now emits an explicit Idunn preflight summary before the operator elevation boundary. Its JSON and one-line summary report `preflightStatus`, child artifact present/hash-verified/mismatch/missing counts, aggregate service execution failed/missing check counts, child preflight rows with expected/actual SHA-256s, and private-state exposure. Live proof `local-20260619-025627-410-9724e2f6` generated the non-mutating parent artifact with `preflightStatus=ready-for-elevated-operator`, two child runbooks present, two hashes verified, zero mismatches, zero missing artifacts, eleven failed sealed service checks, zero missing checks, explicit aftercare audits, and `privateStateExposed=false`. The remaining scar is still explicit elevated operator execution followed by complete Idunn audits, not missing parent/child artifact readiness.
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
last_completed_repo_swarm_cut: Repo-work MVP readiness sight now has a first-class wrapper mouth. `tools/epiphany_local_run.ps1 -Mode repo-work-readiness` invokes `epiphany-work readiness` for a repo Body, accepts optional public-proof, Idunn lifecycle, and tool-directory receipts, writes the readiness receipt plus repo-local CultMesh projection when the accept receipt names the store, and prints each satisfied/missing readiness family row while keeping sight-only authority. Gjallar/swarm-overview and swarm-triage wrapper summaries now forward `repoWorkReadinessTuiRows` so the whole-Verse sight row exposes readiness status, gaps, and authority denials without opening private state. Wrapper proof `local-20260621-105433-017-b1c2bbd9` against `.epiphany-smoke\repo-work-readiness-20260621-094043\repo-body` reported `status=not-ready`, missing `bifrost-publication`, `upstream-main-sync`, `idunn-lifecycle`, and `tool-directory`, with readiness approval, publication, service lifecycle, Hands action, and private-state exposure all false. Gjallar proof `local-20260621-105450-620-0fc13242` printed the same `REPO-WORK-READINESS` row.
next_action: Continue repo-swarm MVP work from the documented Epiphany Online cut order in `notes/epiphany-repo-swarm-mvp-contract.md`. The next useful cut is explicit Idunn deployment/service execution audit under operator authority, richer Soul/Modeling/Mind readiness closure depth beyond the current semantic/closure/Bifrost/readiness readbacks, or another useful repo-owned safe action family if the review loop needs more cargo. Persona-to-Imagination consensus readback, Mind-owned interpreter brief cargo, Gjallar closure/readiness map rows, Bifrost ledger accounting rows, and the readiness wrapper mouth are sealed; preserve Idunn service lifecycle ownership, Bifrost publication/upstream-main ownership, Mind durable-state admission, and existing CultMesh/Odin/Eve tool directories. Windows service install/start/deployment execution still requires explicit elevated operator authority.
last_completed_repo_swarm_cut: Repo deployment handoff/readback now has local wrapper mouths. `tools/epiphany_local_run.ps1 -Mode repo-deployment-config-audit`, `-Mode repo-deployment-runbook`, and `-Mode repo-deployment-aftercare-audit` delegate to `epiphany-work deployment-config-audit`, `deployment-execution-runbook`, and `deployment-aftercare-audit` for a repo Body. Proofs `local-20260621-110141-130-fa8f91d7`, `local-20260621-110200-679-a03614ce`, and `local-20260621-110219-492-c870e2da` against `.epiphany-smoke\repo-deployment-config-family-20260620-223203\repo-body` showed `ready-for-idunn-review`, an operator-only `git push origin HEAD:refs/heads/main` runbook with SHA-256 `6af0cac1de07198c0964aab31568e92330784ccf7018f0abc8d827fa18b07afb`, and complete aftercare from fixture Idunn CultMesh receipts. Execution, deployment, git-push, service lifecycle, Hands, and private-state authority stayed false. This is Idunn/operator handoff and aftercare sight only; the wrapper does not run git push, SSH, or deployment.
next_action: Continue repo-swarm MVP work from the documented Epiphany Online cut order in `notes/epiphany-repo-swarm-mvp-contract.md`. The next useful cuts are wiring deployment/tool-directory/Idunn receipt refs into repo-work readiness closure, richer Soul/Modeling/Mind readiness depth beyond current semantic/closure/Bifrost/readiness readbacks, another useful repo-owned safe action family if the review loop needs more cargo, or explicit elevated/operator Idunn execution proof only when the human grants that authority. Persona-to-Imagination consensus readback, Mind-owned interpreter brief cargo, Gjallar closure/readiness map rows, Bifrost ledger accounting rows, readiness wrapper mouth, and repo deployment handoff/readback wrappers are sealed; preserve Idunn service lifecycle ownership, Bifrost publication/upstream-main ownership, Mind durable-state admission, and existing CultMesh/Odin/Eve tool directories. Windows service install/start/deployment execution still requires explicit elevated operator authority.

View file

@ -1,5 +1,5 @@
param(
[ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "bifrost-publication", "bifrost-public-proof", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "gjallar", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-readiness", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "swarm-online-runbook", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute")]
[ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "bifrost-publication", "bifrost-public-proof", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "gjallar", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-readiness", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "swarm-online-runbook", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute")]
[string]$Mode = "smoke",
[string]$Root = (Resolve-Path ".").Path,
[string]$Workspace = "",
@ -58,6 +58,12 @@ param(
[string]$RepoWorkPublicProof = "",
[string]$RepoWorkIdunnLifecycleReceipt = "",
[string]$RepoWorkToolDirectoryReceipt = "",
[string]$RepoDeploymentRemote = "origin",
[string]$RepoDeploymentRunbookReceipt = "",
[string]$RepoDeploymentIdunnReceipt = "",
[string]$RepoDeploymentIdunnReceiptRef = "",
[string]$RepoDeploymentAftercareReceipt = "",
[string]$RepoDeploymentAftercareReceiptRef = "",
[switch]$RepoWorkDryRun,
[string]$PersonaInput = "",
[switch]$SkipBuild,
@ -351,7 +357,7 @@ $runtimeStore = Join-Path $Workspace "state\runtime-spine.msgpack"
$liveRuntimeMode = @("run", "mvp") -contains $Mode
if (-not $SkipBuild) {
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-deployment-config-audit" -and $Mode -ne "repo-deployment-runbook" -and $Mode -ne "repo-deployment-aftercare-audit" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
Invoke-Checked `
-Label "build Codex app-server compatibility organ" `
-FilePath $cargoExe `
@ -408,7 +414,7 @@ if (-not $SkipBuild) {
}
$requiredBinaries = @($statusExe, $operatorRunExe, $operatorSnapshotExe, $verseQueryExe, $swarmExe, $repoWorkExe, $daemonSupervisorExe, $handsActionExe)
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-deployment-config-audit" -and $Mode -ne "repo-deployment-runbook" -and $Mode -ne "repo-deployment-aftercare-audit" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
$requiredBinaries += @($codexAppServer, $coordinatorExe)
}
function Assert-SwarmBrakeAllowsLiveRun {
@ -481,7 +487,7 @@ function Assert-SwarmBrakeAllowsLiveRun {
}
}
if (@("plan", "run", "mvp", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-readiness", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute") -contains $Mode) {
if (@("plan", "run", "mvp", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-readiness", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute") -contains $Mode) {
if (-not (Test-Path -LiteralPath $verseQueryExe)) {
throw "required binary not found for swarm brake preflight: $verseQueryExe"
}
@ -1977,6 +1983,68 @@ if ($Mode -eq "repo-work-readiness") {
-StderrPath (Join-Path $artifactRoot "repo-work-readiness.stderr.log")
}
if ($Mode -eq "repo-deployment-config-audit") {
$resultPath = Join-Path $artifactRoot "repo-deployment-config-audit.stdout.json"
Invoke-Checked `
-Label "audit repo Idunn deployment config" `
-FilePath $repoWorkExe `
-Arguments @(
"deployment-config-audit",
"--workspace", $Workspace
) `
-WorkingDirectory $Root `
-StdoutPath $resultPath `
-StderrPath (Join-Path $artifactRoot "repo-deployment-config-audit.stderr.log")
}
if ($Mode -eq "repo-deployment-runbook") {
$resultPath = Join-Path $artifactRoot "repo-deployment-runbook.stdout.json"
Invoke-Checked `
-Label "write repo Idunn deployment runbook" `
-FilePath $repoWorkExe `
-Arguments @(
"deployment-execution-runbook",
"--workspace", $Workspace,
"--remote", $RepoDeploymentRemote
) `
-WorkingDirectory $Root `
-StdoutPath $resultPath `
-StderrPath (Join-Path $artifactRoot "repo-deployment-runbook.stderr.log")
}
if ($Mode -eq "repo-deployment-aftercare-audit") {
$resultPath = Join-Path $artifactRoot "repo-deployment-aftercare-audit.stdout.json"
$repoWorkVerseStore = Join-Path $Workspace ".epiphany\local-verse.ccmp"
$aftercareArgs = @(
"deployment-aftercare-audit",
"--workspace", $Workspace,
"--local-verse-store", $repoWorkVerseStore,
"--runtime-id", $RepoWorkRuntimeId
)
if ($RepoDeploymentRunbookReceipt -ne "") {
$aftercareArgs += @("--runbook-receipt", $RepoDeploymentRunbookReceipt)
}
if ($RepoDeploymentIdunnReceipt -ne "") {
$aftercareArgs += @("--idunn-deployment-receipt", $RepoDeploymentIdunnReceipt)
}
if ($RepoDeploymentIdunnReceiptRef -ne "") {
$aftercareArgs += @("--idunn-deployment-receipt-ref", $RepoDeploymentIdunnReceiptRef)
}
if ($RepoDeploymentAftercareReceipt -ne "") {
$aftercareArgs += @("--aftercare-audit-receipt", $RepoDeploymentAftercareReceipt)
}
if ($RepoDeploymentAftercareReceiptRef -ne "") {
$aftercareArgs += @("--aftercare-audit-receipt-ref", $RepoDeploymentAftercareReceiptRef)
}
Invoke-Checked `
-Label "audit repo Idunn deployment aftercare" `
-FilePath $repoWorkExe `
-Arguments $aftercareArgs `
-WorkingDirectory $Root `
-StdoutPath $resultPath `
-StderrPath (Join-Path $artifactRoot "repo-deployment-aftercare-audit.stderr.log")
}
if ($Mode -eq "repo-work-service-plan" -or $Mode -eq "repo-work-service-runbook" -or $Mode -eq "repo-work-service-launch" -or $Mode -eq "repo-work-service-audit") {
$repoWorkServiceId = $ServiceId
if ($repoWorkServiceId -eq "epiphany-daemon-supervisor-service") {
@ -2614,6 +2682,38 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
$verseProjection = "$($result.verseProjection.readinessId):$($result.verseProjection.latestKey)"
}
Write-Host "Repo work readiness: status=$($result.status), item=$($result.item), missing=$($result.missingRequiredCount), missingKinds=$missingKinds, receipt=$($result.receiptPath), verseProjection=$verseProjection, rows=$readinessRows, sightOnly=$($result.authority.sightOnly), readinessApprovalAuthorized=$($result.authority.readinessApprovalAuthorized), publicationAuthorized=$($result.authority.publicationAuthorized), serviceLifecycleAuthority=$($result.authority.serviceLifecycleAuthority), handsActionAuthorized=$($result.authority.handsActionAuthorized), next=$($result.nextSafeMove), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "repo-deployment-config-audit") {
$failed = "none"
if ($null -ne $result.assertions -and @($result.assertions).Count -gt 0) {
$failed = ((@($result.assertions) | Where-Object { $_.passed -ne $true } | ForEach-Object { $_.id }) -join ",")
if ($failed -eq "") {
$failed = "none"
}
}
Write-Host "Repo deployment config audit: status=$($result.status), readyForIdunnReview=$($result.readyForIdunnReview), daemonOwnsExecution=$($result.daemonOwnsExecution), failed=$failed, receipt=$($result.receiptPath), executionAuthorized=$($result.executionAuthorized), deploymentAuthority=$($result.deploymentAuthority), gitPushAuthority=$($result.gitPushAuthority), serviceLifecycleAuthority=$($result.serviceLifecycleAuthority), nextGate=$($result.nextGate), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "repo-deployment-runbook") {
$artifactSha256 = Get-LocalArtifactSha256 $result.runbookPath
if ($artifactSha256 -eq "none" -and $null -ne $result.runbookSha256 -and $result.runbookSha256 -ne "") {
$artifactSha256 = $result.runbookSha256
}
Write-Host "Repo deployment runbook: status=$($result.status), runbookWritten=$($result.runbookWritten), remote=$($result.remote), watchedRef=$($result.watchedRef), gitPush='$($result.gitPushCommand)', operatorCommand=$($result.operatorExecutionCommand), artifactSha256=$artifactSha256, mutatesRemoteWhenRun=$($result.mutatesRemoteWhenRun), requiresExplicitOperatorAuthority=$($result.requiresExplicitOperatorAuthority), executionAuthorized=$($result.executionAuthorized), deploymentAuthority=$($result.deploymentAuthority), gitPushAuthority=$($result.gitPushAuthority), serviceLifecycleAuthority=$($result.serviceLifecycleAuthority), path=$($result.runbookPath), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "repo-deployment-aftercare-audit") {
$failed = "none"
if ($null -ne $result.assertions -and @($result.assertions).Count -gt 0) {
$failed = ((@($result.assertions) | Where-Object { $_.passed -ne $true } | ForEach-Object { $_.id }) -join ",")
if ($failed -eq "") {
$failed = "none"
}
}
$idunnDeployment = "none"
if ($null -ne $result.idunnDeploymentReceipt -and $null -ne $result.idunnDeploymentReceipt.receiptId) {
$idunnDeployment = "$($result.idunnDeploymentReceipt.receiptId):$($result.idunnDeploymentReceipt.status)"
}
$idunnAftercare = "none"
if ($null -ne $result.idunnAftercareAuditReceipt -and $null -ne $result.idunnAftercareAuditReceipt.receiptId) {
$idunnAftercare = "$($result.idunnAftercareAuditReceipt.receiptId):$($result.idunnAftercareAuditReceipt.status)"
}
Write-Host "Repo deployment aftercare audit: status=$($result.status), deploymentComplete=$($result.deploymentComplete), failed=$failed, idunnDeployment=$idunnDeployment, idunnAftercare=$idunnAftercare, localVerseStore=$($result.localVerseStore), runtimeId=$($result.runtimeId), receipt=$($result.receiptPath), executionAuthorized=$($result.executionAuthorized), deploymentAuthority=$($result.deploymentAuthority), gitPushAuthority=$($result.gitPushAuthority), serviceLifecycleAuthority=$($result.serviceLifecycleAuthority), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "repo-work-service-plan") {
$plannedArgs = "none"
if ($null -ne $result.args -and $result.args.Count -gt 0) {