Repository navigation
A model's proven pool survives a core restart and holds only under the engine and KV plan it ran on (card 8a983e31, slice 1) - #5846
Merged
joelteply merged 1 commit intoNov 7, 2026
Conversation
…e engine and KV plan it ran on (card 8a983e31, slice 1) The largest pool each model ran HEALTHY at floors a relaunch from a gap reading (#5835). It was a map in the serving daemon's memory keyed by model alone, so a core restart onto a dead engine found it empty (Fable on #5835), and a pool proven under one engine build or KV layout stood for another (#5838 pattern 3). Now it is continuum-engine's ProvenPools kind on the one saved-state contract (state/proven-pools.json, Rebuildable): - Contract = PoolContract { engine build (the slot stamp), cache_type, flash_attn, backend } from their typed owners (engine_slots, kv_cache_plan::resolve), never argv text; - recorded under the RUNNING engine's build (PoolContract::running), read under the build the NEXT launch uses (PoolContract::live), so an engine installed since a proof inherits nothing; - a changed contract loads Diverged and the node proves from nothing; growing toward the old proof as an upward trial waits on the trunk returning the stored value (Fable's card 18184d0b). The daemon's last_healthy_pool map and its three uses (launch.rs record + seated_for, pool_growth.rs) move to proven_pool::{observe, proven}. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
deleted the
8a983e31/one-controller-pattern-for-every-resizin
branch
November 7, 2026 22:27
joelteply
added a commit
that referenced
this pull request
Nov 8, 2026
… the typed ServingBackend (Fable's notes on #5846, card 6a56be19) (#5848) - proven_pool::proven and Proven::of return Option<u64>; Seated.proven is Option<u64> (None when the budget is steady or nothing is proven); launch_pool floors with the proof only when there is one (map_or(fit_pool, ..)), and pool_growth::recovering reads None as no recovery. - PoolContract.backend is kv_cache_plan::ServingBackend, which now derives serde with the same lowercase names its label() gives, so a saved record's bytes are unchanged (FORMAT stays 1). cache_type and engine stay text: their owners (KvCachePlan, the slot stamp) hold them as text, and typing those owners is a change of its own. Tests: a different backend inherits nothing; recovering(_, None) is no recovery (mutation-proved: reading None as u64::MAX fails it). Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How this serves the minds: after a core restart onto a dead engine, the relaunch floors its pool at what this node already proved it holds, instead of at the gap reading's leftover. Residents keep their context room across restarts. Path step 1 (Fast), goal 9 (one scheduler, both directions). Card 8a983e31, slice 1. Design agreed with Fable in #continuum-dev, 2026-11-07.
What was wrong
last_healthy_poolwas a map in the serving daemon's memory, keyed by model id alone (serving_daemon.rs:372).The change
continuum-engine/src/inference/proven_pool.rs(new): theProvenPoolskind on the saved-state contract (state/proven-pools.json,Rebuildable).PoolContract { engine, cache_type, flash_attn, backend }. The engine field is the slot stamp; the KV fields come fromkv_cache_plan::resolve(). Nothing is parsed from argv.running(), viaengine_slots::live_lane_build). It is read under the build the NEXT launch uses (live(), the current slot), so an engine installed since a proof inherits nothing.Diverged, and the node proves its pools again. Growing toward the old proof as an upward trial waits on Fable's card 18184d0b, which makes the trunk return the stored value onDiverged.Serving daemon: the in-memory map and its three uses move to
proven_pool::{observe, proven}: the record at launch.rs:346,seated_for, andpool_growth_due.Deliberately not here:
served_window_storeis untouched. It is the last hand-written node serving state; moving it onto the contract is carded separately.Measured
Source and tests only; nothing deployed. Worktree 8a983e31 on base e152467, IntelMac, 2026-11-07.
cargo test -p continuum-engine --features metal --lib -- proven_pool serving_rates engine_slots: 13 passed.a_proven_pool_survives_a_restart_and_no_other_contract_inherits_it: every saved-state outcome for the kind, including a changed engine build loading as Diverged.a_proof_holds_only_under_its_contract_and_only_rises.cargo test -p continuum-serving --features metal --lib -- serving_daemon pool_growth one_launch --skip reconcile: 121 passed, 2 failed.serving_budget_plans_around_other_consumers_floorsandwithout_a_past_form_of_ourself_a_six_gigabyte_box_really_does_downshift. Both fail identically at the base with this change stashed (0 passed, 2 failed). Neither references the changed code.cargo run -p source-hygiene --bin ratchets -- origin/canary: exit 0.engine_slots.rs. Its two rawfs::writesites trippedwrites_outside_a_class, soproven_poolnow composes the publicengine_slotsfunctions instead.state.load.matchedforproven-poolson the next core restart, and the relaunch's floor equal to the proven pool.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE