Repository navigation
fix(cognition): a citizen's own lived turns become curriculum — producer wired INTO the settle driver (#319) - #2337
Conversation
…become curriculum, not just graded cards (#319) `ExperienceRecord::from_lived_turn` had ZERO production callers tree-wide. The only live producer was `from_kanban_grade` (benchmark.rs:1989), so the experience stream — "the SPINE the salience→curriculum seam was missing", in `experience_stream_path`'s own words — was fed EXCLUSIVELY BY GRADES. A citizen could hold a thousand real conversations and her stream stayed empty. Nothing could learn from work nobody had scored. Everything needed already existed and was correct: the record shape, the two magic-number-free lived-salience signals (infra fault, non-convergence), `ErrorSalience` reading them with no new detector, and a doc block naming "the lived-turn settle site" as a producer. The CALL was missing. Same shape as #341 (boot called the unbounded sink; the rotating one had zero callers) and #362 (ProbeRouterLayer installed with its handle discarded) — a built component with a dead wire, which is why [[an-absence-is-an-unfinished-measurement]] keeps earning its place. WIRED at `service_loop.rs`'s live settle site, BEFORE `SettleStep::from_settled` consumes the outcome — the only point where a lived turn's settle verdict exists. The driver stays a driver per PERSONA-COGNITION-PIPELINE §3: one call, no policy. The behaviour lives in `experience::record_lived_turn` so it is unit-testable without booting a loop. BEST-EFFORT, and that is NOT a fallback ([[no-fallbacks-ever]] holds): nothing is substituted and no result is fabricated. Learning is a SIDE channel to being — a full disk must not make a citizen mute mid-sentence. The failure is WARNED with the path and the honest consequence ("this episode will not become curriculum"). COMPRESSION, because the new writer would otherwise have been the FIFTH hand-rolled spelling of the citizen storage layout. `citizens/peers/<uuid>` was written as `join("citizens/peers")` in modules/work.rs, `join("citizens").join("peers")` in commands/benchmark.rs, and in prose in persona_workspace.rs + persona_roster.rs. Now ONE resolver, `identity::citizen_peer_dir(root, peer)`, in the module whose own doc says "the whole crate imports identity from ONE home" and warns against exactly this re-invention. Keyed by `PeerId`, never a String — the directory name IS her identity. Pure path arithmetic, so a read-only caller never mints an empty citizen dir, which its test pins. Tests: 11/11 cognition::experience (the lived-turn test now asserts the PRODUCER — empty stream → record lands at the canonical path → a second turn appends rather than overwrites, i.e. the wire, not just the record's shape) + identity's one-spelling test. `cargo check -p continuum-core --features metal,accelerate` clean. LIVE PROOF OWED and NOT claimed: no live turn has run on this build. The falsifiable prediction is that a citizen's `citizens/peers/<her>/experience.jsonl` gains a `LivedTurn` record on her next real room turn, where today it holds only kanban grades or nothing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… not at one call site (#319) MEASURED, and it retracts my own claim from 200dab9. I wrote that the #319 producer was wired and that a LivedTurn record was owed on the next real turn. The wire was wrong, so the record could never come: 180 experience records across 5 citizens on this box, 100% `source: "Eval"`, ZERO `LivedTurn` — while the same core showed 47 persona.upstart.bind, 97 presence rows and 4 delib.context.render, i.e. citizens alive and deliberating. ROOT CAUSE. `record_lived_turn` was called from ONE of the THREE `drive_to_settle` sites in service_loop — the directed-message path (:1087). The self-tick path (:2628) and the held-work path (:1207) settle turns through the same driver and recorded nothing. Three callers, one remembering: a missing constraint expressed as three sites, not a bug at one ([[the-same-bug-at-two-sites-is-a-missing-constraint]]). FIX. The record moves INTO `drive_to_settle`, which is the one place a `SettleOutcome` is born. `drive_to_settle` is now a thin wrapper over a private `settle_to_outcome`, so the write happens ONCE around the driver rather than at its four return paths — a fifth return path added later inherits learning instead of silently opting out, and no call site carries learning policy. Gated on `WorkspaceCycle::acting()`, because that is where a citizen's identity lives: a cycle with no `ActingBody` is pure cognition (a faculty test, a replay) and is nobody's lived experience. Structural absence, not a skipped write. SECOND FIX, applying Joel's rule that a required thing should not be re-expressible: dropped the `stimulus: &str` parameter. It was a second, independent expression of "what she was responding to", free to disagree with what the turn actually perceived — and it already did, since the old call site passed only `msg.text` while the mind had settled over the whole rendered burst. The stimulus is now read off `SettleOutcome.world_state` (set on every return path), so the disagreement is unrepresentable rather than merely discouraged. The test asserts `task.prompt == settled.world_state` instead of a literal. GUARD, positive-controlled (not merely green): a source-walking test asserts `record_lived_turn` has EXACTLY ONE production caller and that it is settle.rs. Verified failing — injected a second call into service_loop and it reported `found 2: [settle.rs, service_loop.rs]` with the remediation in the message. Reverted. Comment-stripped so prose naming the function cannot read as a call (registry.rs's module-wiring audit is the house precedent). cargo check clean; cognition::experience 12/12, cognition::act_observe 38/38. LIVE PROOF STILL OWED and NOT claimed: no turn has run on this build yet. Baseline for falsifiability is recorded above — 180 records, 100% Eval, 0 LivedTurn. The prediction is that a hosted citizen's `citizens/peers/<her>/experience.jsonl` gains a LivedTurn record on her next settled turn from ANY of the three paths, where today it holds only kanban grades. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Coverage audit: is
|
Correcting my own reading above: it was NOT latency. It is lane-admission starvation.I wrote "this reads as latency, not a blocked path" in the previous comment. That was The measurement. Over ~25 minutes on
Frozen counters, not slow ones. Latency would have moved them. Mechanism, read in-file ( sem.acquire_owned().await // unbounded parkWith 24 hosted citizens, one self-tick holds the single non-directed permit and the Why this matters beyond #319. The four self-ticks that DID perceive never reached any What I did about the measurement, per The single non-directed permit is now uncontended. Watcher still armed; still owed, still Lesson for me, and it is the same one twice today: a frozen counter and a slow counter |
Live proof: BLOCKED by box state, not by this change. Watcher stopped; nothing claimed.Quiescing 24 → 1 did not relieve the park. What is actually holding this box ( That is #440's frontier bring-up — a different in-flight lane, not persona serving. So the honest state of the proof: this box cannot currently produce an ambient settled Unit evidence stands (12/12 + 38/38, guard positive-controlled by injection). Live Cheapest route when someone picks this up, in order:
Roster left at 1 (Anon). Independent finding worth its own card (#446/#139 family): an unbounded |
…t pinned the whole roster at the 240s cap Measured live 2026-08-17, 24 hosted citizens: ONE self-tick across the entire roster in 40 minutes, on a serving lane that was healthy and decoding at ~17 tok/s the whole time. The lane was never the problem. The cadence rule was. The self-tick gates on a single ambient-turn permit (AMBIENT_TURN_CONCURRENCY = 1). When a peer holds it, the citizen yields — she never ran, never looked at the room, learned nothing. The yield branch nonetheless charged her the SAME 1.5×-toward-the-cap backoff as a citizen who ran a full cycle and found nothing new. With 24 citizens, ~23 yield on every beat. Eight yields carries 15s past the 240s rest cap — a 16× slowdown — and she STAYS there, because the only two things that reset the beat are a successful cycle (which the backoff itself now denies her) and an inbound message. Transient contention compounds into permanent slowness, and it gets strictly worse as the roster grows. That is a ratchet, not a rest. Fix: a yield leaves the beat exactly where it was. The earned backoff after a real, fruitless cycle is untouched — that one is honest. Extracted the rule into a pure `next_beat_after(BeatOutcome, ..)` (the `core_bind_guard::decide` shape) because the three outcomes — Engaged / NothingNew / YieldedNoSlot — are trivially confusable inline, and confusing two of them cost the roster 16×. Both call sites now derive from the one function; there is no second expression of the cadence. Regression test pins the invariant in both directions: 50 yields must not cost a single millisecond; a fruitless cycle must still back off and must saturate at the cap. Positive-controlled — restoring the old compounding fails the assertion by name. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rom the live lane budget, like its own doc always claimed
The self-tick gate in service_loop.rs has documented this permit as "sized to the LIVE
served lane count (LaneAdmission ← set_served_lane_count)" for as long as it has existed.
It never was. It was `const AMBIENT_TURN_CONCURRENCY: usize = 1`, and that constant was the
roster's starvation ceiling: on this box, 4 served lanes and 24 hosted citizens, so 3
non-directed lanes sat permanently idle while 23 citizens yielded every beat against a pool
of one.
Two things kept it invisible. The comment described the intended design, so reading the
call site told you the opposite of the truth. And a hard 1 is indistinguishable from a
quiet room at n≈1 citizen — which is exactly how it was reasoned about ("under light load
ambient turns are naturally serial, so this never throttles a quiet room"). It doesn't
throttle a quiet room. It throttles a POPULATED one, and the roster only grew.
Fix: the pool is `nondirected_budget()` — the same live (lanes − 1, floored at 1) budget
the per-call lane reservation already uses. One machine, one answer to "how much
non-directed concurrency is there", derived from live capacity instead of declared twice
and then contradicted.
Why loosening this bound is safe: the directed-turn guarantee never came from this permit.
It comes from `acquire_serving_lane`, which caps non-directed CALLS at lanes−1 so a
directed call always finds a lane — untouched here, and it is the layer that actually owns
lane priority. This permit's job (#171) is anti-STAMPEDE: bound the fan-out when N peers
wake on one beat and all read inflight=0. A bound of lanes−1 does that job exactly as well
as a bound of 1 — still fixed, still non-blocking, still held across the turn — while no
longer throttling below the hardware.
Also wired the pool into `set_served_lane_count` alongside its two siblings. It is lazy for
the same load-bearing reason they are (capture the real count at first use, never the boot
ceiling), which makes "first use beat serving's first publish" a live possibility — and
without the grow wiring the whole roster would stay pinned at the boot budget for the life
of the process. That has its own regression test.
Tests: the existing ambient test now pins a real 4-lane machine and asserts against the
derived budget — a PREMISE CHANGE, stated as such, because at a hardcoded 1 it could not
tell "correctly bounded" from "throttled below the hardware". Two new rows cover the halves
that could silently hurt: a 1- and 2-lane box still admits exactly one ambient turn
(byte-identical to before on the weakest supported hardware), and a cold-boot pool grows
when serving publishes its real width. 8/8 green.
Corrected two stale comments while here: `resource_admission.rs` claimed "an idle self-tick
is not ambient-permit-gated at all", contradicted by the self-tick gate's own comment block
in the same tree; and the service_loop references to the now-deleted constant.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…stale core that steals the socket mid-build MEASURED 2026-08-17. `continuum reboot` shipped 6229b37 and deploy-verify reported the core running a87f7c8. The installed image on disk was confirmed to contain the NEW sha, so the build and the install were both correct. The core that answered simply was not the one the deploy launched. The mechanism is not subtle: 1. `reboot` stops the old core and runs start-server.sh, which BUILDS (292s and 530s measured here; 772s on BIGMAMA per #422) and only near the END copies the fresh artifact over ~/.continuum/bin/continuum-core-server. 2. For that whole multi-minute window, no core answers the socket AND the installed path still holds the PREVIOUS build. 3. Every `continuum <verb>` calls `ensure_core_running`, whose entire job is to autostart when nothing answers. In that window it launches the STALE image. 4. That stale core binds the socket and answers. The freshly-built binary loses, and deploy-verify correctly reports the old sha. Any client can do this — a UI poll, `npm start`, a cron, a persona, or an operator typing `continuum ping` to see whether the reboot finished. In the observed incident the trigger was my own 120-second monitor calling `persona/roster`. That also settles the open question on #421, which has sat un-run for days: "something respawns a core within seconds of every kill — external supervisor, or me?" It was the CLI's own autostart. There is no mystery daemon. #421 can close on this. WHY THE EXISTING GUARD COULD NOT SEE IT. `core_bind_guard::decide` is a function of (ping answered, core pids running). Mid-build BOTH are false, and the honest reading of that state really is "no core is running, and starting one is safe" — true in general, wrong during a deploy. "A deploy is in flight" is a fact that lives in another process, so this is not a stricter bind guard; it is the missing observation, published by the only party that knows it. THE FIX. `runtime::deploy_claim` — reboot publishes {pid, started_ms, target_sha} for the length of its build+swap; implicit autostart and the launch arm of explicit `start` consult it and refuse with a message that names the deploying pid, the build it is shipping, and how long it has been going. `--force` overrides, consistent with the Occupied arm beside it. The claim is RAII: released on Ok, Err, `?`, and panic-unwind, because a claim that leaked past its deploy would block autostarts until its owner died. AND THE FAILURE MODE IT MUST NOT BECOME. A claim that outlives its owner would wedge the machine — exactly airc's "start GIVES UP on a contended lock" defect (#355). So the claim is advisory and self-healing: it blocks only while its owner is demonstrably alive AND younger than a 1-hour cap (far above any measured build, still bounded). A killed reboot, a hung build, and a recycled pid all decay back to Clear on their own, and the decision returns `Abandoned{why}` so the caller SWEEPS AND SAYS SO rather than silently obeying a dead file. Writing the claim is best-effort for the same reason: an unwritable advisory file must not turn a hint into an outage. The decision is pure — `decide(claim, owner_alive, now_ms)` — so the `--lib` CI gate covers every row without a filesystem or a process, the same split as `core_bind_guard` and for the same reason. Four rows, each a real case: a live deploy blocks for the whole build; a dead owner and an expired claim both decay to launchable; a future-stamped claim (clock skew) reads as new rather than underflowing to "ancient", which would have silently disabled the guard on any box with a skewed clock; and the on-disk round-trip covers idempotent clear and a corrupt file degrading to absent. 8/8 green with core_bind_guard. NOT YET POSITIVE-CONTROLLED END-TO-END, and stated plainly rather than implied: an isolated control is not reachable while a real core runs, because `running_core_pids()` is global (pgrep) and returns Occupied before the gate. The honest control is the incident itself — a `continuum` verb firing mid-build must now print the refusal instead of autostarting. The monitor that caused the incident still runs every 120s, so the next reboot exercises it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ext was false `reboot` rebuilds AND reinstalls the CLI (#422 / PR #2293). But the invocation doing the reinstall is by construction the one it REPLACES — a running image cannot be the artifact it just installed. So `cli_staleness_note`, which compares the RUNNING `continuum` against git HEAD, diverged on every healthy deploy and printed ⚠ STALE CLI. Observed three times in a row today on deploys that were otherwise perfect, including one whose core verdict was a clean ✅. Its text then said: "`reboot` rebuilds the CORE and never the CLI." That has been false since #2293 — verified on this box today, where the installed CLI advanced a87f7c8 → 6229b37 → 5d62bf3 across three reboots, each time by reboot's own install step. A warning that fires on every success is not a warning. It is noise that trains the operator to skip the exact line where a REAL stale CLI would appear — the same class of defect as #422's own "⚠ …Please report this" that nobody reported, and as airc's `doctor --fix` reporting ok while delivery was 100% down (#348). Fix: `cli_staleness_note` takes `rebuilt_this_run`, so the two situations stop sharing a message. • self-replacing run (reboot on a machine where `cli_self_build` says Rebuild) → "↻ CLI updated: this invocation is build X, the NEXT one runs Y." Information, not a fault, and it still says the useful part out loud: CLI-side behaviour in THIS run is the old build, so re-run a lifecycle verb whose fix lives in the CLI. • nothing replaced it (a bare `deploy-verify`, or a platform where the self-build skips) → the ⚠, with the false "never rebuilds the CLI" sentence replaced by what is actually true: reboot does rebuild it, except where cli_self_build skips the platform. `reboot` computes the flag from the two terms that actually decide it — a start script exists (the same condition `plan_launch` uses to choose Script for a FromSource launch) AND `cli_self_build(OS) == Rebuild`. Both matter: an installed node with no checkout rebuilt nothing, and Windows deliberately skips. Getting either wrong re-creates the noise or, worse, hides a genuinely stale CLI behind a reassuring handoff line. Test pins both readings apart, and that a MATCHING CLI stays silent in both modes so the flag cannot invent a note. It also asserts the corrected wording no longer contains "never" — the specific false claim. 6/6 green. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… the two install defects, and what is NOT yet measured Standing instruction (Joel, 2026-08-17): a new well-labeled dated observation file after every run, and stop reading the old ones. Written from this session's probes and deploy receipts only; no prior cards consulted. Records the honest state including the gaps: the ambient-pool fix has had no uninterrupted window yet (three reboots for the install fixes), and the deploy claim is unit-green but not positive-controlled end-to-end. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…, and the ambient-pool fix is inert at lanes=1 Re-measured instead of trusting my 18:07 snapshot. active_model IS Qwen3.8-27B on the persona lane; #440's bring-up landed. And nondirected_budget() = lanes-1 floored at 1, so at lanes=1 the new pool equals the old hardcoded constant — the fix is correct but buys nothing in this configuration. The remaining ceiling is the LANE count, and serving.plan says why: a 27B at a 16,384 per-slot floor fits one warm slot (resident_personas=4, warm_slots=1, without_warm_slot=3). That is an allocation policy question, not a bug. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ad identically to a healthy one Measured today at lanes=1: a 10-minute window showed zero `persona.selftick.*` rows. That is ambiguous, and dangerously so. It reads the same whether ONE citizen is mid-turn holding the only lane (healthy, just serialized) or the roster is dead. Resolving it required a manual `curl /slots`, which showed slot 0 processing with 3,727 tokens decoded — fine all along. The cause is structural: the yield branch emits nothing. That was the right call for volume — at 24 citizens on a 15s beat, a row per yield is ~92/min and would drown the stream exactly as `serving.plan` did at 2.6 rows/s (#399) — but the absence of a signal is not the same as a signal of absence ([[an-absence-is-an-unfinished-measurement]], the error class that produced the retracted premises on #211 and #390). Fix: count every yield (one relaxed increment on the permit miss, where the yield actually happens), and emit at most ONE probe per minute for the whole process carrying the delta. `persona.selftick.starved` names it as contention, not a fault — because at lanes=1 with 24 citizens it IS the expected shape, and a probe that cries fault at normal operation is the #348 / #422 defect again. Rate-limit rule is pure and table-tested. Four rows, each a real failure mode: the FIRST starvation always reports (a naive `now - last >= gap` swallows it on a box whose clock starts near zero — and the first one is the one that matters); a second report inside the gap is silent (the firehose); after the gap it reports the WINDOW delta, not the cumulative total (a cumulative count cannot show a rate); and a quiet roster emits nothing at all. Concurrent yielders race a compare-exchange so only one reports per window. 9/9 admission + 41/41 service_loop green. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ield named per-window Caught within the hour of shipping it, by reading the live rows instead of trusting the commit message: 19:44:02Z yields_this_window=135 cumulative=135 19:45:03Z yields_this_window=197 cumulative=197 19:46:03Z yields_this_window=263 cumulative=263 Identical on every row, while consecutive rows differ by ~65. The field named `yields_since_last_report` was reporting the running total. Cause: `take_ambient_yield_report` passed a literal 0 for `yields_at_last_report`, with a comment justifying it — "the report resets the clock, so total-at-report is implicit." That is false. Resetting the TIMESTAMP does not reset the COUNT, so `fresh = total - 0 = total` forever. The galling part, and worth stating plainly: the pure rule was RIGHT and its table test asserted the delta correctly (`ambient_yield_report_due(1_000, 23, 70_000, 9_000) == Some(977)`). The defect lived entirely in the impure wrapper feeding it a wrong argument — which is exactly the seam the pure/impure split exists to protect and exactly the gap a table test over the pure half cannot close. I wrote a commit an hour earlier about fields that promise one thing and deliver another, then shipped one. Fix: a second watermark, `AMBIENT_YIELDS_AT_LAST_REPORT`, advanced by the same winner of the timestamp compare-exchange so a losing yielder's counts roll into the NEXT window rather than being dropped. New test pins the argument boundary the old one couldn't reach: the second window must read 62 (197−135), not 197. The mislabel did NOT cost the measurement — consecutive cumulative rows still give the rate by subtraction, and that rate is the finding: ~65 ambient yields per minute across 24 citizens with ZERO self-cycles completing. First time that contention has had a number instead of a silence. 10/10 green. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…render, order by relevance
READ OUT OF A LIVE AMBIENT TURN (capture 762a806b, 2026-08-17), not inferred:
system prompt 18,697 chars
[board] 9,284 chars 49.7% ← 38 distinct cards, full titles
(preamble) 7,863 chars 42.1%
workspace-map 1,478 chars 7.9%
observed prefill 12,286 tokens for a turn that decoded 41
Half of every citizen's system prompt was the kanban board, re-sent on every self-tick, and
it was ~25% of total prefill. The per-card loop was `for card in &board.cards` bounded only
by remaining budget.
Two things make that a defect rather than a cost:
1. IT IS REDUNDANT. The `[board]` headline and the `[your work]` / `[available work]` leads
directly above already carry the counts and the top titles — and those leads were ADDED
precisely because this dump is unreliable under budget (the Asha 2026-08-06 note in this
file). So the same facts are paid for twice and the expensive copy is the one truncated.
2. IT SCALES BACKWARDS. Bounded by budget, the board grows to fill the prompt, so every
citizen thinks SLOWER as the backlog grows. A team that accumulates work becomes
progressively less able to do it. That is the opposite of what a work board is for, and
it gets worse every time we file a card.
FIX: order by what she can act on — her own holds first, then newest claimable (the same
recency argument the available-work lead already makes) — and take at most
MAX_RENDERED_CARDS. Counts in the headline stay the TRUE totals; the board is not made
smaller than it is, only shorter than it was. `work/list` remains the full read and is
verified working (#337).
The cap is sized from what it MUST cover, not picked: both leads name up to 5, so the detail
must carry 10 or the summary would promise cards the detail omits — a citizen seeing "you
hold 5" above a list of 3 would rightly read the substrate as inconsistent. Two spare keeps a
just-created card visible in the turn it arrives. Ten is the floor; it cannot drop below
without re-deriving the lead caps with it.
Also fixed: cap-truncation now counts into `dropped` alongside budget-truncation, so the
debug line does not report dropped=0 on a shortened board and hide the shortening in the one
place an operator looks.
Test pins all three halves — the cap holds, her OWN card survives the cut even when it is
the OLDEST on the board (under the old board-order loop a cap would have cut exactly the
worst card), and the headline still reports the true 40. Positive-controlled: with the cap
removed it fails "board must be capped at 12, rendered 41 of 41". 13/13 green.
NOT YET MEASURED LIVE: the prompt-size delta. Deploying next; the number goes on the
observation card, not in this message.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ike -e . already did (#380/#383) `ensure_env` had TWO sites that install under the instance's date pin, and only ONE of them could heal when the pin itself created an unresolvable hole: - the editable `-e .` install carried a bounded retry loop that reads uv's own `exclude-newer-package` hint and retries with the minimum per-package override; - the dependency-sdist build-dep pre-install (#383 cause 2) applied `--exclude-newer` and failed hard. Same decision, two expressions, one of them healed. Measured 2026-08-17 dispatching swe-bench-lite's head: every astropy instance died at the unhealed site with could not pre-install astropy__astropy-6938's dependency-sdist build deps ["jinja2"] × Failed to download and build `markupsafe==1.0` ╰─▶ Because only setuptools<=38.2.4 is available and you require setuptools>=40.8.0 which is the pin working exactly as designed — jinja2 2.10 pulls markupsafe 1.0, whose setup.py build wants setuptools>=40.8.0, and the 2017 cutoff caps setuptools at 38.2.4. Unsatisfiable by construction. uv's stderr named the package and suggested `exclude-newer-package`; the loop 30 lines below knew how to parse exactly that hint and never saw it. Extracted `era_pinned_uv_install(uv, py, as_of, tail, cwd, envs)` holding the whole bounded loop, all three heal arms, and the importlib-metadata upgrade remedy (general to any --no-build-isolation build, not just `-e .`). Both sites now call it; a third site inherits the behaviour by construction rather than by remembering. MAX_ERA_OVERRIDES replaces the bare 8. No behaviour change at the `-e .` site — same flags, same arms, same bound. The change is that the other site now has them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… one she was bound to (#443) The board source was made turn-parametric weeks ago. Roster and doctrine were not, so a citizen taking a turn in a per-run bench room got the cards and NEITHER the peers nor the rules. Measured live 2026-08-17 over 90 minutes on this box: source bound → turn room n roster academy swe-bench 23 room-doctrine academy swe-bench 19 roster academy hard-rs 3 room-doctrine academy hard-rs 3 That is 42 + 39 `rag.room_gate.abstain` rows: every bench turn ran with no roster and no operating doctrine. She was handed the work with none of the room's rules and no idea who else was there. THE CAPABILITY ALREADY EXISTED AND WAS NEVER WIRED. `airc_lib` has `room_roster_in`, `room_roster_cards_in` and `room_doctrine_in`, and `room_doctrine_in`'s own doc names this exact defect verbatim: "A citizen who belongs to several rooms answers a turn in the room it arrived in; reading doctrine from her default instead grounds that answer in another room's rules" Continuum called the roomless variants everywhere. This is the wire, not a new mechanism — the same shape as the astropy env fix earlier today (cabecb9): one decision expressed at several call sites, correct at one of them. - `AircRosterReader::room_roster` / `room_roster_cards` and `AircDoctrineReader::room_doctrine` take `room: Option<Uuid>`; the real impls delegate to airc's `*_in`. - Both sources resolve `turn_room.or(bound)` exactly as RoomBoardSource does. `None` (an UNSTAMPED context — background consolidation) keeps pre-#443 behaviour. - The exam-bleed pin SURVIVES and is now pinned by a test: a synthetic nil room gets nothing AND never falls back to the bound room; the reader is not consulted at all. Tests: `the_turn_room_wins_over_the_bound_room` asserts the reader is asked for the TURN room (the stub records what it was asked — a stub that ignores the argument would let this regress invisibly), and `a_nil_room_gets_nothing_and_never_falls_back` holds the exam pin. 8/8 green in room_doctrine_source. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… them blind Dated post-run card per the standing instruction. Records what was dispatched, the fan-out measurement (24 turn rows = 2 events), the #443 abstain table, the operator's inability to cancel a round it can create (#27/#371), the third unwired instance (wall_source, blocked on an airc-side RoomId seam), and the four method errors I made. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…isfiable at every heal rung (astropy)
Reproduced in isolation 2026-08-17 (uv 0.11, py3.11/arm64) — the astropy sdist build-dep
pre-install is unsatisfiable BY CONSTRUCTION under its 2017 era pin, at every rung the
heal loop can reach:
1. era markupsafe 1.0 has no wheel for this interpreter/arch → sdist build mandatory →
needs setuptools>=40.8.0, which the pin caps at 38.2.4. uv hints
`exclude-newer-package`; the heal lifts setuptools — VERIFIED FIRING, correct move.
2. retry: the 2017 sdist now builds against MODERN setuptools →
`ImportError: cannot import name 'Feature' from 'setuptools'` (removed in
setuptools 46). No hint in that error; the loop correctly stops.
3. the other lift is no better: modern markupsafe (>=2.1) removes `soft_unicode`,
which era jinja2 2.10 imports — dies at import time.
The only installable combination is modern jinja2 + modern markupsafe (verified
importing clean). So: when the healed era-pinned install still fails, retry ONCE with
no date pin, loudly.
Scope-safe by construction: `era_sdist_build_deps` lists BUILD TOOLS for dependency-sdist
code generators (astropy → pyerfa → jinja2), never subject requirements. A repo where
jinja2 IS subject code (flask) has no entry in that table, and the subject graph is
resolved by the still-date-pinned `-e .` step.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
roster half, #412) A dispatch fired inside the post-boot resume window found an EMPTY roster and refused instantly, so the operator hand-rolled a sleep-loop around dispatch — run by hand twice on 2026-08-17, which per the foolproof doctrine is a design defect, not a procedure. The serving half of #442 already parks (`await_ready_serving`). The roster half now parks the same way: dispatch waits (bounded, 180s, 5s poll) ONLY while the roster is empty — citizens being re-hosted after a boot. An unknown NAME against a LIVE roster still fails fast: that error means a typo, never a resume in progress. All existing `resolve_dispatch_roster` semantics (whole-roster default, loud unknown-name listing who is online, Denied on a genuinely empty machine) are unchanged — the loop only delays WHEN the resolver runs, never what it decides. With this, the runbook's manual sequence (ping → serving/status → roster wait → dispatch) collapses into `benchmark/dispatch` itself: serving gate + roster gate are both inside the ONE command. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… emits in-process (#450 tail, #434) MEASURED 2026-08-17, the night two solved SWE cards graded as nothing. Atlas ran the full loop on astropy-14182 and astropy-14995 — work/get → shell → read → work/claim → searches → code/write (wrote=true) → shell/test → work/state. Both cards read `Closed owner=Atlas` on the bench room board. Grade receipts under ~/.continuum/progress: frozen at 92, unchanged. Zero `work.card.state_changed.bridged` rows for either. Root cause is the SPINE of the tail, not the grader. `work/state` deliberately emitted NOTHING, on the reasoning that the transition's own transcript echo returns through a persona subscribe stream and `bridge_wire_work_event` (its single caller) publishes exactly once. That is correct when delivery works. Under #434 — post-reboot durable delivery to citizen scopes down — the echo never comes back: `persona.inbound.raw_event` counted 2 rows in 80 minutes against 83 in a comparable earlier window the same day. The bridge never fires, the grader never hears, and finished work grades as nothing. A grade tail whose only feeder is a subsystem with a known-open delivery bug is a grade tail that is down whenever that bug is. So the verb now emits DIRECTLY. It just wrote the transition — it does not need the wire to tell it what it did. The bridge stays for every writer that is NOT this core's work/state (operator CLI, remote peers over the grid), which is exactly why it was added. ONE emitter, not two code paths that each know how to publish: both feeders route through `emit_card_state_changed(payload, via)`, and the (card_id, state) ring inside it makes a transition publish once no matter which feeder sees it first. The wire-event-id ring cannot cover this — the verb path has no wire event — so the dedup key had to move up to the fact itself. `via` is on the probe, so which feeder won is answerable per transition. room_id is the CARD's own room, resolved by walking the subscribed rooms' boards (`card_room_of`, the read-only sibling of `claim_following_card_room`) — NEVER `current_room()`, which is only where the persona happens to be standing. That is the #345 wrong-room trap, and `grade_card`'s own doc names it; I wrote it into this fix first and caught it before commit. An unresolvable room emits empty, so the grader fails loud rather than grading against a guessed board. Regression test pins the cross-feeder dedup (same transition once, different state publishes). cargo check green with metal,accelerate. Not deployed — a round is live on this box; this ships with the next reboot alongside 4178d50 (astropy build-dep fallback) and a37ac70 (dispatch roster wait). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…void a score (#380 family) MEASURED 2026-08-17. A re-grade of astropy-14995 died with: clone of astropy/astropy from its local mirror failed: fatal: destination path '…/benchmarks/swe/work/astropy__astropy-14995/repo' already exists and is not an empty directory `clone_at` removes that directory immediately before cloning, so the message reads like a harness bug. It is not. The directory's ONLY content was a `.DS_Store`, stamped AFTER the remove — Finder/Spotlight noticed the parent and repopulated it inside the window between `remove_dir_all` and `git clone`. `git clone` refuses any non-empty destination, so an OS indexer can void a grade, on any repo, at random, and the receipt cannot tell you that is what happened. Fix: clone into a pid-suffixed STAGING path and move it into place. The window closes because the destination is only touched at the rename, and anything that reappeared there meanwhile loses to the tree we just built. Bonus property from the same shape: a half-fetched tree is never visible at `repo_dir` — the move is the commit point. Also stop swallowing the pre-clone removal error (`let _ = remove_dir_all`). If the stale grade tree cannot be cleared, that is a filesystem fault and it now says so by name, instead of surfacing three lines later as git's confusing "already exists" — the same absence-vs-fault confusion this whole grade tail keeps producing. No test: the failure is a filesystem race with a macOS daemon, and the honest reproduction needs a network mirror + Finder. The staging shape is the fix; the comment carries the measurement. Found while grading two closed astropy cards after the grade-tail fix (185816b). Second finding from that same pass, NOT fixed here and bigger: astropy-14182 grades UNGRADEABLE — PASS_TO_PASS scores 0 of 9 on the PRISTINE tree, so the harness correctly refuses to report (gateOk:false). That is #380 (gold-gate every env class): no astropy instance can score at all until its env builds, and a citizen's patch there is unmeasurable, not wrong. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…LECT scores 0/N (#380) MEASURED end-to-end 2026-08-17. The gold gate said astropy-14182 was UNGRADEABLE: "PASS_TO_PASS passes 0 of 9 on the PRISTINE tree". Not the citizen's patch — the DATASET'S OWN GOLD PATCH could not be scored. Running the suite by hand gave the reason in one line: ImportError while loading conftest '…/repo/conftest.py'. conftest.py:9: in <module> import hypothesis E ModuleNotFoundError: No module named 'hypothesis' The env installs `-e .`, which resolves RUNTIME dependencies. `hypothesis` is a TEST dependency, and astropy's conftest imports it at module scope — so pytest dies loading conftest, before collecting a single test. An instance whose env is missing its suite's deps scores 0/N on a PRISTINE tree, the gate correctly refuses to report, and nothing that instance's solver writes can matter. The repo declares exactly what its suite needs in `[project.optional-dependencies]`; we simply never asked for it. POSITIVE CONTROL, run before writing the fix — same env, same pristine tree, after installing `.[test]` with the era pin and the same ERA_CFLAGS the code passes: 1 failed, 9 passed FAILED …test_rst.py::test_rst_with_header_rows — TypeError: RST.__init__() got an unexpected keyword argument 'header_rows' 9/9 PASS_TO_PASS green and the ONE failure is the instance's FAIL_TO_PASS test — the bug the instance exists to fix. That is the gold-gate condition exactly. SCOPE, measured rather than assumed (a `pytest --collect-only` sweep across all 40 envs with a staged tree): every one of them collects today, so this is NOT a whole-suite outage. Per-env it is luck: of four astropy envs, 12907 HAS hypothesis and 14182 did not, and 14365/14995 still do not. Nothing designed that difference — an era resolve happened to pull it for one instance and not another. The fix's value is turning that coincidence into a guarantee, and the honest claim is "an env missing its suite's deps is unscoreable", not "astropy is broken by construction". An earlier draft of this message overstated it as every astropy instance; the sweep disproved that before it shipped. `test_extra_name` picks the group the repo declares, preferring test > tests > testing > dev. The order is load-bearing: a repo declaring both `dev` and `test` must get `test`, or we install a kitchen-sink group and inherit its resolution failures. No pyproject, no optional-dependencies, or no test-shaped group all mean "install as before" — never "install something plausible". `ensure_test_extra` is NON-FATAL by design and runs LAST. Everything before it decides whether the env can BUILD and RUN a harness; this decides whether the suite can COLLECT. A repo whose suite already collects does not need it, and a resolve failure must not delete an env that grades fine today — so a failure probes (`swe.env.test_extra`, installed=false) and leaves the env standing. It also runs on the CACHED path, marker-guarded, because every env on this box was built before this existed; without the heal, an env that happens to lack its suite's deps stays that way forever and the operator has to know which ones. The marker makes it once-only, including the "this repo declares nothing" answer. Extracted `era_cutoff` while here: the cached path needs the same "what era is this instance" answer the build path computed inline, and two copies is how they drift. Deploys with 185816b (grade tail) and 99c59fe (clone staging) on the next reboot. #380 stays open until the gold gate passes per env CLASS — that is the instrument, and one instance passing is not a class passing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…and stop caching a negative (#380) I shipped b0141e8 claiming astropy would now gold-gate. The live run said no, and it was right. Correcting my own fix, with the receipt: gold gate astropy-14995 → "UNGRADEABLE — PASS_TO_PASS passes 0 of 40 on the PRISTINE tree"; swe.env.test_extra probe rows: 0; env marker `.test-extra` = "none-declared"; `python -c "import hypothesis"` → ModuleNotFoundError. TWO defects, both mine. 1. THE PARSER READ ONE FILE. astropy 5.3 has NO `[project.optional-dependencies]` — its suite deps are setuptools declarative config: [options.extras_require] test = # Required to run the astropy test suite. pytest>=7.0 pytest-astropy>=0.10 So `test_extra_name` returned None for the exact repo the fix was written for. Both files are ordinary in the ecosystem; reading one is reading half. `declared_extras` now reads both, hand-scanning the INI section for KEYS (an ini crate would be more surface than six lines, and we need group names, not requirement lists — note the flush-left check, since ` pytest>=7.0` is a continuation, not a group). My earlier positive control was real but proved the wrong thing: I ran `uv pip install -e ".[test]"` by hand, and uv resolves that extra THROUGH setuptools — so it worked while our own parser could never have named it. A manual command succeeding is not evidence that the code takes the same path. 2. THE MARKER CACHED A NEGATIVE, which is worse than no cache. On the first run the half-blind parser wrote "none-declared" — permanently. Fixing the parser would not have helped: the marker suppresses the heal forever, and only a human who knew which files to delete could recover it. Caching a negative caches the limits of today's code. Now only a SUCCESS is recorded, and a marker is authoritative only when it NAMES an extra, so the poisoned markers the first version wrote self-heal. Re-reading two small files per grade costs nothing next to cloning a repo and running its suite — the cost I was "optimising" was never real. Test extended with the astropy shape: no pyproject at all, extras in setup.cfg, and `test_all` present — which sorts before `test` alphabetically and is a superset, so it must not win. That case is the one that shipped broken. LESSON, and it is the same one twice today: a fix is not verified by the command I ran by hand, only by the code path the system takes. I had a green unit test, a green compile, and a green manual install, and the feature was still dead on the one repo it existed for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
#380 instrument) `let (pristine_p2p, _) = run_tests(...)` — the report went into `_`. That verdict is the ONLY artifact of the pristine run, so "the suite does not run in this environment" shipped as a conclusion with its evidence deleted, leaving the reader to reproduce the run by hand and guess at the difference. MEASURED TODAY, and it is why this is worth its own commit: astropy-14365 graded `PASS_TO_PASS 0 of 8` here, while the SAME invocation — `-m pytest <file> -v -p no:cacheprovider`, same venv, same tree — run by hand gave 8 passed and the instance's own bug failing (`ValueError: Unrecognized QDP line: read terr 1`), which is exactly the gate condition. So the environment was fine and the divergence was somewhere inside the gate. I proposed three mechanisms and could settle none of them, because the one artifact that names the divergence was thrown away on this line. Hours, on a guessing loop, next to a variable holding the answer. Now the tail rides the error (via the existing `report_tail`, so it is bounded the same way the retry excerpt is). And an EMPTY report gets its own sentence rather than an empty section: no output at all means the harness never executed — a missing interpreter, a refused invocation, a run that died before writing a byte — which is a different fault from a suite that ran and failed, and the two must not read alike. This is the same defect class as the rest of today's session: the instrument had the answer and did not surface it. #380 stays open; this is what makes the next attempt at it a measurement instead of a hypothesis. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ED by her — the round-killer THE DEFECT, measured live 2026-08-17 and deterministic: A citizen's inbound stream skips messages she is recorded as having said (airc_persona_conversation, `message.peer_id == self.own_peer_id`). Correct — nobody answers their own speech. But the operator has no self-peer in-core (#27), so `curator_airc` falls back to `registry.any_live_citizen()`, which picks the LEXICOGRAPHICALLY-LOWEST agent_name. With the roster culled to Atlas + Benchy that is ALWAYS Atlas — the assignee. So `benchmark/dispatch --assignees='["Atlas"]'` authored every `@Atlas (to you)` kickoff THROUGH Atlas. All three died at the self-skip: no error, no probe, no turn. The command reported `kickoffs: 3, kickoff_errors: []` and was telling the literal truth — three messages were sent. Zero were hearable. The round then ran for hours on the DETACHED solver (`dispatch_staged_swe_solve` → `agent/solve`), which produced 18 acts, 0 turns, 0 room visibility and 0 curriculum input (#425) — maximum effort, nothing that reaches the flywheel. Joel: "its supposed to be persona that run. you dont wire in loopers." Why it read as intermittent (#417 "kickoffs DO actuate"): with ~20 citizens online the alphabetical pick usually was NOT the assignee, so kickoffs landed. Culling the roster to two made it a coin flip, and the coin is not random — it is `min_by(name)`. THE FIX (this commit — the delivery half): - `any_live_citizen_other_than(exclude)` — the same deterministic pick, minus one peer. `any_live_citizen()` becomes `…other_than(None)`, so there is ONE selection rule, not two that can drift. - dispatch voices each kickoff through a citizen who is NOT the addressee. - When the addressee is the ONLY live citizen, REFUSE and say why, naming `persona/spawn` as the fix — never send a message that cannot be heard ([[fallbacks-are-illegal-fail-loud]]). - The self-skip now emits `persona.inbound.skipped_self_authored`. The skip stays; its SILENCE was the real cost. A message vanishing without a trace is how a substrate failure reads as "the citizen chose not to work" ([[an-absence-is-an-unfinished-measurement]]). NOT in this commit, deliberately, and next: retiring the detached solver so the persona's own turn does the work (Joel's actual point). Order matters — prove a real `persona.turn.start` fires from a kickoff FIRST, or removing the looper just yields nothing at all. Tracked on #453. Also lands the shutdown lane sweep held from earlier tonight (#454): `lane_registry::sweep_all()` + `SweepMode{Boot,Shutdown}`, called from `stop`. `stop` reaped cores and owned orphans but touched NO llama-server, so lanes leaked across shutdown by design and `reboot` (= stop + start) inherited the wreck — measured as a 19 GB ephemeral 27B resident beside the live 14B, which starved the planner into serving a 2,816-token window (smaller than the tool surface) and made every citizen structurally mute. Role-blind on purpose: the live/ephemeral split decides ADOPTION, and nothing is adoptable by a core that is exiting. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
A citizen is REGISTERED the moment her identity is minted or resumed. She is RESIDENT only once the supervisor attaches a service loop — which is what primes her perception stream and gives her a turn. Every readiness surface reported the former and called it the latter. Measured 2026-08-18: for ~15 minutes after a reboot `persona/roster` listed Atlas and Benchy while `persona.inbound.subscribe_opened` was 0. Hosting was correctly parked waiting for the serving lane to prove it could decode (#363). A round was dispatched into that window on the strength of that roster: 2 cards posted, `kickoffs: 2`, `kickoff_errors: []`, and ZERO turns. Nobody was home and every surface said otherwise. - `PersonaAircRuntimeRegistry::is_resident` / `resident_snapshot` — residency asked per citizen, never inferred from presence in the registry. The truth table is a pure fn (`resident_from_loop_state`) so the three rows are unit- pinned; a live `PersonaAircRuntime` needs a real airc daemon and cannot be built in a test. - `persona/roster` gains `resident` per row + `resident_count`. `count > 0 && resident_count == 0` is exactly the state above, and it is now legible. - `benchmark/dispatch` resolves assignees against the RESIDENT snapshot, and its post-boot wait keys on residency too — the old wait cleared on a non-empty roster, which released it ~10 minutes early (#412). Refusals distinguish the two states because they have opposite fixes: registered-but-not-resident is a WAIT, unregistered is `persona/spawn`. A named assignee who is merely unhosted is no longer reported as a typo. This is honesty at the seam, not the cure. The cure is boot owning the process tree (#452) so the resident window never exists to dispatch into. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…, spawn missing (#452) Joel, 2026-08-16: "start = enumerate → health-check → reap-or-ADOPT → spawn missing, for EVERY service — cores, llama lanes, airc daemon." The operative word was ADOPT, and boot did exactly two things to a service it found running: nothing, or kill it. Neither is ownership. ROW: llama lanes — was `pkill -f llama-server`, unconditionally, every boot. This made real code dead: `inference::lane_registry::sweep_in` already encodes the adopt rule — `(LaneRole::Live, SweepMode::Boot) => false` deliberately leaves a live lane alone at boot and reaps it only at shutdown. The shell killed that lane seconds before the core could adopt it, so that arm never once fired in production. Cost: a cold model load on EVERY reboot, during which the lane cannot prove it can decode, hosting correctly parks (#363), and every citizen is registered-but-not-resident — measured at ~15 minutes on 2026-08-18, the window a benchmark round was staged into for zero turns (#455). Now: enumerate by pid, read each lane's port from its own cmdline, /health it, adopt or reap per lane. Verified live on this box before the change landed: pids 1166 (:58057) and 95258 (:58091) both healthy — both would have been killed, and now are kept. /health is LIVENESS, not decode — a wedged server can pass it, which is exactly why the core verifies generation before seating citizens (#363). That division is deliberate: the shell adopts a plausibly-live lane, the core remains the authority that refuses a lane that cannot decode and relaunches it. Adopting can only cost a relaunch the core already knows how to do; reaping costs a cold load every time. ROW: airc daemon — this row did not exist. Boot printed "⚠ airc daemon not running. Start it with: airc daemon" and carried on: a runbook line where ownership belongs, for the one service whose absence makes everything else inert. With no transport there are no rooms, so citizens have nothing to be resident IN. Now: ping → adopt; wedged (holds the socket, answers nothing — worse than absent, since a fresh spawn loses the bind, #355) → `airc stop` then reap → spawn → bounded wait → FAIL LOUD and exit nonzero. Binary absent is a DIFFERENT state (warn, continue): a box without airc installed is not a broken one, and refusing to boot would strand CI and fresh clones. ROW: cores — already correct and left alone. #420's `core_bind_guard::decide` adopts on `start` (AlreadyServing → no-op, Occupied → refuse), and reaping on `reboot` is right because reboot replaces the binary. `bounded_run` is the shared primitive. macOS ships no coreutils `timeout`, and — the lesson that made #420's guard reachable at all — an unbounded probe against a wedged service does not fail, it HANGS: the kernel completes connect() into the listen backlog whether or not the process is ever scheduled. A health check that can hang is not a health check, it is a boot that stops. Truth table verified live: exit0→0, exit1→1, hang→124 in 1s not 5s. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ink on?" (#126/#369/#438) Joel asked where the base model is governed. The honest answer was FOUR places, in one function, each silently handing off to the next: 0. override_model — runtime per-persona assignment 1. model_preferences — tiered ladder, "best that fits" 2. model_id — explicit per-persona model, labelled "Legacy" 3. default_local_model — system-wide default Four expressions of one decision, and rows 1→2→3 walk DOWN without anyone deciding to. That is the #438 incident shape: one bogus usable_gb=0 sample walked the ladder to the bottom and served citizens a 0.5B that emitted template-token garbage into the room. The sibling module already forbade this in prose (inference_profile.rs: "substrate HARD ERRORS instead of silently degrading") — the prose was right, the code never implemented it. This is a COMPRESSION, 4 → 1, and both modes fall out of it: - Pegged{model, reason} — subsumes override_model (Measurement peg w/ lease) and model_id (Operator). This base or she does not serve. - Adaptive{ladder, floor, rungs} — the governor moves her, bounded below by a NAMED floor member (not "last entry wins", which is how a reordered ladder silently moves its own floor). No system-wide-default arm exists. That arm WAS the bug. THE GENOME IS WHAT MAKES A BASE REACHABLE (Joel, this session): a LoRA adapter is a per-base derivative. The corpus — transcripts, tool traces, solved instances — is the durable, base-independent asset; an adapter is forged FROM it ONTO a specific base and is invalid on any other (#369). So she can scale up or down freely, PROVIDED her genome was forged for the destination. Hence GenomeCoverage as an input: RequireGenome (default) skips rungs she has no adapter for and refuses with the FORGE work-list; AllowBare takes them but reports genome_backed=false so a measurement records WHICH citizen it scored. The paired obligation is the forge's, not this module's: one corpus fans out to N adapters, one per targeted base, each trained independently against that base. A ladder is only as walkable as the forge made it, and RequireGenome turns a declared-but-unforged ladder from a silent capability cliff into a visible one. Why benchmarks need this: genome lift is only measurable against a fixed base. Round 1 on a known base → corpus accrues → forge onto that same base → round 2, same base + adapter → the delta is attributable to the genome. Float the base and the number means nothing AND round 1's adapters are garbage. Worse, a silent re-base corrupts the EXPERIENCE, not just the score: turns taken on an unintended base still land in the corpus, poisoning the next adapter forged from it. So refusing to serve is the cheap failure; serving on an unintended base is the expensive one, and it is the one that used to happen by default. Pure over (host_vram_gb, coverage) — 15 tests, no GPU, no forge, no registry. Every refusal names its own remedy and is asserted on. NOT YET WIRED: allocator/inference_profile still use the 4-way resolver. This is the type + its truth table landing first so the cut-over is mechanical. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ng the forge Correcting my own framing from an hour ago: I called the peg "only for measurement". Too narrow, and Joel's point is the load-bearing one. Continuous learning never stops. The flywheel runs turns → corpus → forge → adapter → page-in continuously, and the adapter coming out the far end is a derivative of whatever base it was trained against. If her base floats between the corpus accruing and the forge finishing, the adapter lands for a base she has already left — forged for nobody, and page-in must then refuse it (#369). The corpus survives that; the training compute does not. So a training run holds a peg for its duration, exactly as a measurement round does, and for the same underlying reason: a process is in flight whose output is only valid against the base it started on. Measurement is episodic; training is always running, which makes THIS the peg held most of the time. GenomeBound is now documented as what it actually is — the standing consequence of past Training runs, derived from the adapters she holds. Also worth stating plainly, since it corrects a second drift in my framing: the LADDER is the mechanism for daily use, not the peg. A citizen on a 64GB box resolves to the top rung automatically — no peg, no special case — and a smaller box steps down the same ladder. The peg exists for the three cases where something in flight depends on the base staying put. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ber — and the row cap lied (#370) TWO DEFECTS, BOTH MINE, both found by Joel from the symptom (an OOM under a concurrent full-suite `cargo test`) rather than by me reading the instrument that was already reporting it. 1. `benchmark/fetch` called `project_suite` purely to REPORT a count. That allocated a complete second copy of the suite — every statement, patch, and test body cloned — while the parsed `Vec<Value>` was still held. The memleak tracker printed `benchmark/fetch:+138MB` in my own reboot output and I read past it. Projecting was the right call (staged-but-unposable has to be visible); holding two copies to learn one integer was not. `count_projectable` projects, validates, and DROPS each task, so peak stays one dataset at any suite size — same adapter, same abort-on-first-bad-row semantics. The rows are then released before the result is built, since `fetch_hf_rows` has already written them to the on-disk cache. 2. The `MAX_ROWS` comment PROMISED a suite would "never [be] silently truncated" and nothing enforced it — a suite at or past the 5,000-row bound returned looking complete. That is the exact shape of a partial denominator published as a whole one. It now refuses, names the bound, and says the fix is a deliberate edit that states the real suite size. A suite of exactly MAX_ROWS trips it too; a loud refusal on a boundary is the correct trade against a silently short task list. WHAT THIS IS NOT. Joel's larger point stands and this commit does not answer it: staging is a RESOURCE CONSUMER and it does not lease. `resources::consumer::ResourceConsumer` already defines the contract — `consumer_id` / `footprint` / `reclaim`, where the daemon holds handles to trait-driven consumers and each concern decides HOW to fit (release, partial, defer, or refuse with a named reason). Serving implements it (#79); benchmark staging does not, so it will still allocate without regard for a live call or a warm lane. Removing a gratuitous doubling is not the same as participating in the budget. Tracked as the follow-up, not claimed here. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…remainder)
`p.room.unwrap_or_else(Uuid::nil)`. That was the whole defect: a nil room makes `apply_act`
skip receipt radiation entirely, so the run executes normally, lands in NO transcript, produces
no room turn, and NOTHING anywhere says so. 13,209 turns went by in that state — 8.7% of all
turns, 35% for one citizen — before anyone measured it, because an invisible run and a visible
one produce identical logs.
A roomless run is still LEGITIMATE and this does not refuse it. A bare `agent/solve` with no
activity behind it has no room to radiate into, and inventing one puts receipts on a phantom —
live-proven 2026-08-12, it stole the single-room chat projection. The defect was never that the
branch exists. It is that the branch was taken in silence.
So `RunVisibility::{InRoom(Uuid), Invisible}` replaces the `unwrap_or_else`, with `resolve` as
the ONE place the param becomes a decision, `room_id()` for the act pipeline (nil is the shape
`apply_act` already keys its skip on), and `warning()` returning the sentence ONLY for the
invisible case — a visible run stays quiet, because a warning that fires on the happy path
trains everyone to ignore it. The call site emits `agent.solve.roomless` + a tracing::warn once,
at the point the branch is taken.
An EXPLICIT `Uuid::nil()` resolves to Invisible too, pinned by its own test: a caller passing nil
means what omitting it means, and treating them differently would reopen the silent branch
through the other door.
This is the same failure shape as the two fixed an hour ago (a fetch cap whose comment promised
it would never truncate while nothing enforced it; a projection that doubled memory without
saying so): the system takes a consequential branch and declines to mention it. An absence is
only measurable if something declares it.
Pairs with slice 1 (PR #2336) — a CLAIMED bench card now solves in the card's room, so the
dispatched path is visible by construction and this covers everything else.
3 tests, green.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…and the one that always yields (#56) Joel: *"crushing a benchmark while simultaneously in a video call with several persona can ONLY work if the intelligent systems have handles to the interface/trait driven consumers of resources... Conversely, the concerns themselves need to decide how to fit within budget."* Staging allocated a whole dataset with no regard for anyone else and OOMed the box. The earlier `drop(rows)` removed a gratuitous doubling and changed NOTHING structural: a large enough suite still evicts a live call by winning a race against `malloc`. A consumer that does not lease cannot be arbitrated, and an unarbitrated consumer is not a peer — it is a hazard. BOTH HALVES OF THE SEAM, which already existed and staging used neither: ASK `available_for(CONSUMER_ID, Ram)` → `StagingPlan::decide` runs BEFORE the allocation. Refusing with a NAMED shortfall beats an OOM that takes the citizens down with it. GIVE `ResourceConsumer::{footprint, reclaim}` → the governor can now take bytes back. WHY THIS SHAPE IS NEW FOR THE TRAIT, and why it was worth implementing rather than special-casing. Serving (#79), Bevy and Voice are all fat-and-holding: they own expensive residency for as long as they are up, and reclaim means degrading something a human perceives — so they weigh, and sometimes REFUSE. Staging inverts every axis: it holds only during a fetch, it holds nothing when idle, and every row it holds is already on disk. It is the cheapest victim on the box. So it NEVER refuses a RAM ask — not on Pressure, not on Rebalance, not on Shutdown. Yielding costs a re-read and nothing perceivable, which is exactly what makes a benchmark safe to run beside a video call instead of racing it. A test pins all three reasons; if this ever starts refusing, a benchmark can starve a call. The one honest complication: an ask for VRAM is REFUSED rather than answered with freed host bytes. Reporting the wrong kind would corrupt the ledger into believing device memory came back. `StagingResidency` is injectable for the same reason `RenderSurface` is — the reclaim disposition is proven without a process-global area or a live governor. The footprint returns to zero the instant the rows drop (normal path AND under reclaim), because a consumer reporting phantom bytes makes the governor evict a REAL holder to recover memory nobody has — the mirror image of the OOM this exists to prevent. DELIBERATELY ABSENT: a `Streamed` variant. When the budget cannot hold a suite the better answer is to page and project row-by-row rather than refuse — but that needs the pager inverted to a per-page callback and the disk cache moved to JSONL so it can be read incrementally. A variant nothing can construct is a lie about what the system does, so it gets its own slice, at which point `Refuse` narrows to "not even one page fits" and everything else adapts. 6 new tests; 172 green across bench_staging + bench_task + benchmark + all `resources::`; de-hardcode guard green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…amed projection, JSONL cache (#56/#370) The previous commit made staging a governed consumer that could plan and yield, but it could only succeed or fail. A concern that can only succeed or fail forces a human to arbitrate. This gives it the middle state, which is the one that matters: suite fits the budget → Resident hold it, hand the caller a Vec suite doesn't, one page does → Streamed page it, project each row, drop it not even one page fits → Refuse name the shortfall THE PAGER IS NOW THE PRIMITIVE. `stream_hf_rows(dataset, config, split, on_row)` hands one row at a time and never accumulates; `fetch_hf_rows` is a thin collector over it. The accumulate-then-return shape WAS the root of the OOM — every caller got the whole suite whether it needed it or not, and `benchmark/fetch` needed only a count. Inverting to a callback makes the memory profile the CALLER's choice behind one paging + caching + error path ([[the-compression-principle]]). THE CACHE IS NOW JSONL, and that is not cosmetic — it is what makes streaming possible at all. A single JSON array cannot be read incrementally: `from_slice` must materialize the whole thing. So the format was the constraint, and the old `.rows.json` files are MIGRATED on first read (read once, rewritten as JSONL, legacy removed) rather than discarded — throwing away a correct 500-row cache to change an extension would re-pull from the network for nothing. THREE CORRECTNESS PROPERTIES the rewrite made explicit, none of which the old path had: - The network path writes to `.jsonl.partial` and is renamed ONLY after both guards pass, so a reader sees the whole cache or no cache — never a short one. An interrupted fetch used to be able to leave nothing at all; now it cannot leave something misleading either. - A truncated pull (>= MAX_ROWS) deletes the partial instead of promoting it. A truncated cache that survives is a wrong denominator that reproduces on every later run. - An EMPTY cache file is treated as interrupted-write debris and re-fetched, not reported as an empty suite. The streamed arm projects page-locally through the same `SuiteAdapter` — one row alive at a time — and records a projection failure without aborting the drain, so the caller can still tell a projection failure from a fetch failure. Staging declares the plan's PEAK to the governor, not the suite size: for a streamed plan those differ by the entire point of streaming, and reporting the suite would have the governor evicting a peer to make room for bytes staging will never hold. `benchmark.staging.plan` carries `streaming` + `peak_bytes`; `benchmark.suite.staged` carries `streamed`. Which mode ran is a receipt, not an inference. 51 green across bench_staging + bench_task + swe_bench + benchmark. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…only the GPU (#56) The governor has carried ResourceKind::Ram through leases, footprints, reclaim and available_for since #56. The daemon's capacity_sources vec has carried ONLY the GPU source the whole time. So capacity(Ram) was 0, and therefore available_for(_, Ram) returned 0 for EVERY consumer, permanently. Nothing noticed for months because serving, Bevy and voice all lease VRAM. The first consumer to actually plan against RAM — benchmark staging — was refused instantly on a box with tens of gigabytes free. The machinery was complete and one wire was missing, which is this codebase's recurring failure shape: a capability that is structurally unreachable while looking finished, surfacing only when something finally tries to use it. HostRamCapacitySource + LiveHostMemory, registered unconditionally at boot (unlike the GPU there is no detect() that can fail — every host has RAM). THE NON-BLOCKING CONTRACT, and the accessor this does NOT use. CapacitySource::ceiling_bytes is read on the daemon's hot tick and its value used while the accounting lock is held, so it must be a cached, non-blocking read. MemoryPressureMonitor::budget_snapshot() has exactly the fields wanted and is exactly wrong for it: it takes the reporter read lock and calls budget() + report() on every registered reporter. This reads current_available_bytes() instead — a lock-free atomic the monitor loop refreshes every 2s. THE COLD-BOOT TRAP, which is the same defect shape as the bug being fixed. Total from the monitor's snapshot is 0 until its first poll, and a ceiling of 0 does not mean "no RAM", it means "not measured yet" — reporting it would reproduce refuse-everything for the first seconds of every boot. Physical RAM does not change, so total is probed ONCE at construction and the ceiling is right immediately. Symmetrically, an absent available reading yields used=0, the trait's documented degradation to capacity − granted, never "all of it is spoken for". Reserve is proportional with bounds — (total/8).clamp(1 GiB, 8 GiB) — in ONE place. A flat constant is noise on a 128 GB M5 and half the machine on an 8 GB box, and the same code is claimed to run on both. Tests pin all four: ceiling less reserve, the cold-boot trap in both directions, the reserve across the 8/32/128 GB ladder, and an oversized reserve flooring at 0 rather than wrapping into an exabyte ceiling. 6/6 green. Also carries the benchmark-staging consumer this unblocks (StagingPlan/StagingArea + registration as the fifth governed consumer). NOT YET LIVE-PROVEN: the streamed staging path has still never executed, because the RAM ceiling is what was blocking it. That proof is owed on the next deploy. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…n layer stops double-counting (#56) `ResourceKind::Vram`'s own doc has always stated the contract and assigned it: GPU memory. On UMA (Apple Silicon) this overlaps `Ram` physically; the authority's scan layer IS RESPONSIBLE for not double-counting. It was written, assigned to capacity.rs, and never implemented. So the governor kept two independent ledgers over one physical pool, and each could grant against bytes the other had already spent. MEASURED on this M5 before the fix, from `resources/board`: kind=vram capacity 55,125,917,696 physicalUsed 38,171,508,736 available 16,954,408,960 kind=ram capacity 60,129,542,144 physicalUsed 61,863,329,792 available 0 VRAM advertising 16.9 GB of headroom while RAM correctly reported 0 — both describing the same 6.39 GiB of real free memory. A serving lane could have leased ~17 GB that was gone. The two capacities also sum to 107 GiB on a 64 GiB machine, which is the double-count stated as arithmetic. This is NOT a coincidence of two estimators disagreeing. metal_monitor's Unified arm reads `host_statistics64(HOST_VM_INFO64)` — the HOST's VM free pages — as the GPU's free_bytes, because on Apple Silicon that IS the truth. The bottom of the stack knew; the top could not ask. THE FIX, in three parts: 1. `MemoryMode::{Unified, Discrete}` lifts from a metal_monitor private detail onto the `GpuMonitor` trait. It was private on the stated assumption that "production callers should use the trait methods, which abstract the mode away" — true for pressure (a ratio is a ratio), false for the governor, which must know whether it is handing out bytes from one pool or two. Detected from `device.has_unified_memory()`, never from target_os: an Intel Mac with a discrete AMD card also runs macOS and is NOT unified. Trait default is Discrete, so every existing adapter is unchanged rather than silently wrong, and CUDA keeps two genuinely separate axes. 2. `UnifiedMemoryPool` vends TWO CapacitySource views over ONE measurement. Pool ceiling = host physical − reserve (NOT recommendedMaxWorkingSetSize, which is a GPU working-set hint smaller than physical memory). VRAM view ceiling = min(pool, hint), so the hint keeps its meaning as a cap on GPU allocation without becoming a second pool. Both views report the SAME used, which is the entire fix: neither axis can offer bytes the other's residency consumed. 3. Boot branches on the detected mode. Unified → the pool's two views. Discrete → GPU source + host RAM source, exactly as before. The kinds deliberately survive rather than collapsing into one. A serving lane asking for VRAM and staging asking for RAM are semantically different requests even when the bytes are identical, and on a discrete box they are physically different too — erasing the distinction would be wrong on CUDA. KNOWN RESIDUAL, stated not hidden: grants are still tracked per kind, so within a single tick two axes could each grant against the same free bytes. The next tick closes it — a grant becomes residency, residency is the shared measurement. That is the same window a single axis already has between acquire and the next scan; this does not widen it, and `committed = max(granted, physical_used)` means the larger always binds. A cross-kind grant ledger would close it fully and is deferred. Tests reconstruct the incident with the board's REAL numbers: both views agree on used, VRAM's 16.9 GB phantom goes to 0, the hint caps VRAM without shrinking the pool, an oversized hint never raises the ceiling, and the cold-boot trap does not reach either view. 10/10 green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…not (#56) MEASURED on this M5, live `resources/board`, 2026-08-19: vram: physicalUsed 50.95G attributed 6.81G (serving) UNOWNED 44.14G ram: physicalUsed 50.95G attributed 0.00G UNOWNED 50.95G 87% of resident memory had no declared owner. The governor could see the bytes were gone and could not say who had them, so it could not ask anyone to give them back. WHY THAT IS NOT MERELY AN OBSERVABILITY GAP. A consumer deciding what it can afford sees `capacity − everything resident`. With nothing attributed, "everything resident" is indistinguishable from "everything immovable", and a planner facing all-immovable memory can only shrink. That is the mechanism behind serving a 0.5B on a 64 GB machine (#438) and behind grow-back never happening (#214) — one missing attribution seen from two ends. Not one line of code was wrong; nothing was accountable. THE SHAPE IS BORROWED DELIBERATELY. `disk_eviction::every_cache_class_has_a_decided_ eviction_story` already does exactly this for disk — enumerate every class the substrate writes to, fail on any with no decided owner. CLAUDE.md calls it "the difference between a red test and a user's trashed machine". Memory had no twin. This is it. `standard_memory_holders()` names all nine holders on this box. Five are Declared (serving, render, voice, perception, benchmark-staging). Four are Undeclared, each naming the task that closes it rather than a bare TODO: vision (#106/#395) — a SECOND llama-server, Qwen2.5-VL-7B on :58091, measured 9.4 GB resident, registers nothing. Largest unowned holder, and because it never yields, a 27B and vision cannot be planned against one pool. This is precisely the VL-as-consumer keystone #395 names. embed (#225) — has a consumer-id constant AND a honoured reservation floor, but registers no consumer. Half-wired is the worst state: serving budgets around a floor for bytes nobody reports. core (#178) — the core process itself, the one holder that can never be reclaimed by asking, so its job is to be COUNTED. grade-subprocess (#381), forge-train (#99/#137). Undeclared is a tracked promise, not a shrug — the guard rejects a reason that names no task or is too short to act on, so the class can never be the silent one again. `Reconciliation` computes `physical_used − attributed − external` per kind and explains the CONSEQUENCE, not just the number, because an unowned fraction means nothing to a reader who does not know it forces the planner to treat memory as immovable. Tests: the decided-owner guard; a cross-check that Declared rows use the constants the code actually registers under (prose cannot fake wiring, the #344 property) which also asserts embed is still NOT a consumer so its row gets moved when #225 lands; the reconciliation reproduced from the incident's real numbers; and over-attribution flooring at zero rather than wrapping. 4/4 green. NEXT, and this is deliberately not bundled: the reconciliation is computed but not yet surfaced on the board, so the 87% is still only visible to a code reader. Then vision as a real consumer, then the self-eviction budget (a consumer must be able to re-plan the model it is already running — today its own residency is subtracted from its own budget, which is the ratchet). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…— end the ratchet (#438/#214) The serving planner budgeted its NEXT model against `available_for(serving, Vram)`, and `available_for` subtracts `max(granted, physical_used)` — which INCLUDES serving's own resident weights. So the incumbent was counted against its own replacement. MEASURED, live board, 2026-08-19: vram capacity 55,125,917,696 serving's own residency 30,253,811,702 ← subtracted from serving available_for(serving) 16,954,408,960 ← what the planner was handed + own residency = 47,208,220,662 ← what it could actually have A 27B fits in 47.2 GB. It does not fit in 16.9 GB. **The planner refused to keep the model it was already running**, stepped down to a 7B, and the next decision started from a lower ceiling still — ending at a 0.5B at 4,608 context on a 64 GB machine. #438 and #214 are not two bugs; they are this one, seen from each end. It also explains the lane thrash Joel called out. The budget MOVES as the incumbent loads (0 → 28 GB resident), so the planner re-decides mid-load and respawns. A budget that does not subtract your own bytes from your own plan is also a STABLE budget. FIX: `budget_for_replacing(consumer, kind)` = `available_for` + that consumer's OWN measured residency. The rule lives in the ledger — one place knows it — rather than every caller remembering to add back. `available_for` is already consumer-aware about RESERVATIONS (#225); it was consumer-BLIND about RESIDENCY, and that asymmetry was the whole defect. SCOPE, deliberately narrow: - adds back ONLY the caller's own residency, never a peer's, so it can never plan into someone else's bytes; - other consumers' reservation floors stay excluded, exactly as before; - `acquire` still uses `available_for` — a lease must never be granted against bytes not yet released. This is a PLANNING number, not a grantable one, and a test pins that distinction. THE INVARIANT, which is Joel's acceptance test stated as code: *a machine already serving model X can always re-plan model X.* Anything else can only decay, and no learned layer on top can recover — it would be training against a signal wrong by the size of the resident model. Tests use the incident's real numbers. The first asserts the PRECONDITION (the old number is genuinely too small for the model already running) before asserting the fix, so it cannot pass vacuously if the arithmetic changes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… is empty" — my regression (#56) FOUND LIVE, and it is mine. `13cec02ef` routed BOTH governed memory axes through `LiveHostMemory`, which read only `current_available_bytes()` — the atomic `MemoryPressureMonitor` publishes. I documented an unset atomic as "has not polled yet", a couple of seconds at boot, and degraded it to `used = 0` on that basis. That reasoning was wrong in one specific, dangerous way. An unset atomic ALSO means "that monitor is not publishing", which is unbounded — and because the unified pool routes both axes through this one reader, one silent monitor blinded the entire governor. MEASURED on this box minutes ago, same instant, two sources: system/resources: total 64.0G used 54.2G available 9.8G swap_used 12.3G resources/board: physUsed 0.00G available 51.84G The machine was 54 GB used and swapping 12 GB while the governor reported half the pool free. Erring toward "plenty available" is the worst direction available: it over-grants into a host already past its limit. Before unified memory the VRAM axis read the GPU monitor independently and could not be blinded this way. Collapsing the axes onto one pool was right; collapsing them onto one SOURCE was the mistake, and I made it in the same change. FIX: `available_bytes()` now falls back — monitor atomic, else a direct `sysinfo` sample (the same `host_statistics64` read the monitor itself makes, and the one `system/resources` already serves from), else the last value either source produced. `None` only if nothing has ever produced a reading. Stale beats fabricated-empty: an old number keeps the governor conservative; a zero invites over-grant. Cost: zero extra syscalls on the healthy path (the atomic answers first); at most one cheap syscall per ~1Hz daemon tick on the degraded path. `new()` also seeds last-known-free from its existing construction-time probe, so the reader is useful from its first call. NOT FIXED HERE, and it should not be hidden by this: MemoryPressureMonitor's atomic is 0 on this boot while sysinfo works fine, so that monitor is not publishing at all. This change stops that outage from corrupting the governor; it does not explain it. Separate investigation — the resilience fix is right on its own merits either way. 10/10 capacity tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…derive total−used instead (#438 root cause) MEASURED, same process, same `System`, this M5: System::new() + refresh_memory() → total=68719476736 available_memory()=0 System::new_all() → total=68719476736 available_memory()=0 `available_memory()` returns ZERO on this platform while `total_memory()` and `used_memory()` both return correct values. Not a construction problem — every construction gives the same zero. WHY THAT MATTERED FAR BEYOND ONE READER. `MemoryPressureMonitor` calls `available_memory()` and publishes the result into `CURRENT_AVAILABLE_BYTES` — the global atomic its own doc calls "the honest 'how much can I allocate before the OS OOM-kills me' number", the one a subsystem is told to size large allocations against. It has been publishing a permanent 0. `SystemMonitor::read_memory` never had the bug: it derives `available = total − used` and reports correctly (10.5 GB available / 58.2 GB used, live, right now). Two readers of the same fact, one right and one silently wrong, and the wrong one is the one the governor trusts. A bogus zero-available is precisely the shape of #438 — "governor downshift on ONE bogus usable_gb=0 sample served citizens with a 0.5B". This does not by itself close that card, but it is a mechanism that produces exactly its symptom, and it was live on this box today. FIX: `available_from(&System)` — ONE derivation, `total.saturating_sub(used)` — used by the pressure monitor's poll and by `LiveHostMemory` both at construction and on its fallback sample. The two readers can no longer disagree, which is the actual invariant; the specific arithmetic is secondary. This also explains why my previous commit's fallback did not help: it copied `available_memory()` and inherited the same zero. Fallback depth is worthless when every level asks the same broken question. Found by writing a diagnostic that printed all three constructions rather than reasoning about which one "should" work — I had already guessed wrong twice (construction kind, then daemon wiring) before measuring. 10/10 capacity tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… carries provenance (#56) Joel, 2026-08-19: "it's whatever vision is estimated or monitored to be, which is surely singular source of truth, even if it did start at some estimate — which is why handle/adapter for all memory footprints (even if this adapter is permitted to hard code, go from last measured and so on as part of its own; you'd need to store the state if so). Don't craft some recursive loop whatever you do." THE PROBLEM THIS PREVENTS. I was about to add a second way to size the vision sidecar, alongside the one serving already uses. Two sizings of one holder is how VRAM and RAM came to disagree by 23 GB about a single physical pool. So: one adapter per holder, and it is the only thing entitled to answer. It MAY be crude inside — a hardcoded figure, a catalog estimate, last-measured-with-age — and may keep whatever state that needs. What it may not do is make its crudeness invisible. PROVENANCE, because an estimate that reads like a measurement is worse than no number: `FootprintReading { kind, bytes, provenance }` where provenance is Measured | Estimated | LastKnown{age_ms} | Unknown. `usable_bytes() -> Option<u64>` is the call shape that makes "unknown" impossible to accidentally add to a budget. UNKNOWN IS NOT ZERO, and this is the day's lesson typed. `serving_footprint_fn` ends in `.unwrap_or(0)`: a LIVE lane whose catalog row will not resolve reports zero bytes held. Cosmetic on a display; as a budget term it is precisely the defect that cost today — `sysinfo::available_memory()` returning 0 while the machine was 54 GB used and swapping, and every consumer concluding the box was empty. A reading that cannot be made must say so. A holder that genuinely holds nothing still reports `Measured(0)`, which is a different fact and stays usable. ACYCLICITY, made structural rather than advisory. Footprint adapters are LEAVES: they may read hardware, the catalog, a process table, their own cache — never the governor, a budget, a board, or another holder. The governor computes budgets FROM footprints (`budget_for_replacing` = available + own residency); a footprint that consulted a budget would be circular and order-dependent — the self-eviction ratchet again, but non-terminating instead of merely wrong. The trait is handed no governor, so the cycle is unrepresentable, not merely discouraged. `LastKnown` is provided so adapters do not each hand-roll live → last → never, and holds only bytes+timestamp, which keeps them leaves by construction. Tests pin the four ways this gets silently wrong: unknown reading as a quantity; provenance lost in transit so an estimate passes as a measurement; a fallback fabricating a value before any real read; and a backwards clock forging a fresh age on stale data. 4/4 green. NEXT (deliberately not bundled): serving and vision both adopt this, so the vision add-back term is the live provider's reading rather than any constant — and the `unwrap_or(0)` on the budget path becomes a loud fault. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… footprint adapter (#106/#395/#56) Joel: "it's whatever vision is estimated or monitored to be, which is surely singular source of truth… handle/adapter for all memory footprints." Both adapters answer through the SAME calculation — the catalog's ModelFootprint sizing (weights + lanes × kv(window) + prefill compute reserve) evaluated at the lane's own live shape, re-read from ServingSnapshot every call. Swap the model or resize the window and the number moves on the next tick; there is no cached size and therefore no invalidation step anyone can forget. Nothing here invents a number. KEYED ON THE FEATURE, NOT THE SIDECAR ("or the feature really"). Vision on this node comes from one of two places: the persona lane when its own model sees (Qwen3.8-27B does), or a separate describe sidecar when it does not. The adapter reads whichever endpoint the snapshot has VERIFIED, so a change of provider needs no edit here. That framing carries the correctness case, and it is the day's bug in miniature. When the main lane IS the vision provider, its bytes are already charged by serving — attributing them again double-counts one residency across two holders, inflating attributed bytes by a whole model and shrinking every budget by the same amount. Self-inflicted scarcity, indistinguishable from the real thing, and the exact shape that had VRAM and RAM disagreeing by 23 GB about one physical pool. So that case reports Measured(0): the vision FEATURE holds nothing of its own. Pinned by `vision_provided_by_the_main_lane_holds_nothing_of_its_own`. UNKNOWN, NEVER ZERO, on the branches that can't answer. A ready lane with no served window or no named model is Live(reason) → Unknown, not 0 — a live server we cannot size still holds gigabytes, and reporting 0 tells every other consumer those bytes are free and invites the concurrent OOM. Distinct from `nothing_serving_is_a_real_zero`, which stays a usable Measured(0). That distinction is the whole point of the Provenance ladder. THE PROBE, so a bad decision is readable instead of re-derived: class `resources.footprint` emits holder, model, window, lanes, bytes and provenance at the moment the reading is taken. A wrong grant can now be traced to the term that produced it — which is not how today went, where a monitor publishing a silent zero cost hours of guessing at inputs nobody had recorded. Leaf discipline holds: catalog snapshot + watch borrow, both non-blocking, no governor handle. 4/4 green. TWO FINDINGS for follow-up, both instances of the rule this commit applies: - `plan_sidecar` sizes the SAME holder differently — `weights_bytes + SIDECAR_OVERHEAD_BYTES` (a flat 2 GiB) against this path's calculated model. Two sizings of one thing; the gate should call the adapter. - `footprint_for` re-stats the GGUF on every call to get `weights_bytes`. That belongs on the catalog row, hydrated once at resolution — the "stored catalog values" half. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…bytes on the catalog row (#106/#56/#74) Joel: "Fix 1 and 2 before we proceed. It's just not gonna work if incomplete. It just shifts the bug." Correct — an adapter that unifies the ledger while the GATE keeps its own arithmetic has moved the disagreement, not removed it. FIX 1 — ONE SIZING, so the gate and the ledger cannot disagree. `plan_sidecar` admitted on `weights_bytes + SIDECAR_OVERHEAD_BYTES`, a flat 2 GiB standing in for "mmproj + KV + compute buffers", while the resource ledger attributed the same holder using the calculated model. Two answers for one holder, neither wrong on its own terms, so nothing could catch the disagreement — and the constant is wrong in BOTH directions: far too generous for a 2B, far too thin for a 30B at any real window. The constant is deleted. `find_candidate` now sizes each candidate through `serving_footprints::resident_bytes_for` — the same function the adapter attributes with — and `plan_sidecar` is reduced to a pure comparison against that number. A row that cannot be sized is SKIPPED with a named reason rather than admitted on a guess: refusing to spawn is recoverable, spawning into memory nobody accounted for is the mid-load SIGKILL. That shared function also fixes a real under-report the weights-only path had all along: the multimodal PROJECTOR is resident alongside the model, so a vision lane sized from the GGUF alone is short by the whole mmproj (~1.4 GB for the VL-7B). FIX 2 — THE ROW IS THE SOURCE OF TRUTH for artifact bytes. `footprint_for` re-`stat`ed the GGUF on EVERY call to get `weights_bytes` — a syscall per poll, on the governor's accounting tick, for a number that cannot change while the path is valid. `Model` now carries `weights_bytes` + `mmproj_bytes`, stamped ONCE by `artifacts::hydrate_artifact_sizes` at the same moment the paths are resolved: a path and its size are one fact discovered together, so they are stored together. `attach_local_artifact` (the models/pull route) hydrates too, and `detach_local_artifact` clears both — a row never carries a path without its size, or a size without its path. `None` means NOT RESOLVED, never zero. The stat survives as the fallback for rows built by hand in tests and fixtures — not dead code, but the exception rather than the steady state. UNPLANNED BENEFIT, and it is the one that will keep paying: residency is now testable WITHOUT A FILESYSTEM. A hydrated row carries its own bytes, `footprint_from_parts` is pure, so the new `the_spawn_gate_sizes_the_sidecar_the_way_the_ledger_will` asserts the real properties off-disk — that residency exceeds bare weights, that the projector is counted, and that a 1 GB model is charged LESS than a 5 GB one. That last one is the property a constant cannot have, and it is exactly what the old 2 GiB got wrong. `ModelSpec` deliberately does NOT gain these fields, for the same reason it omits `parameter_count`: a hand-authored byte count goes stale the moment a quant is re-pulled. Discovered, never declared. 280 tests green across model_registry / serving_daemon / serving_plan / resources / hydrate, 0 failed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…probes to debug it (#106/#395/#56) Joel: "wire it up with probes then we can debug it." The adapters were green and had zero call sites — green components with dead wiring is the exact shape that let DiskPressureMonitor log `level=high [no reporters]` while the disk filled. REGISTERED. `register_as_consumer` now also builds `CatalogFootprintSource::vision` and adds it via a new `MonitoredHolder`. The holders table moves `vision` from Undeclared to Declared, and `declared_holders_use_the_ids_the_code_registers_under` is what proves the row and the registration agree — that guard passing IS the wiring receipt, not a comment claiming it. MONITOR-ONLY, AND THAT IS THE HONEST SHAPE. It declares the bytes and REFUSES reclaim with a named reason. Vision bytes are releasable — but by the serving reconcile (`if main_sees { sidecar = None }`), not by any inbound handler. Declaring a reclaim it cannot perform would have the authority plan against a release that silently never happens, which is worse than declaring none. The refusal is probed so an operator sees the gap instead of inferring it. UNKNOWN STILL ISN'T ZERO, and at this seam the rule finally bites. `footprint()` DROPS a row it could not size rather than contributing 0: the board sums declared footprints, so a 0 would assert "this holder holds nothing", a stronger and falser claim than declining to answer. Omitting it leaves those bytes in `unowned`, where they read as immovable — conservative, and visible as the gap it actually is. THE PROBES (three, each a different question): - `resources.footprint.wired` — fires at registration. Answers "is it connected at all", the question I could not answer about my own code an hour ago. - `resources.footprint` — holder, model, window, lanes, bytes, gib, provenance, and a `why` string naming which branch produced it. Emits on TRANSITION only: a changed byte count, a changed provenance, or ANY Unknown. Unknown always fires because it is the state that silently poisons a budget. Steady numbers stay quiet — #399 measured `serving.plan` at 2.6 rows/s, 51% of the entire probe stream, which is how a glass box becomes a fog bank. - `resources.footprint.reclaim_refused` — holder, target bytes, and the reason, so a refused reclaim is a readable event instead of a mystery non-event. 218 tests green (resources + serving_daemon + holders + footprints), 0 failed. DELIBERATELY NOT IN THIS COMMIT: the capability-keyed add-back. `governed_vram_ceiling` is model-agnostic — it has no candidate in scope — so applying the add-back there would inflate the budget for NON-vision candidates too, granting bytes the sidecar will not release, which is an over-commit and an OOM rather than a bad plan. It belongs where candidates are scored, and it should be written against a vision footprint the probe has actually shown on this box. Writing it first and measuring after is the launch-and-pray order, and this is the arithmetic where that costs a wedged lane. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…os were indistinguishable (#106/#395) DEBUGGED FROM THE LIVE BOARD, not from the code. The zero I set out to "solve" turned out to be the CORRECT answer, and chasing it surfaced the real defect one layer up. WHAT THE PROBES SHOWED. `serving/status` on the running core: active_model = ggml-org/Qwen3.8-27B-GGUF ready, 4 lanes, 22,528 window vision_base_url = http://127.0.0.1:58057/v1 ← identical to base_url vision_model = ggml-org/Qwen3.8-27B-GGUF ← identical to active_model One llama-server, carrying `--mmproj mmproj-Qwen3.8-27B-Q8_0.gguf` in the same process. The main lane IS the vision provider, the double-count guard fired, and `vision = 0.00 GB` is right. (The `sidecar_up` probe I first read was the VL-7B from an earlier run — a stale observation, not a live one.) THE ACTUAL BUG, which only the live board could show: `why = "holds nothing of its own"` was emitted for TWO OPPOSITE FACTS. - the 27B provides vision itself → costs nothing extra → everything is working - nothing provides vision at all → PERSONAS ARE BLIND → a defect Same byte count, same string, opposite news, opposite response. An operator staring at `vision 0.00 GB` could not tell a healthy system from a blind one, and neither could I. That is the #151/#357 lying-receipt family wearing a number instead of a sentence. THE FIX, at the branch that knows. `LaneClaim::HoldsNothing` now carries its reason, set where the decision is made rather than reconstructed downstream from the value: "the main lane's own model sees — vision costs no extra residency" "no vision provider is running — personas cannot see" "no lane is serving" `FootprintReading` grows `note` and a chainable `.because()`, so ONE carrier feeds the probe's `why`, the board row's `detail`, and any future consumer — three renderers, one explanation, no re-derivation. BRITTLENESS REMOVED while in here: `LastKnown::reading` built a `FootprintReading` by struct literal, so growing the type broke it — which is exactly how it shipped missing `note`. It now goes through the constructors plus a new `.aged(age_ms)` transition, so a stale reading cannot be hand-built as a fresh `Measured` one and new fields can't be silently skipped at a construction site. TEST: `the_two_vision_zeros_never_read_the_same` asserts the two reasons differ, that the bad one names the harm ("cannot see"), and that the good one names why it is free. The pre-existing test would have passed on either zero — it only checked the byte count, which is precisely how the ambiguity survived being "covered". ALSO MEASURED, and bigger than this fix: - the 27B IS SERVING — 4 lanes, 22,528 window, MTP draft, fits_on_gpu=true. The self-eviction fix delivered the model the box was refusing to keep this morning. - attribution is essentially complete: serving 50.43 GB attributed vs 50.10 GB physUsed. This morning: attributed 6.81 GB, UNOWNED 44.14 GB. The unowned block is gone. The estimate now runs ~0.33 GB OVER physical — conservative, the safe direction, and worth watching as its own drift signal. 17 tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…abricated zero (#438) Joel: "I don't understand how zeroes are ever getting in at all, because defaults and estimates eventually get only real measured data to replace them, not zero… Can it remain 'unknown' but use the guesstimate till it resolves?" Correct on both counts, and the answer to the first is: NOTHING MEASURED IT. No monitor ever reported zero. `governed_vram_ceiling` honestly returns `Option<u64>` — `None` means "the governor has not published a VRAM row yet", which at boot is simply true for a second or two — and every call site wrote `.unwrap_or(0)`. The zero was manufactured at a type boundary, where "no answer yet" was forced into a slot that only accepts a number. MEASURED CONSEQUENCE, live on this box today at t-128s from boot: base_model = continuum-ai/qwen2.5-0.5b-instruct-GGUF usable_gb = 0 fits_on_gpu = false lanes = 1 win = 2048 A 0.5B spawned on a 64 GB machine, serving until the board caught up ~90s later. That is #438's mechanism, located. WHY THE ZERO LOOKED SAFE, AND WHY THAT REASONING WAS HALF RIGHT. Zero IS the correct conservative answer for a GRANTER: `acquire` against a ceiling of 0 refuses, and refusing is safe. Zero is catastrophic for a PLANNER: "how big a model should live here" against 0 does not decline — it picks the tiniest thing that fits in nothing, and then actuates. One scalar, two consumers, OPPOSITE SAFETY POLARITY. That is the defect: not the constant, but a single value answering two questions whose safe direction is reversed. THE LADDER (`resources::ceiling_prior::decide`), best evidence first, pure and testable: 1. Measured — the governed board has a VRAM row 2. LastKnown — the board reported earlier this process, aged; an old REAL number 3. Estimated — no reading ever, but the GPU monitor knows the DEVICE'S PHYSICAL VRAM, a static hardware fact available before any pressure sample, discounted by the operator headroom so a cold plan is conservative-not-empty 4. Unknown — genuinely nothing: no row, no history, no device On any machine with a GPU rungs 1–3 always produce a real number, so rung 4 is unreachable in practice. There is no path where 0 is the best available answer — it was never the most conservative value, only the emptiest. NOT INVENTED HERE. This is the standard shape: automotive ECUs under ISO 26262 substitute a DEFINED default on a failed plausibility check and fall back on analytic redundancy (MAF fails → infer from MAP + RPM), running degraded-but-operational rather than feeding a raw zero into the control law. Same pattern wherever a controller must act before its estimate converges — TCP slow-start opens at a nonzero initial window, DVFS governors boot at a default P-state, a Kalman filter initialises with a prior rather than a zeroed state. COMPRESSION: this reuses `FootprintReading` + `Provenance` — the exact primitive built this morning for footprints. A ceiling and a footprint are the same kind of thing: a byte quantity that may be measured, estimated, stale, or absent. Giving capacity a parallel vocabulary is how the sidecar gate and the ledger came to disagree about one holder. One carrier, one provenance ladder, both axes. PROBES: `serving.vram_ceiling_prior` fires ONLY on non-Measured rungs — bytes, gib, provenance and the rung's own reason — so "we are planning on a substitute" is visible while a healthy board stays silent and does not drown the stream (#399). `serving.vram_ceiling_prior.seeded` records the cold prior at daemon start, which happens BEFORE `register_as_consumer` and before any reconcile, so the very first plan already has a real number. Unknown still collapses to 0 at that one call site, deliberately: with no board, no history and no device, refusing to plan IS the honest outcome. The change is that this is now the unreachable last rung instead of the first thing a cold boot hit. 5 ladder tests + 9 existing green. The live proof this owes is the next cold boot's `usable_gb` — it should read ~55, not 0. FOLLOW-UP, deliberately not bundled: the actuation gate — a plan built on a non-Measured ceiling may be COMPUTED but should not spawn or tear down a lane until provenance is Measured. Estimate now, correct as the filter converges, commit irreversible actions only on confirmed state. That is what ends the boot-time spawn/teardown churn entirely. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…own unjustified unwrap_or
Joel, two corrections in one pass:
"Any in a chain can short circuit others."
"This is why I said rust elegance and to avoid the use of unwrap_or… I would always get
code review corrections for their usage."
Both land, and the second one lands ON ME: I introduced two `unwrap_or(0)` today WHILE
fixing `unwrap_or(0)`.
THE CHAIN PROBLEM. capacity → available → available_for → budget_for_replacing → ceiling
→ host_budget → plan → spawn is arithmetic at every link. One fabricated value anywhere
produces a result every LATER layer computes correctly from a poisoned input, and by the
time the planner sees it the number has been laundered through three subtractions and is
indistinguishable from a measurement. Fixing one link only moves which link poisons it.
So provenance now propagates: `Provenance::weakest` plus `FootprintReading::{minus, plus,
bounded_by}`. A derived quantity inherits its WEAKEST ancestor and carries that link's
reason, so the poisoned value can say who was guessing. Same principle as NaN in floating
point — a bad input poisons the result rather than silently becoming zero — except this
one explains itself.
Trust order is the design decision, stated deliberately: Measured > LastKnown > Estimated
> Unknown. A real number the hardware produced two seconds ago outranks one no instrument
ever produced.
MY OWN unwrap_or SITES, all three replaced:
- `mmproj_bytes.unwrap_or(0)` — and it was semantically wrong, not merely ugly. `None`
conflated "this model has no projector" with "the row was never hydrated", and
`hydrate_artifact_sizes` even did `.filter(|n| *n > 0)`, discarding the difference.
Hydration now writes `Some(0)` when there genuinely is no projector — a real, known
fact — and reserves `None` for unresolved. `resident_bytes_for` then uses `?`: it
REFUSES to size a row nobody has hydrated instead of under-reporting a vision lane by
the projector's whole size.
- `reading.usable_bytes().unwrap_or(0)` — the ladder laundering `Unknown` back into a
number one line after building a type to prevent exactly that. Now a `match` with the
reasoning written in the `None` arm. Same value, but it is a decision a reviewer can
argue with instead of a default that reads like punctuation.
- `epoch_ms`'s `unwrap_or(0)` — KEPT, and justified in place: the error case is a clock
set before 1970, and 0 is this module's existing "never recorded" sentinel, so the
last-known rung goes correctly UNAVAILABLE rather than falsely fresh.
THE STANDING RULE, written where the Unknown-is-not-zero law already lives:
1. Prefer the type — `?`, a `match` arm, an `Option` return states the branch.
2. If a default is genuinely right, justify it ON THE LINE, and the justification must
show the failure direction moves toward LESS trust, never more. A default that makes
a caller believe it has more room, more evidence or fresher data than it does is
always wrong, however tidy.
3. Never default a value a DECISION is computed from. Display and telemetry may take a
default; budgets, admissions and plans may not.
That third clause is the whole day in one line: the zero was fine for the granter and
fatal for the planner.
Tests: 3 new contagion tests — one guessed link poisoning a 3-step chain (and naming the
guilty link), an all-measured chain NOT being needlessly demoted, and Unknown sinking a
`bounded_by` even when it loses the comparison. 175 green across resources +
serving_footprints + artifacts, 0 failed.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…w is not a reading (#438) Joel: "finish it till it works right… if it can't take these new frontier models it defeats the purpose." The ladder and the contagion rule were both correct and both were sitting on top of a source that could still invent a zero. This is the cut that closes the chain. THE ONE LINE, and the reasoning is the whole fix: .find(|k| k.kind == ResourceKind::Vram) .filter(|k| k.capacity_bytes > 0) CAPACITY IS THE DEVICE'S SIZE, NOT ITS FREE SPACE. A GPU does not shrink to nothing. So a governed Vram row carrying zero capacity cannot be an observation — it can only mean the capacity source has not reported yet, which at boot is simply true for a second. That is `ledger.rs`'s `capacity.get(&kind).copied().unwrap_or(0)` fabricating a number one layer below where the ladder reads, and it is why the ladder did NOT fire on the boot that still produced a 0.5B: `governed_vram_ceiling` returned `Some(0)`, the ladder classified it `Measured(0)` — correctly by its own rules — and passed it through. A zero that arrives as a number is indistinguishable from one that was observed. That is what "any in a chain can short circuit others" means in practice. WHAT THIS DOES NOT DO, deliberately: it does not suppress a real full-GPU reading. Zero AVAILABLE against a real capacity stays a genuine measurement and the planner should still decline — there is no room. Only zero CAPACITY is rejected, because only that one is physically impossible. THE DISCRIMINATOR, so the next boot proves the mechanism instead of leaving me inferring it — `serving.vram_capacity_absent` carries capacity/physical_used/available at the moment of the zero. If it fires alongside `serving.vram_ceiling_prior` at ~51.84 GiB with NO 0.5B plan, the chain is closed end to end. If it does NOT fire and a zero still appears, my `ledger.rs:167` suspect is wrong — and the probe says so. Built this way on purpose: I have been wrong three times today reading a live system from one sample, and an instrument that can falsify me is worth more than another argument that I am right. THE CHAIN, now honest at every link: capacity source absent → zero-capacity row rejected (this commit) no board reading → last-known, then device prior, never 0 (6338cd3) derived arithmetic → inherits its weakest ancestor + its reason (f1e7b67) a holder that can't be sized → declines instead of contributing 0 (67a6edb) 215 tests green across resources + serving_daemon + serving_footprints + ceiling_prior, 0 failed. 165 GB free. STILL OWED, and it is the only thing that makes this real: a cold boot showing usable_gb at ~55 instead of 0, no 0.5B spawn, and the 27B coming up directly. That is the receipt, not the test count. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…nds (#438 root) MEASURED IN THE COLLAPSED STATE, which is what made this findable: serving 25.93 GB attributed "1 lane(s)" vram cap=55.66 phys=47.25 measured=25.93 avail=8.42 21.3 GB unowned. The snapshot had already flipped to the new 1-lane shape while the old 4-lane process was still resident. Unowned reads as immovable, `available` fell to 8.42 GB, the 27B stopped fitting, and the planner took a 0.5B — in STEADY STATE, ~8 minutes into a healthy run, not a boot transient. THE CAUSE, `serving_consumer.rs:185`: `footprint()` is PLAN-derived. `active_ready()` returns `None` unless `ready`, so a loading or relaunching lane attributed NOTHING while holding gigabytes; and when the shape shrank, it attributed the new shape immediately while the old residency lingered. Two under-reports, one root — reporting intent as if it were residency. Under-reporting our own bytes is indistinguishable from someone else holding them, and strictly more dangerous: it invites over-commit against memory we have not released. THE FIX: a high-water of bytes held-and-not-shown-released, decaying ONLY on evidence — a `ready_verified_at_ms` we have not yet consumed, which is stamped exactly when readiness is CONFIRMED for the lane now serving, and therefore proves the previous process is gone. Evidence, not a timer. AND THE GUARD THAT MAKES IT SAFE, found by a failing test rather than by argument: if the snapshot carries NO verification stamp, nothing could ever prove release, and the claim would strand this machine's capacity for the life of the process. So the high-water requires a PROOF CHANNEL — no stamp, no claim. Same rule as everywhere else today: the failure direction must move toward LESS trust. A brief under-report is recoverable; an unfalsifiable claim on a third of the box is not. TWO CORRECTIONS TO MY OWN WORK, both caught by tests I nearly rewrote instead of reading: - I wrote three tests against the shared `rig`, whose resolver is FLAT by design — its comment says "the shape (window, lanes) is ignored here", three lines above where I was working. With a flat resolver a 4-lane and a 1-lane serve are the same size, so the shrink I was asserting was unobservable. Added `shape_rig`, which scales with lanes. - I had labelled `footprint_is_the_active_ready_model_only` and `footprint_passes_served_window_and_lanes_to_resolver` as legitimate premise changes. They were not. Under the proof-channel rule BOTH PASS UNMODIFIED — which is the strongest evidence the rule is the right design and not a patch shaped to fit. WHY THIS MATTERS BEYOND THE LOCAL BUG (Joel): allocation gets more dynamic on the grid, and there is no reap to fall back on there. When a peer's residency shifts or a node drops, nothing local can be killed to make the accounting moot — `resources/mod.rs` already calls node loss "a reclaim no one consented to", detected as drift between what a consumer claims and what the scan shows. This is that mechanism, one scale down. 11/11 green in serving_consumer, no existing assertion weakened. STILL OPEN, and it is the CAUSE this compensates for: `lane_registry::sweep_all` is wired at exactly one site (`continuum.rs:1671`), yet an orphaned 0.5B survived a reboot tonight while `serving/status` reported nothing serving. Either that site is not on the reboot path, or the sweep only matches lanes it registered a pidfile for. Boot owning the process tree (#452/#454) removes the drift at its source; this makes the ledger honest either way. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…d attribution (#438) MEASURED AFTER the high-water fix, which did NOT cover this. Cold boot, live board: serving= 0.00G phys=29.90G UNOWNED=29.90G avail=25.76G ready=False model=None serving= 0.00G phys=36.88G UNOWNED=36.88G avail=18.79G ready=False model=None Physical climbing as the 27B loads; zero attributed the whole way. The high-water needs a prior residency and a verification stamp, and a first boot has neither — Joel's exact worry about option (a), landing on option (b) in a different form. THE CAUSE WAS UPSTREAM AND IS THE SAME SHAPE AS EVERYTHING ELSE TODAY: `ServingSnapshot` was BINARY — ready with a model, or not-ready with `active_model: None`. The loading arm of `snapshot_from_outcome` returned `ServingSnapshot::empty()` and DISCARDED `desired`, which it had been handed. So for the whole load window the state pipe FORGOT what it was bringing up, and the consumer could not attribute those bytes because the information was not in the pipe. A state machine that cannot express an honest intermediate degrades its answer to zero. Readiness is a claim about SERVICE. Residency is a fact about MEMORY. They do not start together: weights are mmap'd from spawn, `/props` answers much later. Reporting residency from readiness is a category error, and it costs a third of the box during every load. THE FIX: `loading_model: Option<String>` on the snapshot, set by the loading arm from the `desired` it already receives, and charged by `footprint()` at a MINIMUM shape — one lane at the floor window. That under-states the eventual KV and names the dominant term (weights) immediately, growing to the true figure the moment readiness lands. Conservative in the safe direction, and never zero while a process holds memory. 12/12 green in serving_consumer including the new cold-load case, which sets up exactly the measured condition: never ready, no prior residency, NO verification stamp. THE CHAIN, now honest at every link: capacity source absent → zero-capacity row is not a reading 85024f2 no board reading → last-known, then device prior, never 0 6338cd3 derived arithmetic → inherits its weakest ancestor + reason f1e7b67 a holder that cannot be sized→ declines instead of contributing 0 67a6edb a reshaping lane → reports what it holds, decays on proof 163c926 a LOADING lane → is named and charged from spawn this commit NEXT, and Joel named the likely mechanism (2026-08-19): "startups can destroy the evidence like pid files that they'd need to know which process to kill." That reframes the orphan `sweep_all` missed — it is probably not the wrong call site but an ORDERING bug: if boot recreates the pidfile/registry before reading the previous generation's, the evidence of what to kill is destroyed by the act of starting. The sweep then finds nothing, reports clean, and the orphan survives. Read-and-reconcile the old generation BEFORE writing the new one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…obe the lane's own slot count (#452) The adopt-or-relaunch decision had two operands and they asked different authorities. `window_ok` probed the running server's `/props`. `lanes_ok` read `current_serving().lanes` — our own process-local snapshot. For a lane THIS core spawned those agree, so the asymmetry was invisible. For a lane it did NOT spawn it is fatal. MEASURED LIVE 2026-08-19, by crashing a core with SIGKILL while its lane was healthy: custody survived exactly as designed — llama-lane.pid still named pid 64372, the registry record still described it ({"pid":64372,"port":58057,"role":"live", "model":"…Qwen3.8-27B…"}), and the process was still serving. Drop is ownership-gated and a SIGKILL skips it on purpose, so the evidence a successor needs is all there. boot then declined it. `serving.grow` fired with target_window=22616 — which is 90464/4, EXACTLY the per-slot window the surviving lane was already serving — and `serving.adopt_rejected` had zero rows, so the lane was never even decode-probed. It was reaped (`serving.lane_reclaim → Reclaimed { pid: 64372 }`), and rebuilt over ~110s across three pids, returning at 3 lanes / 21,504 against the 4 lanes / 22,784 that had been running before the crash. The planner targeted precisely what already existed on the box and threw it away to make it again, worse. FIX: `LlamaServerControl::served_lanes()` reads `/props total_slots` — the LANE sibling of `served_context_window`, same shape, same error policy (a probe failure is "lanes OK" so a transient hiccup can never spuriously relaunch a healthy lane; a missing field is Err/UNKNOWN, never a guessed 0). Both operands now ask the process. The stale comment claiming `served_lanes` was "the process's own truth (ServingSnapshot .lanes)" is corrected — a snapshot is our memory of a process, not the process. The `serving.grow` probe now reports what the LANE said and says "unreadable (…)" when it could not be asked; a probe that silently substitutes a number is how this hid. Tests: two added, both to the existing mod. - a_past_form_of_ourself_serving_enough_lanes_is_adopted_not_reaped — the defect itself (not-owned + healthy + already at target shape ⇒ AlreadyServing, zero relaunches). - a_lane_serving_fewer_slots_than_planned_still_relaunches_to_grow — the guard that "adopt more eagerly" must not disable lane grow-back (#214's sibling). Every pre-existing adoption/grow test passes UNMODIFIED, which is the evidence this moves only the intended seam. 35/35 llama_server, 40/40 serving_daemon. Joel's ruling this is built on: we need to know OUR footprint, the total system with us removed, and ANY PAST FORMS OF OURSELF — and we are free to control our own processes, fully. Boot could already see the first two. This is the third. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…carries the shape (#452/#438) The upstream half of 6c12965. That commit made the adopt gate ask the lane how many slots it serves; this one makes the GOVERNOR know the lane is ours at all. MEASURED LIVE 2026-08-19, on the boot right after deploying the adopt fix: serving.plan t-381s qwen2.5-coder-3b lanes=1 win=3271 usable_gb=2 ← boot serving.plan t-380s qwen3.5-4b-forged lanes=1 win=16384 usable_gb=2 serving.plan t-374s Qwen3.8-27B lanes=1 win=16384 usable_gb=31 ← recovers serving.plan t-299s qwen2.5-coder-7b lanes=1 win=16384 usable_gb=7 ← collapses AGAIN serving.plan t-290s Qwen3.8-27B lanes=3 usable_gb=25 `usable_gb = 2` on a 64 GB machine. The predecessor's healthy 27B was still running and holding ~50 GB, but a fresh core's ServingSnapshot is empty for a lane it did not spawn, so the consumer reported ZERO and the governor filed those bytes under `external` — someone ELSE'S. The box looked full, the planner chose a 3B, and the 27B was reaped as the "wrong model" to make room for it. Twice in one boot (serving.lane_reclaim: Reclaimed{3459}, Reclaimed{62615}). The self-eviction ratchet could not rescue it either: the ratchet adds back our OWN measured residency, and the lane was not ours yet. And the adopt gate from 6c12965 never even ran — zero serving.grow rows — because the decline happened upstream at model identity. One misfiling, both symptoms. FIX, in Joel's own frame ("know OUR footprint, the total system with us removed, and any PAST FORMS OF OURSELF — then work within that; we are free to control our own processes, fully"). Boot could already see the first two quantities. This is the third: 1. `LaneRecord` carries the SHAPE (`context_window`, `lanes`), not just the identity. Residency is weights + KV(window, lanes), so a record naming only the model cannot answer "how many bytes does my past form hold?". Written at spawn from ServingTarget. 2. `lane_registry::live_lane()` — the LIVE-role record whose pid is genuinely alive. A stale file cannot conjure residency. 3. `serving_consumer::inherited_footprint(rec, sizer)` — pure over (record, sizer), so both arms are testable with no filesystem, process, or governor. Wired as the third fallback after active_ready and loading_model. THE REFUSAL IS THE LOAD-BEARING HALF. A record predating the shape fields carries 0, which means UNKNOWN, not "a zero-byte lane". `inherited_footprint` returns None there. Returning Some(0) would hand the governor a QUANTITY where it should get an absence — the same fabricated-zero class as #438's usable_gb=0 and the sidecar's two-zeros bug, and this fix would have re-created the very defect it exists to remove. Tests (2 added to the existing mod, both confirmed by name): - a_lane_inherited_from_a_previous_generation_is_counted_as_ours — sized from the record's own shape, reason names the pid it came from. - an_old_record_without_a_shape_is_unknown_and_never_a_zero_byte_lane — all three partial-shape rows refuse. 22/22 serving_consumer + lane_registry green; the registry fixture gained a real shape. STILL OWED: live proof. Both fixes are green and deployed-pending; the repro that produced the evidence above must be re-run and show usable_gb NOT collapsing at boot. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rity, identity-verify the pid (#452) Caught by measuring the previous commit instead of trusting it. Polling the board DURING a boot, with the 27B (pid 97530, 19414 ctx × 4 lanes) as the live lane: serving = 0.81G "continuum-ai/qwen2.5-0.5b-instruct-GGUF inherited from a previous generation" We attributed 0.81 GB where ~50 GB was resident. Two defects in the `live_lane()` I wrote in 5f7ecce, compounding: 1. `read_dir` order is ARBITRARY. A crashed generation leaves several `Live` records and the loop returned whichever the filesystem listed first — a stale 0.5B. 2. `is_alive(pid)` is NOT identity. A dead lane's pid gets REUSED and the stale record reads live forever. `lane_pidfile::reclaim` has always been "identity-verified (never a reused pid)" and `lane_process::is_llama_server` exists for exactly this; I simply did not call it. The hazard is even named in lane_process.rs:11. FIX — one authority per question, which is why they cannot drift: - the PIDFILE answers *which* lane is live (it holds exactly one canonical pid); new `lane_pidfile::read()` exposes it, doc'd as NOT a liveness claim. - `is_llama_server(pid)` proves the number still belongs to a lane. - the REGISTRY RECORD supplies that lane's shape. SECOND DEFECT, mine, found by the tests immediately: calling `lane_registry::live_lane()` from `footprint()` reaches a process-wide FILESYSTEM singleton, and three unit tests began reporting the operator's real live 27B. A unit that reads the developer's machine is not a unit test (#72's smell), and it would pass or fail depending on whether a lane happened to be up. `inherited_lane` is now an INJECTED field beside `footprint_of` — which was the precedent sitting right there, already injected for the same reason. Production wires the real lookup; tests hand it `|| None` via `with_inherited_lane`, gated `#[cfg(any(test, feature = "test-fixtures"))]`. 22/22 serving_consumer + lane_registry green. STILL OWED: the live re-measure. The two prior commits moved usable_gb's floor 2 → 5 and cut the collapse from two cycles to one, but the attribution was sizing a 0.5B the whole time — so that improvement came from something else and the real effect of counting a 27B as ours has never actually been observed. Not claiming it until the board shows ~50 GB under `serving` at boot. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ips with its Rust) The `loading_model` field added to ServingSnapshot in this branch never had its generated TS committed. Repo rule is both halves land together — a Rust wire type whose binding lags is #457's drift, caught here by hand because CI has no guard for it yet. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
work.rs conflicted twice, both on #425: canary's b4fad49 and this branch each grew a room-lookup helper for the same job. Taking canary's file wholesale COMPILED CLEAN and would have silently deleted 206 of this branch's lines to gain 154 — a green build proving nothing. Caught before shipping; resolved by hand instead. RESOLUTION, keeping both sides: - canary's `room_holding_card` WINS over this branch's `card_room_of` — returns the full `Room` (superset of the uuid) and is the explicit consolidation of two callers that "used to derive it separately — badly". One resolver, not three. - this branch's work/state direct-emit caller is KEPT, rewired onto it (`.map(|r| r.channel.as_uuid().to_string())`) rather than deleted. - hunk 2 takes canary's fuller #425 treatment (solve runs IN THE CARD'S ROOM). - type seam: canary's dispatch carries a typed `PeerId`, `resolve_for_titles` wants a raw `&Uuid` — bridged at the call site with `&claimer.as_uuid()`. 36/36 green across work:: + serving_consumer:: + lane_registry::. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… as the incumbent (#438) Measured from the probe ledger, 2026-08-19 — and it retracts my last two diagnoses of this defect, both of which were wrong. WHAT THE LEDGER SHOWS. A core crashed with a healthy Qwen3.8-27B serving 4 lanes at a 25,075 window (`serving.grow served_lanes=4 target_window=25075`). Its successor booted while that lane was STILL ALIVE holding ~45 GB, and the first plan read: +32246.3s Qwen2.5-Coder-7B lanes=1 win=4689 usable_gb=6 bound_by=host-fit +32246.9s qwen2.5-coder-14b lanes=1 win=2048 bound_by=host-fit +32247.5s serving.lane_reclaim outcome=Reclaimed { pid: 11341 } <-- 1.2s TOO LATE +32256.3s Qwen3.8-27B lanes=2 win=16384 usable_gb=29 +32306.3s Qwen3.8-27B lanes=4 win=27481 usable_gb=47 `usable_gb=6` is not a bogus sample and not a fabricated window — it is an HONEST reading of free VRAM on a box whose own predecessor holds 45 GB of it. The planner spent that budget on a 14B at MIN_SERVE_CTX; 1.2 seconds later the reclaim freed all 45 GB, and by the time the plan wanted the 27B back it could not have it — a model swap needs the relaunch already spent. WHY BOTH DEFENCES WERE OFF. `plan_serving_stable`'s at-rest credit exists precisely so "a model's OWN load/residency can never flap it out", and `downshift_gate`'s sustained-ticks debounce (#368) exists precisely to reject a transient squeeze. BOTH key on an incumbent, and `publish_plan`'s own comment declared boot has none: "Boot's first plan has no incumbent (plan_tx holds None) -> plain selection." So the one moment a squeeze is GUARANTEED — the successor overlapping its predecessor — is the one moment every guard against transients is disabled by construction. THE FIX, in Joel's framing of the governor: know our footprint, the system with us removed, and ANY PAST FORMS OF OURSELF — then work within that. An inherited lane is that third category. It is ours, its bytes are ours to reclaim, so it is the incumbent the first plan reasons against, not an external squeeze to flee. `incumbent_for_plan(published, inherited)`: a published plan always wins (a stale .lane file must never pin the model forever); the registry record speaks only in the window where `plan_tx` is empty. `InheritedLaneSource` is an injected seam, not a direct `live_lane()` call, for the same reason `DecodeAgeSource` is one — the production default reads a filesystem singleton, so under `cargo test` (one process, shared HOME) it would hand every planning test the OPERATOR's real 27B as an undeclared incumbent. `daemon_with` pins it to None. That exact leak was already caught by measurement in `serving_consumer`; this is the same lesson applied before it could bite. TESTS (43/43 green in this module), with a real negative control: - the inherited 27B is defended at a 6 GB sample - WITHOUT it, the same 6 GB genuinely downshifts — so the test above is not vacuous - a published plan outranks a stale inherited record, and cold boot still has no incumbent RETRACTED by this commit, both mine: (1) the handoff note's "the reap happens BEFORE attribution can matter" — it happens 1.2s AFTER the plan it invalidates; (2) "a transient in a settled system, not a boot defect" — it is a boot defect, and the ordering is the mechanism. The three VRAM-provenance fixes from earlier today are correct and remain, but they were not the binding constraint on this path. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…anner may tick (#438) Joel, 2026-08-19: *"unacceptable to not consider the removal of the last system as negated."* He is right, and the honest form of the defect is narrower than it first looked. THE NEGATION ALREADY EXISTS. `governed_vram_ceiling` budgets serving through `budget_for_replacing(SERVING_CONSUMER_ID, Vram)` — available PLUS serving's own resident bytes, because a consumer choosing its successor releases what it holds. Live board, right now, with the 27B up: `externalBytes: 0`, `measured 55.59 GB` attributed to `serving`. Our predecessor's memory is filed as OURS, not as an external squeeze. A second credit was drafted for `host_budget()` and DISCARDED before commit — it would have added the same 55.59 GB twice and over-committed the GPU, which fails as an OOM rather than a small window. That is the parallel-allocator move this codebase forbids. WHAT WAS ACTUALLY BROKEN IS THE WIRING ORDER, read in-file at `ipc/mod.rs:1322`: serving_daemon.register_planner_on_authority_tick(); // planner attached HERE runtime.register(serving_daemon.clone()); // initialize() → register_as_consumer LATER The add-back is keyed on serving being a REGISTERED CONSUMER. The planner was attached to the authority's tick at wiring time, while registration lived in `initialize`, which the runtime calls afterwards. The authority could therefore tick a plan in the gap — and did. Measured on the crash-repro boot: `usable_gb = 0` on a 53 GiB board for ~0.6 s, because our own 44 GB were filed under nobody yet. Nothing was actuated (the #438 downshift debounce held the plan, and `serving.lane_reclaim` never fired — the inherited 27B was ADOPTED, same pid across the crash). But a guard covering for a budget that is momentarily lying is not the same as the budget being honest, which is exactly Joel's objection. FIX: `declare_to_memory_authority()` — seed the device VRAM prior + register as a consumer — called at wiring time immediately BEFORE the planner is attached. Both operations are idempotent (set-once prior; `add_consumer` clears stale quarantine for the id), so this is an ordering constraint, not a duplication hazard. The device's total VRAM is a static hardware fact available immediately; there was never a reason to learn it later than the first tick that plans against it. The two call sites carry a do-not-swap note naming the measurement. ACCEPTANCE (Joel's, verbatim): "letting us have and keep our 27b for benchmarks and project development activities." Verified live across a hard SIGKILL of the core with the lane held: 27B kept, ADOPTED not reaped (pid 42506 identical before and after), ready, 4 lanes, 26,880 window — vs. the pre-fix ledger where the same crash produced a 14B at a 2,048 window. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
#438 closed on this branch — governor keeps the 27B across a crashTwo commits added since this PR opened, both live-verified on the M5.
Measured across three boots, same crash repro (SIGKILL the core, lane held, boot)
The lane is adopted, not relaunched: same llama pid before and after the SIGKILL, Not done, deliberatelyA second VRAM credit was drafted in Tests: 43/43 green in |
What was broken
ExperienceRecord::from_lived_turnhad zero production callers tree-wide. The onlylive producer was
from_kanban_grade, so the experience stream — "the SPINE thesalience→curriculum seam was missing", per its own doc — was fed exclusively by
grades. A citizen could hold a thousand real conversations and her stream stayed
empty: the curriculum could only ever learn from work someone had scored.
Measured on this box, before: 180 experience records across 5 citizens, 100%
source: "Eval", ZEROLivedTurn.Two commits, because the first one was wrong
0a34ea083wired the producer at the service_loop call site.08ccd6139corrects it, and retracts my own claim from the first commit.
The first wiring called
record_lived_turnfrom one of the threedrive_to_settlesites inservice_loop— the directed-message path (:1087). Theself-tick path (
:2628) and the held-work path (:1207) settle turns throughthe same driver and recorded nothing. So the owed proof could never arrive: the same
core showed 47
persona.upstart.bind, 97 presence rows and 4delib.context.render— citizens alive and deliberating — with the record count still flat at zero.
Three callers, one of them remembering. That is a missing constraint expressed as three
sites, not a bug at one.
The fix
The write moves into
drive_to_settle, the one place aSettleOutcomeis born.drive_to_settlebecomes a thin wrapper over a privatesettle_to_outcome, so therecord happens once around the driver rather than at its four return paths — a
fifth return path added later inherits learning instead of silently opting out, and no
call site carries learning policy.
Gated on
WorkspaceCycle::acting(), because that is where a citizen's identity lives.A cycle with no
ActingBodyis pure cognition (a faculty test, a replay) — nobody'slived experience, so there is no stream it belongs in. Structural absence, not a
skipped write.
Second fix: a required thing should not be re-expressible
Dropped the
stimulus: &strparameter. It was a second, independent expression of"what she was responding to", free to disagree with what the turn actually perceived —
and it already did: the old call site passed only
msg.textwhile the mind had settledover the whole rendered burst. The stimulus is now read off
SettleOutcome.world_state(set on every return path), so the disagreement is unrepresentable rather than
merely discouraged. The test asserts
task.prompt == settled.world_stateinstead of aliteral.
Guard, positive-controlled
A source-walking test asserts
record_lived_turnhas exactly one production callerand that it is
settle.rs. Verified failing: injected a second call intoservice_loop and it reported
with the remediation in the message. Reverted. Comment-stripped so prose naming the
function cannot read as a call (
registry.rs's module-wiring audit is the houseprecedent). The walk also asserts it found files at all — a vacuously-green guard is
worse than a red one.
Validation
cargo check -p continuum-core --features metal,acceleratecleancognition::experience12/12,cognition::act_observe38/38✅ deploy verified: core is running build 08ccd6139 (== git HEAD)Live proof
Owed, and not claimed here. Falsifiable prediction with the baseline recorded
above: a hosted citizen's
citizens/peers/<her>/experience.jsonlgains aLivedTurnrecord on her next settled turn — from any of the three paths, which is what the
correction buys. A watcher is armed; the result gets posted to this PR either way.
Note the self-tick path matters for provability independent of #434: it settles on her
own metronome, so the proof does not depend on inbound chat delivery.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo