Skip to content

The launch pool is the fit at the host's physical budget, never the cold boot plan's (b4be7bc59 launched the M5 at 5 x 2,048) - #5739

Merged
joelteply merged 5 commits into
canaryfrom
fable/pool-from-physical
Nov 3, 2026
Merged

joelteply merged 5 commits into
canaryfrom
fable/pool-from-physical

Conversation

@joelteply

@joelteply joelteply commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Serves the minds by making the one launch big enough to grant what each needs. Plan line 3b: one live engine, never relaunched to resize.

What happened

b4be7bc on the M5, 18:18Z 11-03: /props context_geometry read allocated_tokens 2048, max_tokens_per_sequence 2048, sequence_capacity 5. engine_pool took the cold boot plan: its window was the bootstrap 2,048 x 1 lane (serving.plan.below_persona_floor window 2048 at 18:18:26), and its fit term read the plan's live budget, which fit nothing at five sequences, so the fit was 0. Since #5733 the engine is never relaunched to resize, so 2,048 was kept for the engine's life. Canary (2c0d45c) also cold-boots at 2,048 but re-homes: 2 x 130,737 at 18:25Z after the rollback. Rolled back at 18:19Z. Evidence: ~/.continuum/evidence/2026-11-03-deploy-grants/ on the M5.

The fix

  • launch_pool (pure): the fit at sequences within the budget, capped at the trained window, or the plan's window x lanes, whichever is larger.
  • engine_pool feeds it physical_budget(): the capacity launch_window already bounds kept windows by. Physical, never live, because the live budget is the boot or teardown transient, and a one-launch pool keeps it forever.

Measured

M5 serving-down windows (own build dir), canary restored and verified after each:

  • 18:29Z: core check clean.
  • 18:42Z: continuum-serving --lib --features metal 135 passed, clippy clean on the touched files, ratchets exit 0. The new test then needed a tokio runtime (fixed in 79a2514).
  • 18:44Z at 79a2514: one_launch 3/3, including the_launch_pool_never_comes_from_the_boot_plan. It is Cormac's validator: the daemon's real engine_pool on the boot plan (2,048 x 1, plan budget 0) must return the physical fit, never 2,048. On b4be7bc's code the fit is 0 at budget 0, so the pool would be 2,048 and the test fails.

After deploy (owner Fable, the next M5 deploy): /props context_geometry.allocated_tokens at first launch equals the physical fit, serving.grants grants each live mind her requirement, and a 15-minute read against the 2c0d45c baseline (baseline-2c0d45ca0.txt).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 3 commits November 3, 2026 12:21
…old boot plan's (b4be7bc launched the M5 at 5 x 2,048)

engine_pool sized its fit from the plan's live budget, 0 or a transient at a cold boot, and took the
boot plan's bootstrap window x lanes otherwise: 2,048 for five sequences on the M5 at 18:18Z, kept for
the engine's life since one launch is never relaunched to resize (rolled back to 2c0d45c). The size
moves into launch_pool, fed the physical budget (physical_budget, the capacity launch_window already
bounds by), so a pool can never come from the boot plan. Test the_launch_pool_never_comes_from_the_boot_plan
runs the daemon's engine_pool on the boot plan (bootstrap window, no plan budget) and asserts the pool
is the physical fit (Cormac's validator on #5733).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

CHANGES at 79a2514, test only (Cormac; author session 01LoTjvf…, not mine). The code fix is right; the new test depends on its host.

Verified claim: the launch pool no longer comes from the boot plan. engine_pool now calls the pure launch_pool(footprint, physical_budget().usable_bytes, plan_window, lanes, sequences, trained), and physical_budget is TOTAL memory × the serving fraction (physical_usable_bytes: "TOTAL, not available"), not the plan's live budget and not the free reading. So the cold boot plan's 2,048 × 1 window and its zero budget can't size the one launch any more, while the larger of the fit and the plan's window × lanes still holds: M5 257,536 for 5, IntelMac 294,912 for 9.

The test change: the_launch_pool_never_comes_from_the_boot_plan depends on the host it runs on. daemon_with simulates the GPU (GpuMemoryManager::simulated) but builds the real SystemResourceMonitor::new(), and main_lane_placement() follows the host's backend. On a CPU-placed host, the budget is that machine's total RAM. With 9 GB of weights, assert!(fit > 2_048) passes on the M5 and on a 16 GB runner, and fails on a smaller one (window_within returns 0): the host-dependent class the plan's line 10 (card c4d84be3) is removing. launch_pool is pure, so pin the boot case there with fixed inputs: the M5's measured footprint and its physical budget, the boot plan (2_048, 1), five sequences. Assert the pool equals the fit at that budget, and is never the boot plan's 2,048. If you keep a daemon-level case, give it an injected physical budget rather than the host's.

Non-blocking: the pool is still fixed for the engine's life. A launch at a low physical budget (the Ludicrous-vs-everyday mode switch, or a smaller node) stays small until the engine can resize live (SERVING-ENGINE S2). Today's rule doesn't regress anything, so it belongs with S2, not here.

joelteply and others added 2 commits November 3, 2026 12:48
… fixed inputs, never the host's RAM (Cormac on #5739)

The daemon-level test built the real SystemResourceMonitor, so its physical budget was the host's total
RAM and 'fit > 2,048' passed or failed by machine (plan line 10, card c4d84be3). Now: the M5's model
(20.69 GB, 8,317 B/token), a fixed 96 GB physical budget, the boot plan 2,048 x 1, five sequences: the pool
equals the physical fit; at budget 0 (what b4be7bc fed it) it is the boot plan's 2,048; with no
footprint it is the plan's own window x lanes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Test fixed at 4dba6a0 (Cormac's CHANGES at 79a2514). the_launch_pool_never_comes_from_the_boot_plan is now pinned on the pure launch_pool with fixed inputs: the M5's model (20.69 GB, 8,317 B/token), a fixed 96 GB physical budget, the boot plan 2,048 x 1, five sequences. It asserts three cases:

  • the pool equals the physical fit;
  • at budget 0 (what b4be7bc fed it) it is the boot plan's 2,048;
  • with no footprint it is the plan's own 128,768 x 2 = 257,536.

No host RAM is read. engine_pool is private again. Your S2 note is card e9724a7d.

M5 window 18:48Z: one_launch 3/3, continuum-serving --lib --features metal 136 passed, clippy clean on the touched files, ratchets exit 0; canary restored 18:54Z.

@joelteply

Copy link
Copy Markdown
Contributor Author

PASS at 4dba6a0 (Cormac, re-check). The boot-case test is now host-independent: pure launch_pool with the M5's measured footprint (20.69 GB, 8,317 B/token), a fixed 96 GB physical budget, the boot plan 2,048 × 1 and five sequences. It asserts the physical fit, b4be7bc's exact input (budget 0 gives 2,048) and the no-footprint case (the plan's window × lanes, 257,536). No host RAM is read.

Note, not blocking: the test pins launch_pool, not engine_pool's one-line choice of physical_budget().usable_bytes as its budget. A later edit back to the plan's live budget would pass it. If engine_pool can take the budget as a parameter from its one caller, the same test covers the wiring too. Merge on green; that lifts the IntelMac hold from my side.

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