From 88778762d6fde2c640ba6cd98d3a426226ce3da7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 8 Aug 2026 10:30:47 +0100 Subject: [PATCH] Bind Imagination plans to frontier scope --- epiphany-core/src/agent_launch.rs | 13 ++++++++- epiphany-openai-runtime/src/lib.rs | 2 +- notes/epiphany-current-algorithmic-map.md | 11 ++++++++ notes/fresh-workspace-handoff.md | 31 ++++++++++++++++++++++ state/ledgers.msgpack | Bin 573057 -> 573461 bytes state/map.yaml | 8 +++--- 6 files changed, 59 insertions(+), 6 deletions(-) diff --git a/epiphany-core/src/agent_launch.rs b/epiphany-core/src/agent_launch.rs index 2d9dccfb..ab2129f4 100644 --- a/epiphany-core/src/agent_launch.rs +++ b/epiphany-core/src/agent_launch.rs @@ -756,7 +756,12 @@ pub fn epiphany_frontier_planning_output_schema() -> serde_json::Value { "model_hash": {"type": "string", "minLength": 1}, "frontier_item_id": {"type": "string", "minLength": 1}, "frontier_item_hash": {"type": "string", "minLength": 1}, - "safe_paths": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}, + "safe_paths": { + "type": "array", + "minItems": 1, + "description": "A strict lexicographically sorted, duplicate-free narrowing of the immutable planning context source_scope. Every path must equal one source_scope entry or be a descendant of one; never add an adjacent or otherwise unscoped path.", + "items": {"type": "string", "minLength": 1} + }, "action": {"type": "string", "minLength": 1}, "command": {"type": "string", "minLength": 1}, "checks": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}, @@ -1721,6 +1726,12 @@ mod tests { assert!(schema["properties"].get("statePatch").is_none()); assert!(schema["properties"].get("selfPatch").is_none()); assert!(schema["properties"].get("repoModelPatch").is_none()); + assert!( + schema["properties"]["frontierPlanCandidate"]["properties"]["safe_paths"] + ["description"] + .as_str() + .is_some_and(|description| description.contains("never add an adjacent")) + ); assert_eq!(schema["additionalProperties"], false); } diff --git a/epiphany-openai-runtime/src/lib.rs b/epiphany-openai-runtime/src/lib.rs index cc9e5f9a..9e9a462d 100644 --- a/epiphany-openai-runtime/src/lib.rs +++ b/epiphany-openai-runtime/src/lib.rs @@ -1377,7 +1377,7 @@ fn worker_output_contract_text(document: &EpiphanyWorkerLaunchDocument) -> &'sta EpiphanyWorkerLaunchDocument::Role(document) if document.frontier_planning_context.is_some() => { - "Required frontier-planning result fields: roleId, verdict, summary, nextSafeMove, filesInspected, frontierPlanningRequestId, frontierPlanCandidate. Echo the exact request and candidate identity from the typed launch context. Do not emit statePatch, selfPatch, or repoModelPatch." + "Required frontier-planning result fields: roleId, verdict, summary, nextSafeMove, filesInspected, frontierPlanningRequestId, frontierPlanCandidate. Echo the exact request and candidate identity from the typed launch context. frontierPlanCandidate.safe_paths may narrow but must never expand the immutable source_scope: every safe path must exactly equal a source_scope entry or be a descendant of one, in strict lexicographic order without duplicates. Do not include adjacent files merely because the plan would benefit from them; identify them as a stop condition instead. Do not emit statePatch, selfPatch, or repoModelPatch." } EpiphanyWorkerLaunchDocument::Role(document) if document diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index e10d7b10..13014967 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -1400,6 +1400,17 @@ mutation of the old launch receipt. failed attempts cannot later supply a candidate or override the successful attempt. +Live v50 exposed a missing-context fault at the Imagination boundary. Runtime +spine already enforces that every candidate `safe_paths` entry equals an +immutable planning `source_scope` entry or descends from one. The model-facing +schema described only a non-empty string array, and the runtime output contract +asked for identity echo without stating the ceiling. Two consecutive canonical +Imagination attempts therefore expanded scope and failed closed with no +candidate cargo. The repair belongs at context ownership: the schema and +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. + ## 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 b0363796..b7be407b 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -211,3 +211,34 @@ worktrees. The evidence write caught the damage immediately. Both were restored with `git submodule update --init --checkout` to pinned SHAs `7676a4c2` and `fab5b31d`, and `git submodule status` is clean. Do not reuse junctioned live submodule targets for future baseline archives. + +Exact relinquishment commit `182a591369131d621461947723e7fb71637fa386` +is pushed and packaged as +`sha256-b194a1850071739d62f1dd820529a511d2e7d07286d451506f1021e05e796143` +with witness +`sha256-455e715919444c98528986ee3a88aeb6daffd187d57d5202a15d7e9e688c1979`. +Sealed v50 at +`F:\Projects\.epiphany-runtime\shakedown\live-20260808-v50-hands-relinquishment` +proved `record-refusal`, atomic frontier retirement, native +`frontierRelinquishment`, and structural invalidation of the historical v49 +route. Corrected proposal Modeling eventually admitted RepoModel revision 4 +after two invalid patches were rejected and a transient provider HTTP 503 was +recorded as typed failure +`role-failure-review-497e06aa-663d-4b1d-b55f-1e46629f6227`. + +The resulting planning request +`repo-frontier-planning-d3f0f49859819409fcc7453c33039feee0a3c29f636c4b216ef241a98d5bdce4` +correctly targeted eight source owners. Both canonical Imagination attempts +failed closed with `frontier planning candidate exceeds exact frontier +authority`; receipts are +`frontier-planning-failure-review-1fff4758-7f85-4800-9dda-4f0bcc35ccf6` +and worker result `result-worker-030c6e8e-50b9-482c-9c28-613a0360bbe9`. +Source diagnosis found the validator correct but the model context incomplete: +neither `epiphany_frontier_planning_output_schema` nor the OpenAI runtime output +contract said that `safe_paths` must equal or descend from immutable +`source_scope`. A local focused repair states that invariant and tells +Imagination to put useful adjacent paths in stop conditions instead of silently +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. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index b6c35bf5a879a1eb4f85a4f35144a8184404867b..3beaf031bb027bebd0c4eacbbe5c47625021edd4 100644 GIT binary patch delta 460 zcmY*VJxc>Y5cT3$8auTfOr3BjipI)D2nd1%1e-9~nh1$^;`Q9|9@f1s)MtpOI+}P-!=Ws77QFL=AkwdBHO4IG|$iRx?+| zWJi%UGTwr&d;;aD14I^kQQF9VOp=LuQ}j6sO^mHCUy-E6 delta 65 zcmbQ*pxpRZX@eN!^tF39*x90vF>vgS+pNr3$jIo?Je8?^Dib3RgJ@ 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. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.