From af37dc9b9bcc7c117cfadf7a3b11285de1b45fff Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 6 Aug 2026 00:05:03 +0100 Subject: [PATCH] Let braked physiology survive crossing loss --- epiphany-core/src/bin/epiphany-swarm.rs | 70 ++++++++++-------------- notes/fresh-workspace-handoff.md | 22 +++++--- state/ledgers.msgpack | Bin 548475 -> 549077 bytes state/map.yaml | 21 ++++--- 4 files changed, 53 insertions(+), 60 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-swarm.rs b/epiphany-core/src/bin/epiphany-swarm.rs index fa4cd815..eff60f58 100644 --- a/epiphany-core/src/bin/epiphany-swarm.rs +++ b/epiphany-core/src/bin/epiphany-swarm.rs @@ -12,8 +12,7 @@ use epiphany_core::{ load_epiphany_cultmesh_swarm_brake, load_resident_self_state, observe_process_instance, prepare_resident_self_launch, publish_resident_provider_readiness, resident_self_child_claim, resident_self_local_provider_status, terminate_process_instance, - validate_bifrost_persona_feedback_source, validate_persona_feedback_store_separation, - validate_resident_self_store_separation, + validate_persona_feedback_store_separation, validate_resident_self_store_separation, }; use serde_json::json; use std::collections::BTreeMap; @@ -61,21 +60,6 @@ fn main() -> Result<()> { println!("{}", serde_json::to_string_pretty(&projection)?); return Ok(()); } - // Status is non-actuating sight. In particular it must not open the - // provider-owned delivery store: CultCache read locking can create or - // rewrite the sibling lock file, which would let a root-run verifier - // poison the service identity's later access. The resident importer owns - // source authentication immediately before it can consume deliveries. - validate_feedback_source_for_command(&args.command, || { - validate_bifrost_persona_feedback_source( - &args.persona_feedback_source_store, - &args.bifrost_feedback_trust_anchor, - &args.policy.release_runtime_id, - &args.feedback_target_repository, - &args.feedback_target_persona, - ) - .map(|_| ()) - })?; if let Some(pressure) = args.pressure.as_ref() { enqueue_resident_self_pressure(&args.state_store, pressure)?; } @@ -106,16 +90,6 @@ fn main() -> Result<()> { Ok(()) } -fn validate_feedback_source_for_command( - command: &CommandKind, - validate: impl FnOnce() -> Result<()>, -) -> Result<()> { - if matches!(command, CommandKind::Status) { - return Ok(()); - } - validate() -} - fn publish_self_readiness(args: &Args) -> Result<()> { let process = capture_process_instance(std::process::id())?; publish_resident_provider_readiness( @@ -139,21 +113,32 @@ fn publish_self_readiness(args: &Args) -> Result<()> { Ok(()) } +fn run_feedback_import_if_released( + brake_engaged: bool, + import: impl FnOnce() -> Result<()>, +) -> Result<()> { + if brake_engaged { + return Ok(()); + } + import() +} + fn cycle( args: &Args, state: &mut ResidentSelfState, ports: &mut NativePorts, ) -> Result { let now = Utc::now().timestamp_millis().max(0) as u64; - import_bifrost_persona_feedback_deliveries( - &args.persona_feedback_source_store, - &args.persona_feedback_store, - &args.bifrost_feedback_trust_anchor, - &args.policy.release_runtime_id, - &args.feedback_target_repository, - &args.feedback_target_persona, - )?; - if !ports.brake_engaged()? { + let brake_engaged = ports.brake_engaged()?; + run_feedback_import_if_released(brake_engaged, || { + import_bifrost_persona_feedback_deliveries( + &args.persona_feedback_source_store, + &args.persona_feedback_store, + &args.bifrost_feedback_trust_anchor, + &args.policy.release_runtime_id, + &args.feedback_target_repository, + &args.feedback_target_persona, + )?; bridge_admitted_persona_feedback_to_heartbeat( &args.persona_feedback_store, &args.heartbeat_store, @@ -161,7 +146,8 @@ fn cycle( &args.policy.model_provider, &args.persona_model_allowed_data_classifications, )?; - } + Ok(()) + })?; bind_runtime_repository_domain( &args.policy.runtime_store, &args.feedback_target_repository, @@ -605,16 +591,16 @@ mod brake_tests { } #[test] - fn status_never_opens_or_validates_the_bifrost_provider_store() -> Result<()> { + fn engaged_brake_does_not_touch_the_bifrost_provider_store() -> Result<()> { let touched = std::cell::Cell::new(false); - validate_feedback_source_for_command(&CommandKind::Status, || { + run_feedback_import_if_released(true, || { touched.set(true); - anyhow::bail!("poison Bifrost store was touched") + anyhow::bail!("absent Bifrost delivery store was touched") })?; assert!(!touched.get()); assert!( - validate_feedback_source_for_command(&CommandKind::Once, || { - anyhow::bail!("non-status path authenticates provider source") + run_feedback_import_if_released(false, || { + anyhow::bail!("released cognition requires Bifrost") }) .is_err() ); diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 75ae94fb..6813a203 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -14,13 +14,17 @@ Current host authority: - The bare-metal replacement is retired and must not steer deployment. - The small Yggdrasil at `94.130.75.184` is canonical for Bifrost, DNS, SSH, WireGuard, and public applications. -- Starfire is authorized to host Epiphany cognition while resource demand is - measured. +- Starfire is the temporary Epiphany cognition body while the resident footprint + is measured. Yggdrasil retains Bifrost and public crossing authority. +- Live Yggdrasil has two EPYC vCPUs, 1.9 GiB RAM, 2 GiB swap, and a 38 GiB + root disk with about 15 GiB free. Base Bifrost is active. Docker, Epiphany, + Idunn, and the typed Bifrost Persona-feedback sidecar are absent. Building the + complete governed stack there would consume the constrained body before a + useful runtime measurement exists. - Starfire runtime identity is `epiphany-starfire`; its local Verse is bootstrapped and its canonical swarm brake is engaged. -- Native status completes and reports a cold runtime that needs source regather. -- Resident physiology and the governed Starfire-to-Yggdrasil crossing remain - to be started and proved. +- Native Starfire status completes and reports a cold runtime that needs source + regather. An exact Windows release is being packaged as the temporary body. No cognition release, broad Wake, or host reboot is authorized during the braked startup proof. @@ -42,10 +46,10 @@ braked startup proof. ## Next action -Package the exact clean Starfire source, initialize heartbeat and resident Self -stores beneath the engaged brake, start supervised resident physiology, and -prove stable readiness. Then connect the existing Yggdrasil Bifrost transport -without moving cognition or state-admission authority off Starfire. +Finish and authenticate the Starfire package. Start heartbeat and resident Self +under the engaged brake, prove stable physiology, then install the typed +Bifrost Persona-feedback provider on Yggdrasil and establish an authenticated +delivery crossing before any cognition release. ## Immediate Re-entry Instruction diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 7dff42bb35179112a4547525aaf7569449ea0abe..9d7e6e810e90b7c653395febfb746eddafb05dd6 100644 GIT binary patch delta 674 zcmYk3zityj5XQ0jmxhLddLl~h&gb(P5~m`;L`Xq0F%b$#pt;-e-OB6T%kEx`D;E^J z0Db{l8UzJGqM_jpXm|i#f`&O`5XJ1yXlK9u&9}e4Y=8f{{r*PlT5k}igEV>i?ZVcJ z4KTb9}x8isZ z$L~x<7QHkY)mt2ae z_hA6ZI(2ib0_g3m3nAUK)9tVGi6sgEnTTOCbOifyVi}|};-#=Oest71Cce_q#Zu~* zohQtCSfdquO$*Ql?wNc_Hh^Izs}l7hfCr-1IsjwAFDjmJqX`otkzqasCk5qbBN%(M z6IKN2z?WocVz}T8Jk2U&(Jml2g_ezFOUR5^z`T@-*tJGPdk{2hKv-Z#=xTN{f}t+3 zU`sQL)Bjq>q$UlqGP)p!Gj(2)<2e8`*J%9(6{Oe@e%pEG+2h9)Yd_~v{=x8(REkf| rYUW?l1J+Egz0A>bt851F5!^R