Add repo readiness review gate

This commit is contained in:
Meta Vens 2026-06-21 12:20:28 +01:00
commit bbe41098b5
7 changed files with 358 additions and 8 deletions

View file

@ -418,6 +418,68 @@ fn run_smoke(args: Args) -> Result<Value> {
require_row(&readiness, "tool-directory", true)?;
require_row(&readiness, "private-state-redaction", true)?;
let readiness_review = cargo_json(
&manifest,
"epiphany-work",
&[
"readiness-review",
"--workspace",
path_str(&repo)?,
"--item",
item,
"--readiness-receipt",
readiness
.get("receiptPath")
.and_then(Value::as_str)
.ok_or_else(|| anyhow!("readiness result missing receiptPath"))?,
"--maintainer-review-receipt",
"maintainer-review:repo-work-readiness-smoke",
"--soul-review-receipt",
"soul-review:repo-work-readiness-smoke",
"--mind-review-receipt",
"mind-review:repo-work-readiness-smoke",
"--bifrost-review-receipt",
"bifrost-review:repo-work-readiness-smoke",
"--review-summary",
"Smoke reviewers approve the ready readiness sight receipt without granting action authority.",
],
&root,
)?;
require_eq(
&readiness_review,
&["schemaVersion"],
"epiphany.repo_work_readiness_review.v0",
)?;
require_eq(&readiness_review, &["status"], "readiness-approved")?;
require_u64(&readiness_review, &["missingRequiredCount"], 0)?;
require_bool(
&readiness_review,
&["authority", "readinessApprovalAuthorized"],
true,
)?;
require_bool(
&readiness_review,
&["authority", "durableStateCommitAuthorized"],
false,
)?;
require_bool(
&readiness_review,
&["authority", "publicationAuthorized"],
false,
)?;
require_bool(&readiness_review, &["authority", "mergeAuthorized"], false)?;
require_bool(
&readiness_review,
&["authority", "serviceLifecycleAuthority"],
false,
)?;
require_bool(
&readiness_review,
&["authority", "handsActionAuthorized"],
false,
)?;
require_bool(&readiness_review, &["privateStateExposed"], false)?;
let gjallar = cargo_json(
&manifest,
"epiphany-verse-query",
@ -456,6 +518,8 @@ fn run_smoke(args: Args) -> Result<Value> {
"syncStatus": sync["status"],
"upstreamMainSynced": sync["authority"]["upstreamMainSynced"],
"readinessStatus": readiness["status"],
"readinessReviewStatus": readiness_review["status"],
"readinessReviewReceiptPath": readiness_review["receiptPath"],
"missingRequiredCount": readiness["missingRequiredCount"],
"readinessVerseProjection": readiness["verseProjection"],
"gjallarRepoWorkReadinessCount": gjallar["repoWorkReadinessCount"],

View file

@ -132,6 +132,9 @@ fn main() -> Result<()> {
"readiness" | "readiness-report" | "mvp-readiness" => {
run_readiness(parse_readiness_args(args)?)
}
"readiness-review" | "review-readiness" | "mvp-readiness-review" => {
run_readiness_review(parse_readiness_review_args(args)?)
}
"deployment-config-audit" | "audit-deployment-config" | "idunn-deployment-audit" => {
run_deployment_config_audit(parse_deployment_config_audit_args(args)?)
}
@ -356,6 +359,19 @@ struct ReadinessArgs {
write_receipt: bool,
}
#[derive(Clone, Debug)]
struct ReadinessReviewArgs {
workspace: PathBuf,
item: Option<String>,
readiness_receipt: Option<PathBuf>,
artifact_dir: Option<PathBuf>,
maintainer_review_receipt: String,
soul_review_receipt: String,
mind_review_receipt: String,
bifrost_review_receipt: String,
review_summary: Option<String>,
}
#[derive(Clone, Debug)]
struct DeploymentConfigAuditArgs {
workspace: PathBuf,
@ -1214,6 +1230,64 @@ fn parse_readiness_args(args: impl Iterator<Item = String>) -> Result<ReadinessA
})
}
fn parse_readiness_review_args(
args: impl Iterator<Item = String>,
) -> Result<ReadinessReviewArgs> {
let mut workspace = None;
let mut item = None;
let mut readiness_receipt = None;
let mut artifact_dir = None;
let mut maintainer_review_receipt = None;
let mut soul_review_receipt = None;
let mut mind_review_receipt = None;
let mut bifrost_review_receipt = None;
let mut review_summary = None;
let mut args = args.peekable();
while let Some(arg) = args.next() {
match arg.as_str() {
"--workspace" => workspace = Some(take_path(&mut args, "--workspace")?),
"--item" => item = Some(take_string(&mut args, "--item")?),
"--readiness-receipt" => {
readiness_receipt = Some(take_path(&mut args, "--readiness-receipt")?);
}
"--artifact-dir" => artifact_dir = Some(take_path(&mut args, "--artifact-dir")?),
"--maintainer-review-receipt" | "--maintainer-review" => {
maintainer_review_receipt =
Some(take_string(&mut args, "--maintainer-review-receipt")?);
}
"--soul-review-receipt" | "--soul-review" => {
soul_review_receipt = Some(take_string(&mut args, "--soul-review-receipt")?);
}
"--mind-review-receipt" | "--mind-review" => {
mind_review_receipt = Some(take_string(&mut args, "--mind-review-receipt")?);
}
"--bifrost-review-receipt" | "--bifrost-review" => {
bifrost_review_receipt =
Some(take_string(&mut args, "--bifrost-review-receipt")?);
}
"--review-summary" | "--summary" => {
review_summary = Some(take_string(&mut args, "--review-summary")?);
}
other => return Err(anyhow!("unexpected readiness-review argument {other:?}")),
}
}
Ok(ReadinessReviewArgs {
workspace: workspace.context("missing --workspace")?,
item,
readiness_receipt,
artifact_dir,
maintainer_review_receipt: maintainer_review_receipt
.context("missing --maintainer-review-receipt")?,
soul_review_receipt: soul_review_receipt.context("missing --soul-review-receipt")?,
mind_review_receipt: mind_review_receipt.context("missing --mind-review-receipt")?,
bifrost_review_receipt: bifrost_review_receipt
.context("missing --bifrost-review-receipt")?,
review_summary,
})
}
fn parse_deployment_config_audit_args(
args: impl Iterator<Item = String>,
) -> Result<DeploymentConfigAuditArgs> {
@ -12441,6 +12515,167 @@ fn run_readiness(args: ReadinessArgs) -> Result<Value> {
}))
}
fn run_readiness_review(args: ReadinessReviewArgs) -> Result<Value> {
let workspace = args
.workspace
.canonicalize()
.with_context(|| format!("failed to resolve {}", args.workspace.display()))?;
ensure_git_repo(&workspace)?;
let artifact_dir = args
.artifact_dir
.unwrap_or_else(|| workspace.join(".epiphany").join("work"));
fs::create_dir_all(&artifact_dir)
.with_context(|| format!("failed to create {}", artifact_dir.display()))?;
let item = args.item.unwrap_or_else(|| "first-request".to_string());
let item_slug = sanitize(&item);
let readiness_receipt_path = args
.readiness_receipt
.unwrap_or_else(|| artifact_dir.join(format!("work-readiness-{item_slug}.json")));
let readiness_receipt = read_json(&readiness_receipt_path)?;
let readiness_item = string_from_json(&readiness_receipt, &["item"]).unwrap_or(item);
let readiness_item_slug = sanitize(&readiness_item);
let schema_ok = string_from_json(&readiness_receipt, &["schemaVersion"]).as_deref()
== Some("epiphany.repo_work_readiness_report.v0");
let status_ready =
string_from_json(&readiness_receipt, &["status"]).as_deref() == Some("ready");
let missing_required_count = readiness_receipt
.get("missingRequiredCount")
.and_then(Value::as_u64)
.unwrap_or(u64::MAX);
let rows = readiness_receipt
.get("rows")
.and_then(Value::as_array)
.ok_or_else(|| anyhow!("readiness receipt has no rows"))?;
let row_count = rows.len();
let unsatisfied_kinds: Vec<String> = rows
.iter()
.filter(|row| row.get("satisfied").and_then(Value::as_bool) != Some(true))
.filter_map(|row| row.get("kind").and_then(Value::as_str).map(str::to_string))
.collect();
let authority = readiness_receipt
.get("authority")
.ok_or_else(|| anyhow!("readiness receipt has no authority"))?;
let sight_only = authority
.get("sightOnly")
.and_then(Value::as_bool)
.unwrap_or(false);
let readiness_did_not_approve = authority
.get("readinessApprovalAuthorized")
.and_then(Value::as_bool)
== Some(false);
let dangerous_authority_denied = [
"durableStateCommitAuthorized",
"publicationAuthorized",
"bifrostPublicationAuthorized",
"githubPrAuthorized",
"mergeAuthorized",
"upstreamSyncAuthorized",
"deploymentAuthority",
"serviceLifecycleAuthority",
"handsActionAuthorized",
"crossBodyMutationAuthorized",
"privateVerseRummaging",
"privateStateExposed",
]
.iter()
.all(|key| authority.get(*key).and_then(Value::as_bool) == Some(false));
let private_sealed =
readiness_receipt
.get("privateStateExposed")
.and_then(Value::as_bool)
== Some(false);
let review_refs = vec![
args.maintainer_review_receipt.clone(),
args.soul_review_receipt.clone(),
args.mind_review_receipt.clone(),
args.bifrost_review_receipt.clone(),
];
let review_refs_present = review_refs.iter().all(|receipt| !receipt.trim().is_empty());
let approved = schema_ok
&& status_ready
&& missing_required_count == 0
&& row_count > 0
&& unsatisfied_kinds.is_empty()
&& sight_only
&& readiness_did_not_approve
&& dangerous_authority_denied
&& private_sealed
&& review_refs_present;
if !approved {
return Err(anyhow!(
"readiness review refused: schemaOk={schema_ok}, statusReady={status_ready}, missingRequiredCount={missing_required_count}, rowCount={row_count}, unsatisfiedKinds={:?}, sightOnly={sight_only}, readinessDidNotApprove={readiness_did_not_approve}, dangerousAuthorityDenied={dangerous_authority_denied}, privateSealed={private_sealed}, reviewRefsPresent={review_refs_present}",
unsatisfied_kinds
));
}
let now = Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true);
let review_id = format!("repo-work-readiness-review-{readiness_item_slug}");
let receipt_path = artifact_dir.join(format!("work-readiness-review-{readiness_item_slug}.json"));
let review_summary = args.review_summary.unwrap_or_else(|| {
"Maintainer/Soul/Mind/Bifrost reviewed a ready repo-work readiness sight receipt.".to_string()
});
let receipt = json!({
"schemaVersion": "epiphany.repo_work_readiness_review_receipt.v0",
"createdAt": now,
"workspace": workspace,
"item": readiness_item,
"reviewId": review_id,
"status": "readiness-approved",
"readinessReceiptPath": readiness_receipt_path,
"readinessStatus": "ready",
"missingRequiredCount": missing_required_count,
"satisfiedRowCount": row_count,
"unsatisfiedKinds": unsatisfied_kinds,
"reviewSummary": review_summary,
"reviewReceipts": {
"maintainer": args.maintainer_review_receipt,
"soul": args.soul_review_receipt,
"mind": args.mind_review_receipt,
"bifrost": args.bifrost_review_receipt
},
"adoption": {
"readinessAdopted": true,
"adoptedBy": "Maintainer/Soul/Mind/Bifrost",
"mindReadinessAdoption": true,
"durableStateCommit": false
},
"authority": {
"owner": "Maintainer/Soul/Mind/Bifrost",
"readinessApprovalAuthorized": true,
"readinessApproved": true,
"durableStateCommitAuthorized": false,
"publicationAuthorized": false,
"bifrostPublicationAuthorized": false,
"githubPrAuthorized": false,
"mergeAuthorized": false,
"upstreamSyncAuthorized": false,
"deploymentAuthority": false,
"serviceLifecycleAuthority": false,
"handsActionAuthorized": false,
"crossBodyMutationAuthorized": false,
"privateVerseRummaging": false,
"privateStateExposed": false
},
"privateStateExposed": false,
"nextSafeMove": "Use this readiness approval as review evidence for operator release decisions; do not treat it as publication, deployment, service lifecycle, Hands, merge, or cross-body authority."
});
write_json(&receipt_path, &receipt)?;
Ok(json!({
"schemaVersion": "epiphany.repo_work_readiness_review.v0",
"status": receipt["status"],
"workspace": receipt["workspace"],
"item": receipt["item"],
"reviewId": receipt["reviewId"],
"receiptPath": receipt_path,
"readinessReceiptPath": receipt["readinessReceiptPath"],
"missingRequiredCount": receipt["missingRequiredCount"],
"satisfiedRowCount": receipt["satisfiedRowCount"],
"authority": receipt["authority"],
"privateStateExposed": false,
"nextSafeMove": receipt["nextSafeMove"]
}))
}
fn run_deployment_config_audit(args: DeploymentConfigAuditArgs) -> Result<Value> {
let workspace = args
.workspace
@ -15744,7 +15979,7 @@ fn sanitize(value: &str) -> String {
fn print_usage() {
eprintln!(
"usage: epiphany-work <persona-intake|accept|derive-plan|plan|run|adopt|execute|close|publish|sync|overview|readiness|deployment-config-audit|deployment-execution-runbook|deployment-aftercare-audit|export-proof|tick|queue-run|serve> ...\n\
"usage: epiphany-work <persona-intake|accept|derive-plan|plan|run|adopt|execute|close|publish|sync|overview|readiness|readiness-review|deployment-config-audit|deployment-execution-runbook|deployment-aftercare-audit|export-proof|tick|queue-run|serve> ...\n\
persona-intake --workspace <repo> --item <id> --message <text> [--topic <topic>] [--store <local-verse.ccmp>] [--runtime-id <id>]\n\
accept --workspace <repo> --from <persona|bifrost|persona-or-bifrost> --item <id> [--summary <text>] [--topic <topic>] [--store <local-verse.ccmp>] [--runtime-id <id>] [--online-receipt <path>] [--public-discussion-ref <ref>] [--candidate-action-ref <ref>]\n\
derive-plan --workspace <repo> [--item <id>] [--accept-receipt <path>] [--action-family append-worklog|planning-note|checklist-note|section-note|repo-status-section|task-card|repo-manifest|repo-tool-capabilities|repo-tool-request|repo-eve-surface|repo-collaboration-policy|repo-collaboration-topic|repo-consensus-brief|repo-planning-brief|repo-interpreter-brief|repo-objective-draft|repo-adoption-request|repo-scheduling-request|repo-work-order|repo-verification-request|repo-publication-request|repo-sync-request|repo-maintainer-review-request|repo-pr-request|repo-credit-request|repo-artifact-acceptance-request|repo-metrics-request|repo-readiness-review-request|repo-doctrine-update-request|repo-secret-policy-request|repo-dependency-policy-request|repo-deployment-config|repo-deployment-request] [--target-path <path>] [--model-ref <ref>] [--model-authored] [--action-summary <text>] [--verification-ask <text>] [--stop-condition <text>] [--escalation-reason <text>] [--assumption <text>] [--constraint <text>] [--non-goal <text>] [--open-question <text>] [--decision-point <text>] [--evidence-need <text>]\n\
@ -15757,6 +15992,7 @@ fn print_usage() {
sync --workspace <repo> [--item <id>] [--publish-receipt <path>] [--upstream-ref origin/main] --merge-receipt <ref>\n\
overview --workspace <repo> [--item <id>] [--accept-receipt <path>] [--no-write]\n\
readiness --workspace <repo> [--item <id>] [--accept-receipt <path>] [--public-proof <path>] [--idunn-lifecycle-receipt <path>] [--deployment-aftercare-audit-receipt <path>|--deployment-aftercare-audit-receipt-ref <ref>] [--tool-directory-receipt <path>] [--no-write]\n\
readiness-review --workspace <repo> [--item <id>] [--readiness-receipt <path>] --maintainer-review-receipt <ref> --soul-review-receipt <ref> --mind-review-receipt <ref> --bifrost-review-receipt <ref> [--review-summary <text>]\n\
deployment-config-audit --workspace <repo> [--artifact-dir <path>] [--no-write]\n\
deployment-execution-runbook --workspace <repo> [--artifact-dir <path>] [--remote origin] [--no-write]\n\
deployment-aftercare-audit --workspace <repo> [--artifact-dir <path>] [--local-verse-store <path>] [--runtime-id <id>] [--runbook-receipt <path>] [--idunn-deployment-receipt-ref <ref>|--idunn-deployment-receipt <path>] [--aftercare-audit-receipt-ref <ref>|--aftercare-audit-receipt <path>] [--no-write]\n\

View file

@ -1661,6 +1661,23 @@ Idunn keeps lifecycle ownership, Odin/Gjallar keep discovery/sight, and no
readiness approval, publication, sync, service mutation, Hands action, or
private-state authority is granted.
`epiphany-work readiness-review` is now the explicit readiness adoption gate
after the sight receipt is ready. It consumes the ready
`epiphany.repo_work_readiness_report.v0`, requires four explicit review refs
from Maintainer, Soul, Mind, and Bifrost, refuses unless status is `ready`,
`missingRequiredCount=0`, every row is satisfied, the original readiness report
remained sight-only, and all dangerous authority stayed denied. It writes
`epiphany.repo_work_readiness_review_receipt.v0` with
`status=readiness-approved`, `readinessApprovalAuthorized=true`, and explicit
false authority for durable state commit, publication, PR, merge, upstream sync,
deployment, service lifecycle, Hands action, cross-body mutation, private Verse
rummaging, and private-state exposure. Native smoke
`.epiphany-smoke\repo-work-readiness-20260621-111411` proves the full ready
chain through the review receipt with sixteen satisfied rows. Wrapper proof
`local-20260621-121829-442-d011af09` invokes
`tools/epiphany_local_run.ps1 -Mode repo-work-readiness-review` and prints the
same approval boundary at the operator mouth.
Bifrost public-proof publication transport is now the closure after local
proof sight. `epiphany-verse-query bifrost-public-proof --public-proof-id <id>
--ledger-entry-id <id> --review-receipt <id> --credit-receipt <id>` selects an
@ -1917,7 +1934,7 @@ temptation wearing clean robes.
| Self scheduling | `tick` and `serve` prove one-step branch-local advancement, brake refusal, active-turn refusal, cooldown, and stale-turn recovery; `tick` now routes executed branch-local work through the existing Soul/Modeling/Mind `close` gate; `queue-run` selects tick-actionable rows from the typed repo-work queue and delegates to `tick`; `epiphany-swarm run` is the bounded operator mouth over that queue/tick physiology; `repo-work-service-plan`, `repo-work-service-runbook`, `repo-work-service-launch`, and `repo-work-service-audit` write Idunn lifecycle receipts/artifacts for the same queue-run command and prove non-mutating launch/readiness closure. | Keep any future queue-run service install/start mutation behind Idunn and explicit elevated operator authority. |
| Branch-local Hands work | `adopt` and `execute` create approved Hands gates, run planned commands, stage declared paths, commit on `epiphany/*`, and write receipts. | Keep mutation branch-contained and receipt-backed; broaden only through typed plan families, not ad hoc shell freedom. |
| Soul/Modeling/Mind closure | `close` verifies the Hands commit, writes `epiphany.repo_work_closure_review.v0`, refuses path-scope mismatches, refuses missing/tampered/non-affirmative Mind adoption proof, runs known safe-family content assertions, optionally gates on model-authored closure verdicts, can require verification output to cite declared changed paths with `--require-source-grounding`, writes Soul/Modeling/Mind receipts, admits a compact typed repo map entry into `.epiphany/state/repo-work-map.msgpack`, and mirrors that admitted fact into local Verse as `epiphany.cultmesh.repo_work_map_entry.v0`. | Keep extending closure toward source-grounded semantic review and richer semantic map lenses, while preserving deterministic local closure for simple mechanical work. |
| Repo work sight | `overview` emits compact proof rows, an `epiphany.repo_work_intake_consensus_readback.v0` from the accept/plan chain, and typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; `readiness` now emits `epiphany.repo_work_readiness_report.v0` and mirrors `epiphany.cultmesh.repo_work_readiness.v0` over the MVP proof rows, including Soul's safe-family planning matrix readback, Idunn repo-work service audit validation, Odin/Gjallar tool-directory validation, Bifrost/GitHub publication receipt-chain validation, and upstream-main sync receipt plus git ancestry validation while still granting no readiness approval; the CultMesh TUI rows include compact `CONSENSUS` and `REPO-WORK-READINESS` readbacks showing Persona/public feedback ids, Imagination consensus route, public/candidate ref counts, safe family, readiness gaps, and authority denials without private payloads; `close` mirrors Mind-admitted map facts as `epiphany.cultmesh.repo_work_map_entry.v0`; Gjallar enumerates overview history, readiness rows, map rows, semantic rows, closure rows, family lens rows, path lens rows, branch lens rows, stage lens rows, gate lens rows, and public-proof rows without private-state exposure; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue for branch-local scheduler pulses. | Deepen Bifrost-first external work accounting and semantic map readback without moving action authority out of Hands/Self/Bifrost. |
| Repo work sight/review | `overview` emits compact proof rows, an `epiphany.repo_work_intake_consensus_readback.v0` from the accept/plan chain, and typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; `readiness` now emits `epiphany.repo_work_readiness_report.v0` and mirrors `epiphany.cultmesh.repo_work_readiness.v0` over the MVP proof rows, including Soul's safe-family planning matrix readback, Idunn repo-work service audit validation, Odin/Gjallar tool-directory validation, Bifrost/GitHub publication receipt-chain validation, and upstream-main sync receipt plus git ancestry validation while still granting no readiness approval; `readiness-review` consumes that ready sight receipt and four Maintainer/Soul/Mind/Bifrost review refs to write `epiphany.repo_work_readiness_review_receipt.v0` with readiness approval only, not action authority; the CultMesh TUI rows include compact `CONSENSUS` and `REPO-WORK-READINESS` readbacks showing Persona/public feedback ids, Imagination consensus route, public/candidate ref counts, safe family, readiness gaps, and authority denials without private payloads; `close` mirrors Mind-admitted map facts as `epiphany.cultmesh.repo_work_map_entry.v0`; Gjallar enumerates overview history, readiness rows, map rows, semantic rows, closure rows, family lens rows, path lens rows, branch lens rows, stage lens rows, gate lens rows, and public-proof rows without private-state exposure; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue for branch-local scheduler pulses. | Deepen Bifrost-first external work accounting and semantic map readback without moving action authority out of Hands/Self/Bifrost. |
| Publication | `publish` routes Bifrost/GitHub receipts from closure or explicit Soul/Mind refs. | Keep publication Bifrost-owned; do not let scheduler publish. |
| Upstream main sync | `sync` proves the published commit is contained by upstream main after explicit merge/sync authority. | Treat upstream-main sync as a required final proof for published work. |
| Daemon survival | Idunn service lifecycle receipts and runbooks exist outside repo-work tick authority. | Preserve Idunn as lifecycle owner; repo swarm may request or inspect service state, not impersonate daemon keeping. |

View file

@ -172,6 +172,7 @@ remembers doctrine; the branch remembers the blade.
- 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`, `-RepoWorkDeploymentAftercareReceipt`, `-RepoWorkDeploymentAftercareReceiptRef`, 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-111351-678-c3f7c714` against `.epiphany-smoke\repo-work-readiness-20260621-101053\repo-body` reported `status=not-ready`, missing `bifrost-publication`, `upstream-main-sync`, `idunn-lifecycle`, and `tool-directory`, while `deployment-aftercare` was satisfied and all authority booleans stayed false. `gjallar`/`swarm-overview` and `swarm-triage` wrapper summaries forward Rust-owned `repoWorkReadinessTuiRows`; earlier 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-21: Repo-work readiness now includes the family-friendly safe-family planning depth row, receipt-shaped Idunn/tool-directory validation, Bifrost/GitHub publication receipt-chain validation, and upstream-main sync receipt/ancestry validation. `epiphany-work readiness` inspects `closureReview.familyAssertions.safeFamilyPlanning` from the close receipt and satisfies `safe-family-planning` only for Soul-owned `epiphany.repo_work_safe_family_planning_readback.v0` over `repo.planning_brief` with all expected candidate families, requirements, gates, matrix groups, matrix controls, closure proofs, authority denials, and private-state seal intact. It satisfies `idunn-lifecycle` only from `epiphany.repo_work_service_audit.v0` with complete Idunn-owned repo-work service proof, zero missing/failed checks, no service-manager mutation, no elevation requirement, and private-state seal; satisfies `tool-directory` only from `epiphany.cultmesh.daemon_tool_directory.v0` with nonempty globally available receipt-gated daemon tools, ready hosts, invoke command hints, and private-state seal; satisfies `bifrost-publication` only when the local publish artifact matches latest repo-local CultMesh Bifrost body-change and GitHub publication receipts; and satisfies `upstream-main-sync` only when `epiphany.repo_work_sync_receipt.v0` proves nonempty merge/sync authority receipts, matching publish/Bifrost/GitHub/Hands ids, private-state seal, and live git ancestry that the published commit is contained by the named upstream ref. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-110524` now runs the readiness proof through `repo-planning-brief` cargo, sealed Idunn/tool artifacts, real `epiphany-work publish`, disposable upstream-main merge proof, and `epiphany-work sync`, proving all sixteen rows satisfied with `status=ready`, `missingRequiredCount=0`, `syncStatus=upstream-main-synced`, and `upstreamMainSynced=true`. Wrapper proof `local-20260621-120641-609-72d32f64` prints the same no-gap row without granting readiness, scheduling, Hands, publication, deployment, service lifecycle, durable state commit, cross-body mutation, or private-state authority.
- 2026-06-21: Repo-work readiness review/adoption now has an explicit typed gate. `epiphany-work readiness-review` consumes a ready `epiphany.repo_work_readiness_report.v0`, requires Maintainer, Soul, Mind, and Bifrost review receipt refs, refuses unless `missingRequiredCount=0` and every readiness row is satisfied, and writes `epiphany.repo_work_readiness_review_receipt.v0` with `status=readiness-approved`, `readinessApprovalAuthorized=true`, `readinessAdopted=true`, and durable-state/publication/PR/merge/upstream-sync/deployment/service/Hands/cross-body/private-state authority all false. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-111411` proves the full ready chain plus review receipt with sixteen satisfied rows. Wrapper proof `local-20260621-121829-442-d011af09` proves `tools/epiphany_local_run.ps1 -Mode repo-work-readiness-review` prints the same approval boundary at the operator mouth.
- 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 readiness can now reach `ready` from typed receipt evidence without granting action authority. `epiphany-work readiness` validates `bifrost-publication` from the local publish artifact plus matching repo-local CultMesh Bifrost/GitHub receipts, and validates `upstream-main-sync` only when `epiphany.repo_work_sync_receipt.v0` has status `upstream-main-synced`, nonempty merge/sync authority receipts, matching publish/Bifrost/GitHub/Hands ids, private-state seal, and live git ancestry proof that the published commit is contained by the named upstream ref. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-110524` now drives repo-planning-brief cargo, sealed Idunn/tool artifacts, deployment-aftercare, real `epiphany-work publish`, disposable upstream-main merge proof, and `epiphany-work sync`, proving all sixteen readiness rows satisfied with `status=ready`, `missingRequiredCount=0`, `syncStatus=upstream-main-synced`, and `upstreamMainSynced=true`; wrapper proof `local-20260621-120641-609-72d32f64` printed the same no-gap readiness mouth while keeping readiness approval, scheduling, Hands, publication, deployment, service lifecycle, durable state commit, cross-body mutation, and private-state authority false.
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 turning the ready sight receipt into a Maintainer/Soul/Mind/Bifrost readiness review request/adoption path, deeper Bifrost-first external-work accounting if ledger/publication readback needs more cargo, 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, safe-family planning depth, Gjallar closure/readiness map rows, Bifrost ledger accounting rows, readiness wrapper mouth, repo deployment handoff/readback wrappers, readiness deployment-aftercare closure, readiness safe-family planning closure, readiness Idunn/tool-directory receipt validation, readiness Bifrost/GitHub publication-chain validation, and readiness upstream-main sync validation 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-work readiness review/adoption now has an explicit typed gate after ready sight. `epiphany-work readiness-review` consumes a ready `epiphany.repo_work_readiness_report.v0`, requires Maintainer, Soul, Mind, and Bifrost review receipt refs, refuses unless `missingRequiredCount=0` and every readiness row is satisfied, and writes `epiphany.repo_work_readiness_review_receipt.v0` with `status=readiness-approved`, `readinessApprovalAuthorized=true`, `readinessAdopted=true`, and durable-state/publication/PR/merge/upstream-sync/deployment/service/Hands/cross-body/private-state authority all false. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-111411` proves the full ready chain plus review receipt with sixteen satisfied rows; wrapper proof `local-20260621-121829-442-d011af09` proves `tools/epiphany_local_run.ps1 -Mode repo-work-readiness-review` prints the same approval boundary at the operator mouth.
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 exposing readiness review receipts through Gjallar/receipt-directory/public proof surfaces if operator sight needs them, deeper Bifrost-first external-work accounting if ledger/publication readback needs more cargo, 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, safe-family planning depth, Gjallar closure/readiness map rows, Bifrost ledger accounting rows, readiness wrapper mouth, repo deployment handoff/readback wrappers, readiness deployment-aftercare closure, readiness safe-family planning closure, readiness Idunn/tool-directory receipt validation, readiness Bifrost/GitHub publication-chain validation, readiness upstream-main sync validation, and readiness review/adoption receipt validation 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-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")]
[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-readiness-review", "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 = "",
@ -60,6 +60,12 @@ param(
[string]$RepoWorkToolDirectoryReceipt = "",
[string]$RepoWorkDeploymentAftercareReceipt = "",
[string]$RepoWorkDeploymentAftercareReceiptRef = "",
[string]$RepoWorkReadinessReceipt = "",
[string]$RepoWorkMaintainerReviewReceipt = "maintainer-review:local-proof",
[string]$RepoWorkSoulReviewReceipt = "soul-review:local-proof",
[string]$RepoWorkMindReviewReceipt = "mind-review:local-proof",
[string]$RepoWorkBifrostReviewReceipt = "bifrost-review:local-proof",
[string]$RepoWorkReadinessReviewSummary = "Operator-safe local readiness review approves a ready sight receipt without granting action authority.",
[string]$RepoDeploymentRemote = "origin",
[string]$RepoDeploymentRunbookReceipt = "",
[string]$RepoDeploymentIdunnReceipt = "",
@ -359,7 +365,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-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") {
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-readiness-review" -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 `
@ -416,7 +422,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-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") {
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-readiness-review" -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 {
@ -489,7 +495,7 @@ function Assert-SwarmBrakeAllowsLiveRun {
}
}
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 (@("plan", "run", "mvp", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-readiness", "repo-work-readiness-review", "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"
}
@ -1991,6 +1997,30 @@ if ($Mode -eq "repo-work-readiness") {
-StderrPath (Join-Path $artifactRoot "repo-work-readiness.stderr.log")
}
if ($Mode -eq "repo-work-readiness-review") {
$resultPath = Join-Path $artifactRoot "repo-work-readiness-review.stdout.json"
$repoWorkArgs = @(
"readiness-review",
"--workspace", $Workspace,
"--item", $RepoWorkItem,
"--maintainer-review-receipt", $RepoWorkMaintainerReviewReceipt,
"--soul-review-receipt", $RepoWorkSoulReviewReceipt,
"--mind-review-receipt", $RepoWorkMindReviewReceipt,
"--bifrost-review-receipt", $RepoWorkBifrostReviewReceipt,
"--review-summary", $RepoWorkReadinessReviewSummary
)
if ($RepoWorkReadinessReceipt -ne "") {
$repoWorkArgs += @("--readiness-receipt", $RepoWorkReadinessReceipt)
}
Invoke-Checked `
-Label "review repo-work MVP readiness sight" `
-FilePath $repoWorkExe `
-Arguments $repoWorkArgs `
-WorkingDirectory $Root `
-StdoutPath $resultPath `
-StderrPath (Join-Path $artifactRoot "repo-work-readiness-review.stderr.log")
}
if ($Mode -eq "repo-deployment-config-audit") {
$resultPath = Join-Path $artifactRoot "repo-deployment-config-audit.stdout.json"
Invoke-Checked `
@ -2690,6 +2720,8 @@ 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-work-readiness-review") {
Write-Host "Repo work readiness review: status=$($result.status), item=$($result.item), review=$($result.reviewId), missing=$($result.missingRequiredCount), satisfied=$($result.satisfiedRowCount), receipt=$($result.receiptPath), readiness=$($result.readinessReceiptPath), readinessApprovalAuthorized=$($result.authority.readinessApprovalAuthorized), durableStateCommitAuthorized=$($result.authority.durableStateCommitAuthorized), publicationAuthorized=$($result.authority.publicationAuthorized), mergeAuthorized=$($result.authority.mergeAuthorized), 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) {