Cut coordinator fixture authority

This commit is contained in:
Meta Vens 2026-07-15 18:27:31 +01:00
commit 5da2d7512b
7 changed files with 131 additions and 523 deletions

View file

@ -25,7 +25,7 @@ impl Args {
fn parse() -> Result<Self> {
let root = env::current_dir().context("failed to resolve current dir")?;
let mut parsed = Self {
artifact_root: root.join(".epiphany-dogfood").join("coordinator-smoke"),
artifact_root: root.join(".epiphany-smoke").join("mvp-coordinator"),
coordinator_exe: None,
};
let mut args = env::args().skip(1);
@ -55,9 +55,7 @@ fn run_smoke(args: &Args) -> Result<Value> {
Some(path) => absolute_path(path)?,
None => sibling_exe("epiphany-mvp-coordinator")?,
};
let hands_action = sibling_exe("epiphany-hands-action")?;
ensure_coordinator_built(&root, &coordinator)?;
ensure_epiphany_bin_built(&root, &hands_action, "epiphany-hands-action")?;
let cold = run_coordinator(
&root,
@ -66,11 +64,6 @@ fn run_smoke(args: &Args) -> Result<Value> {
RunOptions {
name: "cold",
mode: "plan",
bootstrap_smoke_state: false,
bootstrap_local_state: false,
simulate_high_pressure: false,
simulate_continue_implementation: false,
dry_compact: false,
max_steps: 1,
},
)?;
@ -81,99 +74,27 @@ fn run_smoke(args: &Args) -> Result<Value> {
require_artifacts(&cold)?;
require_operator_safe(&cold, "$")?;
let local = run_coordinator(
&root,
&coordinator,
&artifact_root,
RunOptions {
name: "local-bootstrap",
mode: "plan",
bootstrap_smoke_state: false,
bootstrap_local_state: true,
simulate_high_pressure: false,
simulate_continue_implementation: 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,
&artifact_root,
RunOptions {
name: "pressure",
mode: "run",
bootstrap_smoke_state: true,
bootstrap_local_state: false,
simulate_high_pressure: true,
simulate_continue_implementation: false,
dry_compact: true,
max_steps: 1,
},
)?;
require(
pressure.pointer("/steps/0/action").and_then(Value::as_str)
== Some("compactRehydrateReorient"),
"simulated high pressure should select compact/rehydrate/reorient",
)?;
require(
pressure
.pointer("/steps/0/events/0/type")
.and_then(Value::as_str)
== Some("dryCompact"),
"dry compact smoke should record the compaction action",
)?;
require_artifacts(&pressure)?;
require_operator_safe(&pressure, "$")?;
let hands_gate = run_coordinator(
&root,
&coordinator,
&artifact_root,
RunOptions {
name: "hands-gate",
mode: "run",
bootstrap_smoke_state: false,
bootstrap_local_state: true,
simulate_high_pressure: false,
simulate_continue_implementation: true,
dry_compact: false,
max_steps: 1,
},
)?;
require(
hands_gate
.pointer("/finalAction/action")
.and_then(Value::as_str)
== Some("continueImplementation"),
"simulated implementation continuation should select continueImplementation",
)?;
require(
hands_gate
.pointer("/finalAction/handsActionGate/intentId")
.and_then(Value::as_str)
.is_some(),
"implementation continuation should emit a Hands action gate",
)?;
require_artifacts(&hands_gate)?;
require_operator_safe(&hands_gate, "$")?;
let hands_pass = record_hands_pass(&hands_action, &hands_gate)?;
require(
hands_pass.pointer("/patch/status").and_then(Value::as_str) == Some("ok")
&& hands_pass
.pointer("/command/status")
.and_then(Value::as_str)
== Some("ok")
&& hands_pass.pointer("/commit/status").and_then(Value::as_str) == Some("ok"),
"Hands record-pass should emit patch, command, and commit receipts",
)?;
let legacy_flags = [
"--bootstrap-smoke-state",
"--bootstrap-local-state",
"--bootstrap-objective",
"--simulate-high-pressure",
"--simulate-continue-implementation",
"--simulate-source-drift",
"--dry-compact",
];
for flag in legacy_flags {
let rejected = Command::new(&coordinator)
.current_dir(&root)
.arg(flag)
.output()
.with_context(|| format!("failed to check rejected coordinator flag {flag}"))?;
require(
!rejected.status.success()
&& String::from_utf8_lossy(&rejected.stderr).contains("unknown argument"),
&format!("production coordinator accepted fixture-only flag {flag}"),
)?;
}
let rejected = Command::new(&coordinator)
.current_dir(&root)
@ -191,12 +112,9 @@ 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"],
"handsGateAction": hands_gate["finalAction"]["action"],
"handsPass": hands_pass,
"rejectedFixtureFlags": legacy_flags,
"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.",
"note": "The smoke owns only its .epiphany-smoke fixture body. Production coordinator state and Hands authority come from typed runtime evidence.",
});
write_json(
&artifact_root.join("coordinator-smoke-summary.json"),
@ -208,11 +126,6 @@ fn run_smoke(args: &Args) -> Result<Value> {
struct RunOptions {
name: &'static str,
mode: &'static str,
bootstrap_smoke_state: bool,
bootstrap_local_state: bool,
simulate_high_pressure: bool,
simulate_continue_implementation: bool,
dry_compact: bool,
max_steps: usize,
}
@ -242,24 +155,6 @@ fn run_coordinator(
.arg("0.1")
.arg("--timeout-seconds")
.arg("3");
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");
}
if options.simulate_continue_implementation {
command.arg("--simulate-continue-implementation");
}
if options.dry_compact {
command.arg("--dry-compact");
}
let output = command
.output()
.context("failed to run native coordinator")?;
@ -273,70 +168,6 @@ fn run_coordinator(
serde_json::from_slice(&output.stdout).context("failed to decode coordinator summary")
}
fn record_hands_pass(hands_action: &Path, summary: &Value) -> Result<Value> {
let artifact_dir = PathBuf::from(
summary
.get("artifactDir")
.and_then(Value::as_str)
.ok_or_else(|| anyhow!("summary missing artifactDir"))?,
);
let stdout_artifact = artifact_dir.join("hands-pass-command.stdout.log");
let stderr_artifact = artifact_dir.join("hands-pass-command.stderr.log");
fs::write(&stdout_artifact, "hands pass smoke command output\n")?;
fs::write(&stderr_artifact, "")?;
let commit = Command::new("git")
.args([
"log",
"-1",
"--format=%H",
"--",
"tools/epiphany_local_run.ps1",
])
.output()
.context("failed to locate a real commit for the Hands smoke path")?;
require(
commit.status.success(),
"failed to resolve Hands smoke commit",
)?;
let commit_sha = String::from_utf8(commit.stdout)?.trim().to_string();
require(
!commit_sha.is_empty(),
"Hands smoke path has no commit history",
)?;
let output = Command::new(hands_action)
.arg("--store")
.arg(artifact_dir.join("runtime-spine.msgpack"))
.arg("record-pass")
.arg("--gate-summary")
.arg(artifact_dir.join("coordinator-summary.json"))
.arg("--summary")
.arg("Coordinator smoke recorded typed Hands consequence receipts.")
.arg("--changed-path")
.arg("tools/epiphany_local_run.ps1")
.arg("--command")
.arg("coordinator-smoke hands-pass synthetic command")
.arg("--exit-code")
.arg("0")
.arg("--stdout-artifact")
.arg(&stdout_artifact)
.arg("--stderr-artifact")
.arg(&stderr_artifact)
.arg("--commit-sha")
.arg(commit_sha)
.arg("--branch")
.arg("main")
.output()
.context("failed to run Hands action recorder")?;
if !output.status.success() {
return Err(anyhow!(
"Hands action recorder failed: {}{}",
String::from_utf8_lossy(&output.stderr),
String::from_utf8_lossy(&output.stdout)
));
}
serde_json::from_slice(&output.stdout).context("failed to decode Hands pass summary")
}
fn require_artifacts(summary: &Value) -> Result<()> {
let artifact_dir = PathBuf::from(
summary
@ -408,8 +239,8 @@ fn require_operator_safe(value: &Value, path: &str) -> Result<()> {
}
fn reset_artifact_root(root: &Path, path: &Path) -> Result<()> {
let dogfood_root = root.join(".epiphany-dogfood").canonicalize().or_else(|_| {
let dogfood_root = root.join(".epiphany-dogfood");
let dogfood_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| {
let dogfood_root = root.join(".epiphany-smoke");
fs::create_dir_all(&dogfood_root)?;
dogfood_root.canonicalize()
})?;

View file

@ -36,8 +36,6 @@ use std::env;
use std::fs;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::thread;
use std::time::Duration;
use uuid::Uuid;
#[cfg(windows)]
@ -57,8 +55,6 @@ mod status_cli;
const DEFAULT_MODEL_RUNTIME_BIN: &str = "epiphany-model-runtime";
const DEFAULT_TOOL_ADAPTER_BIN: &str = "epiphany-tool-codex-mcp-spine";
const WORKER_AUTO_TOOL_MAX_ROUNDS: usize = 24;
const GRAPH_NODE_ID: &str = "reorient-target";
const WATCHED_RELATIVE_PATH: &str = "src/reorient_target.rs";
fn main() -> Result<()> {
let args = Args::parse()?;
@ -88,13 +84,6 @@ struct Args {
auto_review: bool,
supersede_failed_results: bool,
auto_tools: bool,
bootstrap_smoke_state: bool,
bootstrap_local_state: bool,
bootstrap_objective: Option<String>,
simulate_high_pressure: bool,
simulate_continue_implementation: bool,
simulate_source_drift: bool,
dry_compact: bool,
proposal_modeling_request_id: Option<String>,
}
@ -127,13 +116,6 @@ impl Args {
auto_review: false,
supersede_failed_results: false,
auto_tools: true,
bootstrap_smoke_state: false,
bootstrap_local_state: false,
bootstrap_objective: None,
simulate_high_pressure: false,
simulate_continue_implementation: false,
simulate_source_drift: false,
dry_compact: false,
proposal_modeling_request_id: None,
};
while let Some(arg) = args.next() {
@ -196,18 +178,6 @@ impl Args {
"--test-complete-backend was removed: native coordinator refuses direct private state-store job mutation; use live workers or a future CultNet job-result API"
));
}
"--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-continue-implementation" => {
parsed.simulate_continue_implementation = true
}
"--simulate-source-drift" => parsed.simulate_source_drift = true,
"--dry-compact" => parsed.dry_compact = true,
other => return Err(anyhow!("unknown argument: {other}")),
}
}
@ -219,7 +189,7 @@ fn run_coordinator(args: &Args) -> Result<Value> {
let root = env::current_dir().context("failed to resolve current dir")?;
let local_verse_store = status_cli::absolute_path(&args.local_verse_store)?;
assert_local_verse_brake_released(&local_verse_store, "epiphany-mvp-coordinator")?;
let mut cwd = status_cli::absolute_path(&args.cwd)?;
let cwd = status_cli::absolute_path(&args.cwd)?;
let model_runtime_bin = resolve_model_runtime_bin(&root, &args.model_runtime_bin)?;
let tool_adapter_bin = resolve_model_runtime_bin(&root, &args.tool_adapter_bin)?;
let codex_home = status_cli::absolute_path(&args.codex_home)?;
@ -228,10 +198,6 @@ fn run_coordinator(args: &Args) -> Result<Value> {
let runtime_store = status_cli::absolute_path(&args.runtime_store)?;
reset_artifact_dir(&artifact_dir)?;
fs::create_dir_all(&codex_home)?;
if args.bootstrap_smoke_state {
cwd = artifact_dir.join("workspace");
prepare_workspace(&cwd)?;
}
let telemetry_path = artifact_dir.join("agent-function-telemetry.json");
let steps_path = artifact_dir.join("coordinator-steps.jsonl");
@ -303,48 +269,16 @@ fn run_coordinator(args: &Args) -> Result<Value> {
"eventId": runtime_event.event_id,
}));
if args.bootstrap_smoke_state {
apply_bootstrap_patch(&runtime_store, &thread_id, reorient_patch())?;
if args.simulate_source_drift {
fs::write(
cwd.join(WATCHED_RELATIVE_PATH),
"pub fn reorient_target() -> &'static str {\n \"after\"\n}\n",
)?;
thread::sleep(Duration::from_millis(500));
}
} else if args.bootstrap_local_state {
apply_bootstrap_patch(
&runtime_store,
&thread_id,
local_mvp_checkpoint_patch(&cwd, args.bootstrap_objective.as_deref()),
)?;
}
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 mut action = coordinator["action"]
let action = coordinator["action"]
.as_str()
.unwrap_or("regatherManually")
.to_string();
if args.simulate_high_pressure && index == 0 {
action = "compactRehydrateReorient".to_string();
coordinator["action"] = json!(action);
coordinator["canAutoRun"] = json!(true);
coordinator["requiresReview"] = json!(false);
coordinator["reason"] = json!("Simulated high pressure requested by smoke test.");
} else if args.simulate_continue_implementation && index == 0 {
action = "continueImplementation".to_string();
coordinator["action"] = json!(action);
coordinator["canAutoRun"] = json!(true);
coordinator["requiresReview"] = json!(false);
coordinator["targetRole"] = json!("implementation");
coordinator["reason"] =
json!("Simulated implementation continuation requested by smoke test.");
}
let snapshot_name = format!("step-{index:02}-{action}.txt");
fs::write(
@ -606,15 +540,6 @@ fn run_coordinator(args: &Args) -> Result<Value> {
}
}
"compactRehydrateReorient" => {
if args.dry_compact {
push_event(
&mut step,
json!({"type": "dryCompact", "threadId": thread_id}),
);
append_operator_step_jsonl(&steps_path, &step)?;
steps.push(step);
continue;
}
push_event(
&mut step,
json!({"type": "compactUnsupportedInNativeSmoke"}),
@ -761,32 +686,10 @@ fn collect_coordinator_status(runtime_store: &Path, thread_id: &str) -> Result<V
let store = runtime_store.to_string_lossy();
status_cli::native_json(
"epiphany-mvp-status",
&[
"--native",
"--json",
"--thread-id",
thread_id,
"--store",
&store,
],
&["--json", "--thread-id", thread_id, "--store", &store],
)
}
fn apply_bootstrap_patch(runtime_store: &Path, thread_id: &str, patch: Value) -> Result<Value> {
let patch: epiphany_core::EpiphanyRoleStatePatchDocument =
serde_json::from_value(patch).context("failed to decode typed bootstrap state patch")?;
let service = epiphany_core::EpiphanyCoordinatorService::new(runtime_store);
let applied = service.apply_state_update(
thread_id,
epiphany_core::state_update_from_role_patch(Some(0), patch),
None,
)?;
Ok(json!({
"revision": applied.revision,
"changedFields": applied.changed_fields.iter().map(|field| format!("{field:?}")).collect::<Vec<_>>(),
"state": applied.state,
}))
}
fn resolve_model_runtime_bin(root: &Path, configured: &Path) -> Result<PathBuf> {
if configured.components().count() != 1 {
return status_cli::absolute_path(configured);
@ -1437,231 +1340,14 @@ fn now() -> String {
chrono::Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true)
}
fn reorient_patch() -> Value {
json!({
"objective": "Decide whether a durable checkpoint still deserves to be resumed after rehydrate.",
"activeSubgoalId": "phase6-reorient-smoke",
"subgoals": [{
"id": "phase6-reorient-smoke",
"title": "Live-smoke CRRC reorientation policy",
"status": "active",
"summary": "Resume when the checkpoint is still aligned; regather when the touched file proves it isn't.",
}],
"graphs": {
"architecture": {"nodes": [{
"id": GRAPH_NODE_ID,
"title": "Reorient target",
"purpose": "Map the file the watcher will touch so reorientation can notice drift.",
"code_refs": [{"path": WATCHED_RELATIVE_PATH, "start_line": 1, "end_line": 3, "symbol": "reorient_target"}],
}]},
"dataflow": {"nodes": []},
"links": [],
},
"graphFrontier": {"active_node_ids": [GRAPH_NODE_ID], "dirty_paths": []},
"graphCheckpoint": {
"checkpoint_id": "ck-reorient-1",
"graph_revision": 1,
"summary": "Reorientation smoke graph checkpoint",
"frontier_node_ids": [GRAPH_NODE_ID],
},
"investigationCheckpoint": {
"checkpoint_id": "ix-reorient-1",
"kind": "source_gathering",
"disposition": "resume_ready",
"focus": "Verify the touched file before broad edits.",
"summary": "This checkpoint should remain resumable until the watched source moves.",
"next_action": "Resume the bounded slice if the watched source still matches the checkpoint.",
"captured_at_turn_id": "turn-phase6-reorient",
"code_refs": [{"path": WATCHED_RELATIVE_PATH, "start_line": 1, "end_line": 3, "symbol": "reorient_target"}],
},
"churn": {
"understanding_status": "ready",
"diff_pressure": "low",
"graph_freshness": "fresh",
"unexplained_writes": 0,
},
})
}
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 Persona, 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 Persona 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 Persona, runs coordinator-owned work, and invokes Continuity/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": "Persona-coordinator-sleep-cycle",
"title": "Persona to coordinator to sleep",
"purpose": "Persona 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": "Persona-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", "Persona-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: Persona front door, coordinator run, model runtime transport, sleep maintenance.",
"frontier_node_ids": ["local-mvp-runner", "Persona-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)?;
}
let watched = workspace.join(WATCHED_RELATIVE_PATH);
fs::create_dir_all(watched.parent().unwrap())?;
fs::write(
watched,
"pub fn reorient_target() -> &'static str {\n \"before\"\n}\n",
)?;
Ok(())
}
fn reset_artifact_dir(path: &Path) -> Result<()> {
let root = env::current_dir()?
.join(".epiphany-dogfood")
.canonicalize()
.or_else(|_| {
let root = env::current_dir()?.join(".epiphany-dogfood");
fs::create_dir_all(&root)?;
root.canonicalize()
})?;
let cwd = env::current_dir()?;
let mut roots = Vec::new();
for name in [".epiphany-dogfood", ".epiphany-smoke"] {
let root = cwd.join(name);
fs::create_dir_all(&root)?;
roots.push(root.canonicalize()?);
}
let resolved_parent = path.parent().unwrap_or_else(|| Path::new("."));
fs::create_dir_all(resolved_parent)?;
let resolved = if path.exists() {
@ -1671,9 +1357,12 @@ fn reset_artifact_dir(path: &Path) -> Result<()> {
.canonicalize()?
.join(path.file_name().unwrap())
};
if resolved == root || !resolved.starts_with(&root) {
if !roots
.iter()
.any(|root| resolved != *root && resolved.starts_with(root))
{
return Err(anyhow!(
"refusing to delete non-dogfood artifact dir: {}",
"refusing to delete artifact dir outside .epiphany-dogfood or .epiphany-smoke: {}",
path.display()
));
}
@ -1779,7 +1468,7 @@ mod tests {
let status_end = source.find("fn resolve_model_runtime_bin").unwrap();
let status = &source[status_start..status_end];
assert!(status.contains("epiphany-mvp-status"));
assert!(status.contains("--native"));
assert!(!status.contains("--native"));
assert!(!status.contains("AppServerClient"));
assert!(!status.contains("thread/epiphany/"));

View file

@ -1698,6 +1698,35 @@ Real Reddit and Other artifacts exist but are not registered as output
contracts. Rebuild that surface around typed discriminated artifact references,
register the real outputs, or stop advertising them as typed surface outputs.
## Production smoke controls substituted for coordinator authority
The production coordinator formerly accepted fixture/bootstrap and simulation
flags beside arbitrary runtime-store selection. They could seed typed thread
state, replace the derived action, assert `canAutoRun`, waive review, and enter
the ordinary implementation arm that writes a real Hands gate.
- Owner: typed coordinator status and accepted evidence own action selection;
Hands/Substrate review owns implementation permission.
- Inputs: current typed thread state, accepted role results, and review evidence.
- Outputs: action and run receipt; the shared implementation arm may emit a
Hands gate.
- Derived state: bootstrap, forced pressure/continuation/source drift, and dry
compaction are smoke-only scenario state.
- Forbidden writers: production flags, callers, wrappers, and fixture helpers
cannot choose action, waive review, or mint permission.
- Shared paths: smoke and production consume the same typed status/action and
Hands-gate machinery; smoke owns only isolated fixture preparation.
- Cut line: delete fixture flags, overrides, and helpers from production; bind
the smoke to `.epiphany-smoke/mvp-coordinator`.
Negative proof: production deleted all fixture flags/overrides/helpers; smoke
is fixed beneath that root and rejects all seven legacy flags. Typed
status/evidence alone now reaches the action arm and Hands gate.
Eyes' next candidate is unconfirmed: sibling Bifrost subprocess JSON consumed
by readiness needs a typed identity/provenance audit before deciding whether it
borrows provider authority.
### Closure update (2026-07-15)
Commit `65445623` closed the local Persona projection wound: the MVP-status

View file

@ -669,5 +669,25 @@ a new launch-correlated provider heartbeat, and semantic ranking from both
packaged queries. This proves after-login physiology only. Reboot is outside
agent authority until the operator grants that exact host-wide action.
## Coordinator action authority and smoke boundary (2026-07-15)
The production coordinator now derives one path:
`typed status/evidence -> coordinator action -> shared action arm -> optional Hands gate`.
Typed status and accepted evidence own action selection; Hands/Substrate review
owns permission. Current typed thread state, accepted role results, and review
evidence are inputs. The action, run receipt, and optional Hands gate are
outputs. Smoke fixtures and scenario controls are derived verification state.
Production callers, wrappers, fixture flags, and smoke helpers are forbidden
writers of action, `canAutoRun`, review requirements, bootstrap state, and Hands
permission. The seven former production fixture flags and their override/helper
paths are deleted. The dedicated smoke creates fixtures only under
`.epiphany-smoke/mvp-coordinator`, then exercises the shared typed paths; it
rejects attempts to reintroduce those flags.
Future audit frontier, not established anatomy: sibling Bifrost subprocess JSON
used by readiness needs a focused identity/schema/provenance audit before any
cut or confirmed finding.
This map must change when ownership changes. Historical scars belong in git,
evidence, or an explicitly archived note—not in the machine's Modeling state.

View file

@ -1503,3 +1503,42 @@ need a real dispatcher and receipt path.
This does not replace the current deployment next action: complete the real
Windows reboot/logon proof for Task Scheduler, the Yggdrasil tunnel, Idunn, and
the launch-correlated semantic projector heartbeat.
## Production coordinator fixture authority cut (2026-07-15)
The production `epiphany-mvp-coordinator` is again a scheduler, not a smoke
ventriloquist. Typed coordinator status and accepted evidence own the selected
action. The normal `continueImplementation` arm remains the single shared path
that may produce a Hands gate, but caller fixture text can no longer force that
arm or suppress review.
- Owner: typed coordinator status plus accepted role/evidence state owns the
next action; Hands/Substrate review owns implementation permission.
- Inputs: the selected runtime store, current typed thread state, accepted role
results, and explicit review state.
- Outputs: coordinator steps, final action, run receipt, and a Hands gate only
when the typed action reaches the shared implementation arm.
- Derived state: smoke scenarios, fixture workspaces, forced pressure, source
drift, and dry-compaction observations are verification cargo only.
- Forbidden writers: production CLI flags, callers, wrappers, and fixture
helpers cannot choose coordinator action, mark it auto-runnable, waive
review, seed canonical scheduler state, or manufacture a Hands gate.
- Shared paths: production and smoke exercise the same typed status/action and
Hands-gate machinery after their inputs exist; the smoke does not add a
second decision owner.
- Cut line: all production fixture flags, overrides, and helpers were deleted.
Fixture assembly lives in `epiphany-mvp-coordinator-smoke`, confined to
`.epiphany-smoke/mvp-coordinator`.
Negative proof rejects all seven retired flags at the production mouth while
the dedicated smoke remains inside its fixed root. No legacy flag can target a
caller-selected runtime store. Eyes has banked one adjacent candidate, not a
completed finding: sibling Bifrost subprocess JSON still participates in a
readiness view and needs a focused audit for typed provider identity and
provenance before any cut is justified.
The deployment next action is unchanged and permission-bound: only with exact
live operator approval may the real reboot/logon proof run. It must establish
the restored tasks and tunnel, a fresh reconciler -> exactly-one-projector
chain, launch-correlated provider sight, and admitted semantic queries. Do not
infer reboot authority from this scheduler cleanup.

Binary file not shown.

View file

@ -70,7 +70,7 @@ data_flow:
- move historical proof to git, commits, smoke artifacts, or distilled evidence rather than plan prose
active_subgoals:
- Use `notes/conceptual-substitution-audit-2026-07-12.md` plus `notes/receipt-writer-provenance-audit-2026-07-12.md` as the current authority-corrosion maps. Snapshot promotion, synthetic smoke escape, unbound operator completion, hidden service execution flags, provider/bootstrap collapse, central/all-provider publication, production-side implicit bootstrap, orphaned external response authority, bulk readiness authority, public topology-derived provider builders, bootstrap/template-authored operator observation, writerless operator-status schema authority, SoA projection body creation, path-selection-as-body-creation, executable-name-as-provider-participation, and orphaned daemon-tool response authority are cut. Provider responses and readiness without observers are test-only; the ownerless operator-status family and counterfeit Eve provider CLI are deleted; templates are private; query mutations require the body. CultCache's backing store owns missing-read purity by returning before lock acquisition. Next audit remaining projections, caches, schedulers, adapters, and non-receipt smokes for borrowed authority or path escape.
- Use `notes/conceptual-substitution-audit-2026-07-12.md` plus `notes/receipt-writer-provenance-audit-2026-07-12.md` as the current authority-corrosion maps. Snapshot promotion, synthetic smoke escape, unbound operator completion, hidden service execution flags, provider/bootstrap collapse, central/all-provider publication, production-side implicit bootstrap, orphaned external response authority, bulk readiness authority, public topology-derived provider builders, bootstrap/template-authored operator observation, writerless operator-status schema authority, SoA projection body creation, path-selection-as-body-creation, executable-name-as-provider-participation, orphaned daemon-tool response authority, and production coordinator fixture authority are cut. `epiphany-mvp-coordinator` no longer accepts fixture/bootstrap/simulation overrides; typed coordinator status and accepted evidence alone choose actions and therefore whether the shared Hands-gate path runs. The dedicated coordinator smoke owns fixture assembly only beneath `.epiphany-smoke/mvp-coordinator` and rejects the seven retired production flags. Provider responses and readiness without observers are test-only; the ownerless operator-status family and counterfeit Eve provider CLI are deleted; templates are private; query mutations require the body. CultCache's backing store owns missing-read purity by returning before lock acquisition. The next unproved adapter frontier is sibling Bifrost subprocess JSON used for readiness: audit whether typed provider identity and provenance are authenticated before treating it as evidence; do not record this candidate as a confirmed substitution yet.
- `swarm-overview` is an Epiphany-local, renderer-neutral diagnostic projection. It owns no lifecycle, discovery, composition, or mutation authority. No live provider-owned Eve surface contract currently exists: provenance-free v0 Odin/Eve/tool rows are ignored by live consumers and retired by explicit bootstrap. Downstream lowerers and compositors remain outside Epiphany's concern.
- Idunn owns managed-service reconciliation and projector child lifecycle. On this workstation, Task Scheduler owns only current-user after-login presence of the Idunn reconciler; `gamecult-ops` owns only current-user after-login presence and configuration of the foreground Yggdrasil tunnel. Self, wrappers, diagnostic projections, lifecycle receipts, Task Scheduler, and the service manager are forbidden from becoming alternate projector, semantic-readiness, or recovery owners. Historical `swarm-online-runbook` and SCM service-control routes are rejected-path evidence, not current operator actions.
- Use `notes/epiphany-cultmesh-dreaming-roadmap.md` as the design authority for distributed Epiphany dreaming. Public dreams are separately authored typed documents distributed through CultMesh/CultNet; private state remains local and cannot be shared by flipping a visibility flag. Foreign dreams are external thought weather until a reviewed local adoption receipt digests them into memory, planning, doctrine, or governance.