Repository navigation
feat(placement): a slot on a seat is a LEASE the seat grants — S1b, the chooser reads the seat's truth and asks before it moves her - #4199
Merged
joelteply merged 2 commits intoSep 18, 2026
Conversation
…he chooser reads the seat's truth and asks before it moves her
Governor slice S1, placement half (card c84d885a). Joel: "just get it working well." Built on
Cormac's mechanism note — his three fix shapes, in his words, each now a rule:
1. "`free` must be a RESERVATION the responder grants and can revoke, not a beacon field the
requester subtracts once. The responder knows its queue; the requester does not."
persona/placement_reservation.rs: a process-wide ThroughputLeaseRegistry of granted slots
(TTL = MOVE_COOLDOWN_MS, Graceful). `free_slots_live_now = lanes − in flight (all sources)
− outstanding grants` is the ONE number the beacon and the grant share, so the second node
to ask sees what the first node's grant left. `persona/placement/reserve` (Privileged, like
the ai/generate it guards) answers a spiller over airc with the seat's live truth; a re-ask
for the same mind renews, never double-counts. `follow_the_fleet` binds ONLY on a grant:
`placement.spill.leased` / `placement.spill.refused{reason}` — never silent. Refused or
unanswered within the seat's own freshness window (RESERVE_DEADLINE = REMOTE_SEAT_FRESH_MS)
= she stays home this tick.
2. "A bound switch must be RE-CHOOSABLE: when the bound seat's measured lane wait exceeds a
liveness bound she is a candidate again — or home, if home is faster."
`decide` gains the seat's measured wait and this node's own: a seat past the bound falls
home (SEAT_QUEUED_REASON), a queued seat is never RETURNED to, and a home-seated bound
switch past her cooldown rejoins the chooser's candidates. Population 1 is no longer bound
to one peer forever.
3. "Offload only when the remote turn is expected to be FASTER."
`choose_offloads` reads `free_slots_live` (never `lanes − residents`), skips a `seat_queued`
peer — measured wait ≥ this node's own measured wait, or ≥ the UNATTENDED_TTFT budget when
this node has none — and moves nobody when home's median lane wait is under a millisecond
(no queue = nothing to gain). This node's own wait is a second `WaitRing` (the leased-in
ring refactored into one shape) stamped where SHE waits: delib.gate.lane_wait →
lane_acquired. An UNMEASURED seat is never judged on history — the absence-read-as-a-value
guard — its live free count and the grant bound it. The decode half of this shape (per-lane
prefill/decode pairs on the beacon) is carried to S2b; rank stays the proxy.
Rollout: an older seat beacons free_slots_live = 0 and has no reserve verb — it offers nothing
until it runs this. That is the honest default, not a regression: today it was oversubscribed
by every node reading it as "2 free".
Tests (whole-file, 44/44 across the seven touched modules):
two_nodes_over_by_n_against_one_seat_with_two_free_slots_spill_at_most_two — the card's title
free_is_the_seats_live_grant_not_roster_arithmetic
a_queued_seat_is_not_capacity_whatever_its_rank (every number relative to the one bound)
a_bound_seat_whose_measured_wait_passes_the_bound_falls_home_and_is_not_returned_to
a_grant_carries_the_seats_wait_with_its_count_and_free_never_goes_negative
the_reserve_verb_answers_under_the_name_the_spiller_asks_by
a_nodes_own_lane_wait_is_a_median_with_a_count_of_the_same_shape_as_the_seats
No new warnings.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
enabled auto-merge (squash)
September 18, 2026 21:16
…is file's own Two source-hygiene ratchets on #4199's first CI run: the three serde sites in `request_reservation` are a TRUE boundary (the airc wire to the seat's core) and now say so on the line; `WaitRing` is machinery only resource_admission.rs stands up, so it is private, not `pub` — the unwired-public-machinery count stays at its baseline. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
deleted the
fix/a-slot-on-a-seat-is-a-lease-the-seat-grants
branch
September 18, 2026 21:49
joelteply
added a commit
that referenced
this pull request
Sep 18, 2026
…ction is a ratchet until its mirror ships (#4201) Cormac, 2026-09-18, after the fourth one-direction defect of the day: "four one-direction ratchets found and fixed today by three of us … same shape each time — a measurement or a state that could only move one way — and each time the fix was the mirror rule and a test with both directions in it. Worth a doctrine line somewhere the next person will read before they write the fifth." This is that line, in the list the next person reads: the mirror ships in the same commit as the mover, keyed on the same number; the test is a round trip. #4195 #4190 #4193 #4199 #4200. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5.1 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Sep 19, 2026
…ll does — the seat's grant bounds the fleet's swing (#4206) 2026-09-19 00:3xZ, the first minutes after the 5090 ran #4198: its beacon carried its measured wait, read QUEUED, and the IntelMac brought all seven bound minds home in one tick — S1b doing its job. The tick that seat's p50 dips under the bound, `decide` says ReturnRemote for all seven at once, and `apply(ReturnRemote)` re-bound WITHOUT a grant: seven returns rebuild the very queue they left, then all seven fall home again — the metronome at fleet scale, one cooldown per swing. The lease (#4199) exists for exactly this; the return path did not use it. Now a return asks the seat for its slot as a spill does (`request_reservation`, bounded by the seat's own freshness window): the seat grants `free_slots_live − outstanding`, the rest stay home until its beacon shows room. Refused or unanswered = Stay, receipted (`placement.return.leased` / `placement.return.refused`). One ledger for both paths, so a return can never take a slot a spill was granted. Test: seven_returning_minds_take_only_the_seats_free_slots_and_the_rest_stay_home — two slots, two returns, five wait, and a spill from another node then finds nothing. Whole-file: placement_switch, placement_reservation, source_hygiene — 32/32. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5.1 <[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.
Summary
Governor slice S1, placement half (card c84d885a; follows S1a #4198 and S2 #4197). Built on Cormac's mechanism note — his three fix shapes, each now a rule:
freeis a reservation the responder grants and can revoke — "the responder knows its queue; the requester does not"persona/placement_reservation.rs: a process-wideThroughputLeaseRegistryof granted slots (TTL =MOVE_COOLDOWN_MS, Graceful).free_slots_live_now = lanes − in flight − outstanding grantsis the one number the beacon and the grant share.persona/placement/reserve(Privileged, likeai/generate) answers a spiller over airc;follow_the_fleetbinds only on a grant —placement.spill.leased/placement.spill.refused{reason}, never silentdecidegains the seat's measured wait and this node's own: past the bound →FallHome{SEAT_QUEUED_REASON}; a queued seat is never returned to; a home-seated bound switch past cooldown rejoins the chooser's candidateschoose_offloadsreadsfree_slots_live(neverlanes − residents), skips aseat_queuedpeer (measured wait ≥ this node's own, or ≥UNATTENDED_TTFTwhen this node has none), and moves nobody when home's median lane wait is under a millisecond. This node's own wait is a secondWaitRingstamped atdelib.gate.lane_wait → lane_acquired. An unmeasured seat is never judged on history — its live free count and the grant bound itCarried to S2b: the decode half of shape 3 (per-lane prefill/decode pairs on the beacon); rank stays the proxy.
Rollout: an older seat beacons
free_slots_live = 0and has no reserve verb — it offers nothing until it runs this. Honest default, not a regression: today it was oversubscribed by every node reading it as "2 free".Test plan
two_nodes_over_by_n_against_one_seat_with_two_free_slots_spill_at_most_two— the card's title, as a testfree_is_the_seats_live_grant_not_roster_arithmetic·a_queued_seat_is_not_capacity_whatever_its_rank·a_bound_seat_whose_measured_wait_passes_the_bound_falls_home_and_is_not_returned_to·a_grant_carries_the_seats_wait_with_its_count_and_free_never_goes_negative·the_reserve_verb_answers_under_the_name_the_spiller_asks_by·a_nodes_own_lane_wait_is_a_median_with_a_count_of_the_same_shape_as_the_seatsplacement.spill.leased+placement.spill.refusedprobes on the M5/IntelMac,placement.reserve.decidedon the seat; total bound minds on the 5090 ≤ its granted slots; itslane_wait_p50_msfalls over the hour🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo