Correct Epiphany phase memory

This commit is contained in:
Meta Vens 2026-04-24 21:02:56 +01:00
commit 8011abd4da
6 changed files with 25 additions and 17 deletions

View file

@ -25,10 +25,12 @@ What is already landed across vendored Codex and `epiphany-core`:
- Phase 2 prompt integration
- a minimal Phase 3 typed app-server/client read surface via `Thread.epiphanyState`
- Phase 4 hybrid retrieval/indexing with explicit Qdrant-backed indexing and BM25 fallback
- Phase 5 typed state update, read-only distillation, verifier-backed promotion, and structural map/churn promotion validation
Current next phase:
Current phase:
- live-smoke the explicit indexing path against the local Qdrant/Ollama services
- Phase 5 semantic distillation and promotion is active.
- Next bounded move: build richer observation-to-map/churn proposal machinery above `thread/epiphany/distill`, `thread/epiphany/promote`, and `thread/epiphany/update`, while keeping retrieval/distillation read-only and avoiding watcher, GUI, or specialist-agent machinery.
## Important Paths

View file

@ -2,7 +2,7 @@
## Status
Updated on 2026-04-24 after landing the Phase 4 retrieval/indexing/core-extraction baseline on `main`.
Updated on 2026-04-24 after landing the Phase 4 retrieval/indexing/core-extraction baseline and moving into Phase 5 semantic distillation/promotion on `main`.
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.
@ -15,6 +15,7 @@ This note tracks Epiphany as a fork of Codex with an opinionated modeling archit
- a first typed state-update slice that adds explicit loaded-thread-only `thread/epiphany/update`, appends observations/evidence, replaces bounded map/scratch/churn fields, bumps the state revision, and persists an immediate rollout `EpiphanyState` snapshot
- a first typed distillation/proposal slice that adds read-only loaded-thread-only `thread/epiphany/distill`, producing deterministic observation/evidence patches for explicit promotion through `thread/epiphany/update`
- a first richer promotion-policy slice that treats map/churn/frontier/checkpoint replacements as higher-risk state edits: accepted promotions must be tied to explicit observations and patch evidence, and structural graph/churn mistakes are rejected before the durable update path
- 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, or make promotion notice broken map/churn replacements. Those parts are landed. The next job is to keep the landing zone honest: do not casually turn `thread/epiphany/retrieve` or `thread/epiphany/distill` 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.
@ -266,13 +267,13 @@ Add tests for:
## Immediate Next Step
Treat the current retrieval baseline, explicit indexing follow-up, explicit update path, and first distillation proposal path as real and live-smoked. The next machine gap is no longer "can Epiphany retrieve code?" or "can it propose one durable observation patch?" It can. The next gap is "can Epiphany decide which observations deserve promotion, and what map/churn edits they imply?"
Treat the current retrieval baseline and explicit indexing follow-up as landed Phase 4. Treat the explicit update path, distillation proposal path, verifier-backed promotion gate, and structural map/churn promotion validation as the active Phase 5 baseline. The next machine gap is no longer "can Epiphany retrieve code?" or "can it propose one durable observation patch?" It can. The next gap is "can Epiphany decide which observations deserve promotion, and what map/churn edits they imply?"
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
3. keep the new `epiphany-core` boundary honest instead of letting vendored Codex re-accumulate the heavy implementation
4. do not add durable retrieval-summary writes from `thread/epiphany/retrieve` without a clean out-of-band rollout/update semantic
5. build the next layer above the landed distill/update/promote surfaces:
5. continue Phase 5 by building the next layer above the landed distill/update/promote surfaces:
- richer typed observation distillation from tool/model outputs
- promotion policy beyond structural validation, but only when it can stay evidence-backed
- verifier-backed acceptance/rejection evidence

View file

@ -345,12 +345,15 @@ If a future session wakes up from compaction and starts bluffing, this is the pa
- `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, `thread/unarchive`, and detached review-thread startup can carry `thread.epiphanyState` when present
- loaded threads use live state
- stored thread reads reconstruct from rollout with the same rollback/compaction semantics as core
- later slices added dedicated experimental `thread/epiphany/update`, `thread/epiphany/distill`, `thread/epiphany/promote`, `thread/epiphany/retrieve`, and `thread/epiphany/index`; there is still no live `thread/epiphany/*` notification stream
- The next phase is **not** GUI work.
- The current landed phase is **Phase 4 repo-local retrieval/indexing**:
- Phase 4 repo-local retrieval/indexing is landed:
- Epiphany now has a real typed repo retrieval subsystem instead of repeated file-by-file shell archaeology
- persistent semantic indexing now exists behind explicit `thread/epiphany/index`
- the next bounded follow-up is live smoke and operational polish, not proving the retriever exists again
- 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`
- the next bounded follow-up is richer observation-to-map/churn proposal machinery, 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`:
- prompt rendering, rollout replay, and retrieval/indexing logic are now repo-owned
- vendored Codex keeps the typed protocol/thread/app-server seam plus thin adapters
@ -443,16 +446,16 @@ Without that, you get to learn about `symlink_dir failed: ... A required privile
## Recommended Next Implementation
Do not restart verification from superstition. The current Phase 4 retrieval/indexing/core-extraction baseline is already verified, committed, and pushed.
Do not restart verification from superstition. Phase 4 retrieval/indexing/core-extraction is already verified, committed, and pushed. Phase 5 distill/promote/update and the first structural promotion safety layer 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 first distill/promote/update path is live-smoked, and promotion now has a first structural map/churn safety layer. The next clean move is richer observation-to-map proposal machinery, not pretending the already-shipped slices still need ceremony.
Current next implementation move:
Current Phase 5 implementation move:
1. treat the live-smoked retrieval/indexing baseline, typed update surface, typed distill proposal surface, and typed promote gate as real
1. treat the live-smoked retrieval/indexing baseline as Phase 4 and the typed update/distill/promote surfaces as the active Phase 5 baseline
2. keep the current env/default Qdrant/Ollama config surface for now
3. keep `thread/epiphany/retrieve` and `thread/epiphany/distill` read-only
4. build the next layer above the distill/promote/update surfaces:
4. continue Phase 5 by building the next layer above the distill/promote/update surfaces:
- richer map/churn patch generation from verified observations
- promotion policy beyond structural validation only when the evidence path stays explicit
- verifier-backed acceptance/rejection evidence

View file

@ -97,3 +97,4 @@
{"ts": "2026-04-24T19:30:07+00:00", "type": "decision", "status": "ok", "note": "Persisted anti-cruft regression discipline: when a change is made to fix a regression or move a benchmark and it does not fix that regression or move that benchmark, immediately revert it before trying the next hypothesis. Failed hypotheses are not souvenirs; record the rejected path only when the lesson matters."}
{"ts": "2026-04-24T19:38:51+00:00", "type": "implementation", "status": "ok", "note": "Moved the anti-Jenga regression/benchmark discipline from repo prose into runtime Epiphany prompt pressure. epiphany-core::render_epiphany_state now renders an Operating Discipline section in the developer-state block: one measured hypothesis at a time, revert failed regression/benchmark fixes before the next hypothesis, and stop when diff grows while understanding shrinks. Verified with epiphany-core tests and codex-core epiphany tests."}
{"ts": "2026-04-24T19:48:44+00:00", "type": "documentation", "status": "ok", "note": "Source-grounded pass over notes/epiphany-current-algorithmic-map.md. Re-read protocol state, session resume/prompt/persistence, app-server thread hydration and Epiphany RPC handlers, CodexThread update/retrieval host methods, and epiphany-core prompt/rollout/retrieval/distillation/promotion code. Updated the map to include the runtime anti-Jenga operating-discipline prompt section, removed the stale no-update-surface invariant, refreshed moved code anchors, corrected the handoff's outdated Phase 3 no-update-RPC note, and mechanically checked 98 local map links with line anchors."}
{"ts": "2026-04-24T21:02:31+01:00", "type": "documentation", "status": "ok", "note": "Corrected persisted phase memory after rechecking the harness roadmap and evidence log. Phase 4 is the landed retrieval/indexing/core-extraction baseline; Phase 5 is the current semantic distillation/promotion/proposal phase. Updated AGENTS.md, state/map.yaml, state/scratch.md, notes/fresh-workspace-handoff.md, and notes/epiphany-fork-implementation-plan.md so rehydrate/status no longer imply the current work is still a Phase 4 tail or a Qdrant live-smoke follow-up."}

View file

@ -46,7 +46,7 @@ data_flow:
- commit or backtrack
active_subgoals:
- Keep the extracted Phase 4 persistent-semantic follow-up aligned with reality in both code and repo memory.
- Keep the Phase 5 semantic distillation/promotion/proposal 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.
- Build the next layer above the landed typed distill/promote/update paths: richer observation-to-map proposal machinery while keeping verifier-backed acceptance/rejection explicit.
@ -113,5 +113,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`. The current baseline includes explicit Qdrant indexing with BM25 fallback, typed `thread/epiphany/update`, read-only `thread/epiphany/distill`, verifier-backed `thread/epiphany/promote`, structural map/churn promotion validation 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: Build the next bounded layer above `thread/epiphany/distill`, `thread/epiphany/promote`, and `thread/epiphany/update`: richer observation-to-map proposal machinery from verified observations, while keeping retrieval and distillation 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 and promotion is now active: the current baseline includes explicit Qdrant indexing with BM25 fallback, typed `thread/epiphany/update`, read-only `thread/epiphany/distill`, verifier-backed `thread/epiphany/promote`, structural map/churn promotion validation 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 building the next bounded layer above `thread/epiphany/distill`, `thread/epiphany/promote`, and `thread/epiphany/update`: richer observation-to-map/churn proposal machinery from verified observations, while keeping retrieval and distillation read-only and avoiding watcher, GUI, or specialist-agent machinery.

View file

@ -4,10 +4,11 @@ This file is intentionally disposable.
## Current Subgoal
- Move from structural map/churn promotion validation toward richer observation-to-map proposal machinery without hidden writes.
- Continue Phase 5 by moving from structural map/churn promotion validation toward richer observation-to-map/churn proposal machinery without hidden writes.
## Working Notes
- Phase 4 is landed retrieval/indexing/core-extraction. Phase 5 is the current semantic distillation/promotion/proposal phase.
- The Phase 4 retrieval/indexing/core-extraction anchor is `80c29e0` on `main`. The older `360dfea` commit is only the first hybrid retrieval anchor, and later `main` also includes the typed update/distill/promote surfaces, promotion safety layer, and app-server stack-pressure fix.
- The extraction boundary is now the important truth:
- `epiphany-core/src/retrieval.rs` owns the heavy hybrid retrieval/indexing engine