From 1be027242a4d3d26808ffc1253e27a519ca7def5 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 18 Jun 2026 23:15:58 +0100 Subject: [PATCH] Show service control follow-ups --- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 279031 -> 279643 bytes state/map.yaml | 2 +- tools/epiphany_local_run.ps1 | 4 ++-- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 1eae29aa..2965c65d 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -74,6 +74,7 @@ remembers doctrine; the branch remembers the blade. - 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=`. 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: Direct execution-runbook summaries now print the explicit elevated invocation and post-run audit command. `cluster-service-execution-runbook` proof `local-20260618-230302-532-ba02c01c` printed `elevatedCommand=Start-Process PowerShell -Verb RunAs -Wait ...` and `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`; `service-execution-runbook` proof `local-20260618-230302-517-cb2b650c` printed the matching single-service RunAs command plus `aftercare=tools/epiphany_local_run.ps1 -Mode service-execution-audit`. Both are non-mutating artifact rites until the operator explicitly runs the elevated command. - 2026-06-18: Those direct execution-runbook summaries now also print `artifactSha256=` beside the elevated command and aftercare. Proof `local-20260618-230624-842-6bf65bee` printed cluster hash `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`; proof `local-20260618-230624-759-fa808050` printed supervisor-service hash `b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`. +- 2026-06-18: Direct start/stop control summaries now print receipt-producing readback and aftercare wrappers. Cluster control plan proof `local-20260618-231419-577-bf46881d` and non-elevated execute proof `local-20260618-231433-306-46912a0c` append `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-audit` plus `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`; single-service plan proof `local-20260618-231446-756-ad230196` and non-elevated execute proof `local-20260618-231503-197-e86342f1` append `followUp=tools/epiphany_local_run.ps1 -Mode service-status` plus `aftercare=tools/epiphany_local_run.ps1 -Mode service-execution-audit`. Plan paths remain non-mutating, and execute paths remain elevation-gated. - 2026-06-18: Direct install plan/execute summaries now print install artifact hashes and receipt-producing follow-up wrappers. Cluster install plan proof `local-20260618-230937-335-71c4fdaa` and non-elevated execute proof `local-20260618-230937-313-cb288388` printed `artifactSha256=c6b697e173eb319073da341fc90c2963bcd6bee63d804349205b6309c88df764` plus `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-install-execute`; supervisor-service plan proof `local-20260618-230937-331-2e34b579` and non-elevated execute proof `local-20260618-231007-138-1dacc61b` printed `artifactSha256=7760943f618d13425f034226e0c5913f971d05f395b3abc12ae386acd2aaf56f` plus `followUp=tools/epiphany_local_run.ps1 -Mode service-install-execute`. - 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=` and `missingChecks=`. 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. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 55b2dbcfb18cc0c63b9229f6b181b6758fee6927..7d0d97d967f2dd4df8179b5d5e355237a28397a7 100644 GIT binary patch delta 472 zcmYMwF;Ck-6ae5lwp0}fAy=(h5S30sY`HdcBr>Ma&HF6WCaB(xeQh)4ivA-+S-*)W1LXuU4I<@H=NeZr*r1?Y|q& zZ^yYkoz%`IHK#h$+r6IDy#BVm*!FxUv;gk<+gh-jY83Y5!Tn&LF5P#_g#m5836&YG z)QjHJu?mR$eT?wR6#;K|QAHcFp zcVp!rk8w8vS>Tp^tb3o|S4a@iRv1x;o4mm~(G1_?ENpPfIxULrhzHGtE%3SViZ9S= Wzosl+RqWckP4AOmpAWu}zrFw;o1QZO delta 48 zcmccJA^5#naDyZxm!XxhQPeR87KbaFl^F{e8P7FOWon`, artifact status, and SHA-256; wrapper proof `local-20260618-205920-451-383b0da7` now prints all seventeen compact rows in `receiptRows`, including missing Hands/role/work-loop gates, runbook hashes, scheduler follow-up, Bifrost/Imagination witnesses, and the active service lifecycle attention rows. 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. Receipt-directory JSON now carries Rust-owned `attentionRouteRows` derived from the same policy predicate as `attentionRowCount`, and the wrapper prints that field instead of rebuilding attention from ad hoc status strings; live proof `local-20260618-212134-758-c7c56240` left the old degraded Hands daemon-poke receipt as an `OK` historical witness while attention routes named only the cluster and single-service lifecycle wounds. Daemon-poke rows now resolve historical receipt status against current daemon liveness: source smoke proves degraded remains degraded before heartbeat recovery and becomes `resolved` after current status returns ready, while live wrapper proof `local-20260618-212649-563-48647018` printed the old Hands poke receipt as `OK | Self | daemon-poke | resolved`. - `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. Direct cluster install wrapper summaries now include `artifactSha256=` and `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-install-execute`; live proofs `local-20260618-230937-335-71c4fdaa` and `local-20260618-230937-313-cb288388` showed the planned and non-elevated-refused cluster install artifact hash `c6b697e173eb319073da341fc90c2963bcd6bee63d804349205b6309c88df764`. `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. The cluster install/audit/control wrapper summaries now print compact `serviceRows` for all seven daemon-owned Windows service names with daemon id, status or observed status, cluster id, executed flag, exit code, start type, and `private=false`; live proofs `local-20260618-211051-126-2a89d61c`, `local-20260618-211051-125-cd687ee2`, `local-20260618-211051-063-f0ff980d`, and `local-20260618-211118-108-df5cb8cd` show seven missing audit rows, seven ready/demand install-plan rows, seven start-planned rows, and seven stop-planned rows without service mutation. `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`; direct wrapper summaries now print the exact `elevatedCommand=Start-Process PowerShell -Verb RunAs -Wait ...` invocation, `artifactSha256=`, and `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`. Live proof `local-20260618-230624-842-6bf65bee` generated the robust cluster artifact and printed hash `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0` without service mutation. `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. - - Cluster service execution readiness now uses the same compact wrapper `serviceRows` mouth as install/audit/control. Identity-only readiness rows inherit the global readiness verdict, so the seven expected Windows service rows show `not-elevated` instead of `unknown` when the shell lacks service authority. Live proof `local-20260618-211524-363-5d85b3aa` printed seven readiness rows with service name, daemon id, cluster id, `executed=n/a`, `exit=none`, `startType=none`, and `private=false`; live proof `local-20260618-211524-345-d580da5c` printed seven `execution-refused-not-elevated` stop-execute rows without service mutation. + - Cluster service execution readiness now uses the same compact wrapper `serviceRows` mouth as install/audit/control. Identity-only readiness rows inherit the global readiness verdict, so the seven expected Windows service rows show `not-elevated` instead of `unknown` when the shell lacks service authority. Live proof `local-20260618-211524-363-5d85b3aa` printed seven readiness rows with service name, daemon id, cluster id, `executed=n/a`, `exit=none`, `startType=none`, and `private=false`; live proof `local-20260618-211524-345-d580da5c` printed seven `execution-refused-not-elevated` stop-execute rows without service mutation. Direct cluster and single-service start/stop control wrapper summaries now print receipt-producing readback and aftercare commands: cluster control points to `cluster-service-audit` plus `cluster-service-execution-audit`, while single-service control points to `service-status` plus `service-execution-audit`. - `epiphany-verse-query restart-policy-directory` and `tools/epiphany_local_run.ps1 -Mode service-policy-directory` provide the compact scheduler coverage sight organ. It reads daemon topology/status plus durable `epiphany.cultmesh.daemon_restart_policy.v0` rows through a narrow CultMesh restart-policy directory loader, reports each daemon as `ENABLED`, `DISABLED`, or `MISSING`, treats disabled and missing policies as recovery attention, returns covered/enabled/disabled/missing/attention counts, and publishes explicit policy-write plus scheduler-tick follow-up commands without creating or mutating policies. Compact TUI rows now expose cooldown, reconcile interval, heartbeat stale threshold, failure count, last result, `followUp=`, and `private=false`; wrapper proof `local-20260618-213147-804-7dec3346` prints the Rust-owned `tuiRows` directly for all seven faculties as `ENABLED` with `last=ready`, `cooldown=30s`, `reconcile=60s`, `stale=300s`, `followUp=tools/epiphany_local_run.ps1 -Mode service-tick`, and `private=false`, instead of rebuilding policy text in PowerShell. Direct and wrapper proof now report seven daemons, seven covered policies, seven enabled policies, zero disabled, zero missing, zero attention, `status=ok`, and `privateStateExposed=false`. This is a real daemon heartbeat body with non-mutating per-organ launch and install artifacts, but not yet executed installed per-organ OS services. - `https://gamecult.org/Blog/purge-the-heretek-from-our-daemonic-swarm` is a public doctrine receipt for the Perfect Machine audit pressure: organs must not borrow each other's crowns, witnesses need owning mouths, surfaces reflect rather than rule, and cross-repo purification needs Bifrost-shaped ledger evidence instead of relying on recoverable transcripts or commit trails alone. - `tools/epiphany_local_run.ps1` now uses collision-resistant local run ids (`local-YYYYMMDD-HHMMSS-fff-`) for artifact roots and operator run receipts. Same-second parallel compact wrapper proofs for `collaboration-feedback` and `bifrost-publication` produce separate artifact drawers and both complete, so operator rites no longer collide on second-resolution run ids. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index 14e330f6..c33a64cf 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -1997,7 +1997,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { Write-Host "Cluster daemon service audit: service=$($result.serviceId), daemons=$($result.daemonCount), status=$($result.status), missing=$($result.missingCount), running=$($result.runningCount), present=$($result.presentCount), queryFailed=$($result.queryFailedCount), receipt=$($result.receiptId), serviceRows=$serviceRows" } elseif ($Mode -eq "cluster-service-start-plan" -or $Mode -eq "cluster-service-stop-plan" -or $Mode -eq "cluster-service-start-execute" -or $Mode -eq "cluster-service-stop-execute") { $serviceRows = Format-ClusterServiceRows $result.services - Write-Host "Cluster daemon service control: service=$($result.serviceId), daemons=$($result.daemonCount), status=$($result.status), executeRequested=$($result.executeRequested), executed=$($result.executed), planned=$($result.plannedCount), requested=$($result.requestedCount), refused=$($result.refusedCount), failed=$($result.failedCount), receipt=$($result.receiptId), serviceRows=$serviceRows" + Write-Host "Cluster daemon service control: service=$($result.serviceId), daemons=$($result.daemonCount), status=$($result.status), executeRequested=$($result.executeRequested), executed=$($result.executed), planned=$($result.plannedCount), requested=$($result.requestedCount), refused=$($result.refusedCount), failed=$($result.failedCount), receipt=$($result.receiptId), followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-audit, aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit, serviceRows=$serviceRows" } elseif ($Mode -eq "cluster-service-execution-readiness") { $serviceRows = Format-ClusterServiceRows $result.services $result.status Write-Host "Cluster daemon service execution readiness: service=$($result.serviceId), daemons=$($result.daemonCount), services=$($result.serviceCount), status=$($result.status), elevated=$($result.elevated), receipt=$($result.receiptId), serviceRows=$serviceRows" @@ -2091,7 +2091,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { } 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)" + Write-Host "Service control: service=$($result.serviceId), name=$($result.serviceName), status=$($result.status), executeRequested=$($result.executeRequested), executed=$($result.executed), receipt=$($result.receiptId), followUp=tools/epiphany_local_run.ps1 -Mode service-status, aftercare=tools/epiphany_local_run.ps1 -Mode service-execution-audit" } else { Write-Host "Coordinator: thread=$($result.threadId), finalAction=$($result.finalAction.action), runtimePresent=$($result.runtimeSpine.present)" }