From a7bfffba51cf291eb83849b6058e9c1f86711dc3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 30 Apr 2026 01:54:07 +0100 Subject: [PATCH] Add review-gated modeling graph acceptance --- apps/epiphany-gui/src-tauri/src/lib.rs | 1 + apps/epiphany-gui/src/App.tsx | 26 +- apps/epiphany-gui/src/types.ts | 1 + notes/epiphany-current-algorithmic-map.md | 9 +- notes/epiphany-fork-implementation-plan.md | 11 +- notes/fresh-workspace-handoff.md | 9 +- state/evidence.jsonl | 1 + state/map.yaml | 6 +- tools/epiphany_gui_action.py | 13 + tools/epiphany_mvp_status.py | 10 + tools/epiphany_phase6_role_smoke.py | 103 ++++- tools/epiphany_phase6_scene_smoke.py | 2 + .../src/protocol/common.rs | 133 ++++++ .../app-server-protocol/src/protocol/v2.rs | 40 ++ .../app-server/src/codex_message_processor.rs | 390 ++++++++++++++++++ .../src/prompts/epiphany_specialists.toml | 3 +- 16 files changed, 737 insertions(+), 21 deletions(-) diff --git a/apps/epiphany-gui/src-tauri/src/lib.rs b/apps/epiphany-gui/src-tauri/src/lib.rs index 74d61e0e..3a54611b 100644 --- a/apps/epiphany-gui/src-tauri/src/lib.rs +++ b/apps/epiphany-gui/src-tauri/src/lib.rs @@ -69,6 +69,7 @@ fn run_operator_action( "coordinatorPlan" => run_coordinator_plan(&repo_root, request), "launchModeling" | "readModelingResult" + | "acceptModeling" | "launchVerification" | "readVerificationResult" | "launchReorient" diff --git a/apps/epiphany-gui/src/App.tsx b/apps/epiphany-gui/src/App.tsx index e70415f2..bb281b20 100644 --- a/apps/epiphany-gui/src/App.tsx +++ b/apps/epiphany-gui/src/App.tsx @@ -22,6 +22,7 @@ const actionButtons: Array<{ title: string; requiresThread?: boolean; requiresReadyState?: boolean; + requiresModelingPatch?: boolean; requiresReorientResult?: boolean; icon: "file" | "check" | "play" | "eye" | "accept"; }> = [ @@ -63,6 +64,16 @@ const actionButtons: Array<{ requiresThread: true, icon: "eye", }, + { + action: "acceptModeling", + label: "Accept Modeling", + runningLabel: "Accepting", + title: "Accept a reviewed modeling graph/checkpoint patch into Epiphany state", + requiresThread: true, + requiresReadyState: true, + requiresModelingPatch: true, + icon: "accept", + }, { action: "launchVerification", label: "Launch Verification", @@ -210,6 +221,9 @@ export function App() { const reorientResult = status?.reorientResult ?? {}; const readyState = scene.stateStatus === "ready"; const currentThreadId = request.threadId; + const modelingFinding = roleResults?.modeling?.finding; + const canAcceptModeling = + text(roleResults?.modeling?.status).toLowerCase() === "completed" && Boolean(modelingFinding?.statePatch); const canAcceptReorient = text(reorientResult?.status).toLowerCase() === "completed"; return ( @@ -248,15 +262,18 @@ export function App() { {actionButtons.map((button) => { const needsThread = button.requiresThread && !currentThreadId; const needsState = button.requiresReadyState && !readyState; + const needsModeling = button.requiresModelingPatch && !canAcceptModeling; const needsReorient = button.requiresReorientResult && !canAcceptReorient; - const disabled = runningAction !== null || needsThread || needsState || needsReorient; + const disabled = runningAction !== null || needsThread || needsState || needsModeling || needsReorient; const title = needsThread ? "Prepare a checkpoint or enter a persisted thread id first" : needsState ? "Prepare Epiphany state before launching this lane" - : needsReorient - ? "Read a completed reorient result before accepting it" - : button.title; + : needsModeling + ? "Read a completed modeling result with a state patch before accepting it" + : needsReorient + ? "Read a completed reorient result before accepting it" + : button.title; return (