From a39d37cb9dadd7d0f8711de0a2878cfd82eeab77 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 18 Jun 2026 16:45:14 +0100 Subject: [PATCH] Expose runbook hashes in swarm action TUI --- epiphany-core/src/bin/epiphany-verse-query.rs | 10 +++++++++- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 258278 -> 258712 bytes state/map.yaml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index d80cdc14..9cf40ec0 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -2420,6 +2420,13 @@ fn main() -> Result<()> { || !service_overview.swarm_action_tui_rows.iter().any(|row| { row.contains("service-execution-authority") && row.contains("artifact=present") + && row.contains(&format!( + "sha256={}", + operator_artifact_sha256( + &service_smoke_runbook_path.display().to_string(), + "present", + ) + )) && row.contains("audit=cluster-service-execution-audit") }) || !service_overview @@ -3482,7 +3489,7 @@ fn swarm_action_rows( fn swarm_action_tui_row(row: &SwarmActionRow) -> String { format!( - "{:03} | {} | {} | {} | {} | mutates={} | elevated={} | artifact={} | audit={}", + "{:03} | {} | {} | {} | {} | mutates={} | elevated={} | artifact={} | sha256={} | audit={}", row.priority, row.family, row.status, @@ -3491,6 +3498,7 @@ fn swarm_action_tui_row(row: &SwarmActionRow) -> String { row.mutates_state, row.requires_elevated_authority, row.operator_artifact_status, + row.operator_artifact_sha256, row.completion_audit_wrapper_mode ) } diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 8894de17..b3e0de28 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -63,7 +63,7 @@ remembers doctrine; the branch remembers the blade. - `epiphany-verse-query tool-directory` and `tools/epiphany_local_run.ps1 -Mode tool-directory` are the compact read-only daemon tool directory. The report reads the same local Verse capability records used by `invoke-tool`, annotates them with host daemon readiness, and returns TUI rows plus direct `invocationCommand` and wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId `. Verified: fresh proof store returned sixteen globally available, receipt-gated, private-state-sealed tools with `hostReadyCount=16`, `hostAttentionCount=0`, including `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands`; smoke source-proves the compact Hands row and command hints; wrapper mode produced `tools=16`, `hostReady=16`, `hostAttention=0`, `privateStateExposed=False`. - `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` are the one-command compact global-agent sight rite. It composes narrow cluster topology, liveness, Odin/Eve surface, daemon tool, restart-policy coverage, receipt-directory service-lifecycle attention, and the shared core service-execution audit report; returns seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, sixteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/invoke/Bifrost-ledger/service-policy-directory/service-execution-audit, sealed `toolHostAttentionRows`/TUI rows for blocked daemon-hosted capabilities, sealed `serviceLifecycleAttentionRows`/TUI rows copied from the receipt directory, explicit `serviceLifecycleRecommended*` fields for service-manager follow-up, ordered `swarmActionRows`/TUI rows with authority/effect/mutation/elevation metadata plus sealed `operatorArtifactRef`, `operatorArtifactStatus`, `operatorArtifactSha256`, `operatorArtifactExecutionCommand`, `operatorAftercareCommand`, and `completionAuditWrapper*` pointers for operator-runbook rows, `serviceExecutionFailedCheckRows`/TUI rows naming the failed sealed execution checks, and `privateStateExposed=false`; and avoids full local Verse serialization. Live `epiphany-verse-query` defaults to `.epiphany-run\cultmesh\local-verse.ccmp`, matching the wrapper and daemon supervisor; bare `epiphany-verse-query smoke` now uses disposable `.epiphany-smoke\verse-query-default\local-verse.ccmp` unless `--store` is explicit. Verified: live overview artifact `local-20260618-163530-102-7d2c8969` returned `status=attention`, `liveness=ready`, `recovery=attention`, `agents=7`, `clusters=7`, `privateVerses=7`, `surfaces=7`, `tools=16`, `nonReady=0`, `toolHostAttentionCount=0`, `policyMissing=0`, `recommended=cluster-service-execution-audit`, `serviceRecommended=cluster-service-execution-audit`, `swarmActionCount=2`, readback row `40:service-lifecycle:cluster-service-execution-audit:attention:mutates=False:elevated=False:artifactStatus=none:sha256=none:audit=none:aftercare=none:artifact=none`, elevated row `50:service-execution-authority:operator-elevated-runbook:operator-authority-required:mutates=True:elevated=True:artifactStatus=present:sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0:audit=cluster-service-execution-audit:aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit:artifact=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-161632-376-436227d8\epiphany-cluster-daemon-services-execution-runbook.ps1`, JSON `operatorArtifactExecutionCommand=Start-Process PowerShell -Verb RunAs -Wait -ArgumentList @('-NoProfile','-ExecutionPolicy','Bypass','-File','...epiphany-cluster-daemon-services-execution-runbook.ps1')`, lifecycle routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, and `serviceExecutionFailedChecks=cluster-windows-service-execution-readiness=not-elevated; cluster-windows-service-install=planned; cluster-windows-service-start=execution-refused-not-elevated; cluster-windows-service-execution-audit=incomplete; cluster-windows-service-stop=execution-refused-not-elevated` with `privateStateExposed=False`. Fresh source smoke passes in bare default-store mode, including present-artifact SHA-256, missing-artifact demotion, and failed-check anatomy branches. - `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` are the compact "see the swarm, then poke only if liveness attention exists" rite. It reads the compact overview first, writes no poke receipt when liveness is ready, routes non-ready daemons through the existing brake-aware `poke-down-daemons` receipt writer, carries overview's sealed service lifecycle attention rows, failed service-execution check rows, explicit service lifecycle recommendation, and ordered/effect-classified action queue with sealed runbook artifact and audit pointers without treating service-manager wounds as daemon-poke authority, and carries sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised tools are blocked by a sick host daemon. Verified: live wrapper artifact `local-20260618-150015-844-aba20563` produced `status=noop`, `overview=attention`, `liveness=ready`, `recovery=attention`, `clusters=7`, `privateVerses=7`, `recommended=cluster-service-execution-audit`, `serviceRecommended=cluster-service-execution-audit`, service readback row `artifactStatus=none`, elevated service authority row `artifactStatus=present`, `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, artifact `E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, `attention=none`, `serviceLifecycleAttention=cluster-service-lifecycle:epiphany-cluster-daemon-services::cluster-windows-service-execution-audit:incomplete; service-lifecycle:epiphany-daemon-supervisor-service::windows-service-execution-audit:incomplete`, `serviceLifecycleAttentionCount=2`, `poked=0`, and `privateStateExposed=False`; degraded Hands proof routes through the topology-aware poke path and exposes blocked Hands tool-host rows plus liveness/tool-host action rows; source smoke `verse-query-completion-audit-row-smoke` proves the degraded single-poke triage path without a post-receipt full-context readback. -- `swarmActionTuiRows` now carry the same audit visibility as JSON rows. Fresh source smoke `verse-query-action-tui-audit-smoke` and live artifacts `local-20260618-150449-420-0371c76a` / `local-20260618-150450-027-74d864da` prove the compact rows include `artifact=present | audit=cluster-service-execution-audit` on the `service-execution-authority` row and `artifact=none | audit=none` on the readback row, while triage remains `poked=0` and private state remains sealed. +- `swarmActionTuiRows` now carry the same audit and artifact-provenance visibility as JSON rows. Fresh source smoke `verse-query-action-tui-audit-smoke` and live artifact `local-20260618-164403-238-dba797ce` prove the compact rows include `artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0 | audit=cluster-service-execution-audit` on the `service-execution-authority` row and `artifact=none | sha256=none | audit=none` on the readback row, while service mutation still requires explicit elevated operator authority and private state remains sealed. - Receipt directory rows now classify their artifact refs too. `ReceiptDirectoryRow` includes `artifactStatus`, and receipt TUI rows append `artifact=`. Fresh smoke `verse-query-receipt-artifact-status-smoke` plus live overview/triage artifacts `local-20260618-150837-267-7fbf22bb` / `local-20260618-150837-466-a6a55086` prove service-manager lifecycle attention refs report `artifactStatus=external-ref` and TUI `artifact=external-ref`, while local runbook action rows still report `artifactStatus=present`. - `epiphany-verse-query receipt-directory` now also derives compact artifact status counts: `artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, and `artifactMissingCount`. Live direct readback against `.epiphany-run\cultmesh\local-verse.ccmp` and wrapper artifact `local-20260618-151656-688-a041afcc` both reported `artifactNone=13`, `artifactExternalRef=2`, `artifactPresent=2`, `artifactMissing=0`, and `privateStateExposed=false`. A clean direct empty-store readback reported all 17 rows as `artifactNone`. The earlier all-in-one `epiphany-verse-query smoke` Windows stack overflow was fixed by cutting full `query_epiphany_local_verse_context` out of `load_swarm_overview_report`; overview now reads daemon service lifecycle rows through narrow history/latest loaders. Fresh proof `verse-query-overview-slim-context-clean` passed the full smoke without stack overflow. - Wrapper `swarm-overview` and `swarm-triage` one-line summaries now include service lifecycle receipt `artifactStatus`, local runbook `sha256`, operator aftercare, and compact `serviceExecutionFailedChecks`. Live artifacts `local-20260618-163530-102-7d2c8969` and `local-20260618-163531-412-0ada43a3` show both lifecycle attention rows, the operator-elevated runbook row with `sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, and readiness/install/start/audit/stop failed checks, with private state sealed. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 5cf8def8637f703e4a2ed68f4064a4ec2d8a11c5..e9b265ad479c78b029221a0a612b91bec67ccf1a 100644 GIT binary patch delta 338 zcmXw!F;2rk5Jj=KqzENKiZqBchy+8jB!EOg843_eXy`WfM6qJ;nptmLMuLJ9M5f~k zNFZ?o8m>S?0i{tIYBpesY5x3q|Ig=p`-kU*O_78Ii1hW-fi<5yOl`YKLr#DWb8g)-HkN20mchM^*> zphlSjMmP~E20%s*lp5yueE!5XYi-VVT8(CFzhSAJgN`*Oq$cH$hAbWPw}P$x07c+ga7{tXh0+{TtxhK5nc7?|H5-mJ`6$jCUac`8%;R3=6sX4*cLi8=5c0DS5X A