Show direct audit follow-up rows

This commit is contained in:
Meta Vens 2026-06-18 23:01:18 +01:00
commit 52ad02cf46
4 changed files with 29 additions and 1 deletions

View file

@ -71,6 +71,7 @@ remembers doctrine; the branch remembers the blade.
- 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. Failed-check TUI rows also carry `followUp=<wrapper command>` for the receipt-producing/readback route; live wrapper proof `local-20260618-224925-221-8e114063` printed cluster follow-ups such as `cluster-service-execution-readiness`, `cluster-service-install-execute`, and `cluster-service-execution-audit`, plus supervisor-service follow-ups such as `service-execution-readiness`, `service-install-execute`, `service-status`, and `service-reconcile`, 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.
- 2026-06-18: Direct wrapper audit summaries now print actionable `failed check rows` for `cluster-service-execution-audit` and `service-execution-audit`: each row carries `serviceId::action=status`, artifact ref, local artifact SHA-256 when present, and `followUp=<wrapper command>`. Live proofs `local-20260618-225923-468-d818951a` and `local-20260618-225923-529-7cfa2bb3` showed the cluster execution scar and supervisor-service scar with exact follow-up wrapper modes while preserving `privateStateExposed=false`.
- 2026-06-18: The `swarm-overview`/`swarm-triage` action queue now carries aggregate sealed service-execution wound counts on the elevated service-control row as `serviceExecutionFailedCheckCount` and `serviceExecutionMissingCheckCount`, with compact wrapper/TUI rows rendering `failedChecks=<n>` and `missingChecks=<n>`. Non-mutating readback rows keep both counts at zero. Live proofs `local-20260618-220534-199-d8e90287` and `local-20260618-220534-205-59582da5` printed the priority-50 `service-execution-authority` row with `failedChecks=11`, `missingChecks=6`, `artifactStatus=present`, the sealed cluster runbook SHA-256, and `privateStateExposed=false`.
- 2026-06-18: The elevated service-control action queue now emits one `service-execution-authority` row per sealed runbook witness instead of attaching all failed checks to the recommended cluster artifact. Source smoke seeds both cluster and single-service runbook witnesses and proves separate scoped rows. Live overview proof `local-20260618-221339-826-b1981064` and triage proof `local-20260618-221340-099-4b4baba8` printed priority 50 for `cluster-service-execution-runbook` with `failedChecks=5`, `missingChecks=0`, SHA-256 `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and aftercare `cluster-service-execution-audit`; and priority 51 for `service-execution-runbook` with `failedChecks=6`, `missingChecks=6`, SHA-256 `b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`, and aftercare `service-execution-audit`, with no private state exposure.
- 2026-06-18: `SwarmActionRow` now carries explicit `serviceId` and `serviceRoute`, and Rust TUI plus PowerShell wrapper action queues render `service=<id>` and `route=<service::action>` for service lifecycle/readiness rows. Non-service rows render `none`. Source smoke guards both fields on the cluster and single-service runbook authority rows. Live overview proof `local-20260618-221912-231-805389bf` and triage proof `local-20260618-221912-282-a79ba8bd` showed readback rows and both elevated runbook rows naming `epiphany-cluster-daemon-services` and `epiphany-daemon-supervisor-service` directly, without parsing artifact paths or prose.

Binary file not shown.

View file

@ -623,6 +623,7 @@ current_status:
- 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 elevated runbook authority rows unchanged. The failed-check anatomy now aggregates cluster and single-service execution audit reports too, carries service identity, and renders `followUp=<wrapper command>` for each failed/missing check so the compact row names the receipt-producing or readback route without opening raw audit payloads. Live wrapper proof `local-20260618-224925-221-8e114063` printed cluster readiness/install/start/audit/stop failures with follow-ups such as `cluster-service-execution-readiness`, `cluster-service-install-execute`, and `cluster-service-execution-audit`, plus supervisor-service missing checks with follow-ups such as `service-execution-readiness`, `service-install-execute`, `service-status`, and `service-reconcile`, all sealed with `privateStateExposed=false`. The action queue now carries service-execution wound counters on each row: non-mutating readbacks report zero, and elevated authority rows report only the sealed failed/missing checks their own runbook artifact can cure. Source smoke seeds both cluster and single-service runbook witnesses and proves distinct authority rows. Live overview/triage proofs `local-20260618-221339-826-b1981064` and `local-20260618-221340-099-4b4baba8` printed priority 50 `cluster-service-execution-runbook` with `failedChecks=5`, `missingChecks=0`, SHA-256 `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and aftercare `cluster-service-execution-audit`, plus priority 51 `service-execution-runbook` with `failedChecks=6`, `missingChecks=6`, SHA-256 `b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`, and aftercare `service-execution-audit`, with `privateStateExposed=false`. `SwarmActionRow` now exposes explicit `serviceId` and `serviceRoute` fields so agents can identify the body/action without parsing artifact paths or prose; Rust TUI and wrapper action queues render `service=<id>` and `route=<service::action>` for service lifecycle and service authority rows, while non-service rows render `none`. Source smoke guards both fields, and live overview/triage proofs `local-20260618-221912-231-805389bf` and `local-20260618-221912-282-a79ba8bd` showed the cluster and supervisor-service identities on readback and elevated runbook rows with `privateStateExposed=false`. `ReceiptDirectoryRow` now owns the same explicit `serviceId`/`serviceRoute` fields, so action rows consume typed service identity from the receipt-directory organ instead of parsing `route`; non-service receipt families carry `none`, while service lifecycle/runbook rows carry the typed body and route. Source smoke guards the fields, and live receipt-directory proof `local-20260618-222641-218-60106c79` printed `service=epiphany-cluster-daemon-services` and `service=epiphany-daemon-supervisor-service` on service attention/readiness rows and runbook witnesses with no private-state exposure.
- Direct wrapper audit summaries now expose the same follow-up ergonomics as the global sight rows. `tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit` and `-Mode service-execution-audit` print `failed check rows` with `serviceId::action=status`, artifact ref, local artifact SHA-256 when present, and `followUp=<wrapper command>` for each failed/missing check. Live proofs `local-20260618-225923-468-d818951a` and `local-20260618-225923-529-7cfa2bb3` showed cluster readiness/install/start/audit/stop failures and supervisor-service readiness/install/start/status/reconcile/stop missing checks with actionable follow-up wrappers and `privateStateExposed=false`.
- 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.

View file

@ -150,10 +150,32 @@ function Format-ServiceExecutionFailedChecks {
if ($null -eq $serviceId -or $serviceId -eq "") {
$serviceId = "unknown-service"
}
"${serviceId}::$($_.action)=${observed}:artifact=${artifact}:sha256=${artifactSha256}"
$followUp = Get-ServiceExecutionCheckFollowUpCommand $_.action
"${serviceId}::$($_.action)=${observed}:artifact=${artifact}:sha256=${artifactSha256}:followUp=${followUp}"
}) -join "; ")
}
function Get-ServiceExecutionCheckFollowUpCommand {
param([string]$Action)
switch ($Action) {
"cluster-windows-service-execution-runbook" { return "tools/epiphany_local_run.ps1 -Mode cluster-service-execution-runbook" }
"cluster-windows-service-execution-readiness" { return "tools/epiphany_local_run.ps1 -Mode cluster-service-execution-readiness" }
"cluster-windows-service-install" { return "tools/epiphany_local_run.ps1 -Mode cluster-service-install-execute" }
"cluster-windows-service-start" { return "tools/epiphany_local_run.ps1 -Mode cluster-service-start-execute" }
"cluster-windows-service-execution-audit" { return "tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit" }
"cluster-windows-service-stop" { return "tools/epiphany_local_run.ps1 -Mode cluster-service-stop-execute" }
"windows-service-execution-runbook" { return "tools/epiphany_local_run.ps1 -Mode service-execution-runbook" }
"windows-service-execution-readiness" { return "tools/epiphany_local_run.ps1 -Mode service-execution-readiness" }
"windows-service-install" { return "tools/epiphany_local_run.ps1 -Mode service-install-execute" }
"windows-service-start" { return "tools/epiphany_local_run.ps1 -Mode service-start-execute" }
"windows-service-status" { return "tools/epiphany_local_run.ps1 -Mode service-status" }
"windows-service-reconcile" { return "tools/epiphany_local_run.ps1 -Mode service-reconcile" }
"windows-service-stop" { return "tools/epiphany_local_run.ps1 -Mode service-stop-execute" }
default { return "tools/epiphany_local_run.ps1 -Mode swarm-overview" }
}
}
function Format-TuiRows {
param([object]$Rows)
@ -1960,6 +1982,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
Write-Host "Cluster daemon service execution runbook: service=$($result.serviceId), status=$($result.status), finalAuditInFinally=$($result.finalAuditRunsInFinally), continueAfterStepFailure=$($result.continueAfterStepFailure), nonzeroExitFailsStep=$($result.nonzeroExitFailsStep), exitsNonzeroAfterFinalAudit=$($result.exitsNonzeroAfterFinalAudit), path=$($result.runbookPath)"
} elseif ($Mode -eq "cluster-service-execution-audit") {
Write-Host "Cluster daemon service execution audit: service=$($result.serviceId), status=$($result.status), missing=$($result.missingCount), failed=$($result.failedCount), receipt=$($result.receiptId)"
$failedCheckRows = Format-ServiceExecutionFailedChecks @($result.checks | Where-Object { -not $_.ok })
$runbookWitnessChecks = @($result.checks | Where-Object { $_.ok -and $null -ne $_.operatorArtifactRef -and $_.operatorArtifactRef -ne "" -and $_.operatorArtifactRef -ne "none" })
if ($runbookWitnessChecks.Count -gt 0) {
$runbookWitnessSummary = ($runbookWitnessChecks | ForEach-Object {
@ -1991,6 +2014,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
}) -join "; "
Write-Host "Cluster daemon service execution failed checks: $failedSummary"
}
Write-Host "Cluster daemon service execution failed check rows: $failedCheckRows"
} elseif ($Mode -eq "service-execution-runbook") {
Write-Host "Service execution runbook: service=$($result.serviceId), name=$($result.serviceName), status=$($result.status), finalAuditInFinally=$($result.finalAuditRunsInFinally), continueAfterStepFailure=$($result.continueAfterStepFailure), nonzeroExitFailsStep=$($result.nonzeroExitFailsStep), exitsNonzeroAfterFinalAudit=$($result.exitsNonzeroAfterFinalAudit), path=$($result.runbookPath)"
} elseif ($Mode -eq "service-install-plan" -or $Mode -eq "service-install-execute") {
@ -2005,6 +2029,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
Write-Host "Service execution readiness: service=$($result.serviceId), name=$($result.serviceName), status=$($result.status), elevated=$($result.elevated), receipt=$($result.receiptId)"
} elseif ($Mode -eq "service-execution-audit") {
Write-Host "Service execution audit: service=$($result.serviceId), name=$($result.serviceName), status=$($result.status), missing=$($result.missingCount), failed=$($result.failedCount), receipt=$($result.receiptId)"
$failedCheckRows = Format-ServiceExecutionFailedChecks @($result.checks | Where-Object { -not $_.ok })
$runbookWitnessChecks = @($result.checks | Where-Object { $_.ok -and $null -ne $_.operatorArtifactRef -and $_.operatorArtifactRef -ne "" -and $_.operatorArtifactRef -ne "none" })
if ($runbookWitnessChecks.Count -gt 0) {
$runbookWitnessSummary = ($runbookWitnessChecks | ForEach-Object {
@ -2036,6 +2061,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
}) -join "; "
Write-Host "Service execution failed checks: $failedSummary"
}
Write-Host "Service execution failed check rows: $failedCheckRows"
} elseif ($Mode -eq "service-start-plan" -or $Mode -eq "service-stop-plan" -or $Mode -eq "service-start-execute" -or $Mode -eq "service-stop-execute") {
Write-Host "Service control: service=$($result.serviceId), name=$($result.serviceName), status=$($result.status), executeRequested=$($result.executeRequested), executed=$($result.executed), receipt=$($result.receiptId)"
} else {