Harden local MVP model transport

This commit is contained in:
Meta Vens 2026-05-28 14:44:08 +01:00
commit ce2a23a2af
12 changed files with 287 additions and 21 deletions

View file

@ -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

View file

@ -75,6 +75,7 @@ fn run_smoke(args: &Args) -> Result<Value> {
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<Value> {
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<Value> {
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<Value> {
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");
}

View file

@ -62,6 +62,8 @@ struct Args {
auto_review: bool,
auto_tools: bool,
bootstrap_smoke_state: bool,
bootstrap_local_state: bool,
bootstrap_objective: Option<String>,
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<Value> {
)?;
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<Value> {
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<Value> {
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)?;

View file

@ -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);
}

View file

@ -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<String>) -> Result<RunWorkerCliOptions> {
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<String>) -> Result<ToolFollowupCliOptio
})
}
fn default_worker_model() -> 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<serde_json::Value> {
@ -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,
}))
}

View file

@ -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<String>,
pub tool_intent_ids: Vec<String>,
@ -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<String>,
pub artifact_refs: Vec<String>,
}
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(),

View file

@ -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 "<operator request>" -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 <id>` and `-Workspace <path>` 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 "<operator request>" -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 <id>` and `-Workspace <path>` 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 <path>` 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 <path>` 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.

Binary file not shown.

Binary file not shown.

View file

@ -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.

View file

@ -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

18
vendor/codex/codex-rs/Cargo.lock generated vendored
View file

@ -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"