From 872d8ad6188fdfe8afcf5d4e9dd65a791fa444f2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 7 Aug 2026 17:15:22 +0100 Subject: [PATCH] Require active proposal frontiers --- .../src/coordinator_launch_context.rs | 3 +- .../src/prompts/epiphany_specialists.toml | 2 +- epiphany-core/src/repo_model_gateway.rs | 5 ++-- epiphany-core/src/runtime_spine.rs | 29 +++++++++++++++++-- notes/epiphany-current-algorithmic-map.md | 7 +++++ notes/fresh-workspace-handoff.md | 26 +++++++++++++++++ state/map.yaml | 10 +++---- 7 files changed, 71 insertions(+), 11 deletions(-) diff --git a/epiphany-core/src/coordinator_launch_context.rs b/epiphany-core/src/coordinator_launch_context.rs index 891b2dba..ef953944 100644 --- a/epiphany-core/src/coordinator_launch_context.rs +++ b/epiphany-core/src/coordinator_launch_context.rs @@ -411,7 +411,7 @@ pub fn append_modeling_repo_model_shape_context( item.source_scope.join(" | "), )); } - context.push_str("New nodes must reference one exact existing domain id. Every unresolved frontier item must target at least one exact existing claim id from existingClaims, or a claim id created by the same patch. Every frontier source_scope must be non-empty and contain safe relative paths in strict lexicographic ascending order with no duplicates; proposal scope hints are evidence to normalize into that canonical order, not an instruction to preserve unsafe or unsorted serialization. Use upsert_frontier only for a genuinely new frontier id not listed in existingFrontier. Use revise_frontier when changing an id listed in existingFrontier; an existing frontier id cannot be upserted again. RepoArchitecture and RepoDataflow nodes/edges may use only observed, proposed, accepted, stale, or retired lifecycle. Prefer accepted for a source-grounded current claim. Do not invent a domain because RepoModel patches have no domain mutation operation.\n"); + context.push_str("New nodes must reference one exact existing domain id. Every unresolved frontier item must target at least one exact existing claim id from existingClaims, or a claim id created by the same patch. Every frontier source_scope must be non-empty and contain safe relative paths in strict lexicographic ascending order with no duplicates; proposal scope hints are evidence to normalize into that canonical order, not an instruction to preserve unsafe or unsorted serialization. A proposal Evolution upsert must use status active: Mind acceptance is the admission decision, and proposed state is not routeable by Self. Use upsert_frontier only for a genuinely new frontier id not listed in existingFrontier. Use revise_frontier when changing an id listed in existingFrontier; an existing frontier id cannot be upserted again. RepoArchitecture and RepoDataflow nodes/edges may use only observed, proposed, accepted, stale, or retired lifecycle. Prefer accepted for a source-grounded current claim. Do not invent a domain because RepoModel patches have no domain mutation operation.\n"); context.push_str(""); Ok(context) } @@ -1379,6 +1379,7 @@ mod tests { shape.contains("Use revise_frontier when changing an id listed in existingFrontier") ); assert!(shape.contains("strict lexicographic ascending order with no duplicates")); + assert!(shape.contains("proposal Evolution upsert must use status active")); assert!(shape.contains("Prefer accepted")); fs::remove_dir_all(&temp)?; Ok(()) diff --git a/epiphany-core/src/prompts/epiphany_specialists.toml b/epiphany-core/src/prompts/epiphany_specialists.toml index 218bb34d..6adeaf50 100644 --- a/epiphany-core/src/prompts/epiphany_specialists.toml +++ b/epiphany-core/src/prompts/epiphany_specialists.toml @@ -101,7 +101,7 @@ If you emit an `anchor`, it must include its own stable `id`, `kind`, and `targe The launch context includes ``. Every new node must use one exact `existingDomains` id from that packet, and repo architecture/dataflow nodes and edges must use one of the listed legal lifecycles. Never derive a domain id from the workspace path; patches cannot create domains. When `` is present, echo its exact `modelingRequestId` as `repoFrontierModelingRequestId`, use `purpose.kind=incorporate_frontier_verdict` with its exact `frontierRouteId` and `soulVerdictReceiptId`, and revise only its routed frontier item to its allowed disposition. The typed request is authority; nearby telemetry, timestamps, and prose are not substitutes. When that request is absent, use `purpose.kind=evolution` and do not invent verdict-incorporation authority. An ordinary `purpose.kind=evolution` patch without `proposalModelingContext` may mutate nodes and edges only. It must not upsert, revise, retire, or adopt frontier items. Describe an observed frontier wound in `summary`, `evidenceGaps`, or `nextSafeMove` when no typed frontier authority exists. -When the typed launch document contains `proposalModelingContext`, echo its exact `requestId` as `proposalModelingRequestId` and use `purpose.kind=evolution`. This is the one evolution frontier exception: emit exactly one `upsert_frontier` operation grounded in the proposal, target at least one exact claim id from `.existingClaims` (or a claim created by the same patch), cite the exact `proposalId` in both top-level `evidenceIds` and the frontier item's `evidence_refs`, and normalize the proposal's relevant `scopeHints` into a non-empty `source_scope` of safe relative paths in strict lexicographic ascending order with no duplicates. Choose `recommended_next_organ` from the actual unresolved work; a user proposal is not automatically Hands-ready. You may also update source-grounded anatomy, but must not emit any other frontier operation. Read only that immutable typed projection against its exact canonical `modelRevision` and `modelHash`. The proposal is evidence, not campaign truth: Mind still owns admission, and Hands still owns execution. Do not substitute adjacent proposals, infer service intake, parse proposal authority from prose, or claim admission or execution authority. +When the typed launch document contains `proposalModelingContext`, echo its exact `requestId` as `proposalModelingRequestId` and use `purpose.kind=evolution`. This is the one evolution frontier exception: emit exactly one `upsert_frontier` operation grounded in the proposal, target at least one exact claim id from `.existingClaims` (or a claim created by the same patch), cite the exact `proposalId` in both top-level `evidenceIds` and the frontier item's `evidence_refs`, set the unresolved frontier `status` to `active`, and normalize the proposal's relevant `scopeHints` into a non-empty `source_scope` of safe relative paths in strict lexicographic ascending order with no duplicates. Choose `recommended_next_organ` from the actual unresolved work; a user proposal is not automatically Hands-ready. You may also update source-grounded anatomy, but must not emit any other frontier operation. Read only that immutable typed projection against its exact canonical `modelRevision` and `modelHash`. The proposal is evidence, not campaign truth: Mind still owns admission, and Hands still owns execution. Do not substitute adjacent proposals, infer service intake, parse proposal authority from prose, or claim admission or execution authority. Generic `statePatch` is optional and has been stripped of repository-anatomy authority. If present, it may contain only coherent `observations` and `evidence`. Never put graphs, graph frontier, graph checkpoint, scratch, investigation checkpoint, planning, objectives, jobs, or other anatomy in `statePatch`; those old paths are demoted and will be rejected. Do not edit files, do not implement product code, do not verify as if you were the reviewer, do not change jobs/subgoals/objective/invariants/churn/mode, and do not promote or accept your own output. ''' diff --git a/epiphany-core/src/repo_model_gateway.rs b/epiphany-core/src/repo_model_gateway.rs index 1f258e71..e9baa639 100644 --- a/epiphany-core/src/repo_model_gateway.rs +++ b/epiphany-core/src/repo_model_gateway.rs @@ -587,14 +587,15 @@ pub struct RepoFrontierPlanningLifecycle { pub decision_id: Option, } -/// Read-only Self projection explaining why an active Imagination frontier is -/// or is not eligible for the canonical planning-request commit primitive. +/// Read-only Self projection explaining why an unresolved Imagination frontier +/// is or is not eligible for the canonical planning-request commit primitive. /// This carries no planning authority and persists no substitute state. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RepoFrontierPlanningCandidateEligibility { pub frontier_item_id: String, pub eligible: bool, + pub status_valid: bool, pub source_scope_valid: bool, pub challenged_target_claim_ids: Vec, pub unresolved_dependency_item_ids: Vec, diff --git a/epiphany-core/src/runtime_spine.rs b/epiphany-core/src/runtime_spine.rs index a1a19b2c..57760edc 100644 --- a/epiphany-core/src/runtime_spine.rs +++ b/epiphany-core/src/runtime_spine.rs @@ -3137,6 +3137,11 @@ pub fn commit_repo_model_admission( "proposal Evolution frontier source_scope must be non-empty, safe relative paths in strict lexicographic order with no duplicates" )); } + if upserts[0].status != crate::RepoFrontierStatus::Active { + return Err(anyhow!( + "proposal Evolution frontier must be active so accepted unresolved work is immediately routeable" + )); + } if proposal.source_kind == crate::RepoFrontierProposalSourceKind::Imagination && (upserts[0].recommended_next_organ != "Imagination" || upserts[0].adopted_plan.is_some()) @@ -6145,10 +6150,13 @@ pub fn runtime_repo_frontier_planning_eligibility( .frontier .iter() .filter(|item| { - item.status == crate::RepoFrontierStatus::Active - && item.recommended_next_organ == "Imagination" + matches!( + item.status, + crate::RepoFrontierStatus::Active | crate::RepoFrontierStatus::Proposed + ) && item.recommended_next_organ == "Imagination" }) .map(|item| { + let status_valid = item.status == crate::RepoFrontierStatus::Active; let source_scope_valid = !item.source_scope.is_empty() && safe_sorted_unique_paths(&item.source_scope); let mut challenged_target_claim_ids = challenges @@ -6175,9 +6183,11 @@ pub fn runtime_repo_frontier_planning_eligibility( RepoFrontierPlanningCandidateEligibility { frontier_item_id: item.id.clone(), eligible: admission_count == 1 + && status_valid && source_scope_valid && challenged_target_claim_ids.is_empty() && unresolved_dependency_item_ids.is_empty(), + status_valid, source_scope_valid, challenged_target_claim_ids, unresolved_dependency_item_ids, @@ -10600,6 +10610,7 @@ pub(crate) mod tests { ("dual-echo", 6), ("unrelated-job", 7), ("unsorted-source-scope", 8), + ("proposed-status", 9), ] { let (store, mut result, mut review) = proposal_admission_fixture(root.path(), suffix)?; match mutate { @@ -10641,6 +10652,19 @@ pub(crate) mod tests { result.repo_model_patch_msgpack = Some(bytes.clone()); review.patch_sha256 = format!("{:x}", Sha256::digest(bytes)); } + 9 => { + let mut patch: crate::RepoModelPatch = + rmp_serde::from_slice(result.repo_model_patch_msgpack.as_deref().unwrap())?; + let crate::RepoModelPatchOperation::UpsertFrontier { item } = + &mut patch.operations[0] + else { + unreachable!() + }; + item.status = crate::RepoFrontierStatus::Proposed; + let bytes = rmp_serde::to_vec_named(&patch)?; + result.repo_model_patch_msgpack = Some(bytes.clone()); + review.patch_sha256 = format!("{:x}", Sha256::digest(bytes)); + } _ => unreachable!(), } if matches!(mutate, 6 | 7) { @@ -11099,6 +11123,7 @@ pub(crate) mod tests { assert_eq!(eligibility.current_admission_count, 1); assert_eq!(eligibility.candidates.len(), 1); assert!(!eligibility.candidates[0].eligible); + assert!(eligibility.candidates[0].status_valid); assert!(eligibility.candidates[0].source_scope_valid); assert_eq!( eligibility.candidates[0].challenged_target_claim_ids, diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index a4ccff7f..297481fa 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -10,6 +10,13 @@ serialization order. `runtime_repo_frontier_planning_eligibility` projects the same predicate per active Imagination frontier, alongside challenge and dependency blockers, so operator status describes the exact selector reality. +Proposal Evolution also requires `status=active`. Mind acceptance is the +proposal's admission decision; persisting it as merely proposed creates a dead +document that Self cannot select and proposal Evolution cannot revise. The +eligibility projection includes unresolved proposed Imagination frontier as a +diagnostic candidate with `statusValid=false`, but only active frontier can be +eligible. This projection observes the wound; admission prevents it. + Owner: Mind admission owns whether proposal frontier state may enter the model. Self only selects admitted routeable state. `source_scope` is no longer assumed routeable merely because its individual paths are safe. Invalid ordering is diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index ae135f15..8cfcd1d5 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -1,5 +1,31 @@ # Fresh Workspace Handoff +## Current authority — 2026-08-07 active-status cut + +Exact `717c649e403d53b12d53b4fbfabb0ecb8d49ee2d` is published as +`sha256-cec12433e99526ab8ed4795812b0bc3d91ef89d80cff324357055273733db453` +with witness +`sha256-819d0141dcd20b767d0005243f884845ad1f21e95d2df188baf859bc1fbd6ae5`. +Fresh v24 was cold-started from its packaged repository-body tool at exact Git +head 717c649e; only canonical `agents.cc` crossed from v23. Its local Verse was +freshly seeded and the exact release published into it. + +Packaged Self derived `launchModeling` without a proposal request override for +`repo-frontier-proposal-modeling-8b1ab2b553b7d4e37756d4cc9169a2febf68a46b5b1d8c7e15e8dd6eaf467664`. +Modeling worker `c6997b20-2978-4bac-9b7e-dccdd59ebcd7` emitted canonical sorted +scope and Mind accepted it at thread revision 3. The frontier status was +`proposed`, however, so Self returned `awaitFrontierProposal`: planning selection +only owns active unresolved frontier. Proposal admission had again accepted +state its downstream selector cannot consume. + +The local repair requires `status=active` for every proposal Evolution frontier +upsert, tells Modeling that Mind acceptance is already the admission decision, +and projects `statusValid` alongside scope, challenge, and dependency validity. +Focused negative admission, eligibility, launch-context, and MVP status tests +pass. v24 is insert-only contaminated evidence; do not mutate or replay it. +Commit/package/publish the repair, cold-start the next generation, and repeat the +native Modeling -> Imagination -> dedicated Mind proof without overrides. + ## Current authority — 2026-08-07 routeability cut Exact `58cf8984975c9ae524690ff2032eaa76abf5d0d4` is published as diff --git a/state/map.yaml b/state/map.yaml index 677b5280..ab473509 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 58cf8984 is authenticated and published. Live v23 accepted fresh release-auth and Continuity proposal-Modeling results, but neither could route to Imagination because both admitted frontier source scopes were safe yet not in strict lexicographic order. The selector correctly failed closed; proposal admission had accepted state its downstream selector could never consume. The local repair exposes typed per-frontier eligibility, requires non-empty safe sorted-unique scope at admission, and gives Modeling the same canonical serialization contract. Focused rejection and launch-context tests pass. v23 is contaminated evidence and should be sealed; a clean v24 must prove Modeling-to-Imagination-to-Mind after the repair is packaged. Persona consequence, Continuity execution, retention, long-duration pacing, and Linux/Yggdrasil cognition remain open. + summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact 717c649e is authenticated and published as sha256-cec12433. Clean live v24 proved packaged Self derives proposal Modeling without overrides and Mind admits canonical sorted-unique source_scope. It then exposed the next admission/selection split: the worker emitted status proposed, proposal admission accepted it, and Self correctly refused to plan because only active unresolved frontier is routeable. The local repair requires active status at proposal admission, tells Modeling the same contract, and exposes status validity in typed eligibility. Focused rejection, eligibility, launch-context, and MVP status tests pass. v24 is now evidence; a clean next generation must prove Modeling-to-Imagination-to-Mind after this repair is packaged. Persona consequence, Continuity execution, retention, long-duration pacing, and Linux/Yggdrasil cognition remain open. operational_state: - local_worktree: proposal_frontier_routeability_invariant_repair_uncommitted + local_worktree: proposal_frontier_active_status_invariant_repair_uncommitted 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: v23 revision 23 contains two admitted active Imagination frontiers whose source_scope ordering makes them permanently ineligible for Self selection. Insert-only proposal authority provides no coherent typed repair, so v23 must not be used to prove native Imagination. The local admission/context/eligibility repair is focused-test-proven but unpublished. Native Imagination live proof, Persona consequence, Continuity crash/restart/closure, retention, long-duration behavior, and Linux/Yggdrasil cognition remain open. - next_action: Commit, push, package, and publish the proposal-frontier routeability invariant repair. Seal v23 as evidence, bootstrap a clean v24, and prove one exact packaged proposal-Modeling result is admitted with canonical source_scope, selected by Self, launched through Imagination, and decided by dedicated Mind without overrides. + unresolved_authority: v24 revision 3 contains one admitted proposed Imagination frontier whose status makes it permanently ineligible for Self selection. Insert-only proposal authority provides no coherent typed repair, so v24 must not be used to prove native Imagination. The local active-status admission/context/eligibility repair is focused-test-proven but unpublished. Native Imagination live proof, Persona consequence, Continuity crash/restart/closure, retention, long-duration behavior, and Linux/Yggdrasil cognition remain open. + next_action: Commit, push, package, and publish the proposal-frontier active-status invariant repair. Seal v24 as evidence, bootstrap a clean next runtime generation, and prove one exact packaged proposal-Modeling result is admitted active with canonical source_scope, selected by Self, launched through Imagination, and decided by dedicated Mind without overrides. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually. @@ -66,7 +66,7 @@ organ_readiness: self: partial; proposal recovery, Mind admission, Hands routing, Soul routing, verdict incorporation, proposal preemption, challenge-aware Eyes routing, in-process status ownership, and single-use Research-to-Modeling routing are live. Native Imagination orchestration is locally implemented and test-proven; packaged live proof is pending. eyes: proven for one bounded challenged-claim circuit; exact 84f00929 launched Research and Mind accepted the first source-gap packet with typed evidence/checkpoint, exact 148d4527 accepted its causal reorientation, and exact 6f019cf8 proved downstream Modeling consumption. modeling: proven for the current bounded circuit; proposal-bound source inspection, Mind admission, exact routed identity preservation, and first-valid verdict incorporation completed without retry churn. Broader Body-map coverage remains open. - imagination: unproven live in the current campaign; the typed lifecycle and MVP route are locally implemented, while v23 exposed and cannot recover from an admission-versus-selection source_scope invariant split. + imagination: unproven live in the current campaign; the typed lifecycle and MVP route are locally implemented, while v23 exposed source_scope routeability and v24 exposed active-status routeability at the proposal admission seam. hands: proven for bounded consequences; native patch, command, commit, push, and typed receipts bind reviewed path ceilings to exact changed-path subsets. soul: proven for the current bounded consequence; the exact 2dd25341 release launched Soul, produced an accepted pass verdict grounded in focused and full-library receipts, and routed verdict incorporation. mind: partial; RepoModel admission, thread-state admission, gateway review, state commit, and first-valid verdict incorporation are live; broader stale or overstated frontier correction remains open.