From dfdbad9e4b1ce1bb2d16186d8e627748a753a220 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 11:42:06 +0100 Subject: [PATCH] Validate readiness lifecycle receipts --- .../bin/epiphany-repo-work-readiness-smoke.rs | 54 +++- epiphany-core/src/bin/epiphany-work.rs | 239 ++++++++++++++++-- notes/epiphany-repo-swarm-mvp-contract.md | 29 ++- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 369471 -> 369844 bytes state/map.yaml | 4 +- 6 files changed, 288 insertions(+), 40 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs b/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs index cff1c227..8b107cb3 100644 --- a/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs +++ b/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs @@ -224,6 +224,54 @@ fn run_smoke(args: Args) -> Result { "privateStateExposed": false }), )?; + let idunn_lifecycle_fixture = repo + .join(".epiphany") + .join("work") + .join("repo-work-service-audit.json"); + write_json( + &idunn_lifecycle_fixture, + &json!({ + "schemaVersion": "epiphany.repo_work_service_audit.v0", + "status": "complete", + "serviceId": "epiphany-repo-work-queue-runner", + "schedulerId": "epiphany-repo-work-queue-runner", + "receiptId": "repo-work-readiness-smoke-idunn-audit", + "planStatus": "present", + "runbookStatus": "present", + "runbookArtifactStatus": "present", + "runbookArtifactRef": "artifact://repo-work-readiness-smoke/repo-work-service-runbook.ps1", + "runbookSha256": "readiness-smoke-fixture", + "launchStatus": "ok", + "launchExitCode": 0, + "missingChecks": [], + "failedChecks": [], + "lifecycleOwner": "Idunn", + "hostedBody": "repo-work", + "mutatesServiceManager": false, + "requiresElevatedAuthority": false, + "privateStateExposed": false, + "nextSafeMove": "continue repo-swarm MVP planner/interpreter hardening" + }), + )?; + let tool_directory = cargo_json( + &manifest, + "epiphany-verse-query", + &[ + "tool-directory", + "--store", + path_str(&local_verse)?, + "--runtime-id", + "repo-work-readiness-smoke", + ], + &root, + )?; + write_json( + &repo + .join(".epiphany") + .join("work") + .join("tool-directory.json"), + &tool_directory, + )?; let readiness = cargo_json( &manifest, "epiphany-work", @@ -237,7 +285,7 @@ fn run_smoke(args: Args) -> Result { "epiphany.repo_work_readiness.v0", )?; require_eq(&readiness, &["status"], "not-ready")?; - require_u64(&readiness, &["missingRequiredCount"], 4)?; + require_u64(&readiness, &["missingRequiredCount"], 2)?; require_bool(&readiness, &["authority", "sightOnly"], true)?; require_bool( &readiness, @@ -286,9 +334,9 @@ fn run_smoke(args: Args) -> Result { require_row(&readiness, "public-proof", true)?; require_row(&readiness, "bifrost-publication", false)?; require_row(&readiness, "upstream-main-sync", false)?; - require_row(&readiness, "idunn-lifecycle", false)?; + require_row(&readiness, "idunn-lifecycle", true)?; require_row(&readiness, "deployment-aftercare", true)?; - require_row(&readiness, "tool-directory", false)?; + require_row(&readiness, "tool-directory", true)?; require_row(&readiness, "private-state-redaction", true)?; let gjallar = cargo_json( diff --git a/epiphany-core/src/bin/epiphany-work.rs b/epiphany-core/src/bin/epiphany-work.rs index 3d3ab345..6a3b907f 100644 --- a/epiphany-core/src/bin/epiphany-work.rs +++ b/epiphany-core/src/bin/epiphany-work.rs @@ -5556,8 +5556,8 @@ fn derive_repo_readiness_review_request_plan( "public_proof = \"epiphany.repo_work_public_proof_bundle.v0\"".to_string(), "bifrost_publication = \"gamecult.bifrost.public_proof_publication_receipt.v0\"".to_string(), "upstream_sync = \"epiphany.repo_work_upstream_sync_receipt.v0\"".to_string(), - "idunn_lifecycle = \"epiphany.cultmesh.daemon_service_lifecycle_receipt.v0\"".to_string(), - "tool_directory = \"epiphany.cultmesh.daemon_tool_directory_readback.v0\"".to_string(), + "idunn_lifecycle = \"epiphany.repo_work_service_audit.v0\"".to_string(), + "tool_directory = \"epiphany.cultmesh.daemon_tool_directory.v0\"".to_string(), String::new(), "[readiness_packet]".to_string(), "requires_proof_bundle_ref = true".to_string(), @@ -8418,8 +8418,8 @@ fn closure_family_assertions( && content.contains( "upstream_sync = \"epiphany.repo_work_upstream_sync_receipt.v0\"", ) - && content.contains("idunn_lifecycle = \"epiphany.cultmesh.daemon_service_lifecycle_receipt.v0\"") - && content.contains("tool_directory = \"epiphany.cultmesh.daemon_tool_directory_readback.v0\""), + && content.contains("idunn_lifecycle = \"epiphany.repo_work_service_audit.v0\"") + && content.contains("tool_directory = \"epiphany.cultmesh.daemon_tool_directory.v0\""), "Committed readiness review request names the MVP proof receipt contract." .to_string(), ); @@ -12170,21 +12170,22 @@ fn run_readiness(args: ReadinessArgs) -> Result { "Published commit is contained by upstream main.", )?, ]; - if let Some(path) = args.idunn_lifecycle_receipt.as_ref() { - rows.push(readiness_path_row( - "idunn-lifecycle", - "Idunn", - "epiphany.cultmesh.daemon_service_lifecycle_receipt.v0", - path, - path.exists(), - "Idunn lifecycle receipt was supplied for the repo-work pulse.", - )?); + let default_idunn_lifecycle_receipt = artifact_dir.join("repo-work-service-audit.json"); + let idunn_lifecycle_path = args.idunn_lifecycle_receipt.as_ref().or_else(|| { + if default_idunn_lifecycle_receipt.exists() { + Some(&default_idunn_lifecycle_receipt) + } else { + None + } + }); + if let Some(path) = idunn_lifecycle_path { + rows.push(idunn_lifecycle_readiness_row(path)?); } else { rows.push(readiness_missing_row( "idunn-lifecycle", "Idunn", - "epiphany.cultmesh.daemon_service_lifecycle_receipt.v0", - "Supply --idunn-lifecycle-receipt after Idunn service audit/readiness proof.", + "epiphany.repo_work_service_audit.v0", + "Supply --idunn-lifecycle-receipt or run repo-work-service-audit into the repo work artifact directory.", )); } let default_deployment_aftercare_audit_receipt = @@ -12279,21 +12280,22 @@ fn run_readiness(args: ReadinessArgs) -> Result { "Supply --deployment-aftercare-audit-receipt, --deployment-aftercare-audit-receipt-ref, or run deployment-aftercare-audit into the repo work artifact directory.", )); } - if let Some(path) = args.tool_directory_receipt.as_ref() { - rows.push(readiness_path_row( - "tool-directory", - "Odin/Gjallar", - "epiphany.cultmesh.daemon_tool_directory_readback.v0", - path, - path.exists(), - "Global daemon tool directory readback was supplied.", - )?); + let default_tool_directory_receipt = artifact_dir.join("tool-directory.json"); + let tool_directory_path = args.tool_directory_receipt.as_ref().or_else(|| { + if default_tool_directory_receipt.exists() { + Some(&default_tool_directory_receipt) + } else { + None + } + }); + if let Some(path) = tool_directory_path { + rows.push(tool_directory_readiness_row(path)?); } else { rows.push(readiness_missing_row( "tool-directory", "Odin/Gjallar", - "epiphany.cultmesh.daemon_tool_directory_readback.v0", - "Supply --tool-directory-receipt from the compact daemon tool directory sight rite.", + "epiphany.cultmesh.daemon_tool_directory.v0", + "Supply --tool-directory-receipt or run tool-directory sight into the repo work artifact directory.", )); } rows.push(json!({ @@ -14176,6 +14178,191 @@ fn readiness_missing_row(kind: &str, owner: &str, required_schema: &str, note: & }) } +fn idunn_lifecycle_readiness_row(path: &Path) -> Result { + let document = read_json_if_exists(path)?; + let schema_version = document + .as_ref() + .and_then(|value| string_from_json(value, &["schemaVersion"])) + .unwrap_or_else(|| "missing".to_string()); + let document_status = document + .as_ref() + .and_then(|value| string_from_json(value, &["status"])) + .unwrap_or_else(|| "missing".to_string()); + let plan_status = document + .as_ref() + .and_then(|value| string_from_json(value, &["planStatus"])) + .unwrap_or_else(|| "missing".to_string()); + let runbook_status = document + .as_ref() + .and_then(|value| string_from_json(value, &["runbookStatus"])) + .unwrap_or_else(|| "missing".to_string()); + let runbook_artifact_status = document + .as_ref() + .and_then(|value| string_from_json(value, &["runbookArtifactStatus"])) + .unwrap_or_else(|| "missing".to_string()); + let launch_status = document + .as_ref() + .and_then(|value| string_from_json(value, &["launchStatus"])) + .unwrap_or_else(|| "missing".to_string()); + let lifecycle_owner = document + .as_ref() + .and_then(|value| string_from_json(value, &["lifecycleOwner"])) + .unwrap_or_else(|| "missing".to_string()); + let hosted_body = document + .as_ref() + .and_then(|value| string_from_json(value, &["hostedBody"])) + .unwrap_or_else(|| "missing".to_string()); + let private_state_exposed = document + .as_ref() + .and_then(|value| bool_from_json(value, &["privateStateExposed"])) + .unwrap_or(true); + let missing_count = document + .as_ref() + .and_then(|value| value.get("missingChecks")) + .and_then(Value::as_array) + .map(Vec::len) + .unwrap_or(usize::MAX); + let failed_count = document + .as_ref() + .and_then(|value| value.get("failedChecks")) + .and_then(Value::as_array) + .map(Vec::len) + .unwrap_or(usize::MAX); + let satisfied = schema_version == "epiphany.repo_work_service_audit.v0" + && document_status == "complete" + && plan_status == "present" + && runbook_status == "present" + && runbook_artifact_status == "present" + && launch_status == "ok" + && lifecycle_owner == "Idunn" + && hosted_body == "repo-work" + && document + .as_ref() + .and_then(|value| bool_from_json(value, &["mutatesServiceManager"])) + == Some(false) + && document + .as_ref() + .and_then(|value| bool_from_json(value, &["requiresElevatedAuthority"])) + == Some(false) + && !private_state_exposed + && missing_count == 0 + && failed_count == 0; + + Ok(json!({ + "kind": "idunn-lifecycle", + "owner": "Idunn", + "requiredSchema": "epiphany.repo_work_service_audit.v0", + "evidenceRef": existing_path_value(path), + "artifactStatus": if path.exists() { "present" } else { "missing" }, + "schemaVersion": schema_version, + "documentStatus": document_status, + "planStatus": plan_status, + "runbookStatus": runbook_status, + "runbookArtifactStatus": runbook_artifact_status, + "launchStatus": launch_status, + "missingCheckCount": missing_count, + "failedCheckCount": failed_count, + "lifecycleOwner": lifecycle_owner, + "hostedBody": hosted_body, + "mutatesServiceManager": document + .as_ref() + .and_then(|value| bool_from_json(value, &["mutatesServiceManager"])) + .unwrap_or(true), + "requiresElevatedAuthority": document + .as_ref() + .and_then(|value| bool_from_json(value, &["requiresElevatedAuthority"])) + .unwrap_or(true), + "privateStateExposed": private_state_exposed, + "satisfied": satisfied, + "status": if satisfied { "satisfied" } else { "missing" }, + "note": "Idunn repo-work service audit proves the queue runner lifecycle path without service-manager mutation.", + "serviceLifecycleAuthority": false, + "deploymentAuthority": false, + "handsActionAuthorized": false + })) +} + +fn tool_directory_readiness_row(path: &Path) -> Result { + let document = read_json_if_exists(path)?; + let schema_version = document + .as_ref() + .and_then(|value| string_from_json(value, &["schemaVersion"])) + .unwrap_or_else(|| "missing".to_string()); + let document_status = document + .as_ref() + .and_then(|value| string_from_json(value, &["status"])) + .unwrap_or_else(|| "missing".to_string()); + let tool_count = document + .as_ref() + .and_then(|value| value.get("toolCount")) + .and_then(Value::as_u64) + .unwrap_or(0); + let host_ready_count = document + .as_ref() + .and_then(|value| value.get("hostReadyCount")) + .and_then(Value::as_u64) + .unwrap_or(0); + let host_attention_count = document + .as_ref() + .and_then(|value| value.get("hostAttentionCount")) + .and_then(Value::as_u64) + .unwrap_or(0); + let invariant_all_agents = document + .as_ref() + .and_then(|value| bool_from_json(value, &["invariants", "availableToAllAgents"])) + .unwrap_or(false); + let invariant_receipts = document + .as_ref() + .and_then(|value| bool_from_json(value, &["invariants", "requiresReceipt"])) + .unwrap_or(false); + let invariant_private = document + .as_ref() + .and_then(|value| bool_from_json(value, &["invariants", "privateStateExposed"])) + .unwrap_or(true); + let has_invoke_command = document + .as_ref() + .and_then(|value| string_from_json(value, &["invocationCommand"])) + .is_some_and(|command| command.contains("invoke-tool")); + let has_wrapper_command = document + .as_ref() + .and_then(|value| string_from_json(value, &["wrapperInvocationCommand"])) + .is_some_and(|command| command.contains("tool-invoke")); + let satisfied = schema_version == "epiphany.cultmesh.daemon_tool_directory.v0" + && document_status == "ok" + && tool_count > 0 + && host_ready_count > 0 + && host_attention_count == 0 + && invariant_all_agents + && invariant_receipts + && !invariant_private + && has_invoke_command + && has_wrapper_command; + + Ok(json!({ + "kind": "tool-directory", + "owner": "Odin/Gjallar", + "requiredSchema": "epiphany.cultmesh.daemon_tool_directory.v0", + "evidenceRef": existing_path_value(path), + "artifactStatus": if path.exists() { "present" } else { "missing" }, + "schemaVersion": schema_version, + "documentStatus": document_status, + "toolCount": tool_count, + "hostReadyCount": host_ready_count, + "hostAttentionCount": host_attention_count, + "availableToAllAgents": invariant_all_agents, + "requiresReceipt": invariant_receipts, + "hasInvocationCommand": has_invoke_command, + "hasWrapperInvocationCommand": has_wrapper_command, + "privateStateExposed": invariant_private, + "satisfied": satisfied, + "status": if satisfied { "satisfied" } else { "missing" }, + "note": "Odin/Gjallar tool-directory sight proves globally available daemon-hosted tools through typed intents and receipts.", + "toolExecutionAuthority": false, + "serviceLifecycleAuthority": false, + "privateVerseRummagingAuthorized": false + })) +} + fn safe_family_planning_readiness_row( close_receipt_path: &Path, close_receipt: Option<&Value>, diff --git a/notes/epiphany-repo-swarm-mvp-contract.md b/notes/epiphany-repo-swarm-mvp-contract.md index 5c65ba2f..8a3ccb13 100644 --- a/notes/epiphany-repo-swarm-mvp-contract.md +++ b/notes/epiphany-repo-swarm-mvp-contract.md @@ -1629,13 +1629,26 @@ satisfied from Soul's `epiphany.repo_work_safe_family_planning_readback.v0` with `candidateNextSafeFamilyCount=21`, all matrix/gate/requirement/closure flags present, authority denied, and private state sealed. The same proof satisfies deployment-aftercare from a sealed -`epiphany.repo_deployment_aftercare_audit.v0` artifact while still reporting -`not-ready` with four missing rows: Bifrost publication, upstream-main sync, -Idunn lifecycle, and tool directory; writes readiness id -`repo-work-readiness-repo-work-readiness`; and Gjallar reports -`repoWorkReadinessCount=1` without private-state exposure. Wrapper proof -`local-20260621-112704-207-2316f57f` prints the same safe-family planning row -through the operator mouth. +`epiphany.repo_deployment_aftercare_audit.v0` artifact. The next +proof-bundle cut made Idunn and global tool sight receipt-shaped instead of +path-shaped: readiness now validates `.epiphany/work/repo-work-service-audit.json` +or `--idunn-lifecycle-receipt` as `epiphany.repo_work_service_audit.v0`, +requiring `status=complete`, Idunn ownership, hosted body `repo-work`, present +plan/runbook/artifact proof, `launchStatus=ok`, zero missing/failed checks, no +service-manager mutation, no elevation requirement, and +`privateStateExposed=false`; it also validates `.epiphany/work/tool-directory.json` +or `--tool-directory-receipt` as +`epiphany.cultmesh.daemon_tool_directory.v0`, requiring nonempty globally +available receipt-gated capabilities, ready hosts, typed direct/wrapper +invocation commands, and the private-state seal. Native smoke +`.epiphany-smoke\repo-work-readiness-20260621-103427` now reports +`not-ready` with only two missing rows, Bifrost publication and upstream-main +sync; writes readiness id `repo-work-readiness-repo-work-readiness`; and Gjallar +reports `repoWorkReadinessCount=1` without private-state exposure. Wrapper +proof `local-20260621-113642-150-6f7ae7a5` prints the same two-gap readiness +mouth. This is still sight only: 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. Bifrost public-proof publication transport is now the closure after local proof sight. `epiphany-verse-query bifrost-public-proof --public-proof-id @@ -1893,7 +1906,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 and naming missing Bifrost/upstream/Idunn/tool-directory gates without approving readiness; 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 | `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, and Odin/Gjallar tool-directory validation while naming the remaining Bifrost publication/upstream-main gaps without approving readiness; 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. | diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 27d63843..dea1b91c 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -171,7 +171,7 @@ remembers doctrine; the branch remembers the blade. - 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 -RepoWorkItem ` 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. `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. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-102528` now runs the readiness proof through `repo-planning-brief` cargo and proves `safe-family-planning` satisfied with `candidateNextSafeFamilyCount=21`, while still missing only Bifrost publication, upstream-main sync, Idunn lifecycle, and tool directory. Wrapper proof `local-20260621-112704-207-2316f57f` prints the same 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 now includes the family-friendly safe-family planning depth row plus receipt-shaped Idunn/tool-directory 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 also 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; and 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. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-103427` now runs the readiness proof through `repo-planning-brief` cargo and sealed Idunn/tool artifacts, proving `safe-family-planning`, `idunn-lifecycle`, `deployment-aftercare`, and `tool-directory` satisfied with `missingRequiredCount=2` for only Bifrost publication and upstream-main sync. Wrapper proof `local-20260621-113642-150-6f7ae7a5` prints the same two-gap row without granting readiness, scheduling, Hands, publication, deployment, service lifecycle, durable state commit, cross-body mutation, or private-state authority. - 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/.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. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index b307600c49ef7f99f58e74f74d28df808d0d042e..3683c4b4a4d6038e93a08e88c65b7d0bddad98f2 100644 GIT binary patch delta 271 zcmdmgOl-?Zu?-T8+$IKA#^zDS7+4oi+^o!4$jDgIJe8?^Dib3RgJ@GtzktyzpsjLfHhG-r|5Ff!CNG&D9dG14_O zHPAInGfzx4Pc&61&d4uU$j{5ERB*~nE6Oh}nV#>%DkYhln3<OV delta 53 zcmdmTQf&V*u?-T8+(s5whK5nc7+4p{Y*uD0WMnLEp32ldm5C9EK{PWEvuvNr#JXw$ E0MoG$;s5{u diff --git a/state/map.yaml b/state/map.yaml index dffbbc52..2ee73b47 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -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 now carries the family-friendly safe-family planning depth row. `epiphany-work readiness` reads `closureReview.familyAssertions.safeFamilyPlanning` from the close receipt and adds `safe-family-planning` as a first-class MVP readiness row only when Soul reported `epiphany.repo_work_safe_family_planning_readback.v0` for `repo.planning_brief` with all expected candidate families, planning requirements, gates, matrix groups, matrix controls, closure proofs, authority denials, and private-state seal intact. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-102528` now drives the readiness proof through `repo-planning-brief` instead of checklist cargo, proving `safe-family-planning:satisfied`, `candidateNextSafeFamilyCount=21`, `missingRequiredCount=4`, and no readiness/publication/deployment/service/Hands/private-state authority; wrapper proof `local-20260621-112704-207-2316f57f` printed the same row 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 wiring tool-directory/Idunn lifecycle receipt production into repeatable readiness proof bundles, Bifrost-first external-work accounting, 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, and readiness safe-family planning closure 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 now validates Idunn lifecycle and global tool-directory proof rows from receipt-shaped artifacts instead of path existence. `epiphany-work readiness` accepts `.epiphany/work/repo-work-service-audit.json` or `--idunn-lifecycle-receipt` only when it is `epiphany.repo_work_service_audit.v0` with complete Idunn-owned repo-work service proof, present plan/runbook/artifact rows, launch ok, zero missing/failed checks, no service-manager mutation, no elevation requirement, and `privateStateExposed=false`; it accepts `.epiphany/work/tool-directory.json` or `--tool-directory-receipt` only when it is `epiphany.cultmesh.daemon_tool_directory.v0` with nonempty globally available receipt-gated daemon tools, ready hosts, direct/wrapper invoke commands, and private-state seal. Native smoke `.epiphany-smoke\repo-work-readiness-20260621-103427` now drives the readiness proof through repo-planning-brief cargo plus those sealed artifacts, proving `safe-family-planning`, `idunn-lifecycle`, `deployment-aftercare`, and `tool-directory` satisfied with `missingRequiredCount=2` for only Bifrost publication and upstream-main sync; wrapper proof `local-20260621-113642-150-6f7ae7a5` printed the same two-gap row 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 Bifrost-first external-work accounting/publication proof, upstream-main sync proof after explicit publication/merge authority, 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, and readiness Idunn/tool-directory 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.