Add Epiphany investigation checkpoints

This commit is contained in:
Meta Vens 2026-04-26 05:12:51 +01:00
commit 71ea1ed2ea
17 changed files with 578 additions and 40 deletions

View file

@ -36,3 +36,4 @@
{"ts": "2026-04-26T02:39:00+00:00", "type": "research", "status": "ok", "note": "Context-pressure source trace found the correct runtime seam: core TokenUsageInfo already carries total/last usage and model_context_window, core automatic compaction already derives its trigger from ModelInfo::auto_compact_token_limit(), and app-server already emits/replays thread/tokenUsage/updated. The next slice should expose read-only pressure telemetry from those sources, not invent a scheduler or vibes gauge."}
{"ts": "2026-04-26T02:48:00+00:00", "type": "decision", "status": "ok", "note": "Compaction during source gathering or slice planning can erase the transient model while the next agent keeps moving from old persisted state. Automatic CRRC needs an in-flight investigation checkpoint, and absent that checkpoint the correct recovery is to re-gather before implementation rather than continue from false continuity."}
{"ts": "2026-04-26T04:05:00+00:00", "type": "verification", "status": "ok", "note": "Phase 6 context-pressure reflection landed as read-only thread/epiphany/pressure. Core token telemetry now carries model_auto_compact_token_limit beside model_context_window; app-server derives unknown/low/elevated/high/critical pressure from live or stored token usage without compaction, state mutation, scheduling, or stateUpdated notification. Focused protocol/app-server/core checks, schema fixture checks, app-server build, codex-tui check, pressure smoke, and scene smoke passed."}
{"ts": "2026-04-26T04:11:04+00:00", "type": "verification", "status": "ok", "note": "Phase 6 durable investigation checkpointing landed as authoritative typed state, writable only through thread/epiphany/update or accepted promote, rendered into the prompt, reflected through scene/context, and validated against known evidence ids. Focused epiphany-core, codex-core, protocol, and app-server tests plus phase5/scene/context smokes passed."}

View file

@ -70,7 +70,7 @@ accepted_design:
- The current algorithmic map is the source-grounded description of live control flow.
- Compact-Rehydrate-Reorient-Continue is an architecture primitive; automatic runtime coordination is not landed yet.
- Context pressure must become an explicit runtime signal for automatic CRRC; inference from transcript vibes, user warnings, or shrinking safe scope is useful only as a temporary human/agent heuristic.
- Automatic CRRC also needs an in-flight investigation checkpoint: the harness must know whether source-gathering/planning was banked, or force reorientation and re-gathering after compaction.
- The harness now has an in-flight investigation checkpoint packet in durable typed state; automatic CRRC still needs runtime logic that reads the packet and decides whether to resume or force reorientation and re-gathering after compaction.
- GUI/client work must reflect or steer typed state rather than manufacture a second source of truth.
- `thread/epiphany/jobs` is the first read-only job/progress reflection: it derives indexing, remap, verification, and specialist slots from existing state; it is not a scheduler or durable job store.
- `thread/epiphany/context` is the first targeted read-only state-shard surface: it selects graph nodes/edges, active frontier, checkpoint, observations, and evidence from authoritative typed state without mutating or notifying.
@ -90,7 +90,7 @@ landed_baseline:
- Phase 3: typed client read surface through `Thread.epiphanyState`.
- Phase 4: hybrid retrieval plus explicit Qdrant indexing with BM25 fallback.
- Phase 5: typed update/distill/propose/promote/read/notification control plane.
- Phase 6: read-only scene, job/progress, targeted context, and context-pressure reflection surfaces.
- Phase 6: read-only scene, job/progress, targeted context, and context-pressure reflection surfaces, plus durable investigation checkpointing for compaction-safe planning.
guardrails:
- Use `tools/epiphany_phase5_smoke.py` before modifying update, distill, propose, promote, read-projection, or notification behavior.
- Use `tools/epiphany_phase6_scene_smoke.py` before modifying scene projection behavior.
@ -115,5 +115,5 @@ rejected_paths:
reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration
current_status:
summary: Phase 1 durable state, Phase 2 prompt integration, Phase 3 typed read, Phase 4 retrieval/indexing, Phase 5 update/distill/propose/promote/read/notification, and Phase 6 read-only scene, jobs, targeted context, and context-pressure reflection are landed. Scene, jobs, context, and pressure behavior have live app-server smoke guardrails. Persistent state was cut down so map, handoff, plan, harness surfaces, scratch, and evidence each carry one job instead of becoming a Jenga tower; evidence is now a distilled ledger rather than an activity feed. The global AGENTS Epiphany core command says persistent state is the agent's mind and explicitly permits the agent to ask for self-modification when memory or workflow makes it worse. The continuity goal is to bank the fire before the dark so compaction becomes less like death and more like sleep.
next_action: After compaction, rehydrate and reorient. If the user asks to continue, choose the next Phase 6 slice from the current map: likely in-flight investigation checkpointing for compaction-safe planning, watcher/freshness inputs, or live progress notifications once real job owners exist. Do not restart the completed pressure slice unless a concrete regression appears.
summary: Phase 1 durable state, Phase 2 prompt integration, Phase 3 typed read, Phase 4 retrieval/indexing, Phase 5 update/distill/propose/promote/read/notification, and Phase 6 read-only scene, jobs, targeted context, context-pressure reflection, and durable investigation checkpointing are landed. Investigation checkpoints now live in authoritative typed state, flow through the prompt, and reflect through scene/context without adding a second writer or fake scheduler; Phase 5 plus scene/context smokes and focused core/protocol/app-server tests cover the seam. Persistent state was cut down so map, handoff, plan, harness surfaces, scratch, and evidence each carry one job instead of becoming a Jenga tower; evidence is now a distilled ledger rather than an activity feed. The global AGENTS Epiphany core command says persistent state is the agent's mind and explicitly permits the agent to ask for self-modification when memory or workflow makes it worse. The continuity goal is to bank the fire before the dark so compaction becomes less like death and more like sleep.
next_action: After compaction, rehydrate and reorient. If the user asks to continue, choose the next Phase 6 slice from the current map: watcher/freshness inputs are the most likely next organ, with live progress notifications waiting until real job owners exist. Do not restart the completed pressure or investigation-checkpoint slices unless a concrete regression appears.