From c56deff570eb0f63b2345d34447b710e7d2da43d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 18 Jun 2026 17:55:40 +0100 Subject: [PATCH] Expose liveness poke routing in compact rows --- epiphany-core/src/bin/epiphany-verse-query.rs | 34 ++++++++++++++---- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 262938 -> 263245 bytes state/map.yaml | 2 +- tools/epiphany_local_run.ps1 | 8 ++++- 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index c231a5de..928da58e 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -1483,6 +1483,17 @@ fn main() -> Result<()> { "local Verse query smoke ready daemon report lost compact READY rows" ); } + if !ready_report.tui_rows.iter().any(|row| { + row.contains("READY") + && row.contains("Persona") + && row.contains("privateVerse=epiphany.cluster.persona.private") + && row.contains("followUp=tools/epiphany_local_run.ps1 -Mode swarm-poke-down") + && row.contains("private=false") + }) { + anyhow::bail!( + "local Verse query smoke ready daemon report lost compact topology/follow-up fields" + ); + } let eve_directory = load_epiphany_cultmesh_eve_surface_directory(&args.store, args.runtime_id.clone())?; let eve_report = eve_surface_report(&eve_directory); @@ -1876,10 +1887,13 @@ fn main() -> Result<()> { load_epiphany_cultmesh_daemon_liveness(&args.store, args.runtime_id.clone())?; let degraded_report = daemon_liveness_report(°raded_liveness); if degraded_report.non_ready_count != 1 - || !degraded_report - .tui_rows - .iter() - .any(|row| row.contains("POKE") && row.contains("epiphany-daemon-hands")) + || !degraded_report.tui_rows.iter().any(|row| { + row.contains("POKE") + && row.contains("epiphany-daemon-hands") + && row.contains("privateVerse=epiphany.cluster.hands.private") + && row + .contains("followUp=tools/epiphany_local_run.ps1 -Mode swarm-poke-down") + }) { anyhow::bail!( "local Verse query smoke degraded daemon report did not surface one Hands poke row" @@ -2667,6 +2681,7 @@ struct DaemonLivenessRow { daemon_id: String, display_name: String, body_domain: String, + private_verse_id: String, eve_surface_id: String, status: String, operator_action: String, @@ -2774,6 +2789,7 @@ fn daemon_liveness_report( let supported_actions = status.supported_actions.clone(); let eve_surface_id = cluster.eve_surface_id.clone(); let body_domain = cluster.body_domain.clone(); + let private_verse_id = cluster.private_verse_id.clone(); let display_name = cluster.display_name.clone(); let needs_poke = status_value != "ready"; if needs_poke { @@ -2781,14 +2797,20 @@ fn daemon_liveness_report( } let compact_status = if needs_poke { "POKE" } else { "READY" }; tui_rows.push(format!( - "{compact_status} | {display_name} | {} | {} | {}", - daemon_id, body_domain, eve_surface_id + "{compact_status} | {display_name} | {} | body={} | privateVerse={} | surface={} | followUp={} | private={}", + daemon_id, + body_domain, + private_verse_id, + eve_surface_id, + WRAPPER_POKE_NON_READY_COMMAND, + status.private_state_exposed )); rows.push(DaemonLivenessRow { cluster_id, daemon_id, display_name, body_domain, + private_verse_id, eve_surface_id, status: status_value, operator_action, diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 9e82a1ab..c2912cdf 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -50,7 +50,7 @@ remembers doctrine; the branch remembers the blade. - `epiphany-verse-query restart-policy-directory` and `tools/epiphany_local_run.ps1 -Mode service-policy-directory` are the compact scheduler coverage sight rite. They report each daemon's durable restart-policy coverage as `ENABLED`, `DISABLED`, or `MISSING` through a narrow CultMesh restart-policy directory loader without writing policies or commands. Compact rows now include cooldown, reconcile interval, heartbeat stale threshold, failure count, last result, `followUp=`, and `private=false`; the wrapper summary prints all seven policy rows with the `service-tick` follow-up. Disabled policies count as recovery attention, not harmless coverage. Live wrapper artifact `local-20260618-175008-830-e470a387` returned `status=ok`, seven daemons, seven covered policies, seven enabled policies, zero disabled, zero missing, zero attention rows, `last=ready`, `reconcile=60s`, `stale=300s`, and `privateStateExposed=false`. This is real daemon heartbeat coverage, not yet an installed per-organ OS service. - `epiphany-verse-query poke-down-daemons` and `tools/epiphany_local_run.ps1 -Mode swarm-poke-down` are the current typed "if a service is down, poke it" reflex. They inspect local Verse daemon status rows, write daemon poke intent/receipt documents for every non-ready daemon, respect the same `daemon.lifecycle_poke` swarm brake as single-daemon poke, include target display name/body domain/private Verse id/Eve surface metadata from cluster topology in the operator-safe poke summary, and expose no private state. Verified: live local Verse had seven ready daemons and produced a no-op operator receipt with `pokedDaemonCount=0`; a temp degraded Hands store produced one topology-aware poke receipt; a temp lifecycle brake refused the batch poke; and `epiphany-verse-query smoke` now source-proves the ready no-op plus degraded single-poke path. - CultMesh now carries the CultCache SoA ergonomic instead of forcing callers to bypass the mesh node. `CultMeshNode::soa()` returns typed SoA tables for registered documents; the CultMesh crate proves the generic path, and Epiphany's agent-state summary test proves local Verse can project sealed `epiphany.cultmesh.agent_state_soa_summary.v0` rows through SoA columns. The seven-row persisted agent-state SoA remains owned by the agent memory store and mirrored into local Verse only as a private-state-sealed summary. `epiphany-verse-query agent-state-report` and `tools/epiphany_local_run.ps1 -Mode agent-state-soa` now expose that mirrored summary as compact TUI/JSON rows from CultMesh SoA columns without full local Verse serialization; live wrapper proof returned `agents=7`, `summaryRows=2` for id/latest projections, and `privateStateExposed=False`. -- `epiphany-verse-query swarm-status` and `tools/epiphany_local_run.ps1 -Mode swarm-status` are the compact read-only liveness surface for the daemon swarm. They use a narrow CultMesh daemon-liveness loader instead of serializing the full local Verse context, return agent-friendly `READY`/`POKE` TUI rows with body domain and Eve surface, and expose no private state. Verified: live wrapper report saw seven ready daemons; a temp degraded Hands report returned `attention`, `nonReadyCount=1`, and `POKE | Hands | epiphany-daemon-hands | repo:E:/Projects/EpiphanyAgent | eve://epiphany/hands`; `epiphany-verse-query smoke` source-proves ready and degraded report paths. +- `epiphany-verse-query swarm-status` and `tools/epiphany_local_run.ps1 -Mode swarm-status` are the compact read-only liveness surface for the daemon swarm. They use a narrow CultMesh daemon-liveness loader instead of serializing the full local Verse context, return agent-friendly `READY`/`POKE` TUI rows with daemon id, body domain, private Verse id, Eve surface, and `followUp=tools/epiphany_local_run.ps1 -Mode swarm-poke-down`, and expose no private state. Verified: live wrapper artifact `local-20260618-175408-868-81ad22c0` saw seven ready daemons and printed each daemon's private Verse plus Eve surface; a temp degraded Hands report returns `attention`, `nonReadyCount=1`, and a `POKE` row with `privateVerse=epiphany.cluster.hands.private`; `epiphany-verse-query smoke` source-proves ready and degraded report paths. - `epiphany-verse-query cluster-topology` and `tools/epiphany_local_run.ps1 -Mode cluster-topology` are the compact read-only topology surface for the standing swarm. They use a narrow CultMesh cluster-topology loader, return seven clusters, seven private Verse ids, seven daemon ids, one public Persona discussion cluster, and `privateStateExposed=false`. Verified: direct proof returned `PUBLIC | Persona | epiphany.cluster.persona.private | repo:E:/Projects/EpiphanyAgent | epiphany-daemon-persona | eve://epiphany/persona`; `epiphany-verse-query smoke` source-proves the compact topology invariants; wrapper proof produced `clusters=7`, `privateVerses=7`, `daemons=7`, `publicDiscussion=1`. - `epiphany-verse-query eve-surfaces` and `tools/epiphany_local_run.ps1 -Mode eve-surfaces` are the compact read-only Odin/Eve surface directory. Odin only reads the local Verse cluster topology, default advertisements, and daemon-owned Eve surface states through a narrow CultMesh loader; the report returns seven TUI rows, exactly one public Persona discussion surface, the `connect-eve` command hint, and `privateStateExposed=false`. TUI rows now include surface id, daemon id, body domain, private Verse id, public-discussion flag, supported actions, exposed document types, advertisement id, and `private=false`. Verified: wrapper proof `local-20260618-173318-552-420d6d66` printed `publicSurfaces=Persona=eve://epiphany/persona@epiphany.cluster.persona.private`, the connection command, `surfaces=7`, `publicDiscussion=1`, and `privateStateExposed=False`; `epiphany-verse-query smoke` source-proves the compact Persona routing row. - `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`. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 7fd8c9e1dffcf590e5569fabc5c130fb5dad246d..4e22028e7b719366112b10a00f34f67deb03cdfd 100644 GIT binary patch delta 240 zcmW-ay-ve06h?6x7N&{?A(kt#A&i`;iK6Zd%pittmVFBmPHb!^h8gj*LsY2)FTjGt z#0zxeo$4?geLBne)-Th)x9RsG*(>I3w%F{Xlarrga!<(D(~!Il35kq5Sq(}0y#Mi= zv%I9Nq*-;9mGh!_|2#Na>|O?L8|pmwodcm8!-WS`_t>IyV0CcN>Hzp)v_mkq?zu;} zMjNe`?i9{@1lQRm7Z}a`=ZwC?)lHI$iy5nERYo!{^IWj8(0Y`>l>&$H1}t*<2$Ex? Uql|~4_O~!LV5ybTfp+F>3r)#S@&Et; delta 47 zcmX@xAuy{=V1pzhm!Xw`Mbt3{7RK+Jl^F{e8CNw=Won`, candidate action refs, consensus packet ref, adoption gate, and `private=false`; wrapper proof `local-20260618-172623-944-62ea45bf` prints the public discussion ref, candidate action list, consensus packet, and adoption gate in one line. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index 8599736d..9f44d6e4 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -1622,7 +1622,13 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { } elseif ($Mode -eq "agent-state-soa") { Write-Host "Agent state SoA: status=$($result.status), agents=$($result.agentCount), summaryRows=$($result.summarySoaTableRows), privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "swarm-status") { - Write-Host "Swarm status: status=$($result.status), daemons=$($result.daemonCount), nonReady=$($result.nonReadyCount), privateStateExposed=$($result.privateStateExposed)" + $daemonRows = "none" + if ($null -ne $result.rows -and $result.rows.Count -gt 0) { + $daemonRows = (($result.rows | ForEach-Object { + "$($_.displayName):$($_.status):$($_.daemonId):privateVerse=$($_.privateVerseId):surface=$($_.eveSurfaceId)->$($result.wrapperMode)" + }) -join "; ") + } + Write-Host "Swarm status: status=$($result.status), daemons=$($result.daemonCount), nonReady=$($result.nonReadyCount), daemonRows=$daemonRows, privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "cluster-topology") { Write-Host "Cluster topology: status=$($result.status), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), daemons=$($result.daemonCount), publicDiscussion=$($result.publicDiscussionClusterCount), privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "eve-surfaces") {