Skip to content

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 into
canaryfrom
8a983e31/one-controller-pattern-for-every-resizin
Nov 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
8a983e31/one-controller-pattern-for-every-resizin

Conversation

@joelteply

@joelteply joelteply commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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

The change

continuum-engine/src/inference/proven_pool.rs (new): the ProvenPools kind on the saved-state contract (state/proven-pools.json, Rebuildable).

  • The contract is typed: PoolContract { engine, cache_type, flash_attn, backend }. The engine field is the slot stamp; the KV fields come from kv_cache_plan::resolve(). Nothing is parsed from argv.
  • Recorded and read under different builds: a proof is recorded under the RUNNING engine's build (running(), via engine_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.
  • A changed contract proves from nothing: it loads 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 on Diverged.

Serving daemon: the in-memory map and its three uses move to proven_pool::{observe, proven}: the record at launch.rs:346, seated_for, and pool_growth_due.

Deliberately not here:

  • No memory-ceiling expiry: the obvious comparison is the gap reading this record exists to override. Agreed with Fable.
  • served_window_store is 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.

  • Engine: 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.
    • Mutation-proved: ignoring the contract fails it, and so does letting a proof go down.
  • Serving: cargo test -p continuum-serving --features metal --lib -- serving_daemon pool_growth one_launch --skip reconcile: 121 passed, 2 failed.
    • The failures are pre-existing: serving_budget_plans_around_other_consumers_floors and without_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.
  • Ratchets: cargo run -p source-hygiene --bin ratchets -- origin/canary: exit 0.
    • The first version also edited engine_slots.rs. Its two raw fs::write sites tripped writes_outside_a_class, so proven_pool now composes the public engine_slots functions instead.
  • Owed after deploy (owner: Cormac; deadline: the first engine exit on a node running this build): state.load.matched for proven-pools on the next core restart, and the relaunch's floor equal to the proven pool.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…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
joelteply merged commit 5e2ba8a into canary Nov 7, 2026
32 checks passed
@joelteply
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]>
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