From ce2a23a2af312075b038174629919dd78a72cf3a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 28 May 2026 14:44:08 +0100 Subject: [PATCH] Harden local MVP model transport --- README.md | 8 +- .../src/bin/epiphany-mvp-coordinator-smoke.rs | 32 ++++ .../src/bin/epiphany-mvp-coordinator.rs | 178 +++++++++++++++++- epiphany-openai-codex-spine/src/lib.rs | 7 +- .../src/bin/epiphany-openai-runtime.rs | 16 +- epiphany-openai-runtime/src/lib.rs | 13 +- notes/fresh-workspace-handoff.md | 4 +- state/agent-heartbeats.msgpack | Bin 49859 -> 61945 bytes state/ledgers.msgpack | Bin 159305 -> 160270 bytes state/map.yaml | 21 ++- tools/epiphany_local_run.ps1 | 11 +- vendor/codex/codex-rs/Cargo.lock | 18 ++ 12 files changed, 287 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 09aab8c0..e4bd22ec 100644 --- a/README.md +++ b/README.md @@ -107,8 +107,12 @@ Useful variants: uses the retained Codex auth/model transport spine. `mvp` is the local product cycle: project Face's character turn, write a Face/Aquarium bubble, run the bridge-equipped coordinator loop with auto-tools, then run heartbeat sleep/dream -maintenance. `status`, `plan`, and `smoke` do not spend model calls; `run` and -`mvp` do. +maintenance. Fresh `mvp` runs bootstrap a minimal local checkpoint before +coordination so the first loop does not stall at missing state. Live coordinator +modes use the workspace `state/runtime-spine.msgpack` for worker lifecycle +documents; run bundles remain evidence. Live model-worker turns default to a +600-second timeout because ChatGPT Codex model latency can exceed four minutes. +`status`, `plan`, and `smoke` do not spend model calls; `run` and `mvp` do. ## Where This Leads diff --git a/epiphany-core/src/bin/epiphany-mvp-coordinator-smoke.rs b/epiphany-core/src/bin/epiphany-mvp-coordinator-smoke.rs index a1f0ff76..84135d68 100644 --- a/epiphany-core/src/bin/epiphany-mvp-coordinator-smoke.rs +++ b/epiphany-core/src/bin/epiphany-mvp-coordinator-smoke.rs @@ -75,6 +75,7 @@ fn run_smoke(args: &Args) -> Result { name: "cold", mode: "plan", bootstrap_smoke_state: false, + bootstrap_local_state: false, simulate_high_pressure: false, dry_compact: false, max_steps: 1, @@ -87,6 +88,28 @@ fn run_smoke(args: &Args) -> Result { require_artifacts(&cold)?; require_operator_safe(&cold, "$")?; + let local = run_coordinator( + &root, + &coordinator, + &app_server, + &artifact_root, + RunOptions { + name: "local-bootstrap", + mode: "plan", + bootstrap_smoke_state: false, + bootstrap_local_state: true, + simulate_high_pressure: false, + dry_compact: false, + max_steps: 1, + }, + )?; + require( + local.pointer("/finalAction/action").and_then(Value::as_str) != Some("prepareCheckpoint"), + "local bootstrap should provide enough checkpoint state to move past prepareCheckpoint", + )?; + require_artifacts(&local)?; + require_operator_safe(&local, "$")?; + let pressure = run_coordinator( &root, &coordinator, @@ -96,6 +119,7 @@ fn run_smoke(args: &Args) -> Result { name: "pressure", mode: "run", bootstrap_smoke_state: true, + bootstrap_local_state: false, simulate_high_pressure: true, dry_compact: true, max_steps: 1, @@ -132,6 +156,7 @@ fn run_smoke(args: &Args) -> Result { let result = json!({ "artifactRoot": artifact_root, "coldAction": cold["finalAction"]["action"], + "localBootstrapAction": local["finalAction"]["action"], "pressureAction": pressure["steps"][0]["action"], "directBackendCompletionRejected": true, "note": "Native smoke does not fake specialist completion by mutating Codex state storage; full completion smoke needs live workers while execution is cauterized into CultNet.", @@ -147,6 +172,7 @@ struct RunOptions { name: &'static str, mode: &'static str, bootstrap_smoke_state: bool, + bootstrap_local_state: bool, simulate_high_pressure: bool, dry_compact: bool, max_steps: usize, @@ -184,6 +210,12 @@ fn run_coordinator( if options.bootstrap_smoke_state { command.arg("--bootstrap-smoke-state"); } + if options.bootstrap_local_state { + command + .arg("--bootstrap-local-state") + .arg("--bootstrap-objective") + .arg("Smoke the local MVP bootstrap checkpoint."); + } if options.simulate_high_pressure { command.arg("--simulate-high-pressure"); } diff --git a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs index 4e5d1183..be502834 100644 --- a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs +++ b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs @@ -62,6 +62,8 @@ struct Args { auto_review: bool, auto_tools: bool, bootstrap_smoke_state: bool, + bootstrap_local_state: bool, + bootstrap_objective: Option, simulate_high_pressure: bool, simulate_source_drift: bool, dry_compact: bool, @@ -87,12 +89,14 @@ impl Args { mode: "plan".to_string(), max_steps: 4, poll_seconds: 5.0, - timeout_seconds: 240, + timeout_seconds: 600, max_runtime_seconds: 180, ephemeral: true, auto_review: false, auto_tools: true, bootstrap_smoke_state: false, + bootstrap_local_state: false, + bootstrap_objective: None, simulate_high_pressure: false, simulate_source_drift: false, dry_compact: false, @@ -148,6 +152,11 @@ impl Args { )); } "--bootstrap-smoke-state" => parsed.bootstrap_smoke_state = true, + "--bootstrap-local-state" => parsed.bootstrap_local_state = true, + "--bootstrap-objective" => { + parsed.bootstrap_objective = + Some(take_string(&mut args, "--bootstrap-objective")?); + } "--simulate-high-pressure" => parsed.simulate_high_pressure = true, "--simulate-source-drift" => parsed.simulate_source_drift = true, "--dry-compact" => parsed.dry_compact = true, @@ -288,6 +297,16 @@ fn run_coordinator(args: &Args) -> Result { )?; thread::sleep(Duration::from_millis(500)); } + } else if args.bootstrap_local_state { + client.send( + "thread/epiphany/update", + Some(json!({ + "threadId": thread_id, + "expectedRevision": 0, + "patch": local_mvp_checkpoint_patch(&cwd, args.bootstrap_objective.as_deref()), + })), + true, + )?; } for index in 0..args.max_steps { @@ -1067,6 +1086,163 @@ fn reorient_patch() -> Value { }) } +fn local_mvp_checkpoint_patch(cwd: &Path, objective: Option<&str>) -> Value { + let objective = objective + .map(str::trim) + .filter(|value| !value.is_empty()) + .unwrap_or("Run the local Epiphany MVP cycle through Face, coordinator, and sleep."); + let local_refs = local_mvp_code_refs(cwd); + let transport_refs = local_mvp_transport_code_refs(cwd); + let mut checkpoint_refs = local_refs.clone(); + checkpoint_refs.extend(transport_refs.clone()); + json!({ + "objective": objective, + "activeSubgoalId": "local-mvp-cycle", + "subgoals": [{ + "id": "local-mvp-cycle", + "title": "Local MVP cycle", + "status": "active", + "summary": "Use Face as the human-facing entrypoint, run bounded coordinator/swarm work, and close with heartbeat sleep/dream maintenance.", + }], + "graphs": { + "architecture": {"nodes": [ + { + "id": "local-mvp-runner", + "title": "Local MVP runner", + "purpose": "One local operator cycle that enters through Face, runs coordinator-owned work, and invokes Life/heartbeat sleep afterward.", + "code_refs": local_refs, + }, + { + "id": "model-runtime-transport", + "title": "Model runtime transport", + "purpose": "Provider-neutral worker execution resolves the model runtime binary and then uses the quarantined Codex/OpenAI transport for model calls.", + "code_refs": transport_refs, + }, + ]}, + "dataflow": {"nodes": [ + { + "id": "face-coordinator-sleep-cycle", + "title": "Face to coordinator to sleep", + "purpose": "Face expression is display state; coordinator owns lane routing; heartbeat owns sleep physiology.", + }, + { + "id": "coordinator-model-runtime-cycle", + "title": "Coordinator to model runtime", + "purpose": "Coordinator launches a typed worker request; epiphany-model-runtime chooses the provider/model and the Codex/OpenAI spine only transports the turn.", + }, + ]}, + "links": [ + { + "dataflow_node_id": "face-coordinator-sleep-cycle", + "architecture_node_id": "local-mvp-runner", + }, + { + "dataflow_node_id": "coordinator-model-runtime-cycle", + "architecture_node_id": "model-runtime-transport", + }, + ], + }, + "graphFrontier": { + "active_node_ids": ["local-mvp-runner", "face-coordinator-sleep-cycle", "model-runtime-transport", "coordinator-model-runtime-cycle"], + "dirty_paths": [], + }, + "graphCheckpoint": { + "checkpoint_id": "ck-local-mvp-cycle", + "graph_revision": 2, + "summary": "Local MVP runner checkpoint: Face front door, coordinator run, model runtime transport, sleep maintenance.", + "frontier_node_ids": ["local-mvp-runner", "face-coordinator-sleep-cycle", "model-runtime-transport", "coordinator-model-runtime-cycle"], + }, + "investigationCheckpoint": { + "checkpoint_id": "ix-local-mvp-cycle", + "kind": "source_gathering", + "disposition": "resume_ready", + "focus": "Continue the local MVP cycle from the typed launcher/coordinator/model-runtime/sleep artifacts.", + "summary": "The local MVP path has enough startup state for the coordinator to route bounded work and for worker transport failures to be attributed to the provider/runtime seam instead of generic missing state.", + "next_action": "Run the coordinator's recommended bounded lane action, then review generated artifacts before accepting state changes.", + "captured_at_turn_id": "local-mvp-bootstrap", + "code_refs": checkpoint_refs, + }, + "churn": { + "understanding_status": "ready", + "diff_pressure": "low", + "graph_freshness": "fresh", + "unexplained_writes": 0, + }, + }) +} + +fn local_mvp_code_refs(cwd: &Path) -> Vec { + let candidates = [ + ( + "tools/epiphany_local_run.ps1", + 1_u64, + 30_u64, + "epiphany_local_run.ps1", + ), + ("README.md", 82, 111, "Run Locally"), + ( + "notes/fresh-workspace-handoff.md", + 33, + 45, + "Current Orientation", + ), + ("state/map.yaml", 477, 487, "Runnability"), + ]; + candidates + .into_iter() + .filter(|(path, _, _, _)| cwd.join(path).exists()) + .map(|(path, start_line, end_line, symbol)| { + json!({ + "path": path, + "start_line": start_line, + "end_line": end_line, + "symbol": symbol, + }) + }) + .collect() +} + +fn local_mvp_transport_code_refs(cwd: &Path) -> Vec { + let candidates = [ + ( + "epiphany-core/src/bin/epiphany-mvp-coordinator.rs", + 719_u64, + 787_u64, + "resolve_model_runtime_bin / run_worker_runtime", + ), + ( + "epiphany-openai-runtime/src/bin/epiphany-openai-runtime.rs", + 431, + 438, + "default_worker_model", + ), + ( + "epiphany-openai-codex-spine/src/lib.rs", + 146, + 170, + "open_responses_stream", + ), + ( + "epiphany-openai-codex-spine/src/lib.rs", + 447, + 463, + "attach_codex_auth_headers", + ), + ]; + candidates + .into_iter() + .filter(|(path, _, _, _)| cwd.join(path).exists()) + .map(|(path, start_line, end_line, symbol)| { + json!({ + "path": path, + "start_line": start_line, + "end_line": end_line, + "symbol": symbol, + }) + }) + .collect() +} + fn prepare_workspace(workspace: &Path) -> Result<()> { if workspace.exists() { fs::remove_dir_all(workspace)?; diff --git a/epiphany-openai-codex-spine/src/lib.rs b/epiphany-openai-codex-spine/src/lib.rs index fafdeaf6..e46bdf4f 100644 --- a/epiphany-openai-codex-spine/src/lib.rs +++ b/epiphany-openai-codex-spine/src/lib.rs @@ -200,7 +200,7 @@ pub fn responses_body_from_epiphany( effort: parse_reasoning_effort(request.reasoning_effort.as_deref())?, summary: parse_reasoning_summary(request.reasoning_summary.as_deref())?, }), - store: true, + store: false, stream: true, include: Vec::new(), service_tier: parse_service_tier(request.service_tier.as_deref())?, @@ -460,10 +460,6 @@ fn attach_codex_auth_headers( if auth.is_fedramp_account() { headers.insert("X-OpenAI-Fedramp", "true".parse().expect("valid header")); } - headers.insert( - "version", - env!("CARGO_PKG_VERSION").parse().expect("valid header"), - ); Ok(()) } @@ -574,6 +570,7 @@ mod tests { assert_eq!(responses["previous_response_id"], "resp-1"); assert_eq!(responses["input"][0]["content"][0]["type"], "input_text"); assert_eq!(responses["stream"], true); + assert_eq!(responses["store"], false); assert_eq!(responses["service_tier"], "flex"); assert_eq!(responses["tools"].as_array().expect("tools").len(), 0); } diff --git a/epiphany-openai-runtime/src/bin/epiphany-openai-runtime.rs b/epiphany-openai-runtime/src/bin/epiphany-openai-runtime.rs index 361e5f5c..9feaaf26 100644 --- a/epiphany-openai-runtime/src/bin/epiphany-openai-runtime.rs +++ b/epiphany-openai-runtime/src/bin/epiphany-openai-runtime.rs @@ -139,7 +139,7 @@ async fn main() -> Result<()> { "smoke-request", "smoke-conversation", &options.provider, - "gpt-5.4", + default_worker_model(), "Answer with one sentence.", ); request.input.push(EpiphanyModelInputItem::UserText { @@ -368,7 +368,7 @@ fn parse_run_worker_options(args: Vec) -> Result { let mut store_path = PathBuf::from(DEFAULT_STORE); let mut codex_home = default_codex_home()?; let mut job_id = None; - let mut model = "gpt-5.4".to_string(); + let mut model = default_worker_model(); let mut auto_tools = false; let mut tool_adapter_bin = None; let mut cwd = None; @@ -431,6 +431,12 @@ fn parse_tool_followup_options(args: Vec) -> Result String { + env::var("EPIPHANY_MODEL") + .or_else(|_| env::var("CODEX_MODEL")) + .unwrap_or_else(|_| "gpt-5.4".to_string()) +} + async fn run_worker_launch_with_tool_continuation( options: RunWorkerCliOptions, ) -> Result { @@ -517,8 +523,14 @@ async fn run_worker_launch_with_tool_continuation( "role": launch_request.role, "requestId": current_request_id, "openaiResultId": openai_summary.result_id, + "openaiVerdict": openai_summary.verdict, + "openaiSummary": openai_summary.summary, "workerResultId": worker_result.result_id, "verdict": worker_result.verdict, + "summary": worker_result.summary, + "nextSafeMove": worker_result.next_safe_move, + "evidenceRefs": worker_result.evidence_refs, + "artifactRefs": worker_result.artifact_refs, "toolRounds": tool_rounds, })) } diff --git a/epiphany-openai-runtime/src/lib.rs b/epiphany-openai-runtime/src/lib.rs index 4e55b75f..6615f39f 100644 --- a/epiphany-openai-runtime/src/lib.rs +++ b/epiphany-openai-runtime/src/lib.rs @@ -68,6 +68,7 @@ pub struct EpiphanyOpenAiRuntimeRunSummary { pub request_id: String, pub event_count: usize, pub verdict: String, + pub summary: String, pub result_id: String, pub receipt_id: Option, pub tool_intent_ids: Vec, @@ -93,6 +94,10 @@ pub struct EpiphanyWorkerRuntimeRunSummary { pub openai_result_id: String, pub worker_result_id: String, pub verdict: String, + pub summary: String, + pub next_safe_move: String, + pub evidence_refs: Vec, + pub artifact_refs: Vec, } pub async fn run_openai_model_turn( @@ -238,6 +243,10 @@ pub async fn run_worker_launch( openai_result_id: openai_summary.result_id, worker_result_id: worker_result.result_id, verdict: worker_result.verdict, + summary: worker_result.summary, + next_safe_move: worker_result.next_safe_move, + evidence_refs: worker_result.evidence_refs, + artifact_refs: worker_result.artifact_refs, }) } @@ -330,7 +339,7 @@ pub fn record_openai_events( job_id: options.job_id.clone(), completed_at: now(), verdict: verdict.to_string(), - summary, + summary: summary.clone(), next_safe_move: "Review typed OpenAI receipt before accepting downstream state." .to_string(), evidence_refs: Vec::new(), @@ -345,6 +354,7 @@ pub fn record_openai_events( request_id: request.request_id.clone(), event_count: events.len(), verdict: verdict.to_string(), + summary, result_id, receipt_id: receipt.map(|item| openai_receipt_key(&item.request_id)), tool_intent_ids: tool_invocation_intents_from_openai_events(DEFAULT_MODEL_PROVIDER, events) @@ -1380,6 +1390,7 @@ mod tests { request_id: model_request.request_id.clone(), event_count: 2, verdict: "pass".to_string(), + summary: "OpenAI model request completed.".to_string(), result_id: "result-openai-worker-worker-job-1".to_string(), receipt_id: Some(model_request.request_id.clone()), tool_intent_ids: Vec::new(), diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index e322574f..0a0290e9 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -33,11 +33,11 @@ remembers doctrine; the branch remembers the blade. ## Current Orientation - Do not copy exact branch or HEAD from this note. Run `git status --short --branch` and `git log --oneline -5`. -- The repo now has a one-command local operator path: `.\tools\epiphany_local_run.ps1`. Default mode is `smoke`; it builds the retained Codex app-server compatibility edge, builds native Epiphany operator binaries, runs the coordinator smoke, and writes launcher artifacts under `.epiphany-run/` plus coordinator artifacts under `.epiphany-dogfood/`. `-Mode status` is now Epiphany-native: it builds only Epiphany operator binaries, reads `state/thread-state.msgpack` when present, derives status through `epiphany-core`, and does not start or require `codex-app-server`. Use `-Mode plan` or `-Mode run -MaxSteps 4` for the raw bridge-equipped coordinator entrypoints; use `-Mode mvp -FaceInput "" -MaxSteps 4` for the local product cycle that projects Face's character turn, writes a Face/Aquarium bubble, runs the coordinator with auto-tools, then runs heartbeat sleep/dream maintenance. Add `-ThreadId ` and `-Workspace ` to inspect or continue an existing thread. `status`, `plan`, and `smoke` do not spend model calls; `run` and `mvp` build and use `epiphany-openai-runtime`. +- The repo now has a one-command local operator path: `.\tools\epiphany_local_run.ps1`. Default mode is `smoke`; it builds the retained Codex app-server compatibility edge, builds native Epiphany operator binaries, runs the coordinator smoke, and writes launcher artifacts under `.epiphany-run/` plus coordinator artifacts under `.epiphany-dogfood/`. `-Mode status` is now Epiphany-native: it builds only Epiphany operator binaries, reads `state/thread-state.msgpack` when present, derives status through `epiphany-core`, and does not start or require `codex-app-server`. Use `-Mode plan` or `-Mode run -MaxSteps 4` for the raw bridge-equipped coordinator entrypoints; use `-Mode mvp -FaceInput "" -MaxSteps 4` for the local product cycle that projects Face's character turn, writes a Face/Aquarium bubble, bootstraps a minimal local checkpoint for fresh threads, runs the coordinator with auto-tools, then runs heartbeat sleep/dream maintenance. Live plan/run/mvp modes use the workspace `state/runtime-spine.msgpack`, because CodexThread launch writes worker requests there; the run bundle remains artifact evidence, not runtime lifecycle authority. Add `-ThreadId ` and `-Workspace ` to inspect or continue an existing thread. `status`, `plan`, and `smoke` do not spend model calls; `run` and `mvp` build and use `epiphany-openai-runtime`. Current live blocker: coordinator-run still waits synchronously for model-worker stdout; one `gpt-5.4` worker completed through the direct Codex/OpenAI spine, but later live MVP runs timed out with empty worker stdout/stderr even at 600 seconds. Next cut should detach/poll workers through runtime-spine progress receipts instead of inflating the timeout again. - Local operator runs now write typed CultMesh intent/receipt documents to `.epiphany-run/cultmesh/operator-runs.ccmp` through `epiphany-operator-run`. The wrapper writes intent before acting and a completion receipt after success; this is the local consent/trace rail, not a hidden scheduler queue. - Status-mode local runs now also write a native CultMesh operator snapshot to `.epiphany-run/cultmesh/operator-snapshots.ccmp` through `epiphany-operator-snapshot`. That snapshot distills the operator-safe MVP status artifact into typed fields such as thread id, state status, coordinator action, CRRC action, reorient action, available actions, and artifact refs; it does not preserve the raw JSON status blob as internal state. - `epiphany-mvp-status --source native` is the current provider-neutral status boundary. It projects scene, pressure, jobs, roles, planning, reorient, CRRC, and coordinator status from native core surfaces and returns provider/runtime worker results as `backendMissing` placeholders instead of asking Codex for model-worker state. Keep future pluggable model-provider work behind launch/result/runtime documents; do not let provider choice leak into status, prompt authority, scheduler policy, or durable `EpiphanyThreadState`. -- `epiphany-model-runtime` is the current provider-neutral executable boundary. It is built by the `epiphany-openai-runtime` crate for now and accepts `--provider openai-codex`; the old `epiphany-openai-runtime` binary, `--openai-runtime-bin`, and `openai-runtime` executor name survive only as compatibility aliases. Coordinator run mode, local wrapper run mode, and repo birth runner should call `--model-runtime-bin` plus `--model-provider`. The typed request/event/receipt contract is now provider-neutral in `epiphany-model-adapter` as `epiphany.model_request.v0`, `epiphany.model_stream_event.v0`, `epiphany.model_receipt.v0`, and `epiphany.model_adapter_status.v0`; OpenAI/Codex documents are adapter evidence behind that boundary, not scheduler/status/state authority. +- `epiphany-model-runtime` is the current provider-neutral executable boundary. It is built by the `epiphany-openai-runtime` crate for now and accepts `--provider openai-codex`; the old `epiphany-openai-runtime` binary, `--openai-runtime-bin`, and `openai-runtime` executor name survive only as compatibility aliases. Coordinator run mode, local wrapper run mode, and repo birth runner should call `--model-runtime-bin` plus `--model-provider`. The runtime default model is `gpt-5.4`, with `EPIPHANY_MODEL` / `CODEX_MODEL` as overrides; `gpt-5.5` was rejected by this Codex-compatible transport as requiring a newer Codex. The typed request/event/receipt contract is now provider-neutral in `epiphany-model-adapter` as `epiphany.model_request.v0`, `epiphany.model_stream_event.v0`, `epiphany.model_receipt.v0`, and `epiphany.model_adapter_status.v0`; OpenAI/Codex documents are adapter evidence behind that boundary, not scheduler/status/state authority. - Coordinator plan/run passes now emit `epiphany.coordinator_run_receipt.v0` into runtime-spine. `coordinator-summary.json` and `coordinator-steps.jsonl` remain useful operator artifacts, but the durable receipt of what the coordinator decided is typed CultCache/CultNet state. - The first tool/MCP contract surface exists in `epiphany-tool-adapter`: `epiphany.tool_capability.v0`, `epiphany.tool_invocation_intent.v0`, and `epiphany.tool_invocation_receipt.v0`. Runtime-spine advertises these as the Epiphany-facing tool boundary. `epiphany-model-runtime` now materializes complete MCP-shaped model tool calls as typed invocation intents, and `epiphany-tool-codex-mcp-spine` is the quarantined executing adapter: it consumes one typed invocation intent from the mixed runtime-spine CultCache store, calls user-declared Codex MCP through `codex-mcp`, and emits a typed invocation receipt. Raw MCP JSON remains protocol-edge cargo; Codex MCP is transport scaffolding, not Epiphany state, prompt, scheduler, or policy authority. - Native status now exposes that quarantined bridge spine without granting it authority. `runtime_spine_status` counts tool invocation intents, receipts, and pending calls; `runtime_tool_invocation_statuses` derives read-only intent/receipt status rows; `epiphany-runtime-spine status` reports the counts; and `epiphany-mvp-status --runtime-store ` renders the latest tool calls under `tools`. This is operator visibility only. The model-runtime feedback seam is also now typed: MCP-shaped model tool calls preserve the original provider `call_id` plus source model request id; `epiphany-model-runtime tool-followup` builds a provider-neutral follow-up `EpiphanyModelRequest` from completed typed tool receipts using the previous provider response id; and `epiphany-model-runtime tool-followup-turn` derives and runs that continuation through the selected provider in one runtime-owned operation. `epiphany-model-runtime run-worker --auto-tools --tool-adapter-bin ` now lets a launched worker automatically execute typed MCP intents through the quarantined Codex MCP adapter, feed receipts back through follow-up model turns, and only then parse/complete the worker result. Codex still executes the quarantined MCP edge; Epiphany owns the continuation request shape and invocation boundary. diff --git a/state/agent-heartbeats.msgpack b/state/agent-heartbeats.msgpack index 8e90501c2f143da9bb091036781aed4834a7e347..73e01775679e07a35254595b88484c7f346b624b 100644 GIT binary patch literal 61945 zcmeHw3y@q_d8W%DY?7iVYKzU1$C8VT4Oy#OJ);?EBw^aJu`T(9v9v7fHEHg2-|oIv zci;BC-7^}9Q(=KhvPlYSS{^K?oH!s^@&i94`Tan)6M|`yKw{Z-gV~scY+`I44j~(s z&DMVZdENKDeS2hU#wC?Y9`)S*?>YZD=Rg1VKL>}a{Z_B4SDQxB=~=c>oSRtu%!5YP z>^AkzLQ!uRonEDB=yq?`(0hr$cqHi?pqKb1xAw6$4&L0>FW1|~n$2sHh^$#Fp8KF- zJEql1c@*!%(`}B8j9&WXv*)1}SR>#zFL`7@tC z?X4;Mq%ek^3(h1&rN$Dz^|&b zJ{9kon&DLM?HIdz?6ZZ6-mBtMzt_R{f5uW!V^~4pRGf;DcLk z8J7R)qu;#fuD5<{SpKn~Sbq84KYH@hSO4m;{5SNQkA8C~UUAy3G?O`FuUovb-*L2y znwHaRnT=+z;57BFQPaA#@0}jbqGnqyL&N^I?1iGc_A-4zGuvI;nlrSP-jTo2=9@-G z)93YFhNgFFnptZZMfbf|*w!^hwWsy$ey^#`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)EZhk5O(RC_kIpC(*SSp8E z7;_{n8IOLPhhRY&==>>3B+aHovb%OHX0x}G?j`+Uy6O%49k?IEmY@+6%?54a$qMFZ zAgF@RqH3Hkzhpff87e*0YhtzFh}0}BU}3|O4U=5lU2V*mgE delta 43 zcmeBs!g=xz=LRuGULz}GGb=-jsACLFxoVr084DR1uQX3(YM;u)xP2-U)0S)iItLB$ diff --git a/state/map.yaml b/state/map.yaml index 9d8726e8..3a35cefe 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -480,8 +480,16 @@ current_status: launcher artifacts under `.epiphany-run/` plus coordinator evidence under `.epiphany-dogfood/`. `-Mode mvp` is the current Face-front-door wrapper: it projects a typed Face character turn, writes a local Face/Aquarium - bubble, runs the bridge-equipped coordinator loop with auto-tools, then - invokes heartbeat sleep/dream maintenance unless explicitly skipped. + bubble, bootstraps a minimal local checkpoint for fresh threads, runs the + bridge-equipped coordinator loop with auto-tools, then invokes heartbeat + sleep/dream maintenance unless explicitly skipped. That bootstrap now maps + both the Face/coordinator/sleep cycle and the coordinator-to-model-runtime + transport seam, so model failures are attributed to provider/runtime + transport instead of generic missing checkpoint state. + Live plan/run/MVP modes use the workspace `state/runtime-spine.msgpack`, + because CodexThread job launch writes typed worker requests there; the + `.epiphany-dogfood/` runtime store shape is artifact evidence only unless + CodexThread learns an explicit runtime-store override. This is scaffolding over the current compatibility shell, not a new policy owner. Native CultMesh operator status is landed too: `epiphany-core` can write, @@ -520,8 +528,11 @@ current_status: and `openai-runtime` executor names remain compatibility aliases. This does not make OpenAI generic internally yet: the current provider still uses typed OpenAI request/event/receipt documents through the Codex auth - reliquary. It does move provider selection out of scheduler/status/state - surfaces and into one runtime executable boundary. + reliquary. The runtime default is `gpt-5.4` unless `EPIPHANY_MODEL` or + `CODEX_MODEL` overrides it; `gpt-5.5` is currently blocked by the retained + Codex-compatible transport as requiring a newer Codex client. It does move + provider selection out of scheduler/status/state surfaces and into one + runtime executable boundary. The provider-neutral model document seam is now landed: `epiphany-model-adapter` owns `epiphany.model_request.v0`, `epiphany.model_stream_event.v0`, `epiphany.model_receipt.v0`, and @@ -557,4 +568,4 @@ current_status: materializes complete MCP-shaped model tool calls as typed tool invocation intents, and the Codex MCP spine can consume those intents from the mixed runtime-spine store and emit typed success/failure receipts. - next_action: Continue Codex starvation and CultNet liberation by exercising the auto-tool worker loop in a live coordinator run, then hardening whichever typed receipt/result edge fails first. + next_action: Cut the synchronous worker-runtime wait out of `epiphany-mvp-coordinator`: launch model workers as detached runtime-spine jobs with pollable progress/timeout receipts, because live `gpt-5.4` Codex transport can complete but later MVP runs timed out with empty stdout/stderr while the coordinator waited on the child process. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index f31ce4f3..2f2cc48a 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -7,7 +7,7 @@ param( [string]$CodexHome = "", [string]$TargetDir = "C:\Users\Meta\.cargo-target-codex", [int]$MaxSteps = 4, - [int]$TimeoutSeconds = 240, + [int]$TimeoutSeconds = 600, [string]$FaceInput = "", [switch]$SkipBuild, [switch]$AutoReview, @@ -91,6 +91,7 @@ $operatorSnapshotStore = Join-Path $Root ".epiphany-run\cultmesh\operator-snapsh $operatorSnapshotId = "$runId-status" $agentStore = Join-Path $Root "state\agents.msgpack" $heartbeatStore = Join-Path $Root "state\agent-heartbeats.msgpack" +$runtimeStore = Join-Path $Workspace "state\runtime-spine.msgpack" $liveRuntimeMode = @("run", "mvp") -contains $Mode if (-not $SkipBuild) { @@ -239,7 +240,7 @@ if ($Mode -eq "plan") { "--codex-home", $CodexHome, "--cwd", $Workspace, "--artifact-dir", (Join-Path $dogfoodRoot "coordinator"), - "--runtime-store", (Join-Path $dogfoodRoot "runtime-spine.msgpack"), + "--runtime-store", $runtimeStore, "--mode", "plan", "--max-steps", "1", "--timeout-seconds", "$TimeoutSeconds" @@ -325,7 +326,7 @@ if ($liveRuntimeMode) { "--codex-home", $CodexHome, "--cwd", $Workspace, "--artifact-dir", (Join-Path $dogfoodRoot "coordinator"), - "--runtime-store", (Join-Path $dogfoodRoot "runtime-spine.msgpack"), + "--runtime-store", $runtimeStore, "--mode", "run", "--max-steps", "$MaxSteps", "--timeout-seconds", "$TimeoutSeconds" @@ -333,6 +334,9 @@ if ($liveRuntimeMode) { if ($AutoReview) { $runArgs += "--auto-review" } + if ($Mode -eq "mvp" -and $ThreadId -eq "") { + $runArgs += @("--bootstrap-local-state", "--bootstrap-objective", $FaceInput) + } if ($ThreadId -ne "") { $runArgs += @("--thread-id", $ThreadId, "--no-ephemeral") } @@ -403,6 +407,7 @@ $summary = @" - operatorSnapshotBinary: $operatorSnapshotExe - operatorSnapshotStore: $operatorSnapshotStore - coordinatorBinary: $coordinatorExe +- runtimeStore: $runtimeStore - modelRuntimeBinary: $modelRuntimeExe - modelProvider: $modelProvider - faceBinary: $faceExe diff --git a/vendor/codex/codex-rs/Cargo.lock b/vendor/codex/codex-rs/Cargo.lock index 05342c72..00a3632f 100644 --- a/vendor/codex/codex-rs/Cargo.lock +++ b/vendor/codex/codex-rs/Cargo.lock @@ -5117,8 +5117,10 @@ dependencies = [ "cultcache-rs", "cultmesh-rs", "cultnet-rs", + "epiphany-model-adapter", "epiphany-openai-adapter", "epiphany-state-model", + "epiphany-tool-adapter", "ignore", "postgres", "reqwest", @@ -5130,6 +5132,14 @@ dependencies = [ "uuid", ] +[[package]] +name = "epiphany-model-adapter" +version = "0.1.0" +dependencies = [ + "cultcache-rs", + "serde", +] + [[package]] name = "epiphany-openai-adapter" version = "0.1.0" @@ -5147,6 +5157,14 @@ dependencies = [ "ts-rs", ] +[[package]] +name = "epiphany-tool-adapter" +version = "0.1.0" +dependencies = [ + "cultcache-rs", + "serde", +] + [[package]] name = "equivalent" version = "1.0.2"