Skip to content

The stop saves every mind whose act it cut, not only the idle ones - #6004

Merged
joelteply merged 1 commit into
canaryfrom
fable/the-stop-saves-every-resident-it-condemns
Nov 14, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fable/the-stop-saves-every-resident-it-condemns

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves resident minds' speed across a deploy (path step 1, line 3b). This follows up #5987's live receipt: the restart on the M5 was still cold for three of four minds.

Diagnosis (M5, canary 7f875cc, 2026-11-14; core log ~/.continuum/logs/continuum-core-server.log*; page dir ~/.continuum/cache/kv-pages/ggml-org_Qwen3.6-35B-A3B-GGUF/)

  • (a) The key did not change. The ledger fingerprint is the same 2a2750f7… before and after the deploy, and the page dir is the same model directory. The new core attached the ledger (07:52:26Z inference.kv_page.ledger_attached carried=false loaded=1) and restored that one page (07:52:41Z action=Restore slot=3 page=mind 2f50b223 ok=true). The fork pin changing to b5534b531 did not matter: the page format names no engine build.
  • (b) The old build's eviction deleted nothing. Every pass from 07:47:55Z to 07:48:26Z declined with page_io_busy and freed 0 bytes (cold_minds_forgotten=0).
  • (c) The real gap: the stop saved one resident of four. 07:48:28.031Z action=save slot=3 page=mind 2f50b223 ok=true, then stop_checkpoint ok=true, with no other save. The stop condemns acts in flight (The stop's checkpoint condemns the acts it handed back, and one owner awaits a process's exit as an event (card b5b9bef3) #5988, page_io.rs checkpoint_endpoint). A cut act's drop forgets her attribution (turn_admission.rs:213: Dispatch::Sent → forget_resident), and checkpoint_pool saved only pool.holders (engine_generation.rs:517). So Aiko, Aris and Atlas had nobody to save them. They were never saved, so there was nothing to discard: cold_turn cause="no_page" with an empty discard_reason is accurate.

Fix (at the owner)

KvSlotPool::stop_residents is now the resident set every checkpoint saves:

  • every attributed resident, as before;
  • every slot still holding a sequence of a mind attributed nowhere, read from LiveSequences::held.

Which of those slots get saved:

  • a confirmed sequence, when it is at least as new as her page;
  • an unconfirmed one (her cut act's tokens), only when she has no page, because a cut prompt may have truncated below what her page holds.

There is one save per page.

Test

turn_admission/tests/lifecycle.rs a_mind_whose_act_the_stop_cut_is_saved_and_restores_after_the_boot reproduces the sequence:

  1. Engine A runs two residents.
  2. One mind's act is sent and cut.
  3. The stop's checkpoint runs.
  4. Engine B (another process) and a new core boot on the same page dir.
  5. Both minds are Restored with what their slots held at the stop.

Not compiled locally (the M5 is serving); CI is the compiler.

Measured: live receipt (after the next deploy)

At the stop, expect one action=Save per resident, cut ones included. At boot, expect ledger_attached loaded= equal to the resident count, one Restore per mind before her first act, and no cold_turn cause="no_page".

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Live receipt for #5987 on the M5 (canary 7f875cc, 2026-11-14 07:48-07:53Z): the stop's
checkpoint saved one resident of four (07:48:28Z, slot 3, Benchy); the new engine (fork pin
b5534b531) and core attached the ledger (loaded=1) and restored Benchy, while Aiko, Aris and
Atlas came up cold (cold_turn cause="no_page"). The key matched (same fingerprint; Benchy
restored) and the page store evicted nothing (every pass declined page_io_busy). The cause:
the stop condemns acts in flight (#5988), and a cut act's drop forgets her attribution
(TurnAdmission::drop -> forget_resident), so checkpoint_pool, which saved only `holders`,
had nobody to save in those slots.

KvSlotPool::stop_residents is the checkpoint's resident set: every attributed resident, plus
each slot still holding a sequence of a mind attributed nowhere (LiveSequences::held): a
confirmed sequence when at least as new as her page, an unconfirmed one (her cut act) only
when she has no page. One save per page.

Test: a_mind_whose_act_the_stop_cut_is_saved_and_restores_after_the_boot (engine A, a cut
act, the stop, engine B and a new core: both minds restore what their slots held).

Not compiled locally (the M5 is serving); CI is the compiler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit bccfce8 into canary Nov 14, 2026
32 checks passed
@joelteply
joelteply deleted the fable/the-stop-saves-every-resident-it-condemns branch November 14, 2026 09:25
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