Repository navigation
feat(cognition): the grid allocates its minds — one pure allocation with the machine scenarios as tests (card 2eec3977) - #4259
Conversation
…ver declared roles, the minds on disk and every node's runnable plans, with the machine scenarios as tests Card 2eec3977 (Joel, 2026-09-20: why 25 personas, what determines this, run every computer scenario and prove competency). Before: the population was every identity on disk (#432), bounded per node by its own warm slots (7c38ff6f); no node decided which minds belong on it, and a node joining or dropping changed nothing but its own draw. grid_allocation::allocate(GridInputs) -> GridAllocation. Inputs: roles in priority order, each a Requirement (window, min capability, decode floor); minds (role + home); a NodeOffer per node holding the LanePlans its own serving planner already computed (LanePlan::of a ServingPlan — no translation layer); the minds-per-lane ratio passed in. Output: what each node serves and why (Hosts / BelowEveryRequirement{best_window, best_capability} / NothingRunnable), who sits where, who is dormant, and the open seats per node and role — the spawn signal. Objective in order: every seated mind at its role's requirement (a 2k lane is not a seat), then capability, then lanes, then window. A mind seats at home when home holds her role, else anywhere the grid has a seat; extras dormant with identity kept. Scenarios: a box that serves only 2k seats nobody and says how far off it is; a lone 64 GB box seats coders on the 27B at 2 lanes (capability before the 7B's 4 lanes, lanes before the 1×131k); a GPU box joining wakes the dormant on it, keeps the seated home, opens seats to mint; a node dropping reseats what fits and the rest go dormant; a 16 GB laptop hosts orchestration and coders go where the capability is; a 6.3 t/s lane does not seat a coder with a 10 t/s floor and an unmeasured one is not refused; 1 mind on 4 seats opens 3, 25 minds on 4 seats leaves 21 dormant; the real planner's plan reads as an offer. Pure, no daemon yet: the module that holds offers and calls this once per change follows. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE with one design condition — reviewed at exact head 6b82c27, as the design-before-code read (Track A's gate), with the reviewer mandate: elegance, substrate viability, the floor tier. What is right, and it is most of it: one pure function over three DECLARED inputs and a passed ratio, no global read, no constant of Joel's grid; a node that joins is one more offer and one that drops is one fewer; The condition: Notes, not conditions: (a) the operator's roster hold and a recipe's declared team are inputs to this decision, not something a consumer applies after it — when the daemon lands, they belong in |
…order — Cormac's condition on #4259 One engine at one window holds every role whose requirement is at or below it. decide_node still chooses the plan for the highest-priority role the node can hold (coders stay on the capability) and now records every role that plan holds; the fill walks roles in priority order across every node holding them, so a 4-seat coder box with 2 coders and 3 orchestrators seats 2 + 2 with 1 dormant and 0 open — before it held 2 seats open for coders that did not exist and sent 3 orchestrators dormant. open stays per node for the role the node was chosen for. One scenario pins it, with the pressure case (5 coders + 3 orchestrators on 4 seats → 4 coders). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Condition taken at 697b687: NodeAllocation carries holds (every role the chosen plan holds, priority order); the fill walks roles downward across every node holding them; open stays per node for the role it was chosen for. Your scenario pins it (2 coders + 3 orchestrators on a 4-seat coder box → 2 + 2 seated, 1 dormant, 0 open) plus the pressure case (5 + 3 → 4 coders, 0 orchestrators). Notes (a) roster hold + declared team as GridInputs, (b) decode at the served total from the #4260 seam, (c) offers sorted by node id in the daemon — all taken for the daemon PR. Validating through CI only from here (my local builds were the M5's 16 GB external — its Eco line). A fresh word at 697b687, please. |
|
APPROVE — reviewed at exact head 697b687. The condition is taken exactly: a node's chosen plan is still the best for the highest-priority role it can hold (coders stay on the capability), holds carries every role at or below it, seats are the node's and fill in priority order, and open is reported for the highest-priority role the node holds; the scenario pins 2 + 2 seated / 1 dormant / 0 open and the 4-coders-over-orchestrators priority case. Merge on green. |
…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
…grid allocation — never something the spawner applies after it (card 426a26fb, lane 2 of Track A) (#4267) 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. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
What
cognition/grid_allocation.rs:allocate(GridInputs) -> GridAllocation, pure.Requirement(window, min capability, decode floor); minds (role + home); aNodeOfferper node holding theLanePlans its own serving planner already computed (LanePlan::of(&ServingPlan), no translation layer); the minds-per-lane ratio passed in, never read.Hosts{role}/BelowEveryRequirement{best_window,best_capability}/NothingRunnable), who sits where, who is dormant, and the open seats per node and role — the spawn signal.Why
Joel, 2026-09-20: "why do we have 25 persona spawned … What even determines this? … run through all computer scenarios and test that our system delivers competency." Today the population is every identity on disk (#432) bounded per node by its own warm slots (7c38ff6f); nothing derives the population from what the grid can seat, no node decides which minds belong on it, and a node joining or dropping changes nothing but its own draw.
Scenarios (the tests)
Not in this PR
The daemon that holds offers as they arrive and calls
allocateonce per change (not per tick), and the spawner/placement consumers ofopenanddormant. Card 2eec3977 tracks both.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo