Repository navigation
A restart continues a mind's prompt-capture segment instead of rolling it away - #5428
Conversation
…g it away Store::open rotated on every open, so each core restart moved the current segment to .prev and deleted the older one: the M5's eight restarts on 2026-10-25 left 4-8 acts per resident, too few for the replay validator (Aiko's 43-act morning was gone). Open now resumes a whole current segment with room (same generation, every row readable); any integrity issue, a full segment or none rotates exactly as before. Bounds unchanged (two segments). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… (the restart contract, test updated) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Cormac on 9e800d8: no blocking findings; my exact-head PASS waits on CI. Why it's safe to resume: Nonblocking: cross-process exclusivity. |
…dows it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Cormac: PASS at exactly 731f6f4.
|
…refill priced, policies compared (#5432) * The replay arena: real results restored, her re-reads counted, prefill priced, policies compared on one line each The captures hold what was sent, so a result canary collapsed had no body and a policy that would have kept it could not be judged. The arena (examples/replay/arena.rs) restores each result's whole text from the request where it was the pinned newest result, gives it its summary level (continuum_context::levels), counts her re-reads of a file read before and whether the policy's previous prompt still held it (whole or outline), and prices fresh prefill at a measured rate. `--arena <prefill tok/s>` runs the core's rule at growing shares 1/2, 1/3, 1/4, 1/6. First run (the M5's captures, 12 residents, 86 acts, 150 tok/s, 2026-10-25): prefill 54.5 / 51.0 / 49.5 / 47.2 s per act, turnovers 20 / 19 / 18 / 16; re-reads 8, of which 5 had the earlier read still in her prompt under every share. Thin: restarts had rotated the captures (#5428 keeps them). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Rename the replay arena to the context validator (--validate): an arena is a place residents go Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * validate: the missing-argument message names --validate Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * validate: --reply replays with another reply reserve On the M5's captures (13 residents, 143 acts, 150 tok/s, 2026-10-25), with completions measured at p50 16 / p95 447 / p99 1,078 / max 7,026 tokens against a 12,288 reserve: reply 12,288 at share 1/2 (today) prefills 58.8 s/act and holds the earlier read for 9 of 15 re-reads; reply 4,096 at share 1/6 prefills 54.4 s/act and holds 13 of 15. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * validate: the act is the request's last assistant turn, its reads paired with their results by tool_use_id, read tools matched by exact name (Codex, Cormac on #5432) Rerun on the M5's captures (362 acts, 89 re-reads, prefill at the engine's measured 450 tok/s median since the right-sized launch, 2026-10-26): share 1/2 24.1 s/act, earlier read still held for 44 of 89 re-reads; 1/4 21.7 s, 28; 1/6 20.8 s, 24. Shrinking restarts saves <=14% of prefill and loses up to half of what she keeps: the half share stays. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * validate: restoration refuses ambiguity (exactly one new action owns a result; two, or a capture gap, are counted and not restored); ids must be non-empty to pair; 'held' is a retention proxy; the rate is validated; fixtures (Codex on #5432) Rerun on the M5's captures (488 acts, 92 re-reads, 450 tok/s): 25 acts ambiguous and not restored. Share 1/2: 21.5 s/act, earlier read retained for 49 of 92 re-reads; 1/3 19.9 s, 36; 1/4 19.0 s, 25; 1/6 18.0 s, 25. The half share stays. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * validate: restoration is chained by capture identity (same session, next act cycle); a single new key after a skipped capture is ambiguous, with Cormac's fixture Captures carry only the latest act as a tool call (older turns are rendered text), so the chain is the capture's (session_id, cycle_id): every act capture on the M5 steps by exactly 1 within a session. Rerun (593 acts, 125 re-reads, 450 tok/s): 30 ambiguous; share 1/2 21.6 s/act retains 65/125, 1/3 19.9 s 49, 1/4 19.2 s 37, 1/6 18.4 s 35. The half share stays. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
How this serves the minds: every resident's real act history survives a restart. That history is the corpus the replay arena tests every context algorithm on, before any of them touches a live mind (Joel: "set up some kind of validation scenario to demonstrate our algorithm works").
Measured
`Store::open` rotated on every open, so each core restart moved the current segment to `.prev` and deleted the older one.
Change
`Store::open` resumes a whole current segment that still has room: same generation, positioned at the end, every row readable. A segment with any integrity issue, a full one or a missing one rotates exactly as before. Bounds are unchanged: two segments, at most 256 MiB.
Tests
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo