Document compact rehydrate continue cycle

This commit is contained in:
Meta Vens 2026-04-24 18:52:16 +01:00
commit 8a0c305f88
3 changed files with 30 additions and 0 deletions

View file

@ -89,6 +89,34 @@ Current controller actions:
- `backtrack`
- `speak`
## Compact-Rehydrate-Continue Cycle
Compaction is not an implementation accident. In Epiphany it is an explicit architectural state transition:
```text
compact -> rehydrate -> continue
```
The purpose is to make context loss survivable without pretending nothing happened. The harness should checkpoint what matters before memory pressure becomes a blackout, then restart from durable state instead of transcript archaeology.
Before compacting, Epiphany should persist:
- the current objective and active subgoal
- the latest stable map/frontier/checkpoint
- accepted evidence and rejected paths since the last checkpoint
- open questions, blockers, and next action
- verification status for the current slice
After rehydrating, Epiphany should:
- reread canonical state instead of trusting residue in the prompt
- restore the active subgoal and map frontier
- restate the next action from persisted state
- continue with one bounded move
- avoid broad implementation until the current mechanism is understood again
This cycle is the harness admitting the model is not a magic continuous mind. A compacted agent wakes up from durable structure, not vibes in a trench coat.
## Evaluation Shape
Compare four conditions:

View file

@ -88,3 +88,4 @@
{"ts": "2026-04-24T17:27:48+00:00", "type": "verification", "status": "ok", "note": "Verified the promotion slice with cargo test --manifest-path .\\epiphany-core\\Cargo.toml promotion, cargo test -p codex-core --lib promotion, cargo test -p codex-app-server-protocol --lib thread_epiphany_, cargo test -p codex-app-server --lib thread_epiphany, regenerated stable app-server protocol fixtures, ran full cargo test -p codex-app-server-protocol, and built codex-app-server.exe."}
{"ts": "2026-04-24T17:27:49+00:00", "type": "verification", "status": "ok", "note": "Live app-server stdio smoke verified thread/epiphany/promote. Distilled a promotion smoke patch in ephemeral loaded thread 019dc087-6d3d-7323-9a2f-2487a591ef7a, rejected failed verifier evidence with no state mutation, then accepted ok verifier evidence, promoted through the durable update path to revision 1, and thread/read returned observation obs-77248505f492 plus evidence ev-77248505f492 and ev-promote-smoke-verifier. Smoke result is .epiphany-smoke/promote-smoke-result.json."}
{"ts": "2026-04-24T17:49:26+00:00", "type": "implementation", "status": "ok", "note": "Updated notes/epiphany-current-algorithmic-map.md for the landed thread/epiphany/promote flow. The current model now includes promote as a verifier-backed gate between distill proposals and the durable update path, with source-grounded refs to app-server protocol DTOs, app-server routing/handler code, and epiphany-core promotion policy evaluation."}
{"ts": "2026-04-24T17:52:09+00:00", "type": "decision", "status": "ok", "note": "Documented compact-rehydrate-continue as an explicit Epiphany architecture primitive. The cycle is: compact from a checkpoint when possible, rehydrate from canonical map/handoff/evidence rather than prompt residue, restate the persisted next action, and continue with one bounded move."}

View file

@ -69,6 +69,7 @@ accepted_design:
- insert a structured observation layer between raw tool output and durable Epiphany state so evidence, invalidation, and graph updates are promoted from typed distillation rather than transcript osmosis
- design Epiphany as GUI-first rather than transcript-first: the primary artifact is typed thread state, chat is one client of that state, user steering should go through typed updates, and long-running retrieval/remap/verification work should surface as explicit observable jobs
- treat compaction as a role-specific state transition with safe points, explicit checkpoints, and resume packets; workers may compact aggressively between implementation passes, while mapper, verifier, and coordinator preserve different state at different boundaries
- make the compact-rehydrate-continue cycle an explicit Epiphany architecture primitive: compact only from a checkpoint when possible, rehydrate from canonical map/handoff/evidence, restate the persisted next action, then continue with one bounded move
- preserve handoff context in repo-local AGENTS and notes files
- keep a durable repository-level algorithmic map of vendored Codex so GUI and Epiphany changes hook into the existing app-server/core boundary instead of reimplementing the turn loop
- keep a dedicated Epiphany algorithmic map that documents the currently landed fork architecture separately from the full Codex machine map and the future-facing harness spec