Skip to content

Her checkpoint survives a restart: the first turn after it rewinds, never re-prefills her view - #6290

Merged
joelteply merged 4 commits into
canaryfrom
fable/checkpoint-survives-restart
Nov 27, 2026
Merged

joelteply merged 4 commits into
canaryfrom
fable/checkpoint-survives-restart

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

After a restart a mind came back with her held tokens and KV in place but no checkpoint (it
lived in host memory only), and on the hybrid a prompt that diverges inside what she holds
cannot rewind without one. So her first turn re-prefilled her whole prompt: on the M5 at
09:52Z (build c43b2ba) Aiko started no_checkpoint with reused 0, sharing 214,911 of
246,764 tokens with what she held, and prefilled 1,019 s; Benchy the same.

Her view-end checkpoint now travels with her blocks (fork CambrianTech/llama.cpp#164):

  • A stop hands it over beside her record, in the same generation, only while the fork finds it
    still valid against her parked blocks (owner, cell lineage, an uncut receipt) and only when it
    holds exactly its end within her history and was taken under the genes her blocks carry. It is
    fenced durable before the manifest names it (Codex: publish the descriptor only once all
    blocks are durable).
  • The resume reads it into her restored blocks; the fork checks it against them and binds it to
    their restored cells. Her history resumes with it as her view checkpoint under the genes she
    resumes under, so reuse::choose rewinds to it, and a prompt that diverges before its end still
    restarts as diverged_before_checkpoint (Codex's first-turn check).
  • A checkpoint that cannot cross (refused by the fork, or not exactly its end) is a probe
    (persona.engine.checkpoint_not_preserved / _not_restored) and she crosses without it: her blocks
    and history are her durable state; only that rewind is lost.
  • The manifest goes to format 4, PreservedMind.checkpoint naming its file and end; a format-3
    manifest is upgraded explicitly (each mind as she was, with none). Cleanup knows .ckp files.

driver.rs stays at 999 lines; the new types live in preserve/mind_files.rs and driver/history.rs.

Measured

  • checkpoint_handoff (new example) on the M5, Qwen3.6-35B-A3B Q4_K_M, 2026-11-27 ~10:05Z: view
    4,096, tail 256, decode 32. After the restart she prefilled the 256-token tail, not 4,352; all
    32 decoded tokens equal a never-stopped control's; a checkpoint of another generation refused
    with nothing taken. Checkpoint file 65.9 MB.
  • cargo test -p continuum-engine --features metal --lib persona_scheduler::preserve: 8 passed
    (format-3 upgrade, and cleanup keeps a named .ckp and removes an older or torn one).
  • Ratchets vs origin/canary: pass.
  • After deploy (owner: Fable, the M5): the first turn of each resident after a restart reports
    a rewind, not no_checkpoint, with prefill near her tail.
    Stacks on canary c43b2ba (An in-process turn that is still advancing is never ended by the act deadline #6289). Fork: A mind's checkpoint crosses a restart beside her record llama.cpp#164 (the submodule points at it).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ever re-prefills her view

After a restart a mind came back with her held tokens and KV in place but no checkpoint (it
lived in host memory only), and on the hybrid a prompt that diverges inside what she holds
cannot rewind without one. So her first turn re-prefilled her whole prompt: on the M5 at
09:52Z (build c43b2ba) Aiko started no_checkpoint with reused 0, sharing 214,911 of
246,764 tokens with what she held, and prefilled 1,019 s; Benchy the same.

Her view-end checkpoint now travels with her blocks (fork CambrianTech/llama.cpp#164):
- A stop hands it over beside her record, in the same generation, only while the fork finds it
  still valid against her parked blocks (owner, cell lineage, an uncut receipt) and only when it
  holds exactly its end within her history and was taken under the genes her blocks carry. It is
  fenced durable before the manifest names it (Codex: publish the descriptor only once all
  blocks are durable).
- The resume reads it into her restored blocks; the fork checks it against them and binds it to
  their restored cells. Her history resumes with it as her view checkpoint under the genes she
  resumes under, so reuse::choose rewinds to it, and a prompt that diverges before its end still
  restarts as diverged_before_checkpoint (Codex's first-turn check).
- A checkpoint that cannot cross (refused by the fork, or not exactly its end) is a probe
  (persona.engine.checkpoint_not_preserved / _not_restored) and she crosses without it: her blocks
  and history are her durable state; only that rewind is lost.
- The manifest goes to format 4, PreservedMind.checkpoint naming its file and end; a format-3
  manifest is upgraded explicitly (each mind as she was, with none). Cleanup knows .ckp files.

driver.rs stays at 999 lines; the new types live in preserve/mind_files.rs and driver/history.rs.

## Measured
- checkpoint_handoff (new example) on the M5, Qwen3.6-35B-A3B Q4_K_M, 2026-11-27 ~10:05Z: view
  4,096, tail 256, decode 32. After the restart she prefilled the 256-token tail, not 4,352; all
  32 decoded tokens equal a never-stopped control's; a checkpoint of another generation refused
  with nothing taken. Checkpoint file 65.9 MB.
- cargo test -p continuum-engine --features metal --lib persona_scheduler::preserve: 8 passed
  (format-3 upgrade, and cleanup keeps a named .ckp and removes an older or torn one).
- Ratchets vs origin/canary: pass.
- After deploy (owner: Fable, the M5): the first turn of each resident after a restart reports
  a rewind, not no_checkpoint, with prefill near her tail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply and others added 3 commits November 27, 2026 04:14
… across a restart)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…row across the C boundary)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 47df3a5 into canary Nov 27, 2026
49 checks passed
@joelteply
joelteply deleted the fable/checkpoint-survives-restart branch November 27, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant