From a764b949f8627824b55633a9134ba3a5f1ebf44e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 12 Jul 2026 21:39:44 +0100 Subject: [PATCH] Test-gate bulk daemon readiness --- epiphany-core/src/bin/epiphany-verse-query.rs | 43 +++++++++++++++--- epiphany-core/src/cultmesh_integration.rs | 6 ++- epiphany-core/src/lib.rs | 2 + notes/epiphany-current-algorithmic-map.md | 4 ++ notes/fresh-workspace-handoff.md | 3 ++ ...eipt-writer-provenance-audit-2026-07-12.md | 15 ++++++ state/ledgers.msgpack | Bin 437401 -> 437814 bytes state/map.yaml | 2 +- 8 files changed, 66 insertions(+), 9 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 34c2adab..accc8afc 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -95,7 +95,6 @@ use epiphany_core::write_epiphany_cultmesh_daemon_poke_receipt; use epiphany_core::write_epiphany_cultmesh_daemon_restart_policy; use epiphany_core::write_epiphany_cultmesh_daemon_service_lifecycle_receipt; use epiphany_core::write_epiphany_cultmesh_daemon_status; -use epiphany_core::write_epiphany_cultmesh_daemon_statuses; use epiphany_core::write_epiphany_cultmesh_daemon_tool_invocation_intent; use epiphany_core::write_epiphany_cultmesh_daemon_tool_invocation_receipt; use epiphany_core::write_epiphany_cultmesh_eve_connection_intent; @@ -199,6 +198,42 @@ fn require_query_bootstrap(args: &Args) -> Result<()> { Ok(()) } +fn seed_quarantined_smoke_daemon_statuses(args: &Args) -> Result<()> { + if !args.smoke_default_store { + anyhow::bail!("synthetic daemon readiness is confined to the built-in smoke store"); + } + for cluster in load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())? { + write_epiphany_cultmesh_daemon_status( + &args.store, + args.runtime_id.clone(), + EpiphanyCultMeshDaemonStatusEntry { + schema_version: epiphany_core::EPIPHANY_CULTMESH_DAEMON_STATUS_SCHEMA_VERSION + .to_string(), + daemon_id: cluster.daemon_id, + cluster_id: cluster.cluster_id, + body_domain: cluster.body_domain, + daemon_surface_id: cluster.daemon_surface_id, + eve_surface_id: cluster.eve_surface_id, + status: "ready".to_string(), + last_heartbeat_utc: "2026-06-02T00:00:00Z".to_string(), + supported_actions: vec![ + "inspectStatus".to_string(), + "pokeDaemon".to_string(), + "watchHeartbeat".to_string(), + "submitTypedToolIntent".to_string(), + ], + operator_action: "none".to_string(), + private_state_exposed: false, + notes: vec![ + "Synthetic liveness fixture confined to the built-in aggregate smoke body." + .to_string(), + ], + }, + )?; + } + Ok(()) +} + fn run_cli() -> Result<()> { let args = Args::parse()?; match args.command.as_str() { @@ -1346,11 +1381,7 @@ fn run_cli() -> Result<()> { &cluster.daemon_id, )?; } - write_epiphany_cultmesh_daemon_statuses( - &args.store, - args.runtime_id.clone(), - "2026-06-02T00:00:00Z", - )?; + seed_quarantined_smoke_daemon_statuses(&args)?; let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?; let ready_liveness = load_epiphany_cultmesh_daemon_liveness(&args.store, args.runtime_id.clone())?; diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index fcdc64cc..6cfc1291 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -5875,8 +5875,8 @@ pub fn query_epiphany_local_verse_context( } } let mut daemon_statuses = Vec::new(); - for status in epiphany_cultmesh_daemon_statuses("") { - if let Some(loaded) = node.get::(&status.daemon_id)? { + for cluster in epiphany_cultmesh_cluster_topology() { + if let Some(loaded) = node.get::(&cluster.daemon_id)? { daemon_statuses.push(loaded); } } @@ -6677,6 +6677,7 @@ fn validate_eve_surface_state(surface: &EpiphanyCultMeshEveSurfaceStateEntry) -> Ok(()) } +#[cfg(test)] pub fn epiphany_cultmesh_daemon_statuses( last_heartbeat_utc: impl Into, ) -> Vec { @@ -6709,6 +6710,7 @@ pub fn epiphany_cultmesh_daemon_statuses( .collect() } +#[cfg(test)] pub fn write_epiphany_cultmesh_daemon_statuses( store_path: impl AsRef, runtime_id: impl Into, diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 056de746..18909c75 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -391,6 +391,7 @@ pub use cultmesh_integration::epiphany_cultmesh_continuity_contracts; pub use cultmesh_integration::epiphany_cultmesh_coordinator_run_receipt_from_summary_json; pub use cultmesh_integration::epiphany_cultmesh_daemon_poke_intent_from_status; pub use cultmesh_integration::epiphany_cultmesh_daemon_poke_receipt_for_intent; +#[cfg(test)] pub use cultmesh_integration::epiphany_cultmesh_daemon_statuses; pub use cultmesh_integration::epiphany_cultmesh_daemon_tool_capabilities; #[cfg(test)] @@ -493,6 +494,7 @@ pub use cultmesh_integration::write_epiphany_cultmesh_daemon_restart_policy; pub use cultmesh_integration::write_epiphany_cultmesh_daemon_scheduler_receipt; pub use cultmesh_integration::write_epiphany_cultmesh_daemon_service_lifecycle_receipt; pub use cultmesh_integration::write_epiphany_cultmesh_daemon_status; +#[cfg(test)] pub use cultmesh_integration::write_epiphany_cultmesh_daemon_statuses; pub use cultmesh_integration::write_epiphany_cultmesh_daemon_tool_invocation_intent; pub use cultmesh_integration::write_epiphany_cultmesh_daemon_tool_invocation_receipt; diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 2054cce7..8c2d2ec3 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -114,6 +114,10 @@ and Imagination consensus response construction are test-only. Production retains typed schemas and readers for provider-authored ingest, but no local shipped binary owns or writes those response documents. +- Bulk seven-daemon `ready` construction/writing is also test-only. Production + loaders enumerate topology keys without manufacturing status; only narrow + single-daemon heartbeat/observation writers remain. Aggregate synthetic + readiness exists solely inside the fixed Verse smoke body. - Store/runtime overrides fail before fixture seeding or receipt construction. - Negative proof: targeting `state/local-verse.ccmp` was rejected and its SHA-256 did not change. - Positive proof: the built-in quarantined smoke completes successfully and reports its quarantine coordinates. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index ef2dee17..85a756b8 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -36,6 +36,9 @@ The confirmed conceptual substitutions have been cut: - orphaned Bifrost/GitHub/Maintainer response and Imagination consensus constructors/writers are test-only. The aggregate smoke proves requests stay pending; production keeps readers for externally provider-authored documents. +- bulk seven-daemon readiness construction/writing is test-only. Production + loaders enumerate topology; the aggregate smoke owns a fixed-store local + fixture helper, while real liveness remains single-daemon authored. The presentation boundary is now plain: `swarm overview` is a generic compact read-only projection. Gjallar is a downstream TUI application on Nightwing and is not an Epiphany organ, provider, owner, runtime, or architectural dependency. Eve/CultUI graphs may be lowered or composited downstream without Epiphany caring which presentation client does it. diff --git a/notes/receipt-writer-provenance-audit-2026-07-12.md b/notes/receipt-writer-provenance-audit-2026-07-12.md index cdb6ffad..b4af7a54 100644 --- a/notes/receipt-writer-provenance-audit-2026-07-12.md +++ b/notes/receipt-writer-provenance-audit-2026-07-12.md @@ -56,3 +56,18 @@ constructors, six writers, their validators, and event-key helpers are compiled only under `cfg(test)`. Typed response schemas and read loaders remain in production for ingesting documents authored by external owning providers; no shipped Epiphany binary can construct or persist those responses. + +## Bulk daemon readiness quarantine + +After real heartbeat and provider ownership moved into +`epiphany-cluster-daemon`, the library still exported +`write_epiphany_cultmesh_daemon_statuses`, which stamped all seven declared +daemons `ready` with one caller-provided timestamp. Its only shipped caller was +the aggregate smoke; the full-context loader also reused the synthetic builder +merely to enumerate keys. + +Loaders now enumerate daemon IDs from declared topology. The bulk ready-state +constructor and writer are test-only. The aggregate smoke constructs its +fixture statuses locally behind `smoke_default_store`; the helper refuses every +non-default store. Production exposes only the single-status writer used by the +owning cluster daemon and Idunn observation paths. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 28d501129cc9b01a46108beccf28fb4b7424c1a3..7dda8f0d1c7ba183ce3a6246b2e2b3c8e7e689e8 100644 GIT binary patch delta 392 zcmXYtze)o^5Qn`OuduLC8w0|Ctrz13m87%r2~yducXNNt-fprp7jsn#3v1C3e1)JO z2#PP@I|x3EbJ60rTg=Qi-|o|Q>;0$oy60{7`rVVuuQmT==k357d*0UVym2>gc#`^F zmoz0CAM=LaTy8&phMn*<=$r+|;UMhvyS<0;{r;>NAaRf?#uzlFDyrbB)I%Vgpb27y zg*D(%#T7)>5W6yB>yB<*&geiT^;y_SZqm9-gU)3RiGVFcx}>`PN1--clv)RZVVp8( zt74ov0yJfTP7MAVVTct$;%p(1k<~V>AeYr50X6}u3}?uB1jLF*0|iMw#W*0ghYm#~67dZ6NL)EnEOXZwF@dr21(>K(vn;cV NWa%F*=-J=(+P?^