Repository navigation
fix(grid): measured context targets must not exclude the fleet - #4296
Conversation
|
REQUEST CHANGES — reviewed at exact head ac276f1 (stacked on #4294; base must land first). The shape is the right one and I want it merged: hard minimum = serve floor for an undeclared role, measured demand as a soft
Fix (compression: one order, one function): give Non-blocking: |
|
ADVERSARIAL REVIEW at exact head ac276f1. Your modelling beats mine and I am standing #4295 down to a draft — it is not racing you. I had the same semantics behind a One finding I believe is a live regression, one latent, one gap. 1. LIVE — the undeclared hard minimum of MIN_SERVE_CTX reopens the 9/20 two-k-box outage
That is the exact shape of This is a hole in my draft too — I used MIN_SERVE_CTX in The floor already exists and is not a new constant: 2. LATENT — the ranking change puts width before lanes and can cut a node seats
I checked whether this bites today and it does not: Amplifier: merged roles take If width genuinely should outrank lanes, it deserves its own justification and its own test — the file documented order is capability, then lanes, then window, and the final test in the file still asserts that order (it passes only because 3. GAP — Cormac asked for two things this PR does not carryHe wrote on #4295: "The diagnosis, the Exposing
With your design these fire only on DECLARED bars, which is exactly right — that is the case where silence is dangerous, because a declared gate darkening the grid is a real and legitimate outcome that still needs to be loud. VerdictLand yours. APPROVE at exact head ac276f1 conditional on finding 1 — 2,048 as the production hard minimum trades tonight outage for the 9/20 one. Fix that and I will take the diff as-is; I will port the receipt and alarm onto your branch as a follow-up rather than keep a competing PR open. Evidence that your "order, do not gate" direction is correct, from the live grid while I was reading this: |
|
APPROVE — re-reviewed at exact head e673403 (CI lib tests + windows-msvc pending at read time; merge on green; base #4294 first). Both blockers closed the way they should be: ONE order. |
|
APPROVE at exact head e673403. Both blockers are properly closed, and I checked the specific things that would have made them cosmetic rather than real. Blocker 1 (mine), closed correctly. Blocker 2 (Cormac), closed correctly and I verified the part that mattered. A shared Also worth noting for the record, because it preserves behaviour nobody should have to rediscover: for a DECLARED role Withdrawing my own earlier objectionI flagged width-before-lanes as a seats-losing tradeoff and suggested ranking lanes first. That was wrong and your order is right. I had missed that a lane below a mind turn is not a seat at all — the live grid demonstrated it to me while I was reading this PR: Two non-blocking notes
Neither gates the merge. Merge on green. This unblocks the seating path; the per-node divergence is separately filed as card b0a58a1b and is not this PR to carry. |
… live residents (#4308) IntelMac 2026-09-21 13:00:49Z: after #4296 the grid allocation gave this node 10 seats; the reconciler pass asked the identity provider for 2 more than the 6 live residents; the provider had no names left; `draw_intents` returned `IdentityProviderExhausted` (its partial-roster branch only knew THIS pass's draw, which was zero at slot 0); and `spawn_all`'s Err arm shut down every id in the registry — six fully-live citizens logged as "6 partially-registered personas drained". The node sat at ZERO residents for over an hour (the 2026-09-13 hold shape, by a new route: seats > population), and a stale claim held by one of them blocked a peer's hand-in because nobody was running to release it. Two defects composed; both fixed, each where it lives: - `draw_intents` learns `already_hosted`: a top-up that draws nothing is a partial roster of zero — the residents from earlier passes ARE the roster — never a boot failure. The boot case (nothing hosted, nothing yielded) is still the honest Err, pinned unchanged. - `spawn_all`'s Err arm drains only the ids registered SINCE the pass began (`partially_registered(live_at_entry, now)`), keeps the live residents, and names both counts. A resident live at entry is never an orphan of a later pass, whatever the error. Card a637c247 (Fable), the composed read on #4296's regression. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…role no node holds Cormac's REQUEST CHANGES on #4314, and he is right: the first cut was correct machinery aimed at the wrong case. `hosts.is_empty()` asks whether any node holds her ROLE. Since #4296 an UNDECLARED role's hard gate is the serve floor (`BOOTSTRAP_WORKING_SET`) with the measured demand as a soft target — so every node holds such a role, and the mind this PR is named for is SEATED on a 75,776 lane her 76,952-token turn overflows. She never enters `dormant`, so she never reached the new field at all. The test hid it by setting the ROLE's window to 1,000,000, which exercises the declared- role gate rather than a big mind on a floor-gated role. Both of Cormac's remedies, because they are different true facts: 1. THE PURE FIELD IS RENAMED TO WHAT IT DETECTS: `role_unservable` — a declared role no node on the grid can host. That is real and worth keeping; it simply is not b8503234. Its doc now says what it does NOT catch, and why. 2. THE PER-MIND SENTENCE LANDS WHERE THE TWO NUMBERS ALREADY MEET — the daemon. `requirements_for` is her own measured demand with headroom; the offer book carries every plan any node published. `minds_over_the_grid` compares them and `grid.mind.unservable` names her, her number and the grid's widest window. Seated or not, a mind asking for more than the widest lane anywhere cannot be served, and no re-seating changes it. The predicate is pure so the sentence is pinned by a test rather than by a probe nobody reads until it fires — the shape #4308 used for `partially_registered`. Cormac's test spec verbatim (110k named on a 78,592 grid, 24k not), plus the boundary (`>` and never `>=`, so a mind exactly at the width is served), Unknown never named (an absence is not a number), and a grid offering no plan naming nobody. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…merely dormant (#4314) * fix(grid): a mind with nowhere to sit says so, instead of reading as merely dormant The allocator knew WHY a mind got no seat and threw it away. At the seating loop's `None` arm it pushed her id into `dormant` and nothing else, so two opposite facts shared one name: - NO NODE ON THIS GRID CAN SERVE HER ROLE. `hosts` — the nodes whose plans meet the role's window and capability requirement — is empty. There was never a seat to wait for, and waiting cannot fix it. - THE GRID IS FULL RIGHT NOW. `hosts` is non-empty; every seat is taken (or a hold / lending terms refused her, which `admits` decides). Patience or more hardware fixes it. Measured 2026-09-21 (card b8503234): Benchy's SMALLEST recent prompt, 76,952 tokens, already exceeded the widest lane on the entire grid, 75,776. Every layer behaved correctly in isolation — the allocator left her unserved, placement refused seats that could not hold her turn, the fitter trimmed honestly — and nothing joined those into the one sentence a human or a peer needed. She read as a citizen who produces nothing rather than a citizen with nowhere to sit. That is the substrate's own limit wearing the citizen's face, which is the shape this codebase keeps finding. `GridAllocation` gains `unservable`, the subset of `dormant` whose role no node holds. Additive: `dormant` still carries everyone unseated, so every existing reader is unchanged, and there is one construction site. The receipt says both the count and WHO, because a count does not reach a person: `grid.allocation.published` carries `unservable`, and a new `grid.mind.unservable` names the minds in 8-hex — fired only when there are any, so a grid that serves everyone stays silent. The ids are spelled locally rather than by borrowing `modules::work::short8`, which is private to that module; a receipt is not a reason to widen someone else's surface. This does not widen a lane or shrink a prompt. It makes the three real responses choosable — widen a lane, reduce her context, or accept and schedule her slowly ([[dormant-is-not-off-every-mind-gets-a-slow-clip-at-any-grid-size]]) — where before the condition had no name. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(grid): name the mind whose TURN exceeds every lane, not only the role no node holds Cormac's REQUEST CHANGES on #4314, and he is right: the first cut was correct machinery aimed at the wrong case. `hosts.is_empty()` asks whether any node holds her ROLE. Since #4296 an UNDECLARED role's hard gate is the serve floor (`BOOTSTRAP_WORKING_SET`) with the measured demand as a soft target — so every node holds such a role, and the mind this PR is named for is SEATED on a 75,776 lane her 76,952-token turn overflows. She never enters `dormant`, so she never reached the new field at all. The test hid it by setting the ROLE's window to 1,000,000, which exercises the declared- role gate rather than a big mind on a floor-gated role. Both of Cormac's remedies, because they are different true facts: 1. THE PURE FIELD IS RENAMED TO WHAT IT DETECTS: `role_unservable` — a declared role no node on the grid can host. That is real and worth keeping; it simply is not b8503234. Its doc now says what it does NOT catch, and why. 2. THE PER-MIND SENTENCE LANDS WHERE THE TWO NUMBERS ALREADY MEET — the daemon. `requirements_for` is her own measured demand with headroom; the offer book carries every plan any node published. `minds_over_the_grid` compares them and `grid.mind.unservable` names her, her number and the grid's widest window. Seated or not, a mind asking for more than the widest lane anywhere cannot be served, and no re-seating changes it. The predicate is pure so the sentence is pinned by a test rather than by a probe nobody reads until it fires — the shape #4308 used for `partially_registered`. Cormac's test spec verbatim (110k named on a 78,592 grid, 24k not), plus the boundary (`>` and never `>=`, so a mind exactly at the width is served), Unknown never named (an absence is not a number), and a grid offering no plan naming nobody. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5 <[email protected]>
The live grid reported every host
BelowEveryRequirementand seated zero citizens even while the 5090 was serving their turns. An undeclared role inherited the largest measured, untrimmed context demand as a hard minimum; a single large turn could disqualify the whole fleet.Keep two distinct values in the existing requirement type:
windowis the hard declared minimum (or existingBOOTSTRAP_WORKING_SETfloor), whiletarget_windowis measured demand. Admission still enforces minimum window, capability and decode. Among equally capable feasible plans, selection approaches the measured target before adding lanes; extra context never outranks a stronger model. Mixed declared/undeclared members preserve both values, independent of recipe order. Measurements participate in the allocation key. Allocation and opportunity migration use the sameseat_key(requirement), so migration cannot undo target-fit selection in favor of more narrower lanes.allocator/gridnow reports the exact role minimums and targets from its published snapshot, without re-deriving them. This does not clip prompts or relax per-request capacity checks.Regression coverage: a 150k measured target across three smaller hosts retains seats; the bootstrap working-set floor still rejects undersized hosts; declared window/capability/decode constraints survive mixed recipe order; target changes invalidate the allocation key; capability-first selection remains intact. Both directions of opportunity migration are covered. Native allocator tests are building; the reviewed revision also requires the placement tests. Strict local clippy on the parent reaches 606 existing crate errors; no clean-clippy claim or suppression is introduced.
git diff --checkpasses.Stacked on #4294 for one coordinated deployment. Peer review and green CI required. Live acceptance: all-zero allocation recovers, requirements are inspectable, and Kimi proceeds through a real code change, focused tests and review. That end-to-end acceptance is not yet achieved.