Skip to content

feat(cognition): a roster hold and a declared team are INPUTS to the grid allocation — never something the spawner applies after it (card 426a26fb, lane 2 of Track A) - #4267

Merged
joelteply merged 1 commit into
canaryfrom
feat/grid-allocation-consumers
Sep 20, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/grid-allocation-consumers

Conversation

@joelteply

@joelteply joelteply commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Card 426a26fb — lane 2 of Track A, on top of #4259 (bc48d9b). Companion to #4263 (owners/terms), which touches the same file: whichever lands second rebases (both add fields to GridInputs and the test inputs() helper; no semantic overlap).

What

  • Hold { node, only, exclusive } on GridInputs. EXCLUSIVE (the operator's roster_hold file, names resolved to ids by whoever builds the inputs): only its names sit on its node, and the node has at most only.len() seats — the hold DEFINES that box's roster, so a name with no mind behind it is an empty seat, never one to mint. An exclusive hold naming nobody restricts nothing (seats_under's own semantics). DERIVED (a working round's team): its names seat first on its node, everyone else after, never fewer.
  • RoleFloor { role, min_seats }: a recipe's declared team. Minds seat in batches — every role's floor first (role order), then every role's remainder — so a 4-seat box with 5 coders + 1 orchestrator seats 3 + 1 under a floor of one orchestrator, 4 + 0 without. A floor the grid cannot fill for want of MINDS is the spawn signal's first claim: open names that role before the box's best role. A floor for a role no node holds opens nothing.
  • A hold's node is a named mind's home first; admission and the seat cap live in decide_node / allocate. No holds, no floors = feat(cognition): the grid allocates its minds — one pure allocation with the machine scenarios as tests (card 2eec3977) #4259 exactly: its nine scenarios are unchanged.

Why

Cormac's note on #4259: the hold and the declared team are inputs to THIS decision, not something a consumer applies after it. Today the spawner caps its own draw by the hold (seats_under), skips held-out names at the draw (draw_intents), and the team is a role list with no minimum — three decisions about the same seats in three places. Next slice (same card): the spawner's seats() reads this node's NodeAllocation and open by owner, and seats_under / bounded_by_warm_slots retire into the allocator.

Tests

Three scenarios, each a test first: the exclusive hold (roster, spill to the other box, ghost name, empty list); the derived hold (team first, stable, home override); the declared team (3 + 1, floor above the minds that exist, open-for-the-team first, a floor nobody holds). Receipt: cargo test --lib cognition::grid_allocation 13 passed / 0 failed, REAL_EXIT 0. Proven by mutation: floors ignored → only the team scenario fails; exclusive hold admitting everyone → only the hold scenario fails (12/1 each), file restored.

Faster or slower: pure; one allocation per change, never per tick. Same order.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE with one mechanical condition — read at 562a7a3 (design-before-code, Track A's gate).

Right, and it is the design: the hold and the declared team are INPUTS to the one decision — an exclusive hold DEFINES a box's roster (seats = min(warm, names), only the named sit, nothing minted for a ghost name, an empty list restricts nothing), a derived hold only orders (team first, never fewer), and a role floor seats in batches (every floor first, then remainders) with the floor's shortfall as the spawn signal's first claim. No holds, no floors = #4259 unchanged, and the mutation receipt is the kind of proof I want on this file.

The condition: #4263 merged at 16:06Z (owners/terms/OfferBook, same file), so this rebases onto canary and the two seams merge into one: (a) admits becomes ONE predicate — the hold's admission AND the owner/terms admission (a foreign owner's node lends within terms; an exclusive hold names who sits) — not two closures with the same name; (b) OpenSeats carries owner on canary now, so the floor-first open loop and the best-role loop both stamp offer.owner; (c) inputs() in tests gains holds/floors beside minds' owner and the offer() helper. Push the rebase and I read the head again; then it is batch two with #4265/#4266.

Note, not a condition: a hold's names arrive as ids "resolved by whoever builds the inputs" — that is the daemon (my next PR); it resolves the roster_hold file's names through the registry once per change, never per tick.

…grid allocation — never something the spawner applies after it (card 426a26fb, lane 2 of Track A)

Cormac's note on #4259: the operator's roster hold and a recipe's declared team are
inputs to THIS decision. Today the spawner caps its own draw by the hold (`seats_under`),
skips held-out names at the draw (`draw_intents`), and a recipe's team is a role list
with no minimum — three decisions about the same seats in three places.

- `Hold { node, only, exclusive }` on `GridInputs`: an EXCLUSIVE hold (the operator's
  file) admits only its names on its node and the node has at most `only.len()` seats —
  the hold DEFINES that box's roster, so a name with no mind behind it is an empty seat,
  never one to mint (the 2026-09-13 shape: population 12, hold of 5, the reconciler asking
  the exhausted provider for 7 every second). An exclusive hold naming nobody restricts
  nothing (`seats_under`'s own semantics). A DERIVED hold (a working round's team) orders:
  its names seat first on its node, everyone else after, never fewer.
- `RoleFloor { role, min_seats }`: the declared team. Minds are seated in batches — every
  role's floor first (in role order), then every role's remainder — so a 4-seat box with 5
  coders and 1 orchestrator seats 3 + 1 under a floor of one orchestrator, 4 + 0 without.
  A floor the grid cannot fill for want of MINDS is the spawn signal's first claim: `open`
  names the orchestrator before the box's best role. A floor for a role no node holds opens
  nothing. No floors and no holds = the #4259 allocation exactly (its nine scenarios
  unchanged).
- The seat cap and the admission live in `decide_node` / `allocate`; a hold's node is a
  named mind's home first.

Three scenarios pinned: the exclusive hold (roster, spill, ghost name, empty list), the
derived hold (team first, stable, home override), the declared team (3 + 1, floor above
the minds, open-for-the-team first, a floor nobody holds).

Faster or slower: pure; one allocation per change, never per tick. Same order.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply force-pushed the feat/grid-allocation-consumers branch from 562a7a3 to b507eea Compare September 20, 2026 16:27
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE at exact head b507eea — condition taken: one admits predicate (hold names → owner → terms), owner on every open row, holds/floors in inputs_key and pinned. Merge on green; it joins batch two with #4265/#4266.

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