diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 23b46f17..faea8d4b 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -2084,14 +2084,20 @@ fn main() -> Result<()> { || bifrost_ledger_report.collaboration_chain_count != 2 || bifrost_ledger_report.rows.len() != 5 || bifrost_ledger_report.private_state_exposed - || !bifrost_ledger_report - .tui_rows - .iter() - .any(|row| row.contains("github-publication-receipt")) - || !bifrost_ledger_report - .tui_rows - .iter() - .any(|row| row.contains("imagination-consensus-receipt")) + || !bifrost_ledger_report.tui_rows.iter().any(|row| { + row.contains("github-publication-receipt") + && row.contains( + "public=https://github.com/GameCult/EpiphanyAgent/pull/smoke", + ) + && row.contains("private=false") + }) + || !bifrost_ledger_report.tui_rows.iter().any(|row| { + row.contains("imagination-consensus-receipt") + && row.contains( + "public=https://gamecult.org/Blog/purge-the-heretek-from-our-daemonic-swarm", + ) + && row.contains("private=false") + }) { anyhow::bail!("local Verse query smoke lost compact Bifrost ledger readback"); } @@ -4911,9 +4917,14 @@ fn push_bifrost_ledger_row( } else { "OK" }; + let private = if row.private_state_exposed { + "private=true" + } else { + "private=false" + }; tui_rows.push(format!( - "{compact_status} | {} | {} | {} | {}", - row.document_kind, row.id, row.status, row.route + "{compact_status} | {} | {} | {} | {} | public={} | {private}", + row.document_kind, row.id, row.status, row.route, row.public_ref )); rows.push(row); } diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 2f9e8c8a..faab938f 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -56,7 +56,7 @@ remembers doctrine; the branch remembers the blade. - `epiphany-verse-query connect-eve` and `tools/epiphany_local_run.ps1 -Mode eve-connect` are the compact Odin-to-Eve connection receipt rite. The command now selects its target from the narrow Eve surface directory and verifies latest intent/receipt keys through narrow CultMesh loaders instead of serializing the full local Verse. The wrapper defaults to `epiphany.cluster.persona`, records intent `eve-connection-intent` plus receipt `eve-connection-receipt`, targets `eve://epiphany/persona`, and keeps `privateStateExposed=false`. Verified: direct temp proof and wrapper proof both returned `status=ok`. - `epiphany-verse-query collaboration-feedback` and `tools/epiphany_local_run.ps1 -Mode collaboration-feedback` are the compact public Persona feedback to Imagination consensus receipt rite. The command verifies latest feedback/consensus keys through narrow CultMesh loaders and now emits follow-on commands for wrapper feedback, Eve connection, direct Bifrost publication, and wrapper Bifrost publication. The wrapper first records the prerequisite Eve connection receipt, then writes feedback `collaboration-feedback` plus consensus `imagination-consensus-receipt`, with adoption gate `mind.review_then_bifrost_adoption` and `privateStateExposed=false`. Verified: direct proof and wrapper proof both returned `status=ok`, and wrapper artifact `local-20260618-072118-623-cad0c52f` carried the command hints. - `epiphany-verse-query bifrost-publication` and `tools/epiphany_local_run.ps1 -Mode bifrost-publication` are the compact non-mutating body-change publication proof rite. The command verifies latest Bifrost intent/publication/GitHub receipt keys through narrow CultMesh loaders and now emits follow-on commands for swarm overview, tool directory, and wrapper Bifrost publication readback. The wrapper supplies explicit proof defaults for target repo, changed path, verification/review receipts, credit subject, ledger id, Hands PR receipt id, and publication URL, then writes Bifrost intent, Bifrost publication receipt, and GitHub publication receipt with `privateStateExposed=false`. Verified: direct proof and wrapper proof both returned `status=ok`, and wrapper artifact `local-20260618-072118-704-3c5ae3da` carried the command hints. -- `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` are the compact read-only Bifrost ledger sight rite. The command reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt through narrow CultMesh loaders, then returns five TUI rows when both chains exist. Verified: smoke `verse-query-smoke-bifrost-ledger.ccmp`, wrapper build proof `local-20260618-073005-597-dc39feac`, and skip-build proof `local-20260618-073051-463-8afc3a56` returned `status=ok`, `publicationChainCount=3`, `collaborationChainCount=2`, `rowCount=5`, and `privateStateExposed=false`. +- `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` are the compact read-only Bifrost ledger sight rite. The command reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt through narrow CultMesh loaders, then returns five TUI rows when both chains exist. TUI rows now include `public=` and `private=false`, and wrapper proof `local-20260618-172258-802-e0cbf5d1` prints the public refs for the body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt in one line. Verified: source smoke and live wrapper both returned `status=ok`, `publicationChainCount=3`, `collaborationChainCount=2`, `rowCount=5`, and `privateStateExposed=false`. - `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` are the compact latest-witness directory over local Verse. The command indexes typed projections for operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA without exposing raw payloads or private worker context. It treats sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as operator attention instead of private-state exposure, routes cluster lifecycle wounds to `cluster-service-execution-audit`, preserves `service-execution-audit` for single-service receipts, and exposes the runbook witnesses as separate display-only `cluster-service-execution-runbook` and `service-execution-runbook` rows. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and renders service lifecycle routes as `service-id::action` so compact rows name the owning lifecycle action without exposing raw audit payloads. Verified: isolated `epiphany-verse-query smoke --store .\.epiphany-smoke\verse-query-route-action\local-verse.ccmp --runtime-id verse-query-route-action-smoke` passes; live wrapper artifact `local-20260618-134424-242-ebd28924` returned `cluster-service-lifecycle` route `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit`, `service-lifecycle` route `epiphany-daemon-supervisor-service::windows-service-execution-audit`, both execution-runbook routes, `attentionRowCount=2`, and `privateStateExposed=false`. `missingRowCount` remains as a compatibility alias for absent witnesses, not a fault signal. - Public doctrine source `https://gamecult.org/Blog/purge-the-heretek-from-our-daemonic-swarm` sharpens the current swarm audit: Odin sees but must not own, Gjallar-like surface publishers must produce their own witnesses, Idunn-like ledgers must advance instead of freezing old wounds, and Bifrost is the ledger gate for cross-repo purification receipts rather than transcript archaeology. - `tools/epiphany_local_run.ps1` now stamps local run ids as `local-YYYYMMDD-HHMMSS-fff-` instead of second-resolution ids, so concurrent operator rites get separate artifact roots and run receipts. Verified: `collaboration-feedback` and `bifrost-publication` launched in parallel in the same second and completed as `local-20260618-064814-171-dc0b8dd9` and `local-20260618-064814-149-2946d675`. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 9731fbfc..c8c5134d 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 529b7484..3e7c5d00 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -608,7 +608,7 @@ current_status: - `epiphany-verse-query connect-eve` and `tools/epiphany_local_run.ps1 -Mode eve-connect` provide the compact Odin-to-Eve collaboration receipt. The command selects the daemon-published surface through the narrow Eve directory, writes connection intent/receipt documents, verifies latest receipt keys through narrow CultMesh loaders, defaults the wrapper target to `epiphany.cluster.persona`, and exposes no private state. - `epiphany-verse-query collaboration-feedback` and `tools/epiphany_local_run.ps1 -Mode collaboration-feedback` provide the public Persona feedback to Imagination consensus receipt path. The wrapper records the prerequisite Eve connection receipt, writes feedback plus Imagination consensus receipt documents, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for wrapper feedback, Eve connection, direct Bifrost publication, and wrapper Bifrost publication, and exposes no private state. - `epiphany-verse-query bifrost-publication` and `tools/epiphany_local_run.ps1 -Mode bifrost-publication` provide the non-mutating Bifrost body-change publication proof path. It writes Bifrost intent, Bifrost publication receipt, and GitHub publication receipt documents from explicit review/verification/credit inputs, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for swarm overview, tool directory, and wrapper Bifrost publication readback, and exposes no private state. - - `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` provide the compact Bifrost ledger sight organ. It reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt through narrow CultMesh loaders, returns five agent-friendly TUI rows when both chains exist, publishes follow-on command hints for swarm overview, tool directory, collaboration feedback, Bifrost publication, and Bifrost ledger readback, and exposes no private state. + - `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` provide the compact Bifrost ledger sight organ. It reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt through narrow CultMesh loaders, returns five agent-friendly TUI rows when both chains exist, publishes follow-on command hints for swarm overview, tool directory, collaboration feedback, Bifrost publication, and Bifrost ledger readback, and exposes no private state. Compact ledger rows now carry `public=` plus `private=false`, so body-change/public-feedback proof is inspectable without opening raw local Verse payloads; wrapper proof `local-20260618-172258-802-e0cbf5d1` prints the publication, GitHub, collaboration, and Imagination public refs in one line. - `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` provide the compact latest-witness directory over local Verse. It indexes operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA witness families from typed local Verse projections; returns agent-friendly `OK`/`ABSENT`/`ATTN` TUI rows with owner, family, status, route, latest id, follow-up command, `presentRowCount`, and `absentRowCount`; preserves `missingRowCount` as compatibility for absent witnesses; flags sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as attention without exposing receipt payloads; routes cluster service lifecycle receipts to `cluster-service-execution-audit`, single-service receipts to `service-execution-audit`, the cluster execution-runbook witness to `cluster-service-execution-runbook`, and the single-service execution-runbook witness to `service-execution-runbook`; and exposes no private state or receipt payload previews. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and exposes `service-id::action` route values such as `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit`, so agents can see the owning lifecycle action without opening raw audit JSON. It also exposes `cluster-service-execution-runbook` plus `service-execution-runbook` as display-only rows, so newer harmless planned/runbook lifecycle receipts cannot hide the active seven-service cluster wound. - `tools/epiphany_local_run.ps1 -Mode service-tick` is the wrapper-owned daemon scheduler pulse rite. It runs `epiphany-daemon-supervisor tick` through the same local Verse store, operator run intent/receipt, agent-state SoA refresh, and swarm-brake preflight as other service lifecycle modes, but leaves restart authority inside durable daemon restart policies. The receipt directory scheduler row now follows up with `tools/epiphany_local_run.ps1 -Mode service-tick` instead of passive service status. Proof seeded one disabled Persona restart policy as inert policy metadata, then the wrapper wrote `daemon-scheduler-receipt-epiphany-daemon-supervisor-0` with `status=tickComplete`, `outcomeCount=1`, `skippedCount=1`, `restartedCount=0`, `refusedCount=0`, and `privateStateExposed=false`; the follow-up receipt-directory proof reported the scheduler row as present with route `*`, follow-up command `service-tick`, and no private-state exposure. - `epiphany-cluster-daemon` is the first real per-cluster daemon heartbeat body. It runs as a narrow Rust binary parameterized by daemon id, publishes typed `epiphany.cultmesh.daemon_status.v0` heartbeats into the shared local Verse, can run once or loop, and exposes no private state. Durable restart policies for Self, Hands, Persona, Imagination, Eyes, Modeling, and Soul now invoke `epiphany-cluster-daemon heartbeat`, not the generic query/debug writer. A degraded proof showed `service-tick` invoking all seven daemon bodies through the supervisor and restoring ready liveness with sealed scheduler/poke receipts; a fresh tick no-ops when all heartbeats are current. `epiphany-daemon-supervisor cluster-service-runbook` and wrapper `-Mode cluster-service-runbook` write a non-mutating service runbook plus `daemon_service_lifecycle` receipt for all seven organ daemon `epiphany-cluster-daemon serve` commands. `epiphany-daemon-supervisor cluster-service-install-plan` and wrapper `-Mode cluster-service-install-plan` write a non-mutating Windows install script plus lifecycle receipt for seven distinct per-organ Windows services. Wrapper `-Mode cluster-service-install-execute` requests execution through the same typed path and, in non-elevated shells, writes `execution-refused-not-elevated` with `executed=false` instead of mutating services. `epiphany-daemon-supervisor cluster-service-audit` and wrapper `-Mode cluster-service-audit` read Windows service-manager state for those seven expected service names, writing an incomplete audit receipt when they are missing. `epiphany-daemon-supervisor cluster-service-start`/`cluster-service-stop` and wrapper `-Mode cluster-service-start-plan`, `cluster-service-stop-plan`, `cluster-service-start-execute`, and `cluster-service-stop-execute` record cluster lifecycle receipts for all seven services: plan modes emit seven `*-planned` rows without mutation, and explicit execute modes refuse as `execution-refused-not-elevated` with seven refused rows when the shell lacks service authority. `cluster-service-execution-runbook` writes an admin-gated wrapper sequence for cluster-native readiness, cluster install, cluster start, cluster audit, cluster stop, and final cluster audit; the artifact now uses `Invoke-EpiphanyRunbookStep` to reset `$LASTEXITCODE`, catch thrown/nonzero failures, continue gathering receipts after a failed step, and always runs `cluster-service-execution-audit` from `finally`; the wrapper calls `epiphany-daemon-supervisor cluster-service-execution-runbook` after artifact generation, so the runbook itself has a typed `daemon_service_lifecycle` receipt with action `cluster-windows-service-execution-runbook`, status `written`, artifact path, final-audit metadata, step-failure policy metadata, and `privateStateExposed=false`. Its wrapper JSON and typed receipt args expose `runbookTryModes`, `finalAuditMode=cluster-service-execution-audit`, `finalAuditRunsInFinally=true`, `stepFailurePolicy=continue-after-step-failure`, `continueAfterStepFailure=true`, `nonzeroExitFailsStep=true`, and `exitsNonzeroAfterFinalAudit=true`, and the compact wrapper line prints those same aftercare facts. Latest proof `local-20260618-161632-376-436227d8` generated and parsed the robust cluster artifact; live overview `local-20260618-161718-889-7cebdcb1` points the elevated operator row at that artifact. `cluster-service-execution-audit` first requires the sealed `cluster-windows-service-execution-runbook` receipt, then checks the latest cluster-native readiness plus cluster install/start/audit/stop lifecycle receipts by receipt timestamp and reports `complete` only when the runbook and elevated effect receipts are sealed and successful. Audit check rows retain lifecycle `operatorArtifactRef`; wrapper summaries now print OK runbook witnesses with SHA-256 before compact failed-check anatomy. Live proof `local-20260618-170322-330-e6cb2117` printed `cluster-windows-service-execution-runbook=...\epiphany-cluster-daemon-services-execution-runbook.ps1:sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0` and the expected five failed checks without mutating Windows services. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index 556e1ee9..81b76506 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -1634,7 +1634,17 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { } elseif ($Mode -eq "bifrost-publication") { Write-Host "Bifrost publication: status=$($result.status), intent=$($result.intentId), publication=$($result.publicationReceiptId), github=$($result.githubPublicationReceiptId), privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "bifrost-ledger") { - Write-Host "Bifrost ledger: status=$($result.status), rows=$($result.rowCount), publicationChain=$($result.publicationChainCount), collaborationChain=$($result.collaborationChainCount), privateStateExposed=$($result.privateStateExposed)" + $publicRefs = "none" + if ($null -ne $result.rows -and $result.rows.Count -gt 0) { + $publicRefs = (($result.rows | ForEach-Object { + $publicRef = $_.publicRef + if ($null -eq $publicRef -or $publicRef -eq "") { + $publicRef = "none" + } + "$($_.documentKind)=${publicRef}" + }) -join "; ") + } + Write-Host "Bifrost ledger: status=$($result.status), rows=$($result.rowCount), publicationChain=$($result.publicationChainCount), collaborationChain=$($result.collaborationChainCount), publicRefs=$publicRefs, privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "receipt-directory") { $artifactHashes = "none" if ($null -ne $result.rows -and $result.rows.Count -gt 0) {