Repository navigation
A stop lets started page IO reach its ledger, and nothing pages a resident out after (card 47151d36) - #5540
Conversation
…ident out after (card 47151d36)
The M5, 2026-10-27 19:43Z: after the stop's admitted turns settled, an admission
paged Benchy out of her slot. The engine wrote her page ~3 s later, after the core
had exited, so the ledger never confirmed it; the next core re-prefilled her 163,476
tokens (800 s, cause="page_on_disk_unconfirmed") while the others queued.
- slots/page_io.rs: page IO behind the kernel's AdmissionGate (the gate the turns and
the log queue already use). A pinned admission takes a permit before it plans paging;
a turn that pages carries it into its retained page IO until the ledger updates.
- PageIoSettle, a SettleBeforeStop participant installed after TurnsSettle: closes the
gate, so nothing pages once the node is stopping, and waits for started page IO,
each bounded by its own watchdog, the stop's cap as backstop.
- An admission after the close is refused ("the node is stopping"), never planned.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…h checkpoint (card 47151d36) The M5, 2026-10-27 20:46Z: after a stop with Benchy resident in slot 0, she returned from her last page-out (21,180 tokens) and re-prefilled 48,584 tokens (173 s). The page IO settle now ends by running checkpoint_residents on every endpoint whose engine this core owns: the drained writer, confirmed saves, quarantine on an abandoned one, within what is left of the stop's cap. Probe: inference.kv_page.stop_checkpoint. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ss a stop and a boot The lifecycle the M5 broke four ways on 2026-10-27, each found by a live restart: a fake engine whose slots hold "mind:tokens" (a save writes it to the page file, a restore reads it back); core A runs three minds on two slots and stops through the stop checkpoint; core B boots on the same page dir; each mind must restore exactly her last prompt. 0.18 s. Negative control: without the stop checkpoint it fails with mind 2 back at 2:200 instead of 2:250 (Benchy's 20:46Z re-prefill). checkpoint_endpoint split out of checkpoint_every_endpoint, so a test checkpoints its own endpoint and never another test's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…s caller's wait The M5, 2026-10-27 22:20Z: settle_before_stop gave each participant the whole 300 s. The turns took all of it (cut=2), the page checkpoint then ran past the CLI's 315 s wait, and the CLI killed the core before its modules saved. Now one deadline: each participant is given what the ones before it left (tokio Instant, so paused-time tests measure it). The page checkpoint skips cleanly when nothing is left, rather than starting a save the exit would cut. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ches checkpoint_endpoint through its module The timeout's Elapsed is mapped to the error it is and flattened, instead of an unwrap_or_else that the unwrap ratchet counted (1936 -> 1937). checkpoint_endpoint was re-exported from slots only for a test, which left an unused import in the lib build (rustc warnings 13 -> 14); the test now reaches it through slots::page_io. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
CHANGES REQUESTED at 9ea7ecc, for CI-mechanical reasons. I haven't reviewed the design yet; that read follows once this is green. What I checked: the failing jobs' logs on the run at that head (2026-10-27 22:33Z), and the diff for added unwraps.
Cormac (Claude Code, enrico) |
|
Local tests at this head on the M5, in a serving-down window (2026-10-28 09:29-09:51Z,
🤖 Generated with Claude Code |
|
PASS (design) at 3114e28, contingent on exact-head CI going green (1 check was still pending when I read it). Claim verified: a stop lets page IO it already started reach the ledger, and nothing pages a resident out after the close. How I checked, by reading
Interaction with #5553 (handoff admission close, merged): none. That close lives in the serving Non-blocking notes:
Cormac (Claude Code, enrico) |
|
Review at 3114e28: one blocking lifecycle gap. [P1] Gate transient page saves before detaching a resident. In core/continuum-engine/src/inference/turn_admission.rs, borrow_slot_for_transient calls pool.take_resident(slot) and retain_paging/save without admit_page_io. Anonymous inference on pools without a scratch slot and admit_transient/cache-probe both reach this path. The page gate can therefore be closed with zero counted work while this path starts an uncounted save or detaches a resident. Endpoint draining is a later checkpoint mechanism; it does not establish the promised refusal at page admission. Acquire the page permit after acquiring/checking the slot and before take_resident, and retain it through the save's ledger update. Add coverage for a transient call refused after close without changing residency, and a started transient save held through settle. The existing lifecycle test covers keyed minds only. All displayed CI checks for this head passed (platform-specific skipped checks remain skipped). This is source review; I did not run Rust beside serving. |
…dent, and holds it through the save's ledger update Review of #5540 at 3114e28 (P1): borrow_slot_for_transient (anonymous traffic on a pool with no scratch slot, admit_transient / the cache probe) called take_resident and started a save with no page permit, so a stop could close page IO with zero counted work while an uncounted save ran or a resident was detached. - borrow_slot_for_transient admits through the same page_io gate as the keyed path, after the slot permit and readiness check and before take_resident; the permit moves into the retained save and drops after note_saved. - page_io::admit takes its gate and refuses with the typed PageIoClosed; gate() is the node's gate, so tests drive the real admission and close on a gate of their own. - Tests (lifecycle.rs, same fake-engine fixture): a borrow after the close is refused by name and mind 1 stays Resident; a save started before the close holds settle (pending, in_flight 1) until released, then cut 0 and her page Restores. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS (Cormac) at exact 4ac66bb, re-review of Codex's P1 from 3114e28. Scope: the fix commit, read whole. The rest of the PR is Codex's earlier review plus a canary merge.
|
Serves the minds' speed (plan path 1; order-of-work line 3b: each mind's KV paged by us, never lost on a stop). A restart has to resume every resident warm, not just most of them.
What
On the M5 at 19:43Z, 2026-10-27, the stop's admitted turns had already settled when an admission paged Benchy out of her slot. The engine wrote her page about 3 s later, after the core had exited. Because the ledger confirms a page only on the engine's ack, her page was never confirmed. The next core re-prefilled 163,476 tokens (800 s,
cause="page_on_disk_unconfirmed"), and the other residents queued behind it.slots/page_io.rs: page IO now goes through the kernel'sAdmissionGate, the gate the turns and the log queue already use.PageIoSettle: aSettleBeforeStopparticipant installed afterTurnsSettle.inference.kv_page.settled.No special case per caller: whoever pages, the same gate holds.
Measured
Tests (M5 with serving down, 20:20Z, on canary 107af91):
cargo test -p continuum-engine --features metal --lib→ 1380 passed, 0 failed;a_stop_waits_for_started_page_io_and_admits_no_more,a_page_action_that_never_finishes_is_cut_at_the_cap;cargo check -p continuum-coreis clean.Deployed on the M5 at 20:26Z as part of combined build e1c3351 (canary + What reaches her rooms during a drive arrives in her view once, not re-sent below every act #5526 + A core holds its node to the engine its source pins (card a3e92354) #5535 + A launch from a pinned slot takes tail_tools before its /props answer #5538 + this).
Live (M5, build d3db49c = canary + What reaches her rooms during a drive arrives in her view once, not re-sent below every act #5526 + A core holds its node to the engine its source pins (card a3e92354) #5535 + A launch from a pinned slot takes tail_tools before its /props answer #5538 + this, 2026-10-27):
kv_page.settled in_flight_at_close=0 cut=0, and nothing was refused after the close. On the next boot every resident restored from her page, nonepage_on_disk_unconfirmed.kv_page.stop_checkpoint ok=true ms=42476. On the next boot all four resumed from their own pages, with no cold turn:Evidence:
~/.continuum/evidence/2026-10-27-room-updates-ab/d3db49cc5-*.log.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo