diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 6d709099..021ed4d0 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -2555,6 +2555,8 @@ fn main() -> Result<()> { .iter() .any(|check| { check.action == "cluster-windows-service-execution-readiness" + && check.service_id.as_deref() + == Some("epiphany-cluster-daemon-services") && check.observed_status.is_none() && !check.ok && check.private_state_sealed @@ -2564,6 +2566,8 @@ fn main() -> Result<()> { .iter() .any(|check| { check.action == "cluster-windows-service-execution-audit" + && check.service_id.as_deref() + == Some("epiphany-cluster-daemon-services") && check.observed_status.as_deref() == Some("incomplete") && !check.ok && check.private_state_sealed @@ -2573,6 +2577,8 @@ fn main() -> Result<()> { .iter() .any(|check| { check.action == "windows-service-execution-readiness" + && check.service_id.as_deref() + == Some("epiphany-daemon-supervisor-service") && check.observed_status.is_none() && !check.ok && check.private_state_sealed @@ -2580,11 +2586,17 @@ fn main() -> Result<()> { || !service_overview .service_execution_failed_check_tui_rows .iter() - .any(|row| row.contains("cluster-windows-service-execution-audit=incomplete")) + .any(|row| { + row.contains("epiphany-cluster-daemon-services::cluster-windows-service-execution-audit=incomplete") + }) || !service_overview .service_execution_failed_check_tui_rows .iter() - .any(|row| row.contains("windows-service-execution-readiness=missing")) + .any(|row| { + row.contains( + "epiphany-daemon-supervisor-service::windows-service-execution-readiness=missing", + ) + }) { anyhow::bail!( "local Verse query smoke did not expose sealed service lifecycle readback plus cluster and service execution failed-check anatomy" @@ -4004,26 +4016,49 @@ fn load_swarm_overview_report(args: &Args) -> Result { .filter(|receipt| receipt.service_id == "epiphany-cluster-daemon-services") .cloned() .collect::>(); - let single_service_lifecycle_receipts = lifecycle_receipts - .iter() - .filter(|receipt| receipt.service_id != "epiphany-cluster-daemon-services") - .cloned() - .collect::>(); let cluster_service_execution_audit = epiphany_cluster_service_execution_audit_report(&cluster_lifecycle_receipts); - let single_service_execution_audit = - epiphany_service_execution_audit_report(&single_service_lifecycle_receipts); - let service_execution_failed_check_count = - cluster_service_execution_audit.failed_count + single_service_execution_audit.failed_count; + let mut single_service_ids = service_lifecycle_attention_rows + .iter() + .filter(|row| row.family == "service-lifecycle") + .filter_map(receipt_directory_row_service_id) + .collect::>(); + single_service_ids.sort(); + single_service_ids.dedup(); + let single_service_execution_audits = single_service_ids + .iter() + .map(|service_id| { + let scoped_receipts = lifecycle_receipts + .iter() + .filter(|receipt| receipt.service_id == *service_id) + .cloned() + .collect::>(); + epiphany_service_execution_audit_report(&scoped_receipts) + }) + .collect::>(); + let service_execution_failed_check_count = cluster_service_execution_audit.failed_count + + single_service_execution_audits + .iter() + .map(|report| report.failed_count) + .sum::(); let service_execution_missing_check_count = cluster_service_execution_audit.missing_count - + single_service_execution_audit.missing_count; + + single_service_execution_audits + .iter() + .map(|report| report.missing_count) + .sum::(); let service_execution_private_state_exposed = cluster_service_execution_audit .private_state_exposed - || single_service_execution_audit.private_state_exposed; + || single_service_execution_audits + .iter() + .any(|report| report.private_state_exposed); let service_execution_failed_check_rows = cluster_service_execution_audit .checks .iter() - .chain(single_service_execution_audit.checks.iter()) + .chain( + single_service_execution_audits + .iter() + .flat_map(|report| report.checks.iter()), + ) .filter(|check| !check.ok || !check.private_state_sealed) .cloned() .collect::>(); @@ -4739,6 +4774,13 @@ fn receipt_directory_attention_route_row(row: &ReceiptDirectoryRow) -> String { ) } +fn receipt_directory_row_service_id(row: &ReceiptDirectoryRow) -> Option { + row.route + .split_once("::") + .map(|(service_id, _)| service_id.to_string()) + .filter(|service_id| !service_id.is_empty()) +} + fn receipt_directory_daemon_poke_status( context: &EpiphanyLocalVerseContext, receipt: &EpiphanyCultMeshDaemonPokeReceiptEntry, @@ -4762,6 +4804,7 @@ fn receipt_directory_daemon_poke_status( } fn service_execution_audit_check_tui_row(check: &EpiphanyServiceExecutionAuditCheck) -> String { + let service_id = check.service_id.as_deref().unwrap_or("unknown-service"); let observed_status = check.observed_status.as_deref().unwrap_or("missing"); let receipt_id = check.receipt_id.as_deref().unwrap_or("missing"); let artifact_ref = check.operator_artifact_ref.as_deref().unwrap_or("none"); @@ -4772,8 +4815,14 @@ fn service_execution_audit_check_tui_row(check: &EpiphanyServiceExecutionAuditCh "private-state-exposed" }; format!( - "{}={} | allowed={} | receipt={} | artifact={} | {}", - check.action, observed_status, allowed_statuses, receipt_id, artifact_ref, seal_status + "{}::{}={} | allowed={} | receipt={} | artifact={} | {}", + service_id, + check.action, + observed_status, + allowed_statuses, + receipt_id, + artifact_ref, + seal_status ) } diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index ce0da8fc..16a4fb85 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -1120,6 +1120,7 @@ pub struct EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry { #[derive(Clone, Debug, PartialEq, Eq, Serialize)] #[serde(rename_all = "camelCase")] pub struct EpiphanyServiceExecutionAuditCheck { + pub service_id: Option, pub action: String, pub allowed_statuses: Vec, pub receipt_id: Option, @@ -1193,27 +1194,40 @@ fn epiphany_service_execution_audit_report_for_expected( let mut missing_count = 0_usize; let mut failed_count = 0_usize; let mut private_state_exposed = false; + let mut service_ids = receipts + .iter() + .map(|receipt| receipt.service_id.as_str()) + .collect::>(); + service_ids.sort(); + service_ids.dedup(); + let inferred_service_id = if service_ids.len() == 1 { + Some(service_ids[0].to_string()) + } else { + None + }; for (action, allowed_statuses) in expected { let receipt = latest_lifecycle_receipt_for_action(receipts, action); - let (receipt_id, observed_status, operator_artifact_ref, ok, sealed) = match receipt { - Some(receipt) => { - let status_ok = allowed_statuses - .iter() - .any(|allowed| *allowed == receipt.status); - ( - Some(receipt.receipt_id.clone()), - Some(receipt.status.clone()), - non_empty_operator_artifact_ref(receipt), - status_ok, - !receipt.private_state_exposed, - ) - } - None => { - missing_count += 1; - (None, None, None, false, true) - } - }; + let (service_id, receipt_id, observed_status, operator_artifact_ref, ok, sealed) = + match receipt { + Some(receipt) => { + let status_ok = allowed_statuses + .iter() + .any(|allowed| *allowed == receipt.status); + ( + Some(receipt.service_id.clone()), + Some(receipt.receipt_id.clone()), + Some(receipt.status.clone()), + non_empty_operator_artifact_ref(receipt), + status_ok, + !receipt.private_state_exposed, + ) + } + None => { + missing_count += 1; + (inferred_service_id.clone(), None, None, None, false, true) + } + }; if !ok { failed_count += 1; @@ -1223,6 +1237,7 @@ fn epiphany_service_execution_audit_report_for_expected( } checks.push(EpiphanyServiceExecutionAuditCheck { + service_id, action: (*action).to_string(), allowed_statuses: allowed_statuses .iter() diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index be2efcfb..ceaae426 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -69,6 +69,7 @@ remembers doctrine; the branch remembers the blade. - `epiphany-verse-query receipt-directory` still derives compact artifact status counts: `artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, and `artifactMissingCount`. Live readback reports `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. - Wrapper `swarm-overview` and `swarm-triage` one-line summaries now forward Rust-owned compact TUI row families as `actionRows`, `daemonRows`, `toolRows` where present, `policyRows` where present, `toolAttentionRows`, `serviceAttentionRows`, and `serviceFailedCheckRows` instead of rebuilding the global sight surface in PowerShell. The older compatibility summaries still include service lifecycle receipt `artifactStatus`, local runbook `sha256`, operator aftercare, and compact `serviceExecutionFailedChecks`. Live artifacts `local-20260618-210646-478-88b58f07` and `local-20260618-210646-474-2fb504ff` show seven READY daemon rows, sixteen globally invokable receipt-gated tool rows, seven enabled restart-policy rows, two ordered service action rows, two service lifecycle attention rows, five sealed failed service-execution check rows, and `privateStateExposed=false`. Live artifact `local-20260618-214854-896-79b9190b` proves the Rust overview now aggregates cluster and single-service execution audit failed-check anatomy together: cluster readiness/install/start/audit/stop plus single-service readiness/install/start/reconcile/stop rows are visible without service mutation or private-state exposure. - 2026-06-18: `swarm-overview` action rows now enumerate every sealed service-lifecycle attention receipt instead of only the selected global recommendation. Each non-mutating readback row carries the receipt's service-manager artifact ref/status/hash/private flag; live wrapper proof `local-20260618-214044-049-a63d008c` printed priority 40 `cluster-service-execution-audit` with `artifactStatus=external-ref`, `sha256=none`, and `artifact=service-manager://windows/epiphany-cluster-daemon-services/cluster-execution-audit`, priority 41 `service-execution-audit` with `artifactStatus=external-ref`, `sha256=none`, and `artifact=service-manager://windows/epiphany-daemon-supervisor-service/execution-audit`, and the priority-50 elevated runbook row unchanged. +- 2026-06-18: Service execution failed-check rows now carry `serviceId` and the compact TUI/PowerShell summaries render `serviceId::action=status`. Single-service overview audits are scoped to service ids from current service-lifecycle attention rows instead of blending all non-cluster receipts, so old EventLog proof scars cannot masquerade as Epiphany supervisor service evidence. Live wrapper proof `local-20260618-215343-309-3f5dd519` printed cluster failures under `epiphany-cluster-daemon-services::...` and supervisor-service missing checks under `epiphany-daemon-supervisor-service::...`, with `privateStateExposed=false`; standalone `service-execution-audit` proof `local-20260618-215828-537-12b29ecf` printed the supervisor-service prefix on runbook witness and failed-check rows, and standalone `cluster-service-execution-audit` proof `local-20260618-215948-348-7be0110c` printed the cluster service prefix on runbook witness and failed-check rows. - Full service lifecycle history now excludes the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror entry. Latest remains readable through the dedicated latest loader; history contains only real per-receipt events. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two writes load as exactly two history receipts while latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage artifacts `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove the compact swarm sights still report service lifecycle attention and the present elevated runbook artifact without daemon pokes or service mutation. A broad unscoped `cargo test service_lifecycle_receipt_history_excludes_latest_mirror` was abandoned after the Windows test harness fanned out across bin targets and hit a broken pipe; use `cargo test --lib service_lifecycle_receipt_history_excludes_latest_mirror` for this check. - The operator snapshot distills typed fields such as thread id, state status, coordinator action, CRRC action, reorient action, available actions, and artifact refs; it does not preserve the raw JSON status blob as internal state. JSON remains display/evidence at the edge. - Local MVP Persona front-door bubbles now route their `epiphany.cultmesh.persona_speech_audit.v0` witness into the same `.epiphany-run/cultmesh/local-verse.ccmp` store and write a final `local-verse-context.json` for MVP mode too. `Persona-bubble.stdout.json` remains display; the local Verse carries the mouth-edge eligibility receipt. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 4b344012..26f50caa 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index c60c2d37..1946232c 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -622,7 +622,7 @@ current_status: - `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` compose the compact swarm overview with the existing brake-aware daemon poke receipt writer. Triage pokes only daemon liveness attention; service-manager lifecycle wounds are reflected from overview as sealed `serviceLifecycleAttentionRows`/TUI rows, `serviceExecutionFailedCheckRows`/TUI rows, explicit `serviceLifecycleRecommended*` fields, and ordered `swarmActionRows`, but do not cause daemon poke receipts, while blocked daemon-hosted tools ride as sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised capabilities are unavailable because their host body is sick. Current live triage `local-20260618-150015-844-aba20563` returns `status=noop`, `overviewStatus=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `clusterCount=7`, `privateVerseCount=7`, `pokedDaemonCount=0`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `swarmActionCount=2`, the same sealed service readback plus operator-elevated runbook rows, including `operatorArtifactStatus=present`, `operatorArtifactRef=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, and `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit` on the elevated row, empty daemon/tool-host attention arrays, `serviceLifecycleAttentionCount=2`, routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, direct and wrapper command hints including `wrapperInvokeTool` and `wrapperBifrostLedger=tools/epiphany_local_run.ps1 -Mode bifrost-ledger`, and `privateStateExposed=false`; degraded Hands proof returns `status=ok`, `overviewStatus=attention`, topology and daemon TUI rows, blocked Hands-hosted tool rows, one sealed topology-aware poke receipt for `epiphany-daemon-hands` with `bodyDomain=repo:E:/Projects/EpiphanyAgent`, `privateVerseId=epiphany.cluster.hands.private`, `eveSurfaceId=eve://epiphany/hands`, `observedStatus=degraded`, `attentionDaemonIds=[epiphany-daemon-hands]`, `attentionToolHostDaemonIds=[epiphany-daemon-hands]`, and liveness/tool-host action rows with no private-state exposure. Source smoke `verse-query-service-execution-failed-checks-clean` proves a physical synthetic written runbook plus incomplete service audit receipts expose both service lifecycle readback and failed-check anatomy with no Windows service mutation. - Compact `swarmActionTuiRows` now match the JSON service-execution queue including local runbook SHA-256 provenance: live artifact `local-20260618-164403-238-dba797ce` shows `050 | service-execution-authority | operator-authority-required | operator-elevated-runbook | operator.elevated_windows_service_control | mutates=true | elevated=true | artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0 | audit=cluster-service-execution-audit`, while the readback row stays `artifact=none | sha256=none | audit=none`. Source smoke `verse-query-action-tui-audit-smoke` guards this agent-friendly TUI surface. - Receipt directory rows now carry `artifactStatus` and `artifactSha256` beside `artifactRef`, using the same `none` / `external-ref` / `present` / `missing` vocabulary as action rows and hashing present local artifacts at the receipt-directory layer. Live wrapper artifact `local-20260618-165005-139-6188fe30` proves the cluster service execution runbook row reports `artifactStatus=present`, `artifactSha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and TUI `artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`; the per-service execution runbook row reports `artifactSha256=b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`; non-artifact rows report `artifactSha256=none`. Wrapper proof `local-20260618-165319-478-e929d2bd` also prints compact `artifactHashes=cluster-service-execution-runbook:3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0; service-execution-runbook:b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7` in the one-line receipt-directory summary. Source smoke guards present-artifact SHA-256 in receipt-directory JSON/TUI, action-row SHA-256, missing-artifact demotion, and failed-check anatomy. `epiphany-verse-query receipt-directory` also derives compact artifact counts (`artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, `artifactMissingCount`) from rows instead of storing a second truth. Live readback reports `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. - - Wrapper `swarm-overview` and `swarm-triage` summaries now forward the Rust-owned compact TUI row families instead of rebuilding the global sight surface in PowerShell: `actionRows`, `daemonRows`, `toolRows` where present, `policyRows` where present, `toolAttentionRows`, `serviceAttentionRows`, and `serviceFailedCheckRows`. The older compatibility summaries still surface lifecycle receipt `artifactStatus`, local runbook `sha256`, operator aftercare command, and compact service execution failed-check anatomy. Live artifacts `local-20260618-210646-478-88b58f07` and `local-20260618-210646-474-2fb504ff` prove overview/triage print seven READY daemon rows, sixteen globally invokable receipt-gated tool rows, seven enabled restart-policy rows, two ordered service action rows, two service lifecycle attention rows, five sealed failed service-execution check rows, and `privateStateExposed=false`. The Rust-owned action queue now enumerates every sealed service-lifecycle attention receipt instead of only the selected global recommendation: live wrapper proof `local-20260618-214044-049-a63d008c` printed priority 40 `cluster-service-execution-audit` and priority 41 `service-execution-audit` non-mutating readback rows with `artifactStatus=external-ref`, `sha256=none`, service-manager artifact refs for cluster execution audit and single-service execution audit, and `privateStateExposed=false`, while leaving the priority-50 elevated runbook authority row unchanged. The failed-check anatomy now aggregates cluster and single-service execution audit reports too: live wrapper proof `local-20260618-214854-896-79b9190b` printed cluster readiness/install/start/audit/stop failures plus single-service readiness/install/start/reconcile/stop failures in the same sealed `serviceExecutionFailedChecks`/TUI surfaces without service mutation. + - Wrapper `swarm-overview` and `swarm-triage` summaries now forward the Rust-owned compact TUI row families instead of rebuilding the global sight surface in PowerShell: `actionRows`, `daemonRows`, `toolRows` where present, `policyRows` where present, `toolAttentionRows`, `serviceAttentionRows`, and `serviceFailedCheckRows`. The older compatibility summaries still surface lifecycle receipt `artifactStatus`, local runbook `sha256`, operator aftercare command, and compact service execution failed-check anatomy. Live artifacts `local-20260618-210646-478-88b58f07` and `local-20260618-210646-474-2fb504ff` prove overview/triage print seven READY daemon rows, sixteen globally invokable receipt-gated tool rows, seven enabled restart-policy rows, two ordered service action rows, two service lifecycle attention rows, five sealed failed service-execution check rows, and `privateStateExposed=false`. The Rust-owned action queue now enumerates every sealed service-lifecycle attention receipt instead of only the selected global recommendation: live wrapper proof `local-20260618-214044-049-a63d008c` printed priority 40 `cluster-service-execution-audit` and priority 41 `service-execution-audit` non-mutating readback rows with `artifactStatus=external-ref`, `sha256=none`, service-manager artifact refs for cluster execution audit and single-service execution audit, and `privateStateExposed=false`, while leaving the priority-50 elevated runbook authority row unchanged. The failed-check anatomy now aggregates cluster and single-service execution audit reports too: live wrapper proof `local-20260618-214854-896-79b9190b` printed cluster readiness/install/start/audit/stop failures plus single-service readiness/install/start/reconcile/stop failures in the same sealed `serviceExecutionFailedChecks`/TUI surfaces without service mutation. The failed-check rows now carry service identity and overview scopes single-service audits to service ids from current service-lifecycle attention rows: live proof `local-20260618-215343-309-3f5dd519` printed `epiphany-cluster-daemon-services::...` cluster failures and `epiphany-daemon-supervisor-service::...=missing` supervisor-service failures, preventing old EventLog proof receipts from being mistaken for Epiphany supervisor service readiness; standalone `service-execution-audit` proof `local-20260618-215828-537-12b29ecf` and standalone `cluster-service-execution-audit` proof `local-20260618-215948-348-7be0110c` printed the same service-prefixed runbook witness and failed-check rows for their respective bodies. - 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. next_action: Continue the swarm-readiness cuts toward elevated operator install/start execution and completed audit/readiness for the seven installed services. Run generated service execution/install/control runbooks only when the operator grants that authority. The current local Verse proves liveness readiness, scheduler-policy coverage, daemon-body invocation, per-organ launch artifact generation, per-organ install-plan generation, non-elevated install/start/stop execution refusal, read-only installed-service audit, cluster-wide service control planning, service-lifecycle attention surfacing, and cluster execution audit acceptance criteria: `swarm-overview` now reports `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, and `recommendedWrapperMode=cluster-service-execution-audit`; `service-tick` can refresh all seven daemon heartbeats through sealed scheduler receipts; `cluster-service-runbook` writes seven explicit `epiphany-cluster-daemon serve` commands with `privateStateExposed=false`; `cluster-service-install-plan` writes seven distinct Windows service install commands with `privateStateExposed=false`; `cluster-service-install-execute`, `cluster-service-start-execute`, and `cluster-service-stop-execute` refuse as `execution-refused-not-elevated` with `executed=false` when the shell lacks service authority; `cluster-service-start-plan` and `cluster-service-stop-plan` emit seven non-mutating planned rows; `cluster-service-audit` currently reports `incomplete` with seven missing services in this non-installed environment; `service-execution-runbook` and `cluster-service-execution-runbook` write elevated wrapper sequences that continue after per-step failure, run final audits in `finally`, exit nonzero after audit when any step failed, and seal typed runbook receipts with aftercare args (`stepFailurePolicy`, `continueAfterStepFailure`, `nonzeroExitFailsStep`, `exitsNonzeroAfterFinalAudit`); and `service-execution-audit` plus `cluster-service-execution-audit` now require those runbook witnesses before considering elevated-ready/install/start/audit/status/reconcile/stop effect receipts. Preserve the existing typed local Verse surfaces: `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-execution-audit`, `service-tick`, `service-policy-directory`, `agent-state-soa`, `swarm-status`, `swarm-poke-down`, `swarm-triage`, `cluster-topology`, `eve-surfaces`, `eve-connect`, `collaboration-feedback`, `bifrost-publication`, `bifrost-ledger`, `receipt-directory`, `tool-directory`, `tool-invoke`, `swarm-overview`, `seed-compact`, service manager status/reconcile/readiness/control wrappers, compact daemon scheduler/policy receipt rows, daemon liveness-gated tool routing, Bifrost/Imagination chains, coordinator-run receipts, Hands gates, role review mirrors, and sealed agent-state SoA summary. Keep the seven-standing-faculty SoA, stale-turn repair, memory lifecycle, shared local Verse witnesses, and typed CultMesh Persona speech gate intact. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index b483f439..fe2b37e5 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -146,7 +146,11 @@ function Format-ServiceExecutionFailedChecks { if ($artifact -ne "none" -and (Test-Path -LiteralPath $artifact -PathType Leaf)) { $artifactSha256 = (Get-FileHash -LiteralPath $artifact -Algorithm SHA256).Hash.ToLowerInvariant() } - "$($_.action)=${observed}:artifact=${artifact}:sha256=${artifactSha256}" + $serviceId = $_.serviceId + if ($null -eq $serviceId -or $serviceId -eq "") { + $serviceId = "unknown-service" + } + "${serviceId}::$($_.action)=${observed}:artifact=${artifact}:sha256=${artifactSha256}" }) -join "; ") } @@ -1932,7 +1936,11 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { if (Test-Path -LiteralPath $artifact -PathType Leaf) { $artifactSha256 = (Get-FileHash -LiteralPath $artifact -Algorithm SHA256).Hash.ToLowerInvariant() } - "$($_.action)=${artifact}:sha256=${artifactSha256}" + $serviceId = $_.serviceId + if ($null -eq $serviceId -or $serviceId -eq "") { + $serviceId = "unknown-service" + } + "${serviceId}::$($_.action)=${artifact}:sha256=${artifactSha256}" }) -join "; " Write-Host "Cluster daemon service execution runbook witnesses: $runbookWitnessSummary" } @@ -1943,7 +1951,11 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { if ($null -eq $observed -or $observed -eq "") { $observed = "missing" } - "$($_.action)=$observed" + $serviceId = $_.serviceId + if ($null -eq $serviceId -or $serviceId -eq "") { + $serviceId = "unknown-service" + } + "${serviceId}::$($_.action)=$observed" }) -join "; " Write-Host "Cluster daemon service execution failed checks: $failedSummary" } @@ -1969,7 +1981,11 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { if (Test-Path -LiteralPath $artifact -PathType Leaf) { $artifactSha256 = (Get-FileHash -LiteralPath $artifact -Algorithm SHA256).Hash.ToLowerInvariant() } - "$($_.action)=${artifact}:sha256=${artifactSha256}" + $serviceId = $_.serviceId + if ($null -eq $serviceId -or $serviceId -eq "") { + $serviceId = "unknown-service" + } + "${serviceId}::$($_.action)=${artifact}:sha256=${artifactSha256}" }) -join "; " Write-Host "Service execution runbook witnesses: $runbookWitnessSummary" } @@ -1980,7 +1996,11 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { if ($null -eq $observed -or $observed -eq "") { $observed = "missing" } - "$($_.action)=$observed" + $serviceId = $_.serviceId + if ($null -eq $serviceId -or $serviceId -eq "") { + $serviceId = "unknown-service" + } + "${serviceId}::$($_.action)=$observed" }) -join "; " Write-Host "Service execution failed checks: $failedSummary" }