core/evals/l10_continuity
Shay 103def317d feat(engine-state): generation-dir atomic checkpoint (ADR-0219)
Closes the cross-file checkpoint-atomicity gap in ADR-0156.  The four
checkpoint files now live in a committed gen-NNNN/ directory; the single
atomic os.replace of a 'current' pointer file is the commit boundary.
A kill before the pointer swap leaves the prior committed generation
intact; a kill after commits the new generation.  Unreferenced gen dirs
are ignored.  ADR-0156's deferred parent-dir fsync is also closed.

Key changes:
- engine_state/__init__.py: begin_generation() + commit_generation() +
  _resolve_dir() for all load_* methods.  Flat-layout legacy checkpoints
  migrate into gen-0000 on first begin_generation call.  GC retains K=2
  committed generations.
- chat/runtime.py: checkpoint_engine_state uses the two-phase commit;
  finalize_turn_trace_hash no longer writes discovery_candidates outside
  the generation sequence (the second unguarded write path is closed).
- evals/l10_continuity/runner.py: _inject_orphan_tmp updated to inject
  the two orphan shapes of the generation model.
- tests/test_adr_0219_generation_checkpoint.py: 18 tests, one per
  acceptance-gate bullet + biting mutation variant each.

L10 lane: all_gates_pass=true; versor_condition<1e-6 throughout.
Smoke: 95 passed. Runtime: 20 passed.
2026-06-15 02:01:52 -07:00
..
__init__.py feat(evals): L10 continuity spike — falsifiable long-horizon soak lane 2026-06-05 11:14:17 -07:00
__main__.py feat(evals): L10 continuity spike — falsifiable long-horizon soak lane 2026-06-05 11:14:17 -07:00
contract.md feat(persistence): Shape B+ Phase D+E — opt-in lived-state persistence; reboot transparent 2026-06-05 13:17:30 -07:00
corpus.py feat(evals): L10 continuity spike — falsifiable long-horizon soak lane 2026-06-05 11:14:17 -07:00
predicates.py feat(persistence): Shape B+ Phase D+E — opt-in lived-state persistence; reboot transparent 2026-06-05 13:17:30 -07:00
report.py feat(evals): L10 continuity spike — falsifiable long-horizon soak lane 2026-06-05 11:14:17 -07:00
runner.py feat(engine-state): generation-dir atomic checkpoint (ADR-0219) 2026-06-15 02:01:52 -07:00