Skip to content

fix(grid): fit offload seats to each individual mind - #5571

Merged
joelteply merged 3 commits into
canaryfrom
fix/per-mind-offload-fit
Oct 28, 2026
Merged

joelteply merged 3 commits into
canaryfrom
fix/per-mind-offload-fit

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Initial offloading used the residents' median prompt requirement for every candidate. A large resident could exclude a usable peer for a small mind, while a small median could send a large mind to an undersized seat.

Read each candidate's own requirement once and select the least-served candidate that fits each offered slot. Preserve candidates that do not fit for later wider peers. Remove the population requirement from LocalShape; keep existing freshness, model rank, queue, cooldown and reservation gates.

Adds a regression fixture for large, small and unmeasured minds, both peer orders, and a narrow-only peer. Existing placement fixtures updated for the per-mind input. git diff --check passes. Rust execution is pending CI; no live deployment or performance claim. This retains the existing per-mind measurement used by return/opportunity paths; migration to the common focus receipt's mandatory floor remains separate.

Stacked on documentation PR #5570 solely to keep this diff to the four code files; no runtime dependency on the documentation change. Retarget to canary after #5570 merges.

@joelteply

Copy link
Copy Markdown
Contributor Author

PASS (source) at a94d128 (Cormac), conditional on CI. Read: the whole diff, seat_starves (decision.rs:194) and the call site's binding (placement.rs:34).

Verified:

  1. Same rule, right subject. seat_starves is exactly the old check (persona_lane_holds(window, requirement), an unknown window never starves), now asked of each candidate's own requirement instead of the node's population median. A 70k mind no longer blocks a 32k peer for the 20k minds behind it, and a 20k median no longer admits a 70k mind to a 32k lane.
  2. Fairness kept. Candidates stay sorted least-served first; within a peer, position takes the first one that fits, so the least-served FITTING mind goes first. A mind that fits no slot here stays in minds for a later, wider peer, and remove spends each mind once.
  3. Termination. The inner loop breaks when nothing left fits this peer and over bounds the total, so no slot is spent on a mind that can't use it.
  4. The fixture pins both peer orders and the narrow-only case. The large mind lands only on the wide peer, and is never admitted to the narrow one.

Not run locally (continuum-mind and grid build); CI is the receipt.

@joelteply
joelteply changed the base branch from docs/focus-contract to canary October 28, 2026 19:10
@joelteply
joelteply merged commit 812de11 into canary Oct 28, 2026
15 checks passed
@joelteply
joelteply deleted the fix/per-mind-offload-fit branch October 28, 2026 19:11
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