From 5b922a049fc139bfcf2882ffb5e5cec8f17b65fb Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 8 Aug 2026 10:45:16 +0100 Subject: [PATCH] Validate successful Imagination retries --- epiphany-core/src/coordinator_launch.rs | 14 +++++++++++++ epiphany-core/src/runtime_spine.rs | 11 ++++++++-- notes/epiphany-current-algorithmic-map.md | 12 +++++++++++ notes/fresh-workspace-handoff.md | 24 ++++++++++++++++++++++ state/ledgers.msgpack | Bin 573461 -> 573977 bytes state/map.yaml | 8 ++++---- 6 files changed, 63 insertions(+), 6 deletions(-) diff --git a/epiphany-core/src/coordinator_launch.rs b/epiphany-core/src/coordinator_launch.rs index c04a9a82..3013647e 100644 --- a/epiphany-core/src/coordinator_launch.rs +++ b/epiphany-core/src/coordinator_launch.rs @@ -3162,6 +3162,20 @@ pub(crate) mod tests { Some(failed.result_id.as_str()) ); assert_eq!(attempts[1].job_id, retry_job_id); + assert_eq!( + attempts[1].binding_record_id, + format!( + "repo-frontier-planning-launch-{}-attempt-1", + planning.request_id + ) + ); + let retry_result = + frontier_planning_result(&planning, retry_job_id, "2026-07-15T09:00:07Z")?; + put_runtime_role_worker_result(&store, &retry_result)?; + assert_eq!( + crate::runtime_repo_frontier_planning_lifecycle(&store)?.stage, + crate::RepoFrontierPlanningLifecycleStage::ImaginationResultReady + ); Ok(()) } diff --git a/epiphany-core/src/runtime_spine.rs b/epiphany-core/src/runtime_spine.rs index be8ba3c0..efa3b77c 100644 --- a/epiphany-core/src/runtime_spine.rs +++ b/epiphany-core/src/runtime_spine.rs @@ -2028,10 +2028,17 @@ pub fn put_runtime_role_worker_result( "{:x}", Sha256::digest(&worker_launch.launch_document_msgpack) ); + let expected_binding_record_id = if binding.attempt_ordinal == 0 { + format!("repo-frontier-planning-launch-{}", request.request_id) + } else { + format!( + "repo-frontier-planning-launch-{}-attempt-{}", + request.request_id, binding.attempt_ordinal + ) + }; if binding.schema_version != REPO_FRONTIER_PLANNING_LAUNCH_BINDING_SCHEMA_VERSION || binding.contract != REPO_FRONTIER_PLANNING_LAUNCH_BINDING_CONTRACT - || binding.binding_record_id - != format!("repo-frontier-planning-launch-{}", request.request_id) + || binding.binding_record_id != expected_binding_record_id || binding.job_id != result.job_id || binding.binding_id != EPIPHANY_IMAGINATION_ROLE_BINDING_ID || binding.runtime_id != request.runtime_id diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 13014967..f7829a30 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -1411,6 +1411,18 @@ runtime contract now state that safe paths are a sorted, duplicate-free narrowing of source scope, and adjacent useful files belong in stop conditions. The validator remains unchanged and Mind retains final admission authority. +Fresh v51 moved the same immutable planning authority past that ceiling and +exposed the next retry invariant. Self correctly names attempt zero +`repo-frontier-planning-launch-` and later immutable attempts +`repo-frontier-planning-launch--attempt-`. Result validation +nevertheless required the attempt-zero record ID for every successful result. +Consequently failures and reviews could schedule retries, but no retry could +ever become a valid Imagination result. Validation now derives the expected +record ID from the persisted binding's attempt ordinal. The regression test +proves failure, explicit review, suffixed retry binding, successful result +persistence, and transition to `ImaginationResultReady` without relaxing any +other causal identity. + ## Exact release build cache ownership The root release-bundle manifest owns release profile policy. Measured on the diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index b7be407b..b4fd1b75 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -242,3 +242,27 @@ expanding authority. Focused core and OpenAI-runtime tests pass. Commit and push, package once, clone v50 into a fresh runtime, and replay a fresh proposal through Modeling, canonical Imagination, and dedicated Mind. Do not retry the consumed v50 request again. + +Commit `88778762d6fde2c640ba6cd98d3a426226ce3da7` is pushed and packaged as +`sha256-4e0700d3e2305a343742608b06054faa4ab1ce4fb5a0fcef6ef1c8ee0efea914` +with witness +`sha256-f434d5a480e5a1d54fef4cb18f93e391bc3cbd9669fd9ed6f7111f35a2d8a536`. +The stable release cache completed the changed core/runtime bundle in 1m34s. +Fresh v51 at +`F:\Projects\.epiphany-runtime\shakedown\live-20260808-v51-imagination-scope-context` +is cloned from sealed v50 and has this exact release published. Proposal v6 +launched source-grounded Modeling result +`result-worker-51add51b-d949-4500-b49d-77e9ebd198c6`, which remains pending +behind the older current planning lifecycle. + +After reviewing v50's preserved second Imagination failure, v51 replayed the +same planning request under the corrected context. The candidate passed the +safe-path ceiling and then failed with `frontier planning result does not +exactly bind request, launch, runtime, thread, and candidate`. Source inspection +found a deterministic retry bug: Self persists retry binding IDs with +`-attempt-N`, but runtime result validation demanded the attempt-zero ID for +all attempts. The local repair derives the expected ID from +`binding.attempt_ordinal`. The focused test now persists a valid retry result +and proves lifecycle `ImaginationResultReady`. Commit/push/package this repair, +clone sealed v51 into v52, review its typed failure, and replay the same +authority. Do not mutate v51 further. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 3beaf031bb027bebd0c4eacbbe5c47625021edd4..999f5784d66f0e4ffa5f724418afee59069296c8 100644 GIT binary patch delta 557 zcmYk3!D zvbSHCy~|}U6Qy-q^gy&D+7&(gwe0oJf3FUoWc}6O@BQ8Fm-~~|pAS1v7dLO1d-pO3ATuq|}jn3sNaJxu23pB5t@7S2e`)C4mRci}qX4rbjsY07?EMf>$)nRl- z?7(2Os)SQ*^F%#(J%kEBr!6(aE%>Mud0#}c#)1zVRfxPmV_MLa;JrRIG=}43ZjH5W zCQQ~1`7RZjqYC#BCgnI678L9%*!cM+D delta 65 zcmbQ)qCB-hd4mKax3Phhu|?D|29AB7HY+n0GBSELPi1PK%ESo7AetG7S%8=oh}nRc Lefv}2 diff --git a/state/map.yaml b/state/map.yaml index 49923f08..6c3c8bdf 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -34,9 +34,9 @@ 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 182a5913 packages as sha256-b194a1850071739d62f1dd820529a511d2e7d07286d451506f1021e05e796143 with witness sha256-455e715919444c98528986ee3a88aeb6daffd187d57d5202a15d7e9e688c1979. Sealed v50 proves the typed Hands refusal and atomic Mind relinquishment against the historical v49 route, then proves corrected proposal-bound Modeling through RepoModel revision 4. Its canonical Imagination attempts both failed closed because the model-facing planning contract omitted the enforced safe-path ceiling; no candidate or Hands authority was admitted. A focused local repair now states that invariant in both schema and runtime output contract. Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. + summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact 88778762 packages as sha256-4e0700d3e2305a343742608b06054faa4ab1ce4fb5a0fcef6ef1c8ee0efea914 with witness sha256-f434d5a480e5a1d54fef4cb18f93e391bc3cbd9669fd9ed6f7111f35a2d8a536. Sealed v50 proves typed Hands relinquishment and corrected Modeling. Fresh v51 proves the new Imagination safe-path context removed the prior scope-ceiling failure, then exposed a retry identity defect: successful retry bindings carry `-attempt-N`, while result validation demanded the attempt-zero ID. A local regression-tested repair now derives the expected immutable binding ID from attempt ordinal. Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. operational_state: - local_worktree: imagination_safe_path_context_fix_verified_commit_next + local_worktree: imagination_retry_binding_fix_verified_commit_next operator_wireguard: restored yggdrasil: canonical_small_public_crossing_body starfire: temporary_epiphany_cognition_body @@ -52,8 +52,8 @@ current_status: bifrost_feedback_crossing: authenticated_transport_only yggdrasil_epiphany_services: absent resident_physiology: heartbeat_and_self_running - unresolved_authority: v50 consumed both immutable Imagination attempts under the old release after producing the same bounded rejection, `frontier planning candidate exceeds exact frontier authority`. Source inspection shows the validator already owns the correct ceiling, but neither the output schema nor the runtime contract told Imagination that safe_paths must equal or descend from source_scope. The local context repair is focused-test green but is not yet committed, pushed, packaged, or replayed on a fresh runtime. - next_action: Commit and push the Imagination safe-path context repair, package its exact source once, clone sealed v50 into a fresh runtime, issue a fresh typed proposal, and prove Modeling -> Imagination -> dedicated Mind adoption without overrides. Record the transient v4 HTTP 503 and both v50 authority failures as endurance and context receipts. Then continue the adopted CRRC/Reorientation/Continuity/Soul implementation route. + unresolved_authority: v51 replay under exact 88778762 produced a scope-valid Imagination candidate, proving the context repair moved the circuit past path authority. Runtime persistence then rejected the otherwise usable retry because `put_runtime_role_worker_result` compared every launch binding to the attempt-zero record ID even though Self correctly names retries with `-attempt-N`. The local identity repair is focused-test green but not yet committed, pushed, packaged, or replayed live. + next_action: Commit and push the retry-binding identity repair, package exact source, clone sealed v51 into v52, review the preserved typed failure, and replay the same planning authority under the new release. Prove successful Imagination retry reaches dedicated Mind adoption, then admit or supersede the pending v6 Modeling result according to the derived route and continue CRRC/Reorientation/Continuity/Soul. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.