From a9a8a00367c5125b178b03ce3005f3fe4b6eeee9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 13 Jul 2026 02:54:24 +0100 Subject: [PATCH] Name provider mirrors by arrival order --- epiphany-core/src/bin/epiphany-verse-query.rs | 53 +++++++++--------- epiphany-core/src/cultmesh_integration.rs | 27 +++++---- epiphany-core/src/lib.rs | 14 ++--- ...onceptual-substitution-audit-2026-07-12.md | 6 ++ notes/fresh-workspace-handoff.md | 5 ++ state/ledgers.msgpack | Bin 464966 -> 465292 bytes state/map.yaml | 2 +- 7 files changed, 62 insertions(+), 45 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index c6fd1736..4bbc9246 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -45,6 +45,13 @@ use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_intent_from_capabili use epiphany_core::epiphany_cultmesh_eve_connection_intent_from_advertisement; use epiphany_core::epiphany_service_execution_audit_report; use epiphany_core::load_agent_state_soa_entry; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_metrics_receipt; +use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt; use epiphany_core::load_epiphany_cultmesh_cluster_topology; use epiphany_core::load_epiphany_cultmesh_daemon_liveness; use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy_directory; @@ -59,13 +66,6 @@ use epiphany_core::load_epiphany_cultmesh_repo_work_readiness_reports; use epiphany_core::load_epiphany_cultmesh_status; use epiphany_core::load_epiphany_cultmesh_swarm_brake; use epiphany_core::load_latest_epiphany_cultmesh_agent_state_soa_summary; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_collaboration_feedback; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_github_publication_receipt; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_metrics_receipt; -use epiphany_core::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt; use epiphany_core::load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt; use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_intent; use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_intent; @@ -921,7 +921,7 @@ fn run_cli() -> Result<()> { intent.clone(), )?; let latest_intent = - load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( + load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( &args.store, args.runtime_id.clone(), )?; @@ -1240,10 +1240,11 @@ fn run_cli() -> Result<()> { args.runtime_id.clone(), feedback.clone(), )?; - let latest_feedback = load_latest_epiphany_cultmesh_bifrost_collaboration_feedback( - &args.store, - args.runtime_id.clone(), - )?; + let latest_feedback = + load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback( + &args.store, + args.runtime_id.clone(), + )?; if latest_feedback .as_ref() .map(|feedback| feedback.feedback_id.as_str()) @@ -7627,33 +7628,35 @@ fn service_lifecycle_receipt_sort_key( } fn load_bifrost_ledger_report(args: &Args) -> Result { - let latest_intent = load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( - &args.store, - args.runtime_id.clone(), - )?; - let latest_publication = load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( - &args.store, - args.runtime_id.clone(), - )?; - let latest_github = load_latest_epiphany_cultmesh_bifrost_github_publication_receipt( + let latest_intent = + load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( + &args.store, + args.runtime_id.clone(), + )?; + let latest_publication = + load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( + &args.store, + args.runtime_id.clone(), + )?; + let latest_github = load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt( &args.store, args.runtime_id.clone(), )?; let latest_public_proof_publication = - load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( + load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( &args.store, args.runtime_id.clone(), )?; let latest_artifact_acceptance = - load_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt( + load_arrival_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt( &args.store, args.runtime_id.clone(), )?; - let latest_metrics = load_latest_epiphany_cultmesh_bifrost_metrics_receipt( + let latest_metrics = load_arrival_latest_epiphany_cultmesh_bifrost_metrics_receipt( &args.store, args.runtime_id.clone(), )?; - let latest_feedback = load_latest_epiphany_cultmesh_bifrost_collaboration_feedback( + let latest_feedback = load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback( &args.store, args.runtime_id.clone(), )?; diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index 429db50a..ce3f3020 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -4505,7 +4505,7 @@ pub fn write_epiphany_cultmesh_bifrost_body_change_publication_receipt( Ok(written) } -pub fn load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -4513,7 +4513,7 @@ pub fn load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( node.get(EPIPHANY_CULTMESH_BIFROST_BODY_CHANGE_PUBLICATION_INTENT_LATEST_KEY) } -pub fn load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -4576,7 +4576,7 @@ pub fn write_epiphany_cultmesh_bifrost_github_publication_receipt( Ok(written) } -pub fn load_latest_epiphany_cultmesh_bifrost_github_publication_receipt( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -4642,7 +4642,7 @@ pub fn write_epiphany_cultmesh_bifrost_public_proof_publication_receipt( Ok(written) } -pub fn load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -4705,7 +4705,7 @@ pub fn write_epiphany_cultmesh_bifrost_artifact_acceptance_receipt( Ok(written) } -pub fn load_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -4766,7 +4766,7 @@ pub fn write_epiphany_cultmesh_bifrost_metrics_receipt( Ok(written) } -pub fn load_latest_epiphany_cultmesh_bifrost_metrics_receipt( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_metrics_receipt( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -4870,7 +4870,7 @@ pub fn write_epiphany_cultmesh_imagination_consensus_receipt( Ok(written) } -pub fn load_latest_epiphany_cultmesh_bifrost_collaboration_feedback( +pub fn load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback( store_path: impl AsRef, runtime_id: impl Into, ) -> Result> { @@ -9461,14 +9461,14 @@ mod tests { )?; assert_eq!( - load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( + load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( &store, "epiphany-test" )?, Some(intent.clone()) ); assert_eq!( - load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( + load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( &store, "epiphany-test" )?, @@ -9599,7 +9599,7 @@ mod tests { )?; assert_eq!( - load_latest_epiphany_cultmesh_bifrost_github_publication_receipt( + load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt( &store, "epiphany-test" )?, @@ -9744,7 +9744,7 @@ mod tests { )?; assert_eq!( - load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( + load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( &store, "epiphany-test" )?, @@ -9870,7 +9870,10 @@ mod tests { )?; assert_eq!( - load_latest_epiphany_cultmesh_bifrost_collaboration_feedback(&store, "epiphany-test")?, + load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback( + &store, + "epiphany-test" + )?, Some(feedback) ); assert_eq!( diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 96b17f70..7c541974 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -406,6 +406,13 @@ pub use cultmesh_integration::epiphany_cultmesh_substrate_gate_contracts; pub use cultmesh_integration::epiphany_cultmesh_verse_policies; pub use cultmesh_integration::epiphany_local_verse_work_loop_summary; pub use cultmesh_integration::epiphany_service_execution_audit_report; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_metrics_receipt; +pub use cultmesh_integration::load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt; pub use cultmesh_integration::load_epiphany_cultmesh_cluster_topology; pub use cultmesh_integration::load_epiphany_cultmesh_daemon_liveness; pub use cultmesh_integration::load_epiphany_cultmesh_daemon_restart_policy; @@ -426,13 +433,6 @@ pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_readiness_reports pub use cultmesh_integration::load_epiphany_cultmesh_status; pub use cultmesh_integration::load_epiphany_cultmesh_swarm_brake; pub use cultmesh_integration::load_latest_epiphany_cultmesh_agent_state_soa_summary; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_collaboration_feedback; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_github_publication_receipt; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_metrics_receipt; -pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt; pub use cultmesh_integration::load_latest_epiphany_cultmesh_coordinator_run_receipt; pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_poke_intent; pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_poke_receipt; diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 6f033a40..e84088d4 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -936,6 +936,12 @@ are overwrite mirrors. Arrival order is therefore the only fact Epiphany can observe. A truthful fix requires a Bifrost-owned contract revision; Epiphany must not synthesize provider chronology from receipt IDs or local clocks. +The executable API now says this plainly: all seven Bifrost/GitHub mirror +loaders are named `load_arrival_latest_*`. The old `load_latest_*` names were +deleted without compatibility aliases. Persisted `/latest` keys remain the +provider-facing storage contract, but Rust callers can no longer confuse their +meaning with provider event order. + The same inspection found 33 consecutive duplicate `#[cfg(test)]` attributes on provider constructors/writers and their re-exports. One gate already makes each item test-only; the second owned nothing. The duplicates are removed. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 59c891e5..98227192 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -286,6 +286,11 @@ receipt contracts expose no provider timestamp or monotonic revision, so local 33 duplicate `#[cfg(test)]` residues found around provider writers/re-exports were removed; one test gate remains on every test-only item. +All seven Bifrost/GitHub mirror loader APIs are now named +`load_arrival_latest_*`; no misleading `load_latest_*` aliases remain. The +persisted `/latest` key spelling is retained as external storage compatibility, +not interpreted as provider chronology. + The latest structural count is 32 closure family branches, 744 remaining substring assertions in the closure region, and 1,284 lines in `closure_contracts.rs`. Do not blindly generate a struct forest for every diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 21458306ddcef82df5c3d617e6063fddd3324437..72178053ac0faf9e54d6b0e0667a7ffa9b207d1e 100644 GIT binary patch delta 306 zcmYL@F;2rk5Jj;8TLMvnf)t^V=qLyfC> zd6qrVcNNB8>-FbPv>J7<_V#;6^~Za-^}I14g9T-PT7#vM44kPuVe2~Q%3X|Zp->_$ zpcyj~3tlV!mPDf?>yjOCJU^g_DpCInXfhBgxb*(4n+%1P>@M`Zld_Jo1UhpYc%ZRu zo>3W~Cr4t?7ji6^6QpdMVCw7%3`W+$Y5x*TlWKAjP{mLyvM>}bl`jeDy|7`;`M6$d G#mB#j$7{6! delta 60 zcmeC#EOTsw%mztDE<-C5^QdDC?BdFsl^F{e86%pfGPO@-VgzCk%?!jWK+FonY}=