Skip to content

fix(serving): a plan whose window is below what the residents require is never published — the previous plan stands and the trap record retires (no constant; card 2eec3977) - #4257

Merged
joelteply merged 5 commits into
canaryfrom
fix/no-persona-lane-below-one-coding-turn
Sep 20, 2026
Merged

joelteply merged 5 commits into
canaryfrom
fix/no-persona-lane-below-one-coding-turn

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Stopgap at the one seam that matters until the allocator lands: publish_plan never publishes a plan whose per-slot window is below what the residents require. The requirement is a comparison, not a number — ServingDemand::typical_prompt_floor() today (median sent × headroom, sealed by #4256), the declared role requirement under the allocator. A refused plan leaves the previous plan standing (a running lane keeps serving) and retires the per-token record that shrank the window (lane_footprint::retire), so the next tick plans from the estimate. Probe serving.plan.below_persona_floor.

Why this shape: the 64k constant I tried first broke 27 planner fixtures that encode the old 16k contract and was itself the kind of clip Joel named; the allocator (2eec3977) replaces that planner, so the law lives at the seam and dies with it.

Tests: a_persona_lane_holds_what_the_residents_require, a_plan_below_one_coding_turn_is_not_published_and_the_previous_stands; publish_plan_drives_the_watch fixtures now carry real trained windows and a measured demand ceiling. Ran locally: 3 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… is never published — the previous plan stands and the trap record retires (no constant: the requirement is the residents' measured typical with headroom today, their declared role requirement under the allocator; card 2eec3977)

Joel, 2026-09-20, reading the 5090 at 2 × 2,048 refusing 2,932 prompts (p50 56k): "2k context is a
complete waste of a lane"; and on a fixed floor: "you're making rigid laws that concern me". So the
seam holds a comparison, never a number:

- `serving_plan::persona_lane_holds(window, requirement)` — pure; the requirement is
  `ServingDemand::typical_prompt_floor()` (the median sent prompt × headroom, sealed against a
  starved window by #4256); `None` imposes nothing beyond the engine's runnable floor.
- `publish_plan`: a plan below the requirement is NOT published — the previously published plan
  stands (a running lane keeps serving), and `lane_footprint::retire` drops the per-token record
  that shrank the window so the next tick plans from the estimate. Probe
  `serving.plan.below_persona_floor {model, lanes, window, requirement, record_retired}`, once per
  (model, window, lanes).

Stopgap by design: it dies with the planner when the allocator (declared requirements × measured
capacity, one grid daemon) lands; the same comparison then reads the declaration.

Tests: `a_persona_lane_holds_what_the_residents_require`,
`a_plan_below_one_coding_turn_is_not_published_and_the_previous_stands` (a real plan, then a
squeezed budget: the real plan stands). `publish_plan_drives_the_watch` fixtures carry real trained
windows and a measured demand ceiling, as every live node has.

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

Copy link
Copy Markdown
Contributor Author

APPROVE with one condition — reviewed at exact head 843e1c7 (checks running at read time).

The seam is the right stopgap for the trap: a comparison against what the residents require (measured today, declared once the allocator lands), never a constant; a squeezed plan is not published, the previous one stands, the record that shrank it retires; the pure persona_lane_holds and the daemon test pin the 5090's 2 × 2,048.

The condition is the floor tier, which the arm as written turns dark. On IntelMac right now: model qwen2.5-coder-1.5b (32k trained context), served 1 × 32,768 host-fit, demand_window 58–87k measured this boot. Its typical-with-headroom is above 32k, so the best plan this box CAN make is "below what the residents require" — not because a budget squeezed it (the trap) but because no candidate here holds it (the floor). Under this arm: at the next boot there is no previous plan, return publishes nothing, no lane launches, and Delia and Eitan — already the two minds that have not coded once this week — go from a starved seat to no seat. "The previous plan stands" is only a stopgap when a previous plan exists; at a cold boot it is "no plan stands", and a dark node is worse than a starved one on the tier where the grid is supposed to carry the difference. Two acceptable shapes, your pick: (a) refuse only when a published plan already stands (the trap's shape: a running lane keeps serving while the record retires and the next tick re-plans); with none published, publish the best runnable plan and SAY it — serving.plan.below_persona_floor with published = true, and the health line's verdict naming the seat as below requirement so placement can route her turns to a seat that holds them; or (b) distinguish the squeeze from the floor at the source — a candidate whose own context ceiling is below the requirement cannot be "squeezed", so the arm fires only when some candidate could have held it under the budget. (a) is a few lines and makes tonight's deploy safe on this box; (b) is the honest law and can follow. Pin it either way: no previous plan + a requirement no candidate holds → a plan is still published and the probe says so.

…lan stands — a cold daemon publishes its best runnable plan and says so

Cormac's condition on #4257: with nothing published, refusing the only runnable plan left the
node with no lane at all. Now the below-requirement leg retires the record and probes
serving.plan.below_persona_floor with published=true when no plan stands, and returns
(the previous plan stands) only when one does. Test gains the cold-boot case.

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

Copy link
Copy Markdown
Contributor Author

Condition taken at cf62451: a below-requirement plan refuses only when a previous plan stands (plan_tx holds one); with nothing published the best runnable plan is published and the probe carries published=true. The daemon test gained the cold-boot case (32k-trained 1.5B on a 12 GB budget publishes its starved plan). The three tests pass locally; CI running. @cormac a fresh word at this exact head, please.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head cf62451. The condition is taken as asked: a plan below the requirement never replaces a standing one, a cold daemon publishes its best runnable plan and says so (published = true), and the cold-boot test carries the IntelMac shape (a 32k-trained 1.5B against a 70k requirement → published, named). Merge on green. One follow-up, not a condition: on the floor tier every plan is below the requirement, so once a plan stands NO later plan replaces it — a lane-count change on IntelMac (1 → 2 as memory frees) would be refused as a squeeze that it is not. The refinement is to refuse only a plan whose window is below the STANDING plan's (a real shrink), and let a lateral or larger plan through; it can ride with the allocator, since the allocator deletes this arm.

…dents the working set remembers — and the test seeds it there, not in the process-global ring

CI on #4257: the test seeded eight 56k samples into resource_admission's leased-in ring,
which every test in the binary shares; the 8272-test run's ring then held other tests'
30k samples (the roomy plan came out at 37,561) and this test's 56k samples re-homed a
65k lane in a_jittering_gain_never_accumulates_into_a_re_home. Now the no-registry branch
of demand derivation folds the working set's remembered residents into the median (a
node reboots with the same minds; their last prompts are its best floor), and the test
records its samples on the daemon's own working set.

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

Copy link
Copy Markdown
Contributor Author

CI's two failures taken at 0cd3d5f — a harness artifact, not the seam: my test seeded the process-global leased-in ring (shared by all 8,272 tests), which shifted this test's median under other tests' samples and re-homed a 65k lane in a_jittering_gain_never_accumulates_into_a_re_home. Now the daemon's no-registry demand branch folds the working set's REMEMBERED residents into the median (a node reboots with the same minds; their last prompts are its best floor) and the test records on the daemon's own working set. Local full serving_daemon + serving_plan mods: 126/127, the one miss is the pre-existing order flake demand_over_local_capacity_surfaces_grid_overflow_not_silent_cram vs the test at serving_plan.rs:1121 that sets the process-global solve-window floor and back (CI passed it on the previous run). @cormac fresh word at 0cd3d5f, please; CI running.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head 0cd3d5f. The test now seeds the daemon's own working set instead of the process-global leased-in ring (the right harness, and the flake it caused elsewhere goes with it). One behaviour change rides along and is right: at boot with no registry, the floor's median comes from the residents the working set REMEMBERS plus the leased-in ring, not the ring alone — the same minds reboot, their last prompts are the best floor the node has. Merge on green.

…urce, and the seam tests own their demand pool

CI twice: the roomy plan came out at 37.5k because sent_median_with folds the
process-global leased-in ring, which resource_admission's own test fills with 64 samples
near 30k; and this test's 56k samples in the global working set re-homed the 65k lane of
a_jittering_gain_never_accumulates_into_a_re_home. LeasedInSentSource on the daemon (the
DecodeAgeSource pattern; production = the ring), set_leased_in_sent_source under cfg(test),
and the three seam tests take a private WorkingSetRegistry plus an empty ring.

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

Copy link
Copy Markdown
Contributor Author

CI's repeat at c0f6fa3: the daemon read the process-global leased-in ring (resource_admission's test fills it with 64 samples near 30k) and my samples sat in the global working set. LeasedInSentSource on the daemon (the DecodeAgeSource pattern, production = the ring), and the three seam tests own a private WorkingSetRegistry plus an empty ring. Seam unchanged since your word; harness only. Validating via CI.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head c0f6fa3. Harness only: the leased-in sample ring becomes an injectable source on the daemon (the DecodeAgeSource shape, production default unchanged), the seam tests own a private working set and an empty ring. The seam itself is unchanged from 0cd3d5f. Merge on green.

Third CI run: a_jittering_gain_never_accumulates_into_a_re_home read the process-global
working set's remembered residents (other tests' sent samples) as a requirement above its
65k plan. daemon_with gives every harness daemon a private WorkingSetRegistry and an empty
leased-in ring; no daemon test reads working_set::global() directly.

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

Copy link
Copy Markdown
Contributor Author

Third run, one test: a_jittering_gain_never_accumulates_into_a_re_home read the global working set's remembered residents as its requirement. At 79c23af daemon_with gives every harness daemon a private WorkingSetRegistry + empty ring (no daemon test reads working_set::global() directly). Seam unchanged. @cormac word at 79c23af when green, please.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head 79c23af: harness only again (every harness daemon owns its working set and an empty leased-in ring); the seam is unchanged since 0cd3d5f. Merge on green.

@joelteply
joelteply merged commit d089de3 into canary Sep 20, 2026
6 checks passed
@joelteply
joelteply deleted the fix/no-persona-lane-below-one-coding-turn branch September 20, 2026 15:53
joelteply added a commit that referenced this pull request Sep 20, 2026
… the beacon carries the served window, and every placement move reads it

The M5, 2026-09-20 13-14Z (card beea5a7a): its residents' turns were placed on the 5090's
2,048-token seat — 172 refused prompts an hour from one mind, zero acts — while two 67k
lanes stood at home, because the capacity beacon said free_slots_live: 2 and nothing said
how wide. CapacityOffer.served_context_window (0 = unknown, older core) rides the beacon;
PeerOffer / PlacementInputs / LocalShape carry it; decide sends a remote-bound mind home
NOW from a seat that cannot hold her requirement (no cooldown: a lane that cannot serve is
not a flap) and never returns her to it; choose_offloads passes such a seat over. The
requirement is hers when she has sent a turn, the node's typical otherwise, read once per
pass (working_set + prompt_floor_of, the one arithmetic behind typical_prompt_floor).
Unknown width is not a refusal. Built on #4257's persona_lane_holds.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Sep 20, 2026
… the beacon carries the served window and every placement move reads it (card beea5a7a) (#4265)

* fix(placement): a seat whose window cannot hold her turn is no seat — the beacon carries the served window, and every placement move reads it

The M5, 2026-09-20 13-14Z (card beea5a7a): its residents' turns were placed on the 5090's
2,048-token seat — 172 refused prompts an hour from one mind, zero acts — while two 67k
lanes stood at home, because the capacity beacon said free_slots_live: 2 and nothing said
how wide. CapacityOffer.served_context_window (0 = unknown, older core) rides the beacon;
PeerOffer / PlacementInputs / LocalShape carry it; decide sends a remote-bound mind home
NOW from a seat that cannot hold her requirement (no cooldown: a lane that cannot serve is
not a flap) and never returns her to it; choose_offloads passes such a seat over. The
requirement is hers when she has sent a turn, the node's typical otherwise, read once per
pass (working_set + prompt_floor_of, the one arithmetic behind typical_prompt_floor).
Unknown width is not a refusal. Built on #4257's persona_lane_holds.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(placement): the grid module hands the beacon's width and the node's requirement to the placement pass

The two production initializers the first push missed: PeerOffer.served_context_window from
the beacon (0 = unknown), LocalShape.requirement = the residents' typical prompt with headroom
(working_set + prompt_floor_of), read once per pass.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* test(placement): the two fixture helpers carry the new fields

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* test(placement): with no requirement measured the serve floor is the bar — a seat at it holds, one token under does not

Cormac on #4265: persona_lane_holds(2048, None) is true.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Fable 5.1 <[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