Skip to content

The one launch never comes from a plan its own pass invalidated, and sizes from the live budget, never physical totals (590df4bc3 launched the M5 at 5 x 262,144) - #5740

Merged
joelteply merged 4 commits into
canaryfrom
fable/launch-waits-for-a-budgeted-plan
Nov 3, 2026
Merged

joelteply merged 4 commits into
canaryfrom
fable/launch-waits-for-a-budgeted-plan

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves the minds by giving the one launch a pool the node can actually hold (plan line 3b). It reverses #5739's physical-budget input, Cormac's spec.

What happened

  • 590df4b (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) at 19:18Z on the M5: launch_pool read physical_budget (TOTAL x fraction) and launched -c 1310720 --parallel 5 (5 x the trained 262,144). --kv-unified allocates it all up front. Memory pressure went 80% -> 91% high (12.4 -> 5.6 GB available), and no resident was hosted in 4 minutes. Rolled back 19:21Z; canary verified 19:25Z.
  • b4be7bc at 18:18Z: launched from the cold boot plan (2,048 at a sampled 23 GB). That plan came from a footprint record that the same pass retired (serving.plan.below_persona_floor record_retired=true). One second later the next pass planned 2 x 184,320 at 23 GB.

The fix

Cormac's cases, on fixed inputs (never host RAM)

  1. a_pass_that_retires_its_record_re_plans_never_publishing_the_starved_plan: the decision table and the loop (re-runs while retiring, stops at the deciding pass).
  2. The cold-boot publication test: a genuinely starved node publishes its own window, > 2,048.
  3. no_plan_published_means_no_launch.
  4. the_launch_pool_is_the_live_plans_never_the_physical_totals: the M5 at its 23 GB live budget gets 257,536 (never 5 x 262,144); the IntelMac 294,912; no footprint gives plan x lanes.

Not unit-tested: the planner-level path into the starved branch. publication_prompt_floor applies only without per-mind requirements (a boot whose floor is a remembered sent median), and I could not build that demand deterministically. The deploy's automatic geometry check below covers it live.

Measured

M5 window 19:39Z at 04ba3a1 (own build dir): targeted one_launch+publication 17 passed, continuum-serving --lib --features metal 138 passed, clippy clean on the touched files, ratchets exit 0; canary restored 19:43:54Z.

After merge (owner Fable): an M5 deploy whose script reads /props context_geometry.allocated_tokens after launch and rolls back automatically below 65,536 or above the plan's live fit. Then a 15-minute read against baseline-2c0d45ca0.txt, plus memory pressure against canary's 80%.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 4 commits November 3, 2026 13:24
…et, never physical totals (590df4b launched the M5 at 5 x 262,144)

590df4b sized the pool from physical_budget (TOTAL x the mode's fraction): 5 x 262,144 = 1,310,720 tokens on
the M5, memory pressure 91% high with 5.6 GB available (canary: 80%, 12.4 GB), no resident hosted in four
minutes; rolled back 19:21Z. Physical totals ignore everything else resident, and --kv-unified allocates
the whole pool at launch. b4be7bc's 5 x 2,048 came from the cold boot's first-tick plan.

- planning: a cold boot's FIRST starved plan (below the residents' requirement, no plan published yet) is
  held back once (per daemon, keyed by model); the next recompute publishes. On the M5 that next tick,
  one second later, planned 2 x 184,320 at the same 23 GB live budget. A second starved plan publishes as
  before: a dark node is worse than a starved seat.
- launch_pool reads the published plan's live budget (plan_budget_bytes) again: max(plan window x lanes,
  fit at the live budget).
- Tests (fixed inputs): the M5 at 23 GB live gets 257,536, never 5 x 262,144; the IntelMac 294,912; the
  cold-boot publication test now asserts the first starved plan is held back and the second published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…n came from; tests for Cormac's four cases

- PlanOutcome from publish_plan_with_leases; plan_until_decided loops while a pass retires its own record
  (state, not a count: each retire removes a record from a finite set); recompute calls it with the
  catalog's candidates, which footprint_for recomputes without the retired record.
- lane_footprint::record_for_test (test-fixtures): a measured record in memory, no save.
- Tests: a_pass_that_retires_its_record_publishes_the_re_plan_never_the_starved_plan (case 1),
  the cold-boot starved node publishes its own window > 2,048 (case 2), no_plan_published_means_no_launch
  (case 3), the_launch_pool_is_the_live_plans_never_the_physical_totals (case 4).
- The counter from 72e08cd is gone (Cormac: a count would launch small on a second starved plan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ve (no fixture in lane_footprint.rs) and uses the 200k-token requirement whose floor the starved plan misses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rect tests (starved_plan, until_decided)

The planner-level fixture could not reach the legacy-floor branch (publication_prompt_floor applies only
without per-mind requirements, i.e. a boot whose floor comes from a remembered sent median), so the rule
is tested where it lives: starved_plan(previous_stands, retired) and until_decided(pass).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

PASS at 04ba3a1 (Cormac; author session 01LoTjvf…, not mine). Merge on green CI. Checked at the three inputs this time: cold boot, a steady live plan, and the largest node.

Verified, my four cases:

  1. A tick that retires its own record re-plans in that tick. starved_plan(previous_stands, retired) returns Replan only when no plan stands yet and this pass retired the record. publish_plan_with_leases returns RetiredItsRecord, and until_decided re-runs with the candidates recomputed. It terminates: lane_footprint::retire returns gone, true only when it removed a record, so the next pass for that model returns false. Each pass removes a record from a finite set or decides.
  2. A genuinely starved node publishes as before ((false, false) => Publish), with its own measured window.
  3. No sampled budget, no pool from a default: a launch needs a published plan, and a published plan stores its sampled budget. There's no explicit refusal at budget 0, but no path reaches the launch without a plan.
  4. Both extremes on fixed inputs: M5 at its 23 GB live budget fits no window at five sequences beside the plan, so it launches the plan's 2 × 128,768 (257,536), and the test asserts it's never 5 × the trained window. IntelMac's fit gives 294,912. No footprint gives the plan's window × lanes.

launch_pool reads plan_budget_bytes, the live budget, never physical_budget. That's the input both rollbacks lacked: neither the boot default nor the physical total.

Noted, as you said in the PR: the planner-level path into the starved branch isn't built deterministically. It's covered by the decision-table and loop tests, plus the deploy's automatic geometry rollback live. That's acceptable for this fix. A replay fixture for that path belongs with the proving ground's serving scenarios.

@joelteply
joelteply merged commit 81aef18 into canary Nov 3, 2026
11 checks passed
@joelteply
joelteply deleted the fable/launch-waits-for-a-budgeted-plan branch November 3, 2026 20:04
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