diff --git a/epiphany-core/src/bin/epiphany-cultmesh-smoke.rs b/epiphany-core/src/bin/epiphany-cultmesh-smoke.rs index d9a5c162..81f6c142 100644 --- a/epiphany-core/src/bin/epiphany-cultmesh-smoke.rs +++ b/epiphany-core/src/bin/epiphany-cultmesh-smoke.rs @@ -3,9 +3,7 @@ use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_TIER; use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID; use epiphany_core::EPIPHANY_CULTMESH_STATUS_SCHEMA_VERSION; use epiphany_core::EpiphanyCultMeshStatusEntry; -use epiphany_core::default_epiphany_cultmesh_operator_status; use epiphany_core::epiphany_cultmesh_operator_snapshot_from_status_json; -use epiphany_core::load_epiphany_cultmesh_operator_status; use epiphany_core::load_epiphany_cultmesh_status; use epiphany_core::load_latest_epiphany_cultmesh_operator_snapshot; use epiphany_core::write_epiphany_cultmesh_continuity_contracts; @@ -14,7 +12,6 @@ use epiphany_core::write_epiphany_cultmesh_global_room_policies; use epiphany_core::write_epiphany_cultmesh_hands_contracts; use epiphany_core::write_epiphany_cultmesh_mind_contracts; use epiphany_core::write_epiphany_cultmesh_operator_snapshot; -use epiphany_core::write_epiphany_cultmesh_operator_status; use epiphany_core::write_epiphany_cultmesh_soul_contracts; use epiphany_core::write_epiphany_cultmesh_status; use epiphany_core::write_epiphany_cultmesh_substrate_gate_contracts; @@ -45,11 +42,6 @@ fn main() -> Result<()> { write_epiphany_cultmesh_hands_contracts(&store, "epiphany-cultmesh-smoke")?; write_epiphany_cultmesh_soul_contracts(&store, "epiphany-cultmesh-smoke")?; write_epiphany_cultmesh_continuity_contracts(&store, "epiphany-cultmesh-smoke")?; - let operator_status = default_epiphany_cultmesh_operator_status( - "epiphany-cultmesh-smoke", - "2026-05-27T00:00:00Z", - ); - write_epiphany_cultmesh_operator_status(&store, operator_status.clone())?; let operator_snapshot = epiphany_cultmesh_operator_snapshot_from_status_json( "epiphany-cultmesh-smoke", "cultmesh-smoke-status", @@ -90,11 +82,6 @@ fn main() -> Result<()> { if loaded != Some(status) { anyhow::bail!("CultMesh smoke failed to round-trip Epiphany status document"); } - let loaded_operator_status = - load_epiphany_cultmesh_operator_status(&store, "epiphany-cultmesh-smoke")?; - if loaded_operator_status != Some(operator_status) { - anyhow::bail!("CultMesh smoke failed to round-trip Epiphany operator status document"); - } let loaded_operator_snapshot = load_latest_epiphany_cultmesh_operator_snapshot(&store, "epiphany-cultmesh-smoke")?; if loaded_operator_snapshot != Some(operator_snapshot) { diff --git a/epiphany-core/src/bin/epiphany-cultmesh-status.rs b/epiphany-core/src/bin/epiphany-cultmesh-status.rs deleted file mode 100644 index 423f9d67..00000000 --- a/epiphany-core/src/bin/epiphany-cultmesh-status.rs +++ /dev/null @@ -1,106 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use chrono::Utc; -use epiphany_core::default_epiphany_cultmesh_operator_status; -use epiphany_core::load_epiphany_cultmesh_operator_status; -use epiphany_core::write_epiphany_cultmesh_operator_status; -use serde_json::json; -use std::env; -use std::path::PathBuf; - -fn main() -> Result<()> { - let args = Args::parse()?; - match args.command.as_str() { - "write" => { - let status = default_epiphany_cultmesh_operator_status( - args.runtime_id.clone(), - Utc::now().to_rfc3339(), - ); - let written = write_epiphany_cultmesh_operator_status(&args.store, status)?; - println!( - "{}", - serde_json::to_string_pretty(&json!({ - "status": "written", - "store": args.store, - "document": written, - }))? - ); - } - "read" => { - let loaded = load_epiphany_cultmesh_operator_status(&args.store, &args.runtime_id)?; - println!( - "{}", - serde_json::to_string_pretty(&json!({ - "status": if loaded.is_some() { "ready" } else { "missing" }, - "store": args.store, - "document": loaded, - }))? - ); - } - "smoke" => { - let status = default_epiphany_cultmesh_operator_status( - args.runtime_id.clone(), - "2026-05-27T00:00:00Z", - ); - write_epiphany_cultmesh_operator_status(&args.store, status.clone())?; - let loaded = load_epiphany_cultmesh_operator_status(&args.store, &args.runtime_id)?; - if loaded != Some(status) { - anyhow::bail!("operator status did not round-trip through CultMesh"); - } - println!( - "{}", - serde_json::to_string_pretty(&json!({ - "status": "ok", - "store": args.store, - "runtimeId": args.runtime_id, - }))? - ); - } - other => anyhow::bail!("unknown command {other:?}; use write, read, or smoke"), - } - Ok(()) -} - -struct Args { - command: String, - store: PathBuf, - runtime_id: String, -} - -impl Args { - fn parse() -> Result { - let mut values = env::args().skip(1); - let command = values.next().unwrap_or_else(|| "read".to_string()); - let mut store = PathBuf::from(".epiphany-run/cultmesh/operator-status.ccmp"); - let mut store_explicit = false; - let mut runtime_id = "epiphany-local".to_string(); - - while let Some(arg) = values.next() { - match arg.as_str() { - "--store" => { - store = PathBuf::from(values.next().context("missing --store value")?); - store_explicit = true; - } - "--runtime-id" => { - runtime_id = values.next().context("missing --runtime-id value")?; - } - _ => anyhow::bail!("unknown argument {arg:?}"), - } - } - - if command == "smoke" { - if store_explicit { - anyhow::bail!( - "operator-status smoke accepts no store override and writes only beneath .epiphany-smoke" - ); - } - store = PathBuf::from(".epiphany-smoke/cultmesh/operator-status.ccmp"); - } - - Ok(Self { - command, - store, - runtime_id, - }) - } -} diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index 03542875..2e74f860 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -2671,6 +2671,7 @@ pub fn load_epiphany_cultmesh_status( node.get(EPIPHANY_CULTMESH_STATUS_KEY) } +#[cfg(test)] pub fn default_epiphany_cultmesh_operator_status( runtime_id: impl Into, generated_at_utc: impl Into, @@ -2707,6 +2708,7 @@ pub fn default_epiphany_cultmesh_operator_status( } } +#[cfg(test)] pub fn write_epiphany_cultmesh_operator_status( store_path: impl AsRef, status: EpiphanyCultMeshOperatorStatusEntry, diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 1a22a9f7..23d3ae53 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -370,6 +370,7 @@ pub use cultmesh_integration::EpiphanyLocalVerseContractSummary; pub use cultmesh_integration::EpiphanyLocalVerseWorkLoopSummary; pub use cultmesh_integration::EpiphanyServiceExecutionAuditCheck; pub use cultmesh_integration::EpiphanyServiceExecutionAuditReport; +#[cfg(test)] pub use cultmesh_integration::default_epiphany_cultmesh_operator_status; pub use cultmesh_integration::default_epiphany_cultmesh_swarm_brake; pub use cultmesh_integration::epiphany_cluster_service_execution_audit_report; @@ -511,6 +512,7 @@ pub use cultmesh_integration::write_epiphany_cultmesh_mind_contracts; pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_intent; pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_receipt; pub use cultmesh_integration::write_epiphany_cultmesh_operator_snapshot; +#[cfg(test)] pub use cultmesh_integration::write_epiphany_cultmesh_operator_status; pub use cultmesh_integration::write_epiphany_cultmesh_persona_speech_audit; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_map_entry; diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index ba3cab9c..42f9872f 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -196,11 +196,13 @@ explicit bootstrap as a common preflight, nearly every run refreshed an operator observation that no observer had produced. Bootstrap now writes declaration/initialization state only and leaves operator -status absent. `epiphany-cultmesh-status write` is the explicit owner of the -positive operator-status path. The read loader returns `None` without opening -or creating a missing store, and the `read` CLI therefore reports `missing` -without filesystem mutation. Its smoke is fixed beneath `.epiphany-smoke` and -rejects every store override before creation. +status absent. The follow-up audit showed `epiphany-cultmesh-status write` was +not an observer: it had no production caller and hard-coded `status=ready` plus +doctrine fields from a template. The shipped binary is deleted, and its default +constructor/writer are test-only. The fixed CultMesh smoke no longer fabricates +operator status; it retains its separate source-JSON-derived operator snapshot +contract proof. Production keeps the typed operator-status schema and a +filesystem-pure reader for future genuine observed ingest. ## Agent-state projection body boundary diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 2d367b69..d85bc173 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -123,9 +123,10 @@ persisted loaders; only the daemon-ID-bounded publisher may lower templates into provider-owned documents. - Generic bootstrap owns declarations and initial control state, not operator - observation. Operator status remains absent until the dedicated status writer - publishes it. Missing reads do not create a CultCache store; status smoke is - fixed beneath `.epiphany-smoke`. + observation. The template-based operator-status writer binary is deleted and + its constructor/writer are test-only. Production retains the typed schema and + a filesystem-pure reader for genuinely observed future ingest; operator + snapshots remain source-artifact-derived documents. - Agent-state SoA sync requires an existing bootstrapped Verse before mirroring the persisted agent store. SoA report is filesystem-pure on a missing store. Wrapper mode `agent-state-soa` explicitly composes sync then report; the diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 48d275e2..9d74cf7f 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -43,8 +43,9 @@ The confirmed conceptual substitutions have been cut: Consumers can load persisted provider documents but cannot request seven plausible advertisements/surfaces/tools from topology. - bootstrap no longer writes default operator status. Only the dedicated - operator-status writer publishes it; missing reads are filesystem-pure and - the status smoke is fixed beneath `.epiphany-smoke`. + operator-status writer was then found to be a dead `ready` template and + deleted. Its constructor/writer are test-only; production retains typed + reading for genuine observed ingest and source-derived operator snapshots. - agent-state SoA sync requires bootstrap; report preserves missing filesystem state. The wrapper explicitly composes sync then report rather than hiding a refresh inside readback. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 0e5dd847..ac40a096 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 7e52d808..1dca584c 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -70,7 +70,7 @@ data_flow: - move historical proof to git, commits, smoke artifacts, or distilled evidence rather than plan prose active_subgoals: - - Use `notes/conceptual-substitution-audit-2026-07-12.md` plus `notes/receipt-writer-provenance-audit-2026-07-12.md` as the current authority-corrosion maps. Snapshot promotion, synthetic smoke escape, unbound operator completion, hidden service execution flags, provider/bootstrap collapse, central/all-provider publication, production-side implicit bootstrap, orphaned external response authority, bulk readiness authority, public topology-derived provider builders, bootstrap-authored operator observation, and SoA projection body creation are cut. Provider responses/readiness without owners are test-only; templates are private; bootstrap owns declarations; query mutations require the body; missing reads preserve filesystem absence. Next audit remaining projections, caches, schedulers, adapters, and non-receipt smokes for borrowed authority or path escape. + - Use `notes/conceptual-substitution-audit-2026-07-12.md` plus `notes/receipt-writer-provenance-audit-2026-07-12.md` as the current authority-corrosion maps. Snapshot promotion, synthetic smoke escape, unbound operator completion, hidden service execution flags, provider/bootstrap collapse, central/all-provider publication, production-side implicit bootstrap, orphaned external response authority, bulk readiness authority, public topology-derived provider builders, bootstrap/template-authored operator observation, and SoA projection body creation are cut. Provider responses/readiness/operator status without observers are test-only or deleted; templates are private; query mutations require the body; missing reads preserve filesystem absence. Next audit remaining projections, caches, schedulers, adapters, and non-receipt smokes for borrowed authority or path escape. - `swarm-overview` is an Epiphany-local, renderer-neutral diagnostic projection over provider-owned typed state. It owns no lifecycle, discovery, composition, or mutation authority. Epiphany publishes clean provider-owned Eve surfaces; Odin may discover them; downstream lowerers and compositors remain outside Epiphany's concern. - Idunn owns daemon survival and service lifecycle physiology. Codex/operator sessions may inspect, generate runbooks, and route explicit operator authority, but keeping daemons alive belongs to Idunn-owned service lifecycle receipts, scheduler policy, audits, and aftercare. Do not let Self, diagnostic projections, or ad hoc wrapper summaries become a second daemon-keeper. Global tool readbacks for Self `service-health`, `service-policy-directory`, and `swarm-online-runbook` state `lifecycleOwner=Idunn` and `hostedBody=Epiphany` without service mutation or private-state exposure. - Use `notes/epiphany-cultmesh-dreaming-roadmap.md` as the design authority for distributed Epiphany dreaming. Public dreams are separately authored typed documents distributed through CultMesh/CultNet; private state remains local and cannot be shared by flipping a visibility flag. Foreign dreams are external thought weather until a reviewed local adoption receipt digests them into memory, planning, doctrine, or governance.