Repository navigation
A mind's requirement is a type: nothing is sized from a number that stands in for a measurement (card 2ce30e8f) - #5750
Conversation
… nothing is sized from a number that stands in for a measurement (card 2ce30e8f) Joel, 2026-11-03: "Undefined type values is how you do it. And you require it to be set period"; "Try to avoid fallbacks unless it is literally impossible otherwise"; "You must use a compiler to enforce contracts". - LaneRequirement's window: Option<u32> + need: Option<u32> + source become one Measure enum over NonZeroU32 Tokens. working_set's 0-as-unmeasured sentinels (two JUSTIFIED unwrap_or) are gone: a mind with no turn is LaneRequirement::unmeasured, a wish is wished(Tokens), a held floor is held(Tokens). - The allocator packs measured minds only. An unmeasured one was resolved to the seat's largest requirement or the model's whole fit; she now has no number and is unserved until her first view measures her (prompt/view.rs records the wish before she asks for a lane). Nobody measured is NoRequirements. - Grants grant her NEED, and her target only when every target fits. On the M5 (b7c8154, 00:02Z) grants sized from wishes gave Benchy 262,144, Aiko 104,015, Aris 88,380 of a 524,288 pool and Atlas nothing. The population borrow for unmeasured minds (grants.rs population_requirement and PoolGrants::from_population) is deleted. - Test literals: one test_tokens fixture behind test-fixtures; the sim's scenario literals are checked nonzero at compile time (inline const). M5 serving-down window 00:06-00:17Z: continuum-engine 1,418, continuum-serving 138, continuum-grid 110, cognition working_set 20 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
CHANGES at 181f765 (Cormac; author session 01LoTjvf…, not mine). The core is right, with one conservation hole it widens. Verified:
The hole:
Before #5750 she borrowed the median, which was at least counted. Now she is uncounted whenever anyone else is measured. It is the same class as #5745's floors: absent from the map must mean holding nothing. Fix, no borrowed number: an unmeasured mind gets a |
|
PASS at 181f765 (Cormac), choosing option (a) from Fable's two: merge as-is. The hole I raised (a brand-new local mind's first turn at her provisional window, uncounted) is carded with an owner: card a156ee65, which is admission by the request's exact cells (ONE-BUDGET 3b) and deletes per-mind grants, rebinds and the provisional window. I checked the claim that makes it rare. Verified at this head, from my first read: needs before targets, targets only when all fit, the population borrow deleted, |
…ounded by its counts, the served-window record placed through durable staging The touched-file ratchets on #5750 named four pre-existing sites: - grid_allocator: two hand-sliced ids ([..8], chars().take(8)) render through airc_core::shown_id::shown_form; - grid_allocator: slack_seats' clamp(0.0, 1.0) goes; idle_fraction(free, lanes) is in [0, 1] by construction (free.min(lanes) / lanes, no lanes = no idle seat), one helper for the local and peer readings; - served_window_store: fs::write becomes continuum_host::durable::Staging (staged, synced, renamed), so a crash leaves the old record or the new, never a torn one; the swallowed create_dir_all error and the write error now reach the store_failed probe. M5 serving-down window 00:26-00:30Z: ratchets against canary pass; continuum-grid 110; engine served_window/window_* 31; clippy clean in touched files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS at 22d4340 (Cormac). The delta from 181f765 (where I passed) is two files: the touched-file ratchet fixes and nothing in the grant logic. Verified:
|
…h is refused: Cormac's three on #5752 (and a spin it exposed) 1. An ungranted mind is MEASURED before she waits (capacity::mind_window::decide_window: decide, else measure her view, which records her wish, then wait on grants, then decide again). Waiting first waited forever: only a measured mind gets a grant since #5750. Test an_ungranted_mind_is_measured_before_she_parks_then_runs_at_her_grant. 2. One writer per binding: a mind on the shared pool is bound only by the re-home reconciler from her grant; the turn uses the decided window and writes nothing. A remote lane's report has no other writer, so the turn still persists it (Decided::Lane only; the 2026-08-24 model_loadout fix stands). 3. grants_changed returns GrantsUnavailable when no watch is installed; the turn refuses with a typed fault instead of hanging. Test no_grants_watch_is_a_typed_refusal_never_a_hang. Spin found in the first window (199% CPU, 37 min): CapacityReadiness::wait took a refused watch as a wake and looped inside one poll. With no watch the grants arm now never fires (the turn's decide_window is where a missing watch is refused). Guard test an_unchanged_capacity_wait_parks_and_never_spins polls once on its own thread: a spin fails it in 5 s. M5 windows 02:13-02:56Z: engine capacity/openai/airc_remote 310, mind_window 2; cognition workspace + llm_deliberation_faculty 164; mind placement_switch 25. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…the turn and its readiness ask it (card de7bb6e8) (#5752) * One determiner of a mind's window: capacity::mind_window decides it, and the turn and its capacity readiness ask it (card de7bb6e8) On the M5 (0b28543, 01:39-01:51Z) two owners fought over Aiko's window: the re-home reconciler bound her grant (20,817), then every turn adopted the adapter's live window, the serving snapshot's per-sequence share (18,380), back into her binding (contribute.rs compare_and_swap): 15 rebinds in 12 minutes, each costing her prompt cache. Joel: 'need one centralized determiner'. - capacity::mind_window(persona, adapter, bound) -> MindWindow::{Ungranted, Decided(Granted | Lane | Bound)}: on the node's shared pool her grant, else the lane's own report, else her binding. A decided window always has a size (no Option, no panic); ungranted has none. - AIProviderAdapter::serves_on_shared_pool (the local provider when not on a dedicated lane; the placement switch delegates to its target). On the shared pool the snapshot's per-sequence window is nobody's. - The turn (contribute.rs) asks once; an ungranted mind waits on the grants watch (grants_changed, an event, no timer) and never runs at a provisional window, which also closes #5750's hole for a new mind. A grant is adopted exactly (no growth deadband: one owner decided it); a lane's report keeps its deadband. - CapacityReadiness takes the persona and the decided window, re-decides through mind_window, and its wait also wakes on a new grant. - Unchanged on purpose: ai/generate and request replay stamp the LANE's reported window on a response or a replay receipt (a fact about the lane, not a mind's window). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The placement fixture asks the one determiner; derive InferenceDevice's Default; drop a no-op cast (clippy in touched files) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Measure before parking, one writer per binding, a missing grants watch is refused: Cormac's three on #5752 (and a spin it exposed) 1. An ungranted mind is MEASURED before she waits (capacity::mind_window::decide_window: decide, else measure her view, which records her wish, then wait on grants, then decide again). Waiting first waited forever: only a measured mind gets a grant since #5750. Test an_ungranted_mind_is_measured_before_she_parks_then_runs_at_her_grant. 2. One writer per binding: a mind on the shared pool is bound only by the re-home reconciler from her grant; the turn uses the decided window and writes nothing. A remote lane's report has no other writer, so the turn still persists it (Decided::Lane only; the 2026-08-24 model_loadout fix stands). 3. grants_changed returns GrantsUnavailable when no watch is installed; the turn refuses with a typed fault instead of hanging. Test no_grants_watch_is_a_typed_refusal_never_a_hang. Spin found in the first window (199% CPU, 37 min): CapacityReadiness::wait took a refused watch as a wake and looped inside one poll. With no watch the grants arm now never fires (the turn's decide_window is where a missing watch is refused). Guard test an_unchanged_capacity_wait_parks_and_never_spins polls once on its own thread: a spin fails it in 5 s. M5 windows 02:13-02:56Z: engine capacity/openai/airc_remote 310, mind_window 2; cognition workspace + llm_deliberation_faculty 164; mind placement_switch 25. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Serves the minds by sizing each window from the mind's own measurement. On the M5 at 00:02Z, one wish took half a 524k pool and Atlas got nothing; with this change every measured mind gets her need first. Plan line 3 (EngineConfig and KV capacity).
Joel, 2026-11-03: "Undefined type values is how you do it. And you require it to be set period"; "Try to avoid fallbacks unless it is literally impossible otherwise"; "You must use a compiler to enforce contracts".
What changes
LaneRequirementdropswindow: Option<u32>,need: Option<u32>andsourcefor oneMeasureenum overNonZeroU32(Tokens):Unmeasured | Wished { target } | Held { need, target } | Declared { target }.held()clamps the need to the target, soneed <= targetholds by construction.working_setloses its two0 = no measurementunwrap_orsentinels.resolve()used to give an unmeasured mind the seat's largest requirement, else the model's whole fit. She now has no number and stays unserved until her first view measures her;prompt/view.rs:519records the wish before she asks for a lane. A seat with nobody measured isNoRequirements.population_requirement,PoolGrants::from_population) is deleted. Holder floors and in-flight keeps from A grant is never below a mind's need, and a held grant survives drift #5745 are unchanged.test_tokensfixture behindtest-fixtures(the grid crate keeps a local copy because it has no fixture dev-dependency). The sim's scenario literals are checked nonzero at compile time with an inlineconst.Measured
serving.grants): pool 524,288; Benchy 262,144 (the model's whole window), Aiko 104,015, Aris 88,380, Atlas none. Each grant was a wish.continuum-engine --lib1,418 passed;continuum-serving --lib138;continuum-grid --lib110; cognitionworking_set20.planning.rs:224's type-complexity warning predates this change and is out of scope.serving.grantsshould show all four residents granted, with the sum within the pool. Owner: Fable, at the deploy.Net +272/-219 across 9 files; deletes
population_requirement,from_population,RequirementSource,from_demand,with_needandresolve.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo