diff --git a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs index 87008581..d322da8f 100644 --- a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs +++ b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs @@ -88,6 +88,7 @@ struct Args { ephemeral: bool, auto_review: bool, supersede_failed_results: bool, + approve_manual_regather: bool, auto_tools: bool, proposal_modeling_request_id: Option, imagination_consideration_request_id: Option, @@ -128,6 +129,7 @@ impl Args { ephemeral: true, auto_review: false, supersede_failed_results: false, + approve_manual_regather: false, auto_tools: true, proposal_modeling_request_id: None, imagination_consideration_request_id: None, @@ -223,6 +225,7 @@ impl Args { "--no-ephemeral" => parsed.ephemeral = false, "--auto-review" => parsed.auto_review = true, "--supersede-failed-results" => parsed.supersede_failed_results = true, + "--approve-manual-regather" => parsed.approve_manual_regather = true, "--auto-tools" => parsed.auto_tools = true, "--no-auto-tools" => parsed.auto_tools = false, "--test-complete-backend" => { @@ -475,16 +478,21 @@ fn run_coordinator(args: &Args) -> Result { })); } + let mut manual_regather_approval = args.approve_manual_regather; for index in 0..args.max_steps { let status = collect_coordinator_status(&runtime_store, &thread_id)?; let mut coordinator = status .get("coordinator") .cloned() .unwrap_or_else(|| json!({"action": "regatherManually"})); - let action = coordinator["action"] + let mut action = coordinator["action"] .as_str() .unwrap_or("regatherManually") .to_string(); + if manual_regather_approval { + action = apply_manual_regather_approval(&action, &mut coordinator)?; + manual_regather_approval = false; + } let snapshot_name = format!("step-{index:02}-{action}.txt"); fs::write( @@ -1912,6 +1920,23 @@ fn first_string_at(value: &Value, paths: &[&[&str]]) -> Option { None } +fn apply_manual_regather_approval(action: &str, coordinator: &mut Value) -> Result { + if action != "regatherManually" { + return Err(anyhow!( + "--approve-manual-regather requires Self to derive regatherManually, got {action}" + )); + } + coordinator["action"] = Value::String("launchResearch".to_string()); + coordinator["canAutoRun"] = Value::Bool(true); + coordinator["requiresReview"] = Value::Bool(false); + coordinator["recommendedSceneAction"] = Value::String("roleLaunch".to_string()); + coordinator["reason"] = Value::String( + "Operator approved the Self-derived manual regather boundary; launch Eyes once through the typed Research lane." + .to_string(), + ); + Ok("launchResearch".to_string()) +} + fn coordinator_receipt_status(mode: &str, final_action: &Value) -> String { if mode == "plan" { return "planned".to_string(); @@ -2363,7 +2388,10 @@ mod tests { gate["routeId"].as_str() ); assert_eq!(intent.plan_candidate_sha256, "coordinator-plan-hash-test"); - assert_eq!(intent.plan_action, "Implement the bounded coordinator gate test."); + assert_eq!( + intent.plan_action, + "Implement the bounded coordinator gate test." + ); assert_eq!( gate.pointer("/recordPassCommand/executable") .and_then(serde_json::Value::as_str), @@ -2380,6 +2408,35 @@ mod tests { Ok(()) } + #[test] + fn operator_can_approve_only_a_self_derived_manual_regather() -> Result<()> { + let mut coordinator = json!({ + "action": "regatherManually", + "canAutoRun": false, + "requiresReview": true, + "recommendedSceneAction": "roleResult", + }); + assert_eq!( + apply_manual_regather_approval("regatherManually", &mut coordinator)?, + "launchResearch" + ); + assert_eq!(coordinator["action"], "launchResearch"); + assert_eq!(coordinator["canAutoRun"], true); + assert_eq!(coordinator["requiresReview"], false); + assert_eq!(coordinator["recommendedSceneAction"], "roleLaunch"); + + let mut unrelated = json!({"action": "launchModeling"}); + let error = apply_manual_regather_approval("launchModeling", &mut unrelated) + .expect_err("operator approval must not override another Self decision"); + assert!( + error + .to_string() + .contains("requires Self to derive regatherManually") + ); + assert_eq!(unrelated["action"], "launchModeling"); + Ok(()) + } + fn seed_hands_frontier(store: &Path) -> Result<()> { let mut item = epiphany_core::RepoFrontierItem { id: "coordinator-hands-frontier-test".to_string(), diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 5739ae7c..64435760 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -90,9 +90,22 @@ f9dfd93a, local Verse was seeded for `repo:F:/Projects/Epiphany`, and the exact release was published into v29's physically separate `release.ccmp`. v28 remains unchanged sealed failure evidence. +Live v29 then proved native initial and proposal-bound Modeling, accepted Eyes, +accepted Reorientation, and the single-use Research-to-Modeling route. After +causal Modeling acceptance, Self derived `regatherManually`: accepted evidence +grounds the Hands authority shape but still lacks the concrete deliberate +worker-failure to continuity-receipt to restart-consumption path. This exposed +a control-plane gap: the coordinator had no typed operator actuator for its +intentional manual Eyes boundary. The current worktree adds +`--approve-manual-regather`. It is single-use, valid only when Self already +derived `regatherManually`, and launches only the fixed Research lane; it fails +closed for any other Self action. All fifteen coordinator tests pass. It is not +yet packaged or replayed. + ## Next action -Without overrides in clean v29, prove: +Package the bounded manual-regather consent surface into a clean successor, +approve the current Self-derived boundary once, then prove: 1. Self derives proposal-bound Modeling and canonical Imagination. 2. Self selects and launches canonical Imagination. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 6f72003f..2204d28f 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 38f7c82c..816159b7 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 f9dfd93a packages all 21 shipped binaries through one frozen release-bundle graph in 16m38s, versus the 32m36s baseline and rejected 35m46s shared-target run. Authenticated release sha256-435bad66 with witness sha256-396d1489 is published only into clean v29; v28 remains sealed Continuity failure evidence. v29 Repository Body is freshly observed at exact f9dfd93a and only canonical agents.cc crossed generations. The repaired Modeling-to-Imagination-to-Mind path, adopted-plan Hands authority, deliberate worker failure/restart/closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition still require live proof. + summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact f9dfd93a packages all 21 shipped binaries through one frozen release-bundle graph in 16m38s and is published only into clean v29; v28 remains sealed Continuity failure evidence. v29 natively proved proposal-bound Modeling, Eyes, Reorientation, the single-use Research-to-Modeling route, and typed acceptance boundaries. After causal Modeling acceptance, Self correctly derived regatherManually because the concrete failure-to-continuity-receipt-to-restart seam remained uninspected, but the coordinator exposed no typed operator control to enact that manual Eyes handoff. The worktree now adds a single-use --approve-manual-regather consent surface valid only over Self-derived regatherManually; all 15 coordinator tests pass. Exact packaging/replay, Imagination-to-Mind, Hands, failure/restart closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. operational_state: - local_worktree: clean + local_worktree: manual_regather_consent_awaiting_package 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: Exact f9dfd93a and v29 prove release ownership, packaging integrity, and a 49 percent cold-build reduction. The packaged worker-terminalization repair now needs live replay: proposal-bound Modeling, canonical Imagination, dedicated Mind adoption, exact adopted-plan Hands binding, then deliberate typed worker failure, restart, and Soul-verifiable closure. Persona consequence, retention, long-duration behavior, and Linux/Yggdrasil cognition remain open. - next_action: Run v29 without routing overrides through Modeling, canonical Imagination, and dedicated Mind adoption; prove exact adopted-plan Hands authority, then deliberately prove typed worker failure, restart, and Soul-verifiable closure. + unresolved_authority: v29 proved native proposal Modeling, Eyes regather, Reorientation, and causal Modeling, then exposed a missing operator actuator at the intentional regatherManually boundary. The bounded consent surface passes tests but needs exact package/replay. Canonical Imagination, dedicated Mind adoption, exact adopted-plan Hands binding, deliberate worker failure/restart/closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition remain open. + next_action: Commit, package, and publish the manual-regather consent surface into a clean successor generation; approve the Self-derived boundary once, accept targeted Eyes evidence, and continue through Modeling, canonical Imagination, Mind adoption, Hands, and deliberate failure/restart/Soul closure. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.