This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
The project target is now the vendored Codex core harness itself, not a sidecar wrapper first and not some random GitHub "OpenCodex" contraption held together with hope and string.
-`epiphany-core/` is now a sibling repo-owned crate that holds the bulk of the Epiphany prompt, rollout replay, and retrieval/indexing logic instead of leaving that whole organ smeared through vendored Codex
Phase 4 repo-local hybrid retrieval is now landed on `main`. The first retrieval anchor is `360dfea`; the current pushed baseline is `80c29e0`, which also includes explicit Qdrant indexing, the `epiphany-core` extraction, and licensing guardrails. This is no longer a vague scaffold, a maybe, or a working-tree-only event.
- manifest-backed Qdrant semantic persistence under `codex_home`
- local Ollama embeddings by default
- stale/fresh retrieval summaries
- read-only `thread/epiphany/retrieve` with BM25 fallback still intact
- repo-owned `epiphany-core` extraction for the heavy prompt/replay/retrieval organ, leaving vendored Codex with thin adapters plus the typed host seam
- 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`
- 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
- retrieval remains read-only and indexing remains the only persistent semantic write path
Live smoke for that follow-up:
- rebuilt `codex-app-server.exe`
- initialized app-server stdio with `experimentalApi: true`
- started ephemeral loaded thread `019dbffc-c19a-75e0-bf35-c780bee59a68` rooted at `E:\Projects\EpiphanyAgent\epiphany-core`
- called `thread/epiphany/update` with `expectedRevision: 0`
- response revision was `1`
-`thread/read` returned `epiphanyState.revision == 1`, objective `Smoke-test explicit Epiphany update persistence`, observation `obs-update-smoke`, and evidence `ev-update-smoke`
- smoke result lives at `.epiphany-smoke/update-smoke-result.json`
- wire-shape footgun: app-server envelope fields are camelCase, but nested reused Epiphany core DTOs currently serialize with their core snake_case field names
Live smoke for the distillation follow-up:
- rebuilt `codex-app-server.exe`
- initialized app-server stdio with `experimentalApi: true`
- started ephemeral loaded thread `019dc028-99ce-7b03-8f89-65b072cc2cca` rooted at `E:\Projects\EpiphanyAgent\epiphany-core`
- called `thread/epiphany/distill` with `sourceKind: smoke`, `status: ok`, subject `thread/epiphany/distill`, text, and a code ref to `src/distillation.rs`
- distill returned `expectedRevision: 0` plus observation `obs-c9bfcac23d66` and evidence `ev-c9bfcac23d66` in a patch
- passing that patch to `thread/epiphany/update` advanced state to revision `1`
-`thread/read` returned the generated observation/evidence ids in `epiphanyState`
- smoke result lives at `.epiphany-smoke/distill-smoke-result.json`
Live smoke for the promotion follow-up:
- rebuilt `codex-app-server.exe`
- initialized app-server stdio with `experimentalApi: true`
- started ephemeral loaded thread `019dc087-6d3d-7323-9a2f-2487a591ef7a` rooted at `E:\Projects\EpiphanyAgent\epiphany-core`
- distilled a promotion smoke patch
-`thread/epiphany/promote` rejected failed verifier evidence with `accepted: false`, a rejection reason, and no `epiphanyState`
-`thread/read` after rejection had no Epiphany state, proving rejection did not mutate state
-`thread/epiphany/promote` accepted verifier evidence with status `ok`, appended verifier evidence, and applied through the durable update path
-`thread/read` returned revision `1`, observation `obs-77248505f492`, patch evidence `ev-77248505f492`, and verifier evidence `ev-promote-smoke-verifier`
- smoke result lives at `.epiphany-smoke/promote-smoke-result.json`
Live smoke after the pushed baseline:
- built `codex-app-server.exe` with `CARGO_TARGET_DIR=C:\Users\Meta\.cargo-target-codex`
- used an isolated `CODEX_HOME` at `.epiphany-smoke/codex-home`
- started an ephemeral loaded app-server thread rooted at `E:\Projects\EpiphanyAgent\epiphany-core`
- preflighted the bounded smoke corpus as 5 tracked files / 106,748 bytes
-`thread/epiphany/index` against real local Qdrant/Ollama returned ready state with 5 indexed files and 198 chunks
- Qdrant collection `epiphany_workspace_fa24bab116f8d229` was created
-`thread/epiphany/retrieve` returned persistent semantic chunks from `src/prompt.rs`, proving the fresh Qdrant path works after explicit indexing
- env/default backend config is good enough for the current slice; do not build a first-class config surface yet unless a real operator pain appears
- unrelated app-server startup noise showed up during the smoke: project trust warning, plugin sync 403, and unauthenticated OpenAI websocket warning
-`thread/epiphany/distill` is the first read-only proposal surface; it returns an `expectedRevision` plus a patch and requires explicit promotion through `thread/epiphany/update`
-`thread/epiphany/promote` is the first explicit promotion gate; it rejects failed verifier evidence without mutation and applies accepted candidates through the update path
-`thread/epiphany/promote` now has a first richer map/churn safety layer: state replacement patches must carry explicit observations and patch evidence, and subgoal/invariant/graph/frontier/checkpoint/churn structure is validated before the durable update path is called
-`thread/epiphany/update` is the first explicit durable Epiphany state write surface; it rejects empty patches, supports optional revision matching, appends observations/evidence, replaces bounded typed fields, increments state revision, and persists immediately
- live hydrated `thread.epiphanyState` reads now backfill a lightweight retrieval summary when the thread already has Epiphany state but no persisted retrieval summary yet
- basic protocol/core/app-server unit tests were added for the new types and mapping layer
- Qdrant-backed semantic indexing behind an explicit write path instead of hidden retrieval mutation
- manifest-backed freshness checking under `codex_home`
- local Ollama embeddings by default, with support for adjacent VoidBot-style env names as fallbacks
- persistent semantic retrieval preference when the index is fresh, and BM25 fallback when it is stale, missing, or unavailable
- modified Codex alone is no longer the whole Epiphany organ; the heavier implementation now lives in the sibling crate and vendored Codex mostly hosts typed seams and adapters
- existing exact/path lookup substrate already exists through `codex_file_search`
- app-server fuzzy search currently uses it in `vendor/codex/codex-rs/app-server/src/fuzzy_file_search.rs`
-`codex-core` already depends on `bm25`
-`vendor/codex/codex-rs/core/src/tools/handlers/tool_search.rs` already shows how BM25 is used in-tree
- tracked corpus preflight for `vendor/codex/codex-rs` at `vendor/codex` HEAD `d45ab10` is `3642` files / `31.09 MB`
- raw working-tree size under `codex-rs` is polluted by build artifacts and should not be used as the retrieval corpus estimate
Recovered bounded design decision:
- the first Phase 4 slice should be a query-time hybrid retriever
- reuse `codex_file_search` for exact/path-ish lookup
- use workspace-local BM25 chunk search as the initial semantic backend
- keep the first slice loaded-thread-only and read-only
- defer embeddings, vector stores, persistent indexing, and watcher-driven invalidation for later slices
Updated follow-up direction:
- the verified BM25 slice is still the right first landing zone
- the first persistent semantic store after that should target Qdrant rather than another blob-thrashing JSON/Postgres embedding store
- Qdrant should be the preferred persistent semantic backend later, not a hard requirement for basic Epiphany use
- exact/path lookup stays first-class
- BM25 should stay around as bootstrap/fallback/control for users who do not want Qdrant or when Qdrant is unavailable instead of turning the machine into vector-only confidence soup
The Phase 2 prompt-integration slice was originally implemented inside vendored Codex and now renders through the repo-owned prompt crate with a thin wrapper in `codex-core`:
Use it when you need the answer to "what machine is current Epiphany, as a fork, actually running right now?" without rereading the whole Codex machine map plus the whole future-facing spec.
- Phase 3 means clients can now **read** typed Epiphany state directly from hydrated `Thread` payloads:
-`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
- there are still no dedicated Epiphany update RPCs or live `thread/epiphany/*` notifications
-`cargo test -p codex-core -p codex-app-server-protocol -p codex-app-server -p codex-analytics -p codex-exec -p codex-tui --lib --no-run` passed after the new `Thread.epiphanyState` field fallout was patched
- targeted Phase 3 tests passed:
-`cargo test -p codex-core --lib latest_epiphany_state_from_rollout_items`
-`cargo test -p codex-app-server --lib load_epiphany_state_from_rollout_path_reads_latest_snapshot`
-`cargo test -p codex-app-server-protocol --lib serialize_client_response`
-`cargo fmt --all` passed for the Phase 4 retrieval slice
-`cargo test -p codex-core -p codex-app-server-protocol -p codex-app-server --lib --no-run` passed for the Phase 4 retrieval slice when `CARGO_TARGET_DIR=C:\Users\Meta\.cargo-target-codex`
- targeted Phase 4 tests passed:
-`cargo test -p codex-core --lib retrieve_workspace_`
-`cargo test -p codex-app-server-protocol --lib thread_epiphany_retrieve`
-`cargo test -p codex-app-server --lib map_epiphany_retrieve_response_preserves_summary_and_results`
- full `cargo test -p codex-app-server-protocol` passed after restoring stable schema fixtures
- after tracing the stack overflow from the richer promotion slice, full `cargo test -p codex-app-server --lib` now passes 232/232 with `CARGO_TARGET_DIR=C:\Users\Meta\.cargo-target-codex` and repo-local Cargo config supplying `RUST_MIN_STACK=67108864`
Without that, you get to learn about `symlink_dir failed: ... A required privilege is not held by the client`, which is not the kind of enlightenment we were after.
Do not restart verification from superstition. The current Phase 4 retrieval/indexing/core-extraction baseline is already verified, committed, and pushed.
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.
Phase 1, Phase 2, and a minimal Phase 3 typed read surface are landed and verified. `vendor/codex` is first-class in the parent repo now. The next clean move is repo-local hybrid retrieval, not GUI paint and not another architectural detour. Also: pre-compaction persistence is now an explicit design rule, not a lucky habit.