From bf9c3701333900949cd79fb3211e1e7dc3b386f0 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 25 Apr 2026 04:10:10 +0100 Subject: [PATCH] Harden proposal map-delta judgment --- epiphany-core/src/proposal.rs | 245 +++++++++++++++++---- notes/epiphany-current-algorithmic-map.md | 28 +-- notes/epiphany-fork-implementation-plan.md | 11 +- notes/fresh-workspace-handoff.md | 15 +- state/evidence.jsonl | 2 + state/map.yaml | 9 +- 6 files changed, 242 insertions(+), 68 deletions(-) diff --git a/epiphany-core/src/proposal.rs b/epiphany-core/src/proposal.rs index 915ffc26..e57edd04 100644 --- a/epiphany-core/src/proposal.rs +++ b/epiphany-core/src/proposal.rs @@ -44,6 +44,44 @@ struct ArchitectureMatch { kind: ArchitectureMatchKind, } +#[derive(Debug, Default, Clone, PartialEq, Eq)] +struct MapDeltaJudgment { + exact_ref_reuses: usize, + same_path_reuses: usize, + deterministic_id_reuses: usize, + semantic_reuses: usize, + created_nodes: usize, + touched_paths: usize, + selected_observations: usize, + existing_unexplained_writes: bool, +} + +impl MapDeltaJudgment { + fn reused_nodes(&self) -> usize { + self.exact_ref_reuses + + self.same_path_reuses + + self.deterministic_id_reuses + + self.semantic_reuses + } + + fn record_match(&mut self, kind: ArchitectureMatchKind) { + match kind { + ArchitectureMatchKind::ExactCodeRef => self.exact_ref_reuses += 1, + ArchitectureMatchKind::SamePath => self.same_path_reuses += 1, + ArchitectureMatchKind::DeterministicId => self.deterministic_id_reuses += 1, + ArchitectureMatchKind::Semantic => self.semantic_reuses += 1, + } + } + + fn has_broadening_reuse(&self) -> bool { + self.same_path_reuses > 0 || self.semantic_reuses > 0 + } + + fn has_mixed_delta(&self) -> bool { + self.reused_nodes() > 0 && self.created_nodes > 0 + } +} + #[derive(Debug, Clone, PartialEq, Eq)] struct ObservationSelectionCandidate { observation_id: String, @@ -83,9 +121,17 @@ pub fn propose_map_update(input: EpiphanyMapProposalInput) -> Result 0), + ..Default::default() + }; for path in &code_ref_paths { let path_code_refs = code_refs_for_path(&code_refs, &path); @@ -100,10 +146,7 @@ pub fn propose_map_update(input: EpiphanyMapProposalInput) -> Result Result Result String { truncated } -fn proposal_understanding_status(reused_nodes: usize, created_nodes: usize) -> String { - match (reused_nodes > 0, created_nodes > 0) { +fn proposal_understanding_status(delta: &MapDeltaJudgment) -> String { + match (delta.reused_nodes() > 0, delta.created_nodes > 0) { (true, false) => "proposal_refines_map", (false, true) => "proposal_expands_map", (true, true) => "proposal_updates_map", @@ -947,33 +988,39 @@ fn proposal_understanding_status(reused_nodes: usize, created_nodes: usize) -> S .to_string() } -fn proposal_graph_freshness(reused_nodes: usize, created_nodes: usize) -> String { - match (reused_nodes > 0, created_nodes > 0) { - (true, false) => "proposal-refined", - (false, true) => "proposal-expanded", - (true, true) => "proposal-updated", - (false, false) => "proposal", +fn proposal_graph_freshness(delta: &MapDeltaJudgment) -> String { + if delta.has_mixed_delta() { + "proposal-updated" + } else if delta.created_nodes > 0 { + "proposal-expanded" + } else if delta.semantic_reuses > 0 { + "proposal-semantically-anchored" + } else if delta.same_path_reuses > 0 { + "proposal-broadened" + } else if delta.reused_nodes() > 0 { + "proposal-refined" + } else { + "proposal" } .to_string() } fn proposal_diff_pressure( - reused_nodes: usize, - created_nodes: usize, - path_count: usize, - observation_count: usize, + delta: &MapDeltaJudgment, existing_churn: Option<&EpiphanyChurnState>, ) -> String { - let proposal_pressure = if created_nodes > 1 - || (reused_nodes > 0 && created_nodes > 0) - || path_count > 2 - || observation_count > 3 - || existing_churn - .and_then(|churn| churn.unexplained_writes) - .is_some_and(|unexplained_writes| unexplained_writes > 0) + let proposal_pressure = if delta.created_nodes > 1 + || delta.has_mixed_delta() + || delta.touched_paths > 2 + || delta.selected_observations > 3 + || delta.existing_unexplained_writes { "high" - } else if created_nodes > 0 || path_count > 1 || observation_count > 1 { + } else if delta.created_nodes > 0 + || delta.has_broadening_reuse() + || delta.touched_paths > 1 + || delta.selected_observations > 1 + { "medium" } else { "low" @@ -987,6 +1034,46 @@ fn proposal_diff_pressure( max_pressure(existing_pressure, proposal_pressure).to_string() } +fn proposal_delta_summary(delta: &MapDeltaJudgment) -> String { + let mut parts = Vec::new(); + if delta.exact_ref_reuses > 0 { + parts.push(format!( + "{} exact-ref refinement(s)", + delta.exact_ref_reuses + )); + } + if delta.same_path_reuses > 0 { + parts.push(format!( + "{} same-path broadening reuse(s)", + delta.same_path_reuses + )); + } + if delta.deterministic_id_reuses > 0 { + parts.push(format!( + "{} deterministic-node reuse(s)", + delta.deterministic_id_reuses + )); + } + if delta.semantic_reuses > 0 { + parts.push(format!( + "{} semantic unanchored-node reuse(s)", + delta.semantic_reuses + )); + } + if delta.created_nodes > 0 { + parts.push(format!("{} new candidate node(s)", delta.created_nodes)); + } + if parts.is_empty() { + parts.push("no graph node delta".to_string()); + } + format!( + "delta judgment: {}; {} touched path(s), {} selected observation(s)", + parts.join(", "), + delta.touched_paths, + delta.selected_observations + ) +} + fn max_pressure<'a>(left: &'a str, right: &'a str) -> &'a str { if pressure_rank(left) >= pressure_rank(right) { left @@ -1196,7 +1283,87 @@ mod tests { .warning .as_deref() .unwrap_or_default() - .contains("1 by semantic graph signal") + .contains("1 semantic unanchored-node reuse") + ); + } + + #[test] + fn propose_map_update_judges_exact_ref_reuse_as_low_pressure_refinement() { + let mut state = state_with_observation("verified"); + state.churn = Some(EpiphanyChurnState { + understanding_status: "grounded".to_string(), + diff_pressure: "low".to_string(), + ..Default::default() + }); + state.graphs.architecture.nodes.push(EpiphanyGraphNode { + id: "prompt-renderer".to_string(), + title: "Prompt renderer".to_string(), + purpose: "Render Epiphany state into developer context".to_string(), + code_refs: vec![code_ref("epiphany-core/src/prompt.rs")], + ..Default::default() + }); + + let proposal = propose_map_update(EpiphanyMapProposalInput { + state, + observation_ids: vec!["obs-verified".to_string()], + }) + .expect("proposal"); + + assert_eq!(proposal.churn.diff_pressure, "low"); + assert_eq!( + proposal.churn.graph_freshness.as_deref(), + Some("proposal-refined") + ); + assert!( + proposal + .churn + .warning + .as_deref() + .unwrap_or_default() + .contains("1 exact-ref refinement") + ); + } + + #[test] + fn propose_map_update_judges_same_path_reuse_as_broadening_pressure() { + let mut state = state_with_observation("verified"); + state.churn = Some(EpiphanyChurnState { + understanding_status: "grounded".to_string(), + diff_pressure: "low".to_string(), + ..Default::default() + }); + state.graphs.architecture.nodes.push(EpiphanyGraphNode { + id: "prompt-renderer".to_string(), + title: "Prompt renderer".to_string(), + purpose: "Render Epiphany state into developer context".to_string(), + code_refs: vec![EpiphanyCodeRef { + path: PathBuf::from("epiphany-core/src/prompt.rs"), + start_line: Some(100), + end_line: Some(120), + symbol: Some("render_graphs".to_string()), + note: None, + }], + ..Default::default() + }); + + let proposal = propose_map_update(EpiphanyMapProposalInput { + state, + observation_ids: vec!["obs-verified".to_string()], + }) + .expect("proposal"); + + assert_eq!(proposal.churn.diff_pressure, "medium"); + assert_eq!( + proposal.churn.graph_freshness.as_deref(), + Some("proposal-broadened") + ); + assert!( + proposal + .churn + .warning + .as_deref() + .unwrap_or_default() + .contains("1 same-path broadening reuse") ); } diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 15b336e3..623b6c51 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -18,7 +18,7 @@ The spine exists in ten live paths: - per-turn persistence: normal turn setup persists one `RolloutItem::EpiphanyState` after the `TurnContext` when state exists in [session/mod.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/session/mod.rs:2677). - client read hydration: app-server thread views attach live or reconstructed `thread.epiphanyState` in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4599). - explicit distillation proposals: app-server routes read-only `thread/epiphany/distill` through a loaded-thread handler into `epiphany-core` so one explicit observation can become a patch candidate without mutating state in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4173) and [distillation.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/distillation.rs:28). -- explicit map/churn proposals: app-server routes read-only `thread/epiphany/propose` through a loaded-thread handler into `epiphany-core` so verified observations with code refs and accepting recent evidence can be selected explicitly or auto-selected as a bounded path cluster, prioritize the strongest selected observation, focus or extend architecture graph nodes, rescue unanchored graph nodes through strict semantic overlap, carry linked dataflow nodes and incident graph edges into the frontier, update churn candidates with map-delta pressure, and still avoid mutation until promotion in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4244) and [proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:77). +- explicit map/churn proposals: app-server routes read-only `thread/epiphany/propose` through a loaded-thread handler into `epiphany-core` so verified observations with code refs and accepting recent evidence can be selected explicitly or auto-selected as a bounded path cluster, prioritize the strongest selected observation, focus or extend architecture graph nodes, rescue unanchored graph nodes through strict semantic overlap, carry linked dataflow nodes and incident graph edges into the frontier, update churn candidates with match-kind-aware map-delta judgment and pressure, and still avoid mutation until promotion in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4244) and [proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:115). - explicit promotion gates: app-server routes `thread/epiphany/promote` through a loaded-thread handler into `epiphany-core` policy evaluation, rejects failed verifier evidence without mutation, and applies accepted candidates through the same durable update path in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4316) and [promotion.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/promotion.rs:33). - explicit state updates: app-server routes `thread/epiphany/update` through a loaded `CodexThread` update method that mutates live `SessionState`, bumps the revision, and persists an immediate `RolloutItem::EpiphanyState` snapshot in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4416) and [codex_thread.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/codex_thread.rs:373). - retrieval/indexing: app-server routes `thread/epiphany/retrieve` and `thread/epiphany/index` through loaded `CodexThread` host methods into `epiphany-core` in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4046), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4122), [codex_thread.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/codex_thread.rs:438), and [codex_thread.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/codex_thread.rs:456). @@ -29,7 +29,7 @@ The thick Epiphany-owned implementation is mostly outside vendored Codex now: - generic rollout replay for stored-thread reads lives in [epiphany-core/src/rollout.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/rollout.rs:38). - retrieval and indexing live in [epiphany-core/src/retrieval.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/retrieval.rs:144) and [retrieval.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/retrieval.rs:160), with summary-only freshness reads in [retrieval.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/retrieval.rs:100). - deterministic observation distillation lives in [epiphany-core/src/distillation.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/distillation.rs:28). -- deterministic map/churn proposal from verified, evidence-backed observations lives in [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:77). +- deterministic map/churn proposal from verified, evidence-backed observations lives in [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:115). - verifier-backed promotion policy lives in [epiphany-core/src/promotion.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/promotion.rs:33). ## Whole Control Flow @@ -104,7 +104,7 @@ Source audit on 2026-04-25 re-read each flow below against the cited code instea The current landed machine is still coherent. The core shape is not ornamental: one protocol state object flows through session state, prompt rendering, rollout persistence, thread hydration, explicit retrieval/indexing, read-only distillation/proposal, verifier-backed promotion, and the single durable update writer. The useful simplification pressure is already present in the boundaries: retrieval reads, indexing writes only the semantic catalog, distillation/proposal draft patches, promotion gates, and update persists. -Nothing in the current typed spine obviously deserves deletion right now. The parts that would turn this into Jenga are still correctly listed as non-flows: automatic tool-output ingestion, watcher invalidation, GUI reflection, specialist scheduling, and an automatic Compact-Rehydrate-Reorient-Continue coordinator. The next Perfect Machine move is therefore not adding another writer or a shiny surface. It is richer map-delta judgment above the existing proposal path, still evidence-backed and still forced through promotion. +Nothing in the current typed spine obviously deserves deletion right now. The parts that would turn this into Jenga are still correctly listed as non-flows: automatic tool-output ingestion, watcher invalidation, GUI reflection, specialist scheduling, and an automatic Compact-Rehydrate-Reorient-Continue coordinator. The next Perfect Machine move is therefore not adding another writer or a shiny surface. After the first match-kind-aware map-delta judgment slice, the next pressure belongs in richer typed observation distillation from real tool/model output and promotion policy that can consume those deltas, still evidence-backed and still forced through promotion. ## Natural Language Spine @@ -692,7 +692,7 @@ A client sends experimental `thread/epiphany/propose` for a loaded thread with: Proposal is the tracing-paper path. It starts from observations that are already in the thread's typed state, chooses a small proposal-ready set when `observationIds` is omitted, requires selected observations to have verified/accepted status, requires each selected observation to cite accepting `recent_evidence`, requires source-grounding through code refs, and returns a candidate patch that can replace graph/frontier/churn fields only if a later promotion accepts it. -This is the first shipped chewing motion. It is deliberately small: no model call, no watcher invalidation, no automatic graph truth. When ids are omitted, proposal now ranks proposal-ready observations by source/evidence strength, code refs, and current map focus, then keeps a bounded coherent path cluster instead of grabbing every shiny pebble in the yard. It then checks that selected observations are backed by current accepting evidence, scores the selected observations so the strongest verifier/test/smoke-backed signal becomes the proposal's primary summary, and tries to match observed code refs against existing architecture nodes. Concrete matching still wins: exact code refs, same-path refs, and deterministic path-node ids are tried before anything semantic. Only after those fail can strict semantic overlap reuse an existing architecture node, and only when that graph node has no code refs yet; anchored nodes stay governed by concrete refs because otherwise the map starts doing interpretive dance in a trench coat. Proposal then enriches matching nodes with newly observed refs, creates path-derived candidate nodes only for genuinely unmapped surfaces, expands frontier focus through graph links, marks named incident edges active, emits a proposal observation/evidence pair, and marks churn according to whether the proposal refined, expanded, or mixed the map. Diff pressure now reflects the proposed map delta, touched paths, observation count, and unresolved write risk instead of blindly inheriting the previous pressure. It is a candidate, not an oracle. We do not crown the goblin because it found a wrench. +This is the first shipped chewing motion. It is deliberately small: no model call, no watcher invalidation, no automatic graph truth. When ids are omitted, proposal now ranks proposal-ready observations by source/evidence strength, code refs, and current map focus, then keeps a bounded coherent path cluster instead of grabbing every shiny pebble in the yard. It then checks that selected observations are backed by current accepting evidence, scores the selected observations so the strongest verifier/test/smoke-backed signal becomes the proposal's primary summary, and tries to match observed code refs against existing architecture nodes. Concrete matching still wins: exact code refs, same-path refs, and deterministic path-node ids are tried before anything semantic. Only after those fail can strict semantic overlap reuse an existing architecture node, and only when that graph node has no code refs yet; anchored nodes stay governed by concrete refs because otherwise the map starts doing interpretive dance in a trench coat. Proposal then enriches matching nodes with newly observed refs, creates path-derived candidate nodes only for genuinely unmapped surfaces, expands frontier focus through graph links, marks named incident edges active, emits a proposal observation/evidence pair, and judges the map delta by match kind: exact-ref reuse is a narrow refinement, same-path reuse is broadening, deterministic-id reuse preserves a known candidate, semantic reuse anchors previously unanchored prose, and new nodes expand the map. Diff pressure now reflects that judgment, touched paths, observation count, and unresolved write risk instead of blindly inheriting the previous pressure. It is a candidate, not an oracle. We do not crown the goblin because it found a wrench. Protocol shape: @@ -713,7 +713,7 @@ Code refs: - [app-server-protocol/common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:350) - [app-server-protocol/v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:3963) -- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:77) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:115) ### Mechanism @@ -746,19 +746,21 @@ The app-server handler: 16. merges focused node ids, active edge ids, and observed paths into the graph frontier. 17. emits a proposal observation/evidence pair tied to the candidate patch, including evidence-backed selection counts, priority label, primary observation id, and reused/created node counts. 18. emits churn with `proposal_refines_map`, `proposal_expands_map`, or `proposal_updates_map` depending on whether the candidate reused existing nodes, created new nodes, or did both. -19. emits `diff_pressure` from the proposal shape: low for narrow refinements, medium for new single-surface expansion, and high for mixed/multi-path/multi-observation changes or existing unexplained writes. +19. emits graph freshness from the match-kind-aware delta: exact-ref/deterministic reuse is refinement, same-path reuse is broadening, semantic unanchored reuse is semantic anchoring, new nodes are expansion, and mixed reuse/create deltas are updates. +20. emits `diff_pressure` from the proposal shape and match kind: low for exact narrow refinements, medium for same-path broadening, semantic anchoring, single-surface expansion, or multi-observation/path pressure, and high for mixed/multi-create/multi-path changes or existing unexplained writes. Code refs: - [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4244) - [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4287) - [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4301) -- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:77) -- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:203) -- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:230) -- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:310) -- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:376) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:115) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:244) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:271) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:351) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:417) - [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:1008) +- [epiphany-core/src/proposal.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/proposal.rs:1037) ### Output @@ -871,7 +873,7 @@ stored Epiphany state -> explicit update patches can revise durable map/evidence/churn state ``` -The current remaining missing organ is not the red pen and not the first chewing motion. Those exist. Proposal now has the first bits of map memory, focus, and selection hygiene: it can auto-select a bounded evidence-backed observation cluster when ids are omitted, requires accepting recent evidence behind selected observations, prioritizes stronger selected observations for proposal wording, reuses existing architecture nodes by concrete code-ref/path/id checks before creating new path nodes, can rescue unanchored graph nodes through strict unique semantic overlap, follows graph links and incident edges into the frontier, and reports churn pressure from the actual proposal shape. The missing organ is broader judgment from fresh tool/model output, watcher/freshness inputs, richer map-delta classification, and eventually role-scoped specialist ownership without silently auto-promoting anything. +The current remaining missing organ is not the red pen and not the first chewing motion. Those exist. Proposal now has the first bits of map memory, focus, and selection hygiene: it can auto-select a bounded evidence-backed observation cluster when ids are omitted, requires accepting recent evidence behind selected observations, prioritizes stronger selected observations for proposal wording, reuses existing architecture nodes by concrete code-ref/path/id checks before creating new path nodes, can rescue unanchored graph nodes through strict unique semantic overlap, follows graph links and incident edges into the frontier, and reports match-kind-aware churn pressure from the actual proposal shape. The missing organ is broader judgment from fresh tool/model output, watcher/freshness inputs, promotion policy that can reason over richer deltas, and eventually role-scoped specialist ownership without silently auto-promoting anything. ```text model/tool observations @@ -882,7 +884,7 @@ model/tool observations -> durable evidence/map/churn mutation ``` -The typed write path exists, the first deterministic observation/evidence distillation path exists, the first deterministic map/churn proposal path exists, proposal-quality hardening now auto-selects bounded observation clusters when ids are omitted, requires accepting recent evidence, reuses existing graph nodes by observed code refs, prioritizes stronger selected observations, rescues unanchored graph nodes by strict semantic overlap, focuses linked frontier context, reports map-delta pressure, and the first verifier-backed promotion gate exists. The first map/churn safety layer also exists: promotion can reject state replacement patches that are not tied to explicit observations/evidence or that contain structurally broken subgoal, invariant, graph, frontier, checkpoint, or churn fields. +The typed write path exists, the first deterministic observation/evidence distillation path exists, the first deterministic map/churn proposal path exists, proposal-quality hardening now auto-selects bounded observation clusters when ids are omitted, requires accepting recent evidence, reuses existing graph nodes by observed code refs, prioritizes stronger selected observations, rescues unanchored graph nodes by strict semantic overlap, focuses linked frontier context, reports match-kind-aware map-delta pressure, and the first verifier-backed promotion gate exists. The first map/churn safety layer also exists: promotion can reject state replacement patches that are not tied to explicit observations/evidence or that contain structurally broken subgoal, invariant, graph, frontier, checkpoint, or churn fields. In natural language: current Epiphany can preserve a map, show a map, retrieve evidence for the map, draft one explicit observation/evidence patch, derive a bounded graph/frontier/churn candidate from verified evidence-backed observations with code refs, choose a small coherent observation set when the caller does not provide one, favor the strongest selected observation when drafting that candidate, reject or accept a verified candidate, apply explicit map/evidence/churn edits, and sanity-check those edits before they hit the ledger. It still does not ingest fresh tool/model output into richer map deltas automatically, invalidate stale graph regions, or coordinate specialist ownership. Teeth are installed; chewing is supervised; the next slices are about taste, not jawbones. diff --git a/notes/epiphany-fork-implementation-plan.md b/notes/epiphany-fork-implementation-plan.md index 77b0ba93..d314868a 100644 --- a/notes/epiphany-fork-implementation-plan.md +++ b/notes/epiphany-fork-implementation-plan.md @@ -2,7 +2,7 @@ ## Status -Updated on 2026-04-25 after landing automatic bounded observation selection inside the Phase 5 read-only proposal path on `main`. +Updated on 2026-04-25 after landing match-kind-aware map-delta judgment inside the Phase 5 read-only proposal path. This note tracks Epiphany as a fork of Codex with an opinionated modeling architecture. The point is not to offer Codex another collaboration preset. The point is to make the harness force the model to carry explicit structure about the codebase, the active subgoal, the evidence trail, and the machine it is modifying. @@ -21,9 +21,10 @@ This note tracks Epiphany as a fork of Codex with an opinionated modeling archit - an evidence-selection/churn hardening slice that requires selected proposal observations to cite accepting `recent_evidence` and derives proposal `diff_pressure` from the candidate map delta, touched paths, selected observation count, and unresolved write risk - a graph-semantic proposal hardening slice that scores selected observations/evidence, uses the strongest selected signal for proposal wording, and can reuse unanchored architecture graph nodes through strict unique semantic overlap while refusing ambiguous matches and leaving code-anchored nodes under concrete ref/path/id matching - an automatic observation-selection slice that lets read-only `thread/epiphany/propose` omit `observationIds`; `epiphany-core` then chooses a bounded coherent path cluster from existing verified, evidence-backed observations using source/evidence quality and current graph-frontier focus +- a map-delta judgment slice that distinguishes exact-ref refinement, same-path broadening, deterministic-node reuse, semantic unanchored-node reuse, and new candidate surfaces before setting graph freshness and `diff_pressure` - current phase: Phase 5 semantic distillation/promotion/proposal machinery -The next job is no longer to prove the retriever exists, sketch the persistent follow-up in prose, invent the first red-pen path, build the first observation proposal surface, make promotion notice broken map/churn replacements, ship the first read-only map/churn proposal surface, teach proposal to avoid duplicating already-mapped code surfaces, make proposal frontier focus follow existing graph links, make selected observations evidence-backed with non-haunted churn pressure, rescue unanchored graph nodes with strict semantic matching, or let proposal choose a bounded ready observation set when ids are omitted. Those parts are landed. The next job is to keep the landing zone honest: do not casually turn `thread/epiphany/retrieve`, `thread/epiphany/distill`, or `thread/epiphany/propose` into durable Epiphany-state writers, and do not widen the explicit indexing/update paths into watcher-driven or GUI-shaped machinery before they earn it. +The next job is no longer to prove the retriever exists, sketch the persistent follow-up in prose, invent the first red-pen path, build the first observation proposal surface, make promotion notice broken map/churn replacements, ship the first read-only map/churn proposal surface, teach proposal to avoid duplicating already-mapped code surfaces, make proposal frontier focus follow existing graph links, make selected observations evidence-backed with non-haunted churn pressure, rescue unanchored graph nodes with strict semantic matching, let proposal choose a bounded ready observation set when ids are omitted, or make proposal pressure understand match kinds. Those parts are landed. The next job is to keep the landing zone honest: improve typed observation distillation from real tool/model outputs and promotion policy over richer deltas without casually turning `thread/epiphany/retrieve`, `thread/epiphany/distill`, or `thread/epiphany/propose` into durable Epiphany-state writers, and without widening the explicit indexing/update paths into watcher-driven or GUI-shaped machinery before they earn it. ## Summary @@ -273,7 +274,7 @@ Add tests for: ## Immediate Next Step -Treat the current retrieval baseline and explicit indexing follow-up as landed Phase 4. Treat the explicit update path, distillation proposal path, read-only map/churn proposal path, verifier-backed promotion gate, structural map/churn promotion validation, graph-node reuse, linked frontier focus, evidence-backed selection, map-delta churn pressure, selected-observation prioritization, strict unanchored-node semantic reuse, and automatic bounded observation-set selection as the active Phase 5 baseline. The next machine gap is no longer "can Epiphany retrieve code?", "can it propose one durable observation patch?", "can it draft one bounded map/churn candidate?", "can it avoid duplicating an existing graph node when an observation points at already-mapped code?", "can it focus linked graph context?", "can it reject selected observations that are not backed by accepting recent evidence?", "can it use graph language when no concrete refs exist yet?", or "can it choose a proposal-ready observation set when ids are omitted?" It can. The next gap is "can Epiphany make richer map-delta judgments from tool/model output without silently promoting them?" +Treat the current retrieval baseline and explicit indexing follow-up as landed Phase 4. Treat the explicit update path, distillation proposal path, read-only map/churn proposal path, verifier-backed promotion gate, structural map/churn promotion validation, graph-node reuse, linked frontier focus, evidence-backed selection, map-delta churn pressure, selected-observation prioritization, strict unanchored-node semantic reuse, automatic bounded observation-set selection, and match-kind-aware map-delta judgment as the active Phase 5 baseline. The next machine gap is no longer "can Epiphany retrieve code?", "can it propose one durable observation patch?", "can it draft one bounded map/churn candidate?", "can it avoid duplicating an existing graph node when an observation points at already-mapped code?", "can it focus linked graph context?", "can it reject selected observations that are not backed by accepting recent evidence?", "can it use graph language when no concrete refs exist yet?", "can it choose a proposal-ready observation set when ids are omitted?", or "can it distinguish exact refinement from same-path broadening or semantic anchoring?" It can. The next gap is "can Epiphany distill richer tool/model outputs and promote richer deltas without silently writing them?" 1. treat the current verified-and-landed query-time hybrid retriever as the Phase 4 slice 1 baseline 2. treat the verified and live-smoked `thread/epiphany/index` slice as the bounded persistent-semantic follow-up @@ -281,8 +282,8 @@ Treat the current retrieval baseline and explicit indexing follow-up as landed P 4. do not add durable retrieval-summary writes from `thread/epiphany/retrieve` without a clean out-of-band rollout/update semantic 5. continue Phase 5 by hardening the layer above the landed distill/propose/promote/update surfaces: - richer typed observation distillation from tool/model outputs - - better proposal heuristics beyond the current exact-code-ref, same-path, deterministic-id, graph-link, accepting-evidence, semantic-unanchored-node, selected-priority, auto-selection, and map-delta-pressure checks - - richer map-delta judgment beyond the current bounded path-cluster proposal heuristic + - better proposal heuristics beyond the current exact-code-ref, same-path, deterministic-id, graph-link, accepting-evidence, semantic-unanchored-node, selected-priority, auto-selection, and match-kind-aware map-delta-pressure checks + - promotion policy that can reason over richer delta classes without becoming a second writer - promotion policy beyond structural validation, but only when it can stay evidence-backed - verifier-backed acceptance/rejection evidence - no hidden retrieval writes diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 91b4b13d..ee800d1b 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -87,7 +87,7 @@ Current verified typed state/promotion layer: - experimental loaded-thread-only `thread/epiphany/propose` - typed patch shape for observations, evidence, objective, subgoals, invariants, graphs, graph frontier/checkpoint, scratch, churn, and mode - deterministic observation/evidence proposal generation in `epiphany-core` -- deterministic map/churn proposal generation in `epiphany-core`, now with first-pass graph-node reuse by exact code-ref, same-path overlap, or deterministic path-node id before new candidate nodes are created, strict semantic reuse for unanchored architecture nodes, linked frontier focus through graph links and named incident edges, evidence-backed selected observations via accepting `recent_evidence`, selected-observation prioritization, automatic bounded observation selection when ids are omitted, and churn pressure derived from the proposed map delta +- deterministic map/churn proposal generation in `epiphany-core`, now with first-pass graph-node reuse by exact code-ref, same-path overlap, or deterministic path-node id before new candidate nodes are created, strict semantic reuse for unanchored architecture nodes, linked frontier focus through graph links and named incident edges, evidence-backed selected observations via accepting `recent_evidence`, selected-observation prioritization, automatic bounded observation selection when ids are omitted, and match-kind-aware churn pressure derived from exact-ref refinement, same-path broadening, deterministic-node reuse, semantic anchoring, or new candidate surfaces - verifier-backed promotion policy evaluation in `epiphany-core` - core `CodexThread.epiphany_update_state(...)` applies the patch to live `SessionState`, bumps revision, persists `RolloutItem::EpiphanyState`, and flushes rollout - replay helpers in both `codex-core` and `epiphany-core` accept an out-of-band Epiphany snapshot before the first real user turn so seed/update snapshots survive resume @@ -355,10 +355,11 @@ If a future session wakes up from compaction and starts bluffing, this is the pa - Phase 5 semantic distillation/promotion is active: - dedicated experimental `thread/epiphany/update`, `thread/epiphany/distill`, and `thread/epiphany/promote` exist and are live-smoked - structural map/churn promotion validation is landed in `epiphany-core` - - proposal selection now rejects observations without accepting `recent_evidence`, and churn pressure now reflects map-delta shape + - proposal selection now rejects observations without accepting `recent_evidence`, and churn pressure now reflects match-kind-aware map-delta shape - proposal can now omit `observationIds` and let `epiphany-core` choose a bounded coherent path cluster from existing verified, evidence-backed observations using source/evidence quality plus graph-frontier focus + - proposal churn now distinguishes exact-ref refinements from same-path broadening, deterministic-node reuse, semantic unanchored-node reuse, and new candidate surfaces before setting graph freshness and diff pressure - the Epiphany algorithmic map has been semantically audited flow-by-flow against the cited code; stale line anchors were fixed, and the current typed spine still describes a coherent machine - - the next bounded follow-up is richer map-delta judgment beyond the current evidence/path/link/semantic-unanchored/auto-selected path-cluster matching, not proving the retriever exists again + - the next bounded follow-up is richer typed observation distillation from real tool/model output or promotion policy over richer deltas, not proving the retriever exists again - There is still no live `thread/epiphany/*` notification stream. - The next phase is **not** GUI work. - The current pushed baseline also extracted most Epiphany-owned implementation into `epiphany-core`: @@ -453,9 +454,9 @@ Without that, you get to learn about `symlink_dir failed: ... A required privile ## Recommended Next Implementation -Do not restart verification from superstition. Phase 4 retrieval/indexing/core-extraction is already verified, committed, and pushed. Phase 5 distill/propose/promote/update, the first structural promotion safety layer, graph-node reuse, linked frontier focus, evidence-backed proposal selection, selected-observation prioritization, strict unanchored-node semantic reuse, automatic bounded observation selection, and map-delta churn pressure are also landed. +Do not restart verification from superstition. Phase 4 retrieval/indexing/core-extraction is already verified, committed, and pushed. Phase 5 distill/propose/promote/update, the first structural promotion safety layer, graph-node reuse, linked frontier focus, evidence-backed proposal selection, selected-observation prioritization, strict unanchored-node semantic reuse, automatic bounded observation selection, and match-kind-aware map-delta churn pressure are also landed. -The durable state seam exists, the turn loop reads it, clients can load typed Epiphany state directly, the first retrieval slice is real, the explicit persistent-semantic indexing path is landed, the distill/propose/promote/update path is live-smoked, promotion now has a first structural map/churn safety layer, and proposal now reuses existing architecture nodes before creating new path nodes, expands frontier focus through linked graph context, rejects selected observations without accepting recent evidence, prioritizes stronger selected observations for proposal wording, can reuse unanchored architecture nodes through strict semantic overlap, can auto-select a bounded evidence-backed observation cluster when ids are omitted, and reports churn pressure from the proposal shape. The next clean move is richer map-delta judgment, not pretending the already-shipped slices still need ceremony. +The durable state seam exists, the turn loop reads it, clients can load typed Epiphany state directly, the first retrieval slice is real, the explicit persistent-semantic indexing path is landed, the distill/propose/promote/update path is live-smoked, promotion now has a first structural map/churn safety layer, and proposal now reuses existing architecture nodes before creating new path nodes, expands frontier focus through linked graph context, rejects selected observations without accepting recent evidence, prioritizes stronger selected observations for proposal wording, can reuse unanchored architecture nodes through strict semantic overlap, can auto-select a bounded evidence-backed observation cluster when ids are omitted, and reports match-kind-aware churn pressure from the proposal shape. The next clean move is richer typed observation distillation from real tool/model output or promotion policy over richer deltas, not pretending the already-shipped slices still need ceremony. Current Phase 5 implementation move: @@ -464,7 +465,7 @@ Current Phase 5 implementation move: 3. keep `thread/epiphany/retrieve`, `thread/epiphany/distill`, and `thread/epiphany/propose` read-only 4. continue Phase 5 by hardening the next layer above the distill/propose/promote/update surfaces: - richer map/churn patch generation from verified observations and tool/model outputs - - richer map-delta judgment than the current exact refs/same path/deterministic ids/graph links/strict unanchored semantic matching and bounded auto-selected path clusters + - promotion policy that can reason over match-kind-aware deltas without becoming a second writer - promotion policy beyond structural validation only when the evidence path stays explicit - verifier-backed acceptance/rejection evidence - no GUI, watcher, or specialist-agent machinery yet @@ -505,4 +506,4 @@ cmd /c "\"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxi The repo is in a good state. -Phase 1, Phase 2, the minimal Phase 3 typed read surface, Phase 4 retrieval/indexing/core-extraction, and the current Phase 5 distill/propose/promote/update baseline are landed and verified. `vendor/codex` is first-class in the parent repo now, with the heavier Epiphany organs living in `epiphany-core`. Read-only proposal can now auto-select a bounded evidence-backed observation cluster when ids are omitted, and the current Epiphany algorithmic map has been source-audited against the code flow it describes. The next clean move is richer map-delta judgment above the read-only proposal path, not GUI paint, watcher magic, or re-proving retrieval. Pre-compaction persistence is now an explicit design rule, not a lucky habit. +Phase 1, Phase 2, the minimal Phase 3 typed read surface, Phase 4 retrieval/indexing/core-extraction, and the current Phase 5 distill/propose/promote/update baseline are landed and verified. `vendor/codex` is first-class in the parent repo now, with the heavier Epiphany organs living in `epiphany-core`. Read-only proposal can now auto-select a bounded evidence-backed observation cluster when ids are omitted and report match-kind-aware map-delta pressure, and the current Epiphany algorithmic map has been source-audited against the code flow it describes. The next clean move is richer typed observation distillation or promotion policy over richer deltas, not GUI paint, watcher magic, or re-proving retrieval. Pre-compaction persistence is now an explicit design rule, not a lucky habit. diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 719fa043..ff672593 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -116,3 +116,5 @@ {"ts": "2026-04-25T02:45:29+00:00", "type": "verification", "status": "ok", "note": "Verified automatic proposal observation selection with cargo fmt --manifest-path .\\epiphany-core\\Cargo.toml, cargo test --manifest-path .\\epiphany-core\\Cargo.toml proposal (16 tests), full cargo test --manifest-path .\\epiphany-core\\Cargo.toml (34 tests), and CARGO_TARGET_DIR=C:\\Users\\Meta\\.cargo-target-codex cargo test -p codex-core --lib proposal. git diff --check only reported expected CRLF warnings."} {"ts": "2026-04-25T02:52:15+00:00", "type": "verification", "status": "ok", "note": "Verified Compact-Rehydrate-Reorient-Continue continuity and source-grounded the current Epiphany algorithmic map against protocol state, session prompt/persistence/replay, app-server Epiphany handlers, CodexThread update/retrieve/index methods, and epiphany-core proposal/promotion/retrieval/prompt/rollout code. Patched the map to reflect ten live paths, current proposal.rs anchors, the explicit/auto-selected proposal branch, and the current non-flow that automatic Compact-Rehydrate-Reorient-Continue coordination is not yet a runtime scheduler."} {"ts": "2026-04-25T02:59:31+00:00", "type": "verification", "status": "ok", "note": "Full source-grounded audit of notes/epiphany-current-algorithmic-map.md cross-referenced each documented flow against protocol, core session state, prompt rendering, rollout replay, app-server hydration, retrieval/indexing, distillation, proposal, promotion, and update code. Stale semantic line anchors were corrected; the current typed spine is coherent, and the next Perfect Machine move remains richer map-delta judgment above the existing read-only proposal path rather than adding new writers, GUI, watchers, or specialist scheduling."} +{"ts": "2026-04-25T03:09:21+00:00", "type": "implementation", "status": "ok", "note": "Landed match-kind-aware map-delta judgment in epiphany-core proposal path. Read-only propose_map_update now carries an internal MapDeltaJudgment that distinguishes exact-ref refinements, same-path broadening, deterministic-node reuse, semantic unanchored-node reuse, and new candidate surfaces before setting graph freshness, churn warning, and diff_pressure; retrieval/distill/propose remain read-only."} +{"ts": "2026-04-25T03:09:25+00:00", "type": "verification", "status": "ok", "note": "Verified match-kind-aware proposal delta judgment with cargo fmt --manifest-path .\\epiphany-core\\Cargo.toml, targeted cargo test --manifest-path .\\epiphany-core\\Cargo.toml proposal::tests::propose_map_update (18 tests), and full cargo test --manifest-path .\\epiphany-core\\Cargo.toml (36 tests)."} diff --git a/state/map.yaml b/state/map.yaml index 5c47bd66..223a7d33 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -49,7 +49,7 @@ active_subgoals: - Keep the Phase 5 distill/propose/promote/update work aligned with reality in code and repo memory. - Keep vendored Codex as a thin typed host seam while Epiphany-owned prompt and retrieval/indexing logic live in the repo-owned `epiphany-core` crate. - Preserve exact/path lookup and BM25 fallback while the Qdrant path stays explicit and bounded. - - Harden the next layer above the landed typed distill/propose/promote/update paths: richer map-delta judgment beyond graph-node reuse, linked frontier focus, evidence-backed selection, selected-observation prioritization, strict unanchored-node semantic reuse, automatic bounded observation selection, and map-delta churn pressure while keeping verifier-backed acceptance/rejection explicit. + - Harden the next layer above the landed typed distill/propose/promote/update paths: richer typed observation distillation from real tool/model output and promotion policy over richer deltas, while keeping verifier-backed acceptance/rejection explicit and keeping retrieval/distill/propose read-only. accepted_design: - external typed state files @@ -102,7 +102,8 @@ accepted_design: - harden proposal selection and churn incrementally: `thread/epiphany/propose` should require selected verified observations to cite accepting `recent_evidence`, summarize the evidence-backed selection in the candidate observation/evidence, and derive `diff_pressure` from the candidate map delta, touched paths, selected observation count, and unresolved write risk instead of merely inheriting old churn - harden proposal graph semantics incrementally: `thread/epiphany/propose` should score selected observations/evidence, use the strongest selected signal for candidate wording, and reuse unanchored architecture graph nodes only through strict unique semantic overlap while refusing ambiguous semantic matches and keeping code-anchored nodes under concrete ref/path/id matching - harden proposal observation selection incrementally: when `observationIds` is omitted, read-only `thread/epiphany/propose` should choose a bounded coherent path cluster from existing verified, evidence-backed observations using source/evidence quality plus graph-frontier focus, without mutating state or bypassing promotion - - a full source-grounded audit of the Epiphany algorithmic map confirmed the current typed spine is coherent: protocol state, prompt rendering, rollout persistence, thread hydration, explicit retrieval/indexing, read-only distillation/proposal, verifier-backed promotion, and the single durable update writer all describe the current control flow; the next Perfect Machine move is richer evidence-backed map-delta judgment above proposal, not another writer or shiny surface + - a full source-grounded audit of the Epiphany algorithmic map confirmed the current typed spine is coherent: protocol state, prompt rendering, rollout persistence, thread hydration, explicit retrieval/indexing, read-only distillation/proposal, verifier-backed promotion, and the single durable update writer all describe the current control flow; the Perfect Machine pressure belongs above proposal/promotion, not in another writer or shiny surface + - harden proposal map-delta judgment incrementally: read-only `thread/epiphany/propose` should distinguish exact-ref refinement, same-path broadening, deterministic-node reuse, semantic unanchored-node reuse, and new candidate surfaces before setting graph freshness and `diff_pressure` rejected_paths: - name: pinned_map_only @@ -119,5 +120,5 @@ rejected_paths: reason: audited candidates were either terminal-only, stale/aspirational, or incoherent wrappers; the comparison clones were removed from vendor to avoid building on untrusted drift current_status: - summary: Workspace initialized with protocol files, typed state, handoff notes, architecture maps, and a rolling implementation plan against vendored Codex. Phase 1 durable state, Phase 2 prompt integration, the minimal Phase 3 typed read surface, and Phase 4 retrieval/indexing/core-extraction are landed on `main`. Phase 5 semantic distillation/promotion/proposal is now active: the current baseline includes explicit Qdrant indexing with BM25 fallback, typed `thread/epiphany/update`, read-only `thread/epiphany/distill`, read-only `thread/epiphany/propose`, verifier-backed `thread/epiphany/promote`, structural map/churn promotion validation, graph-node reuse, linked frontier focus, evidence-backed proposal selection, selected-observation prioritization, strict unanchored-node semantic reuse, automatic bounded observation selection, map-delta churn pressure in `epiphany-core`, and thin vendored Codex host seams. The Windows app-server stack-pressure regression was narrowed to test-thread stack size; repo-local Cargo config sets `RUST_MIN_STACK=67108864`, and boxed-future request-dispatch experiments were removed after config-only verification passed. The repo also has source-available/commercial licensing plus a CLA gate for external contributions. - next_action: Continue Phase 5 by hardening the layer above `thread/epiphany/distill`, `thread/epiphany/propose`, `thread/epiphany/promote`, and `thread/epiphany/update`: richer map-delta judgment beyond current exact-ref/same-path/deterministic-id/graph-link/recent-evidence/semantic-unanchored-node matching, selected-observation prioritization, automatic bounded observation selection, and map-delta churn pressure, while keeping retrieval/distillation/proposal read-only and avoiding watcher, GUI, or specialist-agent machinery. + summary: Workspace initialized with protocol files, typed state, handoff notes, architecture maps, and a rolling implementation plan against vendored Codex. Phase 1 durable state, Phase 2 prompt integration, the minimal Phase 3 typed read surface, and Phase 4 retrieval/indexing/core-extraction are landed on `main`. Phase 5 semantic distillation/promotion/proposal is now active: the current baseline includes explicit Qdrant indexing with BM25 fallback, typed `thread/epiphany/update`, read-only `thread/epiphany/distill`, read-only `thread/epiphany/propose`, verifier-backed `thread/epiphany/promote`, structural map/churn promotion validation, graph-node reuse, linked frontier focus, evidence-backed proposal selection, selected-observation prioritization, strict unanchored-node semantic reuse, automatic bounded observation selection, match-kind-aware map-delta churn pressure in `epiphany-core`, and thin vendored Codex host seams. The Windows app-server stack-pressure regression was narrowed to test-thread stack size; repo-local Cargo config sets `RUST_MIN_STACK=67108864`, and boxed-future request-dispatch experiments were removed after config-only verification passed. The repo also has source-available/commercial licensing plus a CLA gate for external contributions. + next_action: Continue Phase 5 by hardening the layer above `thread/epiphany/distill`, `thread/epiphany/propose`, `thread/epiphany/promote`, and `thread/epiphany/update`: richer typed observation distillation from real tool/model output and promotion policy that can reason over richer deltas, while keeping retrieval/distillation/proposal read-only and avoiding watcher, GUI, or specialist-agent machinery.