From d4b446abaf597a39e1a9af203afa9865c9ccbce4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 8 Aug 2026 01:04:08 +0100 Subject: [PATCH] Qualify resident retry grant identity --- epiphany-core/src/resident_self.rs | 11 +++++++++-- notes/epiphany-current-algorithmic-map.md | 6 ++++++ notes/fresh-workspace-handoff.md | 18 ++++++++++++++++-- state/ledgers.msgpack | Bin 562143 -> 562585 bytes state/map.yaml | 10 +++++----- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/epiphany-core/src/resident_self.rs b/epiphany-core/src/resident_self.rs index 560e4a2a..f1c9b469 100644 --- a/epiphany-core/src/resident_self.rs +++ b/epiphany-core/src/resident_self.rs @@ -953,8 +953,14 @@ pub fn heartbeat_issue_resident_self_grant( let Some(mut pressure) = pending.into_iter().next() else { return Ok(None); }; + let attempt_ordinal = cache + .get_all::()? + .iter() + .filter(|grant| grant.pressure_id == pressure.pressure_id) + .count() + + 1; let grant_id = format!( - "resident-self-grant-{schedule_id}-{action_id}-{}", + "resident-self-grant-{schedule_id}-{action_id}-attempt-{attempt_ordinal}-{}", pressure.pressure_id ); let grant = ResidentSelfHeartbeatGrant { @@ -1950,10 +1956,11 @@ mod tests { assert_eq!(pressure.status, "pending"); assert_eq!(pressure.consumed_by_grant_id, None); let retry_grant = - heartbeat_issue_resident_self_grant(&store, "heartbeat-2", "action-2", 7)? + heartbeat_issue_resident_self_grant(&store, "heartbeat-1", "action-1", 7)? .expect("retry grant"); assert_eq!(retry_grant.pressure_id, first_grant.pressure_id); assert_ne!(retry_grant.grant_id, first_grant.grant_id); + assert!(retry_grant.grant_id.contains("-attempt-2-")); Ok(()) } diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index b9a37562..15f7f343 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -1250,6 +1250,12 @@ not mint the retry grant. The standard heartbeat remains the sole scheduler and may issue a new grant with a new identity for the same exact pressure after it has reconciled the terminal turn. A failed launch can therefore recover without operator pressure duplication or an authority-bypassing coordinator call. +Grant identity includes the pressure-local attempt ordinal as well as heartbeat +schedule and action identity. Historical grants remain immutable receipts; a +retry cannot collide with its predecessor even when heartbeat reconciles the +failed turn and schedules the replacement within the same physiological action. +Concurrent issuers still derive the same next ordinal and contend on the one +pending-pressure CAS, so attempt identity does not weaken single consumption. ## Exact release build cache ownership diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index d32cdf0b..b83e5e81 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -45,10 +45,24 @@ The current worktree makes cancellation atomically return the exact pressure to the sole retry scheduler and issues a new grant identity. All 16 resident-Self tests pass, including exact failed-turn pressure recovery. +Exact pushed `c5f99c46` packages as +`sha256-04a4854a1268139e42c028503460bb75d5b4c97b28c7fafcfb963ad1210c0090` +with witness +`sha256-615b3878473d65c67998614e1f6e33cec2bb5ea08a985210ff1c2161c1a481a5`. +The v33 retry proof repeated the deliberate startup refusal under this release. +Cancellation returned the pressure, but heartbeat reconciliation exposed that +grant identity was still only schedule + action + pressure. A same-action retry +therefore collided with the immutable first grant. + +The current worktree adds a pressure-local attempt ordinal to grant identity. +The retry test now uses the same heartbeat schedule/action and proves attempt 2 +receives a distinct grant while retaining the same pressure authority. All 16 +resident-Self tests pass. + ## Next action -1. Commit, push, package, and authenticate the failed-turn retry repair. -2. Preserve v31 and v32-replay as failure evidence; clone the recovered boundary +1. Commit, push, package, and authenticate attempt-qualified retry grants. +2. Preserve v31 through v33 as failure evidence; clone the recovered boundary into a new replay runtime using an approved `.epiphany-dogfood` artifact root. 3. Re-run heartbeat selection and resident launch, including exact retry after one deliberate failed launch. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 7217c98794c477d6b9f7bb0ed8075331c6ed2aba..621f8e940af5d40b453d2a3d9762290699dccc07 100644 GIT binary patch delta 459 zcmX|-ze)o^5XQau@30D32Zjh%o*oi4iIs>5f|XWwo4rYH$==?%JC~R$g@s@zF$AB$ z!bY&Lvh_8573Yp{#kb3_^ZWLj`Fn4^eKbF}y?XmL47*{g8=l<#uK2H`uO08+^TNk@ z?P*@~SjD}{T4SxVHdveA^O}G4vbb(|{#H8(mnO6NZe#j<@gO9DJnDBkvULnvjSwu7 zofKzo4MxxxO7oRjbS}3DltPTcQV#{~0mW#*i39^SQmJ81rba5QL|MvIYZWm+RumWA zppqmf(bEY1sj`k>V1*&*p%l5pWyOdgMHA3M4w)82m}JBO4T=Ho!(|CoZ6+OqGE(Oe zIuKRZK&MjZicW2$jL@fLU~qC6W0Y$=sG=8xXEu#;$u^O4#GX{)hcJ$L7v&Tg8ul6l e)mqNaZpv@bj+k})#+|$hmve4j%;IO}H~#@dhohDN delta 70 zcmbQaTIv3Br47Q20_Gt`##W|AR;FfA#~3&!?b)o%Sjfnz-#nG6eJT?p5QAuDAZ7t# RRv=~rV)pG*nK-;A0ssrs6+r+1 diff --git a/state/map.yaml b/state/map.yaml index 5955f698..30e99e25 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -34,15 +34,15 @@ invariants: - Evidence and git retain history; this map retains only state that changes future decisions. current_status: - summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact b81092b2 packages 21 independently authenticated binaries as sha256-da343dcfe478720320f94c582eebcef2804aac41ac136a9c6a504cd248f495fa with witness sha256-41f081ce260467325a759bf6c888b30cf7d57faff1b1fdcfab398191323cf333. Stable graph and exact-source caches reduced this core successor to a 6m59s release build; core fan-out remains materially slower than state-only packaging. v32-replay proved the producer-replay repair live by crossing the original collision and launching the coordinator. A deliberate bad artifact root then exposed that failed-turn cancellation left its source pressure permanently consumed. The current worktree atomically returns cancelled pressure to heartbeat scheduling and passes all 16 resident-Self tests. Exact packaging and live retry remain required before resuming the implementation chain. Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. + summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact c5f99c46 packages 21 independently authenticated binaries as sha256-04a4854a1268139e42c028503460bb75d5b4c97b28c7fafcfb963ad1210c0090 with witness sha256-615b3878473d65c67998614e1f6e33cec2bb5ea08a985210ff1c2161c1a481a5. v33 proved cancellation returns failed pressure to heartbeat, then exposed a second retry identity defect: reconciliation can grant within the same schedule/action, so the immutable original grant collided with the retry. The current worktree adds a pressure-local attempt ordinal to grant identity and passes all 16 resident-Self tests, including same-action attempt 2. Exact packaging and live retry remain required before resuming the implementation chain. Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. operational_state: - local_worktree: failed_resident_turn_retry_repair_verified_pending_commit + local_worktree: attempt_qualified_resident_retry_verified_pending_commit operator_wireguard: restored yggdrasil: canonical_small_public_crossing_body starfire: temporary_epiphany_cognition_body starfire_runtime_identity: epiphany-starfire starfire_swarm_brake: released - starfire_release: authenticated_b81092b2_replay_repair; cancellation_retry_successor_pending + starfire_release: authenticated_c5f99c46_cancellation_retry; attempt_identity_successor_pending starfire_repository_body: bound_and_observed starfire_verse_topology: bound_to_current_repository_body starfire_native_status: supervised_shakedown_active @@ -52,8 +52,8 @@ current_status: bifrost_feedback_crossing: authenticated_transport_only yggdrasil_epiphany_services: absent resident_physiology: heartbeat_and_self_running - unresolved_authority: v31's generic user proposal produced a lawful direct Hands gate, but the active objective requires the autonomous Imagination-origin path and dedicated Mind adoption, so that gate remains inert. v32-replay proved identical producer replay no longer collides and resident Self launches from the heartbeat grant. The deliberately invalid artifact root produced a typed failed lease and exposed that cancellation did not return the exact source pressure to heartbeat. The retry repair is locally verified but not yet packaged or proven live. Canonical Imagination, dedicated Mind adoption, exact Hands binding, deliberate worker failure/restart/closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. - next_action: Commit and package the failed-turn pressure retry repair, preserve v31/v32-replay as failure evidence, and prove heartbeat issues a new exact retry grant into an approved dogfood artifact root. Then continue the autonomous Imagination-to-Modeling-to-Mind-to-Hands chain and deliberate failure/restart/Soul closure. + unresolved_authority: v31's generic user proposal produced a lawful direct Hands gate, but the active objective requires the autonomous Imagination-origin path and dedicated Mind adoption, so that gate remains inert. v32 proved producer replay; v33 proved cancellation returns exact pressure, then falsified same-action retry because grant identity lacked attempt lineage. The attempt-qualified repair is locally verified but not yet packaged or proven live. Canonical Imagination, dedicated Mind adoption, exact Hands binding, deliberate worker failure/restart/closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. + next_action: Commit and package attempt-qualified retry grants, preserve v31-v33 as failure evidence, and prove heartbeat issues same-action attempt 2 into an approved dogfood artifact root. Then continue the autonomous Imagination-to-Modeling-to-Mind-to-Hands chain and deliberate failure/restart/Soul closure. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.