From 154dc1eadd98dda25916ee40e7130770e145e874 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 19 Jul 2026 10:53:23 +0100 Subject: [PATCH] Let autonomous promotion await thread state --- epiphany-core/src/runtime_spine.rs | 33 ++++++++++++++++++++++++++--- notes/fresh-workspace-handoff.md | 27 +++++++++++++++++++++++ state/ledgers.msgpack | Bin 536023 -> 536415 bytes state/map.yaml | 5 +++-- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/epiphany-core/src/runtime_spine.rs b/epiphany-core/src/runtime_spine.rs index 4f0a5e75..b6a2e454 100644 --- a/epiphany-core/src/runtime_spine.rs +++ b/epiphany-core/src/runtime_spine.rs @@ -3887,9 +3887,10 @@ pub fn promote_autonomous_direction_options_for_modeling( let mut opening = runtime_spine_cache(runtime_store)?; opening.pull_all_backing_stores()?; let identity = require_identity(&opening)?; - let thread = opening - .get::(crate::THREAD_STATE_KEY)? - .ok_or_else(|| anyhow!("autonomous proposal promotion requires thread state"))?; + let Some(thread) = opening.get::(crate::THREAD_STATE_KEY)? + else { + return Ok(Vec::new()); + }; let model = opening .get::(crate::MEMORY_GRAPH_KEY)? .ok_or_else(|| anyhow!("autonomous proposal promotion requires admitted Modeling map"))? @@ -9399,6 +9400,32 @@ pub(crate) mod tests { assert!(!public_surface.contains("put_repo_frontier_plan_adoption")); } + #[test] + fn autonomous_direction_promotion_waits_for_thread_without_mutation() -> Result<()> { + let root = tempfile::tempdir()?; + let store = root.path().join("cold-autonomous-promotion.cc"); + initialize_runtime_spine( + &store, + RuntimeSpineInitOptions { + runtime_id: "cold-autonomous-runtime".into(), + display_name: "Cold autonomous runtime".into(), + created_at: "2026-07-19T10:00:00Z".into(), + }, + )?; + let before = std::fs::read(&store)?; + assert!( + promote_autonomous_direction_options_for_modeling( + &store, + "GameCult/Epiphany", + root.path().to_str().expect("UTF-8 workspace"), + "2026-07-19T10:00:01Z", + )? + .is_empty() + ); + assert_eq!(std::fs::read(&store)?, before); + Ok(()) + } + #[test] fn autonomous_direction_option_is_atomically_bound_and_selected_for_modeling() -> Result<()> { let root = tempfile::tempdir()?; diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 1c502064..4a74032c 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -3198,3 +3198,30 @@ The autonomous organizational bridge is committed and pushed at `fc733675`. Next commit this certification state, cross only that exact successor through Bifrost and Idunn under the brake, then prove Persona/Discord replay and tamper boundaries plus Starfire-independent operation before granting any wake. + +## Autonomous successor refused; cold-start owner corrected (2026-07-19) + +Bifrost authorized and Idunn attempted exact successor +`2d21c48d7425c3d6d692e506e1981f92991d82ac`. Idunn correctly refused final +admission: `epiphany-swarm.service` restart-looped with `autonomous proposal +promotion requires thread state`. The deploy process was terminated and +rollback restored exact 36f source, active release symlink, release environment, +supervisor, and Heartbeat. Resident Self is intentionally stopped until the +corrected successor crosses; this prevents durable proposal pressure from +retriggering the old binary's fault. The all-scope brake remains engaged. + +The fault belonged to promotion intake. Absent thread state during cold start +means no proposal is eligible yet; it is not corrupt state. Promotion now +returns an empty result without writing when the thread is absent. Present but +malformed authority still fails. A focused byte-identity negative test passes, +and the complete core library proof is 579 passed, zero failed, one ignored. + +Separately, `gamecult-ops` commit `584b94c` moves clone/build/package/verify +before the service stop. Packaging failures can no longer blind the active +body; the remaining outage begins only at canonical Body mutation/promotion. + +Next: commit/push this correction and state, revoke refused 2d authority, +authorize only the corrected exact commit, install/use the ops cut, and deploy +through Idunn under the brake. Admission requires all three units active with +no restart growth and exact signed health. Then run the Starfire-offline +Persona/Discord feedback rehearsal. No host reboot is authorized. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 6835e5e72f5da0c5d84500a0c9744d7e3b41cc2d..8e4eb60cc1b87d0276128e113fd2918a117d2791 100644 GIT binary patch delta 443 zcmXv~J5Iwu5XIq>NVG^$jzo##*v>zpqDDdrG^9c6_1al^<2Cz9NR@(u3lMP)Bnrd@ zxB?PLa0w2;tR;%4+1YvXX5M^!!Ou55A9?%T_9%>|?^_N3^yS#Q^}OHvP3>V*^AIj> zBX$tGh&@F8byI7cog6&AMM2bS2K{C@yb6XRr}N}Z>WAx3Z+gxb46d^bw5613Efqvb z6w=NBmPCVMsnsljm{EccAlAr2&ZX5*DvXB90*qqBAc@496$Z=<^8~cPPe6^77$SU_ zNFicEbJWyED&()(9iax=y%b`Ztj4aw6DM)WL|V;9W?3TDNSwzOuIAc_GC*fm6+T=n z3#Nct19Ory4RfwFFS7qFI93gi0xhfzYgY1{5;2BU-q6aMLBWcVS|NbqYR;QXp(I*E qw?AwJtq=#5m<&4cutOnd3^UEtg5%LZxFe!%X|ox2(VS$sg8v8ljhR6J delta 65 zcmcbAPvQD)g$)vn+(sr=1{P7r7&vscY*uD0WMur@Je8?^Dib3RgJ@ exact direction result -> Imagination proposal -> Self selection -> proposal-bounded Modeling -> Imagination planning -> explicit Mind adoption -> Hands. Commit this live certification state, authorize only that exact successor through Bifrost, and let Idunn deploy it under the still-engaged all-scope brake. Then prove Persona/Discord organizational feedback replay/tamper boundaries and Starfire-independent Discord operation before any wake grant. Conversation/proposal alone grants no Mind, Hands, Persona-speech, release, or deployment authority. No host reboot is authorized." + next_action: "Commit and push the cold-start promotion correction plus this failure evidence. Revoke the refused 2d Bifrost authority, authorize only the corrected exact successor, install/use the ops deployment cut at 584b94c, and let Idunn deploy under the still-engaged all-scope brake. Require all three services to remain active with zero restart growth and exact signed health before calling the resident body restored. Then run the Starfire-offline Persona/Discord organizational-feedback rehearsal. Conversation/proposal alone grants no Mind, Hands, Persona-speech, release, or deployment authority. No host reboot is authorized."