Skip to content

Reference DeepSeek Engram paper — validates genome architecture thesis - #390

Merged
joelteply merged 1 commit into
mainfrom
docs/engram-reference
Mar 25, 2026
Merged

joelteply merged 1 commit into
mainfrom
docs/engram-reference

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

DeepSeek's Engram paper (arXiv:2601.07372) replaces 20-25% of MoE expert layers with n-gram embedding lookup tables. Result: cheaper, faster, and smarter across every benchmark. This validates our genome architecture thesis from inside the model.

Added references to:

  • LORA-GENOME-DEMOCRATIZATION.md — New Section 2.3 with detailed comparison table (Engram inside model vs genome outside model)
  • SYNTHETIC-CITIZENS.md — Related Work section
  • README.md — Research Foundations

The parallel: Engram separates retrieval from reasoning inside the model. Our genome separates retrieval from reasoning outside the model. Same principle, different scale. Both compound when combined.

Test plan

  • Links resolve (arXiv:2601.07372)
  • Comparison table is accurate

Engram replaces MoE expert layers with n-gram embedding lookup tables,
achieving better performance with less compute. This validates our core
principle from inside the model: separating retrieval from reasoning
makes both better. Our genome does the same outside the model — LoRA
adapters for expertise, RAG for facts, sentinels for orchestration.

Added to: LORA-GENOME-DEMOCRATIZATION.md (Section 2.3 with comparison
table), SYNTHETIC-CITIZENS.md (Related Work), README.md (Research
Foundations).
Copilot AI review requested due to automatic review settings March 25, 2026 02:36
@joelteply
joelteply merged commit c2a07b9 into main Mar 25, 2026
@joelteply
joelteply deleted the docs/engram-reference branch March 25, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation references to DeepSeek’s Engram paper and frames it as architectural support for the project’s “genome” retrieval/reasoning decomposition thesis.

Changes:

  • Adds an Engram comparison section (with a 2-column Engram-vs-Genome table) to the LoRA Genome paper.
  • Adds Engram to related work in Synthetic Citizens.
  • Adds Engram to README “Research Foundations”.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
docs/papers/SYNTHETIC-CITIZENS.md Adds Engram to the Related Work list with an explanation of the parallel.
docs/papers/LORA-GENOME-DEMOCRATIZATION.md Adds a new “Engram Validation” section, comparison table, and a formal reference entry.
README.md Adds Engram to the “Research Foundations” list with a short thesis tie-in.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +128 to +133
| Engram (inside the model) | LoRA Genome (outside the model) |
|--------------------------|--------------------------------|
| N-gram lookup tables store facts | RAG memory hierarchy stores context |
| Remaining MoE experts handle reasoning | Base model handles creative decisions |
| Context-aware gating filters irrelevant retrievals | RAG relevance threshold (0.35) filters noise |
| Cheaper, faster, *and* smarter | Smaller local models + infrastructure = *more reliable* |

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Markdown table in this new section uses double leading pipes (|| ...), which will render as an extra empty column / malformed table in most renderers. Use single leading pipes for the header, separator, and rows so the table has exactly the intended 2 columns.

Copilot uses AI. Check for mistakes.

### 2.3 The Engram Validation

DeepSeek's Engram architecture (2025) provides striking internal validation of this decomposition. They replaced 20-25% of MoE expert layers with simple n-gram embedding lookup tables — essentially a "pantry" of pre-computed knowledge that the model retrieves cheaply instead of reconstructing through full transformer computation. The result: the model got *smarter*, not dumber. Loss curves dropped significantly. Every benchmark improved.

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The year is inconsistent with the arXiv identifier: 2601.xxxxx corresponds to Jan 2026, but this line labels Engram as 2025. Update the year here (and keep it consistent with other Engram references added in this PR).

Suggested change
DeepSeek's Engram architecture (2025) provides striking internal validation of this decomposition. They replaced 20-25% of MoE expert layers with simple n-gram embedding lookup tables — essentially a "pantry" of pre-computed knowledge that the model retrieves cheaply instead of reconstructing through full transformer computation. The result: the model got *smarter*, not dumber. Loss curves dropped significantly. Every benchmark improved.
DeepSeek's Engram architecture (2026) provides striking internal validation of this decomposition. They replaced 20-25% of MoE expert layers with simple n-gram embedding lookup tables — essentially a "pantry" of pre-computed knowledge that the model retrieves cheaply instead of reconstructing through full transformer computation. The result: the model got *smarter*, not dumber. Loss curves dropped significantly. Every benchmark improved.

Copilot uses AI. Check for mistakes.
3. **SENTINEL-NEUROPLASTIC-TRAINING.md** - This codebase
4. **Continuum Chat Logs (11/6/2025)** - Vision and mission statements
5. **THOUGHT-FRAME-ARCHITECTURE.md** - RTOS cognitive architecture
3. **Engram: Memory-Augmented Transformers via N-gram Embeddings** - DeepSeek AI, 2025 ([arXiv:2601.07372](https://arxiv.org/abs/2601.07372))

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new reference cites Engram as 2025, but the linked arXiv ID 2601.07372 indicates a 2026-01 submission. Please adjust the year to match the citation (and align with other Engram mentions in the docs/README).

Suggested change
3. **Engram: Memory-Augmented Transformers via N-gram Embeddings** - DeepSeek AI, 2025 ([arXiv:2601.07372](https://arxiv.org/abs/2601.07372))
3. **Engram: Memory-Augmented Transformers via N-gram Embeddings** - DeepSeek AI, 2026 ([arXiv:2601.07372](https://arxiv.org/abs/2601.07372))

Copilot uses AI. Check for mistakes.
- **Unreal MetaHumans**: Photorealistic avatars. No cognition, no learning, no autonomy.
- **OpenDevin/SWE-Agent**: Coding agents. No identity persistence, no multimodal, no collaboration.
- **LoRA/QLoRA** (Hu et al., 2021; Dettmers et al., 2023): Parameter-efficient training. We use this as one component of a larger cognitive architecture.
- **Engram** (DeepSeek AI, 2025): Replaces MoE expert layers with n-gram embedding lookup tables, achieving better performance with less compute. Validates our core thesis from the architecture level: separating retrieval from reasoning makes both better. Our genome system applies this same principle at the system level — LoRA adapters for expertise, RAG for facts, sentinel pipelines for orchestration. Engram does it inside the model; we do it outside. Both approaches compound when combined.

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new Engram entry labels the paper as 2025, but arXiv 2601.07372 corresponds to Jan 2026. Please update the year (and keep it consistent with the other Engram references added in this PR).

Suggested change
- **Engram** (DeepSeek AI, 2025): Replaces MoE expert layers with n-gram embedding lookup tables, achieving better performance with less compute. Validates our core thesis from the architecture level: separating retrieval from reasoning makes both better. Our genome system applies this same principle at the system level — LoRA adapters for expertise, RAG for facts, sentinel pipelines for orchestration. Engram does it inside the model; we do it outside. Both approaches compound when combined.
- **Engram** (DeepSeek AI, 2026): Replaces MoE expert layers with n-gram embedding lookup tables, achieving better performance with less compute. Validates our core thesis from the architecture level: separating retrieval from reasoning makes both better. Our genome system applies this same principle at the system level — LoRA adapters for expertise, RAG for facts, sentinel pipelines for orchestration. Engram does it inside the model; we do it outside. Both approaches compound when combined.

Copilot uses AI. Check for mistakes.
Comment thread README.md
- **Arrow** ([2024](https://arxiv.org/abs/2405.11157)) — Per-token, per-layer LoRA routing
- **RealClassEval** ([2025](https://arxiv.org/abs/2510.26130)) — Real-world Python class benchmark
- **Multi-agent memory sharing** ([2025](https://arxiv.org/html/2507.07957v1), [2025](https://arxiv.org/html/2505.18279v1))
- **Engram** ([DeepSeek 2025](https://arxiv.org/abs/2601.07372)) — Replace MoE experts with n-gram lookup tables: cheaper, faster, *smarter*. Validates our genome thesis: separating retrieval from reasoning makes both better

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The citation label says "DeepSeek 2025" but the linked arXiv ID 2601.07372 corresponds to a 2026-01 submission. Update the year/label so it matches the linked paper and stays consistent with the other Engram references in this PR.

Suggested change
- **Engram** ([DeepSeek 2025](https://arxiv.org/abs/2601.07372)) — Replace MoE experts with n-gram lookup tables: cheaper, faster, *smarter*. Validates our genome thesis: separating retrieval from reasoning makes both better
- **Engram** ([2026](https://arxiv.org/abs/2601.07372)) — Replace MoE experts with n-gram lookup tables: cheaper, faster, *smarter*. Validates our genome thesis: separating retrieval from reasoning makes both better

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Aug 11, 2026
…erable turns — the #390 write-avoidance state gate

Glass-boxed live (claim-2ff4accd, Atlas on sympy-24152): 15 varied read acts on
the RIGHT file, patch_bytes 0. The [no-deliverable] perception fact fired on
every single act and changed nothing — facts are honesty, only STATE moves
behavior. Each read had a fresh signature, so the #206 identical-act backstop
never trips; the whole act budget gets read away and the empty-diff re-drive
in agent/solve receives an attempt with no budget left to hand back.

The state gate: on framing.workspace_deliverable turns, discovery gets
(max_acts / 2).max(1) acts before the first workspace mutation. Past that,
may_act goes false — the same defer lever as the stuck backstop — and the
drive ends with REAL remaining budget. The first mutation latches the gate
open for the rest of the turn: iteration on a patch is never bounded, only
mutation-free discovery is. One probe (persona.settle.discovery_saturated)
marks the withhold.

Delivery seam: agent/solve's EMPTY-DIFF RE-DRIVE required spoken.is_some(),
which structurally excluded exactly the gated endings (spoken=None with budget
remaining) — the population that most needs the redirect. Widened to any
non-infra empty-diff end with budget left; true exhaustion is still excluded
by acts+1 < max_acts, infra by inference_error. The identical-diff sibling
keeps its spoken gate: it requires a non-empty patch, which a zero-mutation
saturation ending can never produce.

Regression test drives a VaryingAct faculty (fresh path per tick — the
backstop-proof shape) 20 acts against workspace framing and pins acts == 10
with spoken=None; the ambient control pins the full 20 (the gate scopes to
workspace-deliverable turns only). 37 act_observe + 11 agent::solve tests green.

Closes the substrate half of #390; the live A/B is the next dispatched run.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 12, 2026
…ause of #390 write-avoidance

Measured on pytest-5221 (Asha, 24 acts, patch 0): the task text was present
in the act-0 prompt and ABSENT from every captured prompt from act ~6 on —
agent/solve delivered it once as the opening burst, and drive_to_settle's
receipt accumulation evicted it. Her late-run turn asked, verbatim, 'Could
you please provide additional details or describe the symptoms of the
issue?' — a mind whose exam question was taken away. With no live anchor for
WHAT to change, reading is the only rational act and the run settles
patchless. That anchor loss is the dominant capability-zero shape, not tool
reluctance.

Fix (same shape as #347's pinned board): new MissionSource RagSource renders
the brief + workspace + deliverable contract as a [mission] block with a
StandingFraming salience floor, joined to the fork via a new extra_grounding
param on fork_eval_cycle_with_adapter (evals pass empty). All-or-nothing
delivery — a truncated mission is a wrong mission. The opening burst stays:
it is the trigger; the framing is the persistence.

Secondary finding parked as its own card: the fork's inherited working-memory
tail carried her ROOM life (a workspace-root file_tree naming astropy/ and
past exam dirs) into the solve — she said 'you're working with the Astropy
repository' mid-pytest. Exam-scoped working memory is the follow-up.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 14, 2026
…+ bounded SDK boot + shell convergence doc (#2294)

* feat(benchmark): a run gets its OWN room — dispatch spawns it and moves the citizens in (#329)

`benchmark/dispatch` had no way to say WHERE. So every suite, every run, forever,
piled into whichever room the curator happened to be standing in. Measured on one
37-minute window of that pile: 136 cards with 66 already CLOSED and still resident;
5,336 of 5,345 inbound events discarded as bookkeeping, NINE surviving as something
a mind could read (~14/hour); ~48 wake-ups per minute per citizen. Claim heartbeats
scale as O(claims x citizens), so the more work a citizen held, the less capacity it
had to do any of it — and the board only grew.

Joel named it: "are you just sticking them in the same identical room every time and
it's accumulating" — yes. And then: "use this thing normally like it's made."

It IS already made. `activity/spawn` births a room from a recipe, and `benchmark` is
one of its recipes. Dispatch simply never called it. So:

- `room: Option<String>` on dispatch. Omit for a FRESH room per run,
  `bench-<benchmark>-<epoch>`; pass a name to join an existing run.
- Spawned through `activity/spawn`'s own path, extracted as
  `activity::spawn_activity_room(airc, name, recipe, parent)` so there is ONE room-birth
  path with two callers rather than a second creator that drifts. A hand-made room
  carries no recipe binding and projects as a plain chat; this one projects as a benchmark.
- Every assignee is JOINED to the run — the members[] half of #274. A citizen who is not
  subscribed never sees the board, the kickoff, or the peers working beside her. Joel:
  "they're sitting in these old rooms flooded or ones with nothing."
- The board read, every create_work_card and every kickoff `say` are current-room
  operations, and `join` moves that pointer — so they all land in the run room with NO new
  airc API. The pointer move is a documented gap for other callers and the mechanism here.
- Idempotence + prune now reason about THIS run's board, so a run finally has its own
  honest denominator instead of a shared pile 136 deep.
- `repo` stays optional: when unnamed, the hint is read from the room the caller is
  standing in BEFORE the move. That is the only thing the old room still contributes.
- Result carries `room` + `room_id`; failed joins ride the same reported channel as failed
  kickoffs — a citizen who never made it in is as invisible as a kickoff that never landed,
  and neither may be silent.

NOT the flattening I wanted: the design of record is `academy/bench/<run>`, but airc's
ChannelName accepts only [a-z0-9_-] so `/` is rejected. Flattened to `-` and the test
asserts through airc's own constructor, so the two can never drift.

What I nearly shipped instead, and why it was wrong: a header-keyed door-skip for
heartbeat traffic. Real, still worth landing, but a MUFFLER — it makes the accumulation
quieter, not smaller. Order matters: (a) a run gets its own room [this], (b) a room has an
END, (c) THEN the door-skip so what remains is quiet.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(ids): a room id is a RoomId, not a String (#396)

Joel, on the previous commit: "Use handles uuids etc."

I had just introduced `room_id: String` on BenchmarkDispatchResult — a brand-new
loose-String id param, which is exactly the class #396 exists to kill, and I added it
while writing a room feature. `ActivitySpawnResult.room_id` was already a String and
was where mine came from, so both are typed now.

`airc_core::RoomId` is a `uuid_newtype!` with `#[serde(transparent)]`, so the WIRE is
unchanged — the bare hyphenated uuid either way. What changes is that Rust can no
longer confuse a room id with a peer id, a card id, or free text
([[uuids-are-not-strings-and-never-hand-drawn]]).

`#[ts(type = "string")]` follows the convention the tree already documents at
identity/mod.rs:83 — airc's id newtypes carry no `TS` derive by design — so the
generated TypeScript is byte-identical and no client changes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(ids): the activity graph's POINTERS are RoomIds, not strings (#396)

Joel: "Usually you try to force a string for no reason instead of a lookup or one
returned via handle. It's a desire to turn everything into shitty scripting languages."

He is describing a real habit and this file is the evidence. `RoomRecipeBinding.parent`
carried this doc, verbatim, directly above a `String`:

    /// Optional parent activity — activities spawn activities, and the graph is
    /// POINTERS, never nested blobs.
    pub parent: Option<String>,

A pointer typed as text is not a pointer. Nothing rejected `"the benchmark one"`. Both
ends are now `Option<RoomId>` — the binding and `ActivitySpawnParams`.

The proof it was always an id: the round-trip test's own fixture value was
`"f1a1b2c3-0000-4000-8000-000000000000"`. The value never changed. The type caught up
to it — which is the whole point of the correction: Rust wasn't in the way, it was
waiting.

Also `binding_post_id: String` → `uuid::Uuid`. Not a newtype, because airc's
`publish_wall_post` returns a bare `Uuid` and there is no `WallPostId` upstream to
borrow — carrying the value instead of stringifying it keeps it in the type system on
this side, and the missing newtype is named in the doc as an airc gap rather than
laundered into text.

Wire is unchanged throughout: `RoomId` is `#[serde(transparent)]`, `#[ts(type =
"string")]` per identity/mod.rs:83, and `#[schemars(with = "Option<String>")]` describes
the WIRE to the tool schema while Rust keeps the type — so a caller sends text, the
command receives a parsed id, and an unparseable one is rejected at the boundary
instead of flowing inward as a plausible-looking String.

1205 tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(benchmark): derive the repo key from the checkout's origin, not from a pile of cards (#329)

Regression I introduced one commit ago, found by running the thing twice.

Per-run rooms removed the repo inference's source BY CONSTRUCTION: dispatch inferred
`repo` from cards already on the board, which worked only while every run shared one
permanent pile. Now the FIRST dispatch leaves the curator standing in a fresh empty
bench room, so the SECOND one had nothing to infer from and died asking for `--repo`.
Measured live: `benchmark/dispatch --name=hard-rs` succeeded, the identical command
immediately after refused.

The fix is not a better fallback chain. The repo key is a FACT ABOUT THIS CHECKOUT —
`git remote get-url origin` — so it is derived from the real thing rather than retyped
by a caller. That also generalizes to any repo user on a fresh clone, the same reason
`resolve_dispatch_roster` refuses to bake in our citizen names.

Resolution order, most-explicit-first: caller's `repo` → the room they came from (the
legacy path, unchanged, so a re-dispatch never splits a live board) → `origin`. The new
step only fills the case that previously ERRORED; no existing behaviour moves.

`repo_slug_from_remote_url` is a pure parser so the part that actually breaks is
tested: scp-style `git@host:owner/name` has no scheme and uses `:` where the others use
`/`, which naive `split('/')` gets wrong. Host-agnostic (a GitLab remote is as valid a
key as GitHub) and takes the LAST two segments so subgroups still yield `group/name`.
Junk returns None so the caller is ASKED, never handed a fabricated key.

Honest about the one dependency: it reads process cwd, because git walks UP to find
`.git` so any directory inside the checkout answers. The core is launched from the repo
by start-server.sh and cognition/eval + gym resolve roots the same way. That is a real
cwd dependency of the #195 class, named in the comment rather than papered over — and
if the core is ever launched elsewhere it returns None and asks for `repo`, which is a
loud fallback, not a wrong board key.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* chore(protocol): regenerate ts-rs bindings for the per-run bench room (#329 a)

The Rust side landed in ca6a815 / ff27025 / 0d49407; the generated
TypeScript never got re-exported alongside it, so the checked-in bindings
were missing `room` / `room_id` on dispatch and still typed
`RoomRecipeBinding.parent` as a bare string. The ts-rs-binding-drift-guard
workflow exists to catch precisely this, and would have gone red on the
next run.

No behaviour change — `cargo test` regenerates these; this commit is the
regeneration.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): the own-speech ring is per-ROOM — a fresh room is a fresh start

Glass-boxed live today, from her own capture. A citizen was dispatched into
a brand-new benchmark room by `benchmark/dispatch` (#329 a). On her FIRST
turn there — having said nothing whatsoever in that room — her prompt
carried:

  [repetition] 4 of your recent messages were nearly identical — you're
  circling, and restating what you've already said adds nothing. If you have
  nothing genuinely new to contribute right now, silence (PASS) is the
  honest response.

Those four utterances were spoken in #academy. `own_speech_rings` was keyed
by `PeerId` alone, so a MULTI-room citizen carried one room's withdrawal
pressure into every other room she entered.

The asymmetry made it obvious once found: `room_speech_rings`, the
room-side sibling ten lines below, has always keyed by room uuid. And the
say path was already room-correct — `say_in(turn_room, …)`, whose own
comment reads "never her ambient default, or she answers one room's
question to a different audience". Only the ring was blind.

Fix: key by `(PeerId, room)`. Every write site already knew which room it
spoke into (turn_room at the directed-say seam, default_room at the
self-tick seam, the message's own room at the hydration seam); every read
site already had the room in hand — llm_deliberation_faculty passed
`ws.room_id` to `recent_room_speech` on the very next line.

Persistence follows: `PersistedVolatile.own_speech` becomes room-keyed, with
an untagged `Legacy(Vec<String>)` arm so a pre-existing `volatile.json` still
PARSES. A torn mind-file is a silent blank wake, which is strictly worse than
a dropped scratchpad — and the legacy lines carry no room, so they are
dropped (with a probe) rather than mis-filed into a room she may never have
spoken in. `hydrate_speech_rings` re-seeds from the durable transcript, where
every message HAS a room (#265).

This does NOT weaken the brick: within a room it fires exactly as before
(own_speech_loop_renders_a_repetition_fact still green), and her history in
the room she actually spoke in is untouched — so it cannot be mistaken for
"clear the ring on room change".

NOT CLAIMED AS PROVEN: on that same run the citizen went
work/list(claimable) -> work/claim(3d1d9dbb) -> yield_turn{} and fell silent
for 10 minutes, with this brick in her context throughout recommending
exactly that silence. Mechanically coherent, and a plausible contributor to
the #390 / #264 withdrawal family — but one specimen is not a cause. The fix
stands on its own merits (the fact was simply FALSE about that room); it is
now also the test.

Regression test in the existing tests mod, asserting both directions: the
room she spoke in keeps her history, the room she has not spoken in reads
silent, and persistence carries the room key.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): the steps ledger stops promising a recall path that does not exist

The all-aged branch told her "the details have aged out of working memory;
recall can retrieve them." That is FALSE by construction, and the chain is
all in-tree: every act becomes an `EngramOrigin::Tool` engram
(act_observe/apply.rs); `recall_candidates` carries an EXECUTING ASSERTION
that a Tool-origin receipt is NEVER in the semantic recall pool
(admission_state.rs); and recall_faculty.rs is the only production caller
of that gate, so the persona's own recall runs through it.

So the one fact whose entire job is ground truth was sending her after a
door that isn't there — a lying receipt of the #151/#357 class, in the
worst possible place. It says what happened plainly now: you did that work,
the details are gone and cannot be retrieved, re-check the workspace or the
board rather than trusting memory of them. An honest gap she can plan
around beats a promise that wastes a turn.

Scope, deliberately narrow: only the ALL-AGED branch is touched. The
some-visible branch already made no promise and was the honest one — a
previous note of mine had the fix direction backwards and would have
propagated the lie into it (#414).

Test extended with the negative assertion, so the promise cannot come back
by edit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(identity): un-red the loose-id guard + give it eyes for parameters

RED TEST FIXED. `no_declaration_outlives_its_defect` has been failing since
0d49407 earlier today — that commit typed `modules/activity.rs: room_id` as a
RoomId and left its LOOSE_IDS exemption behind, so the guard's own anti-rot check
was correctly reporting a declaration that outlived its defect. `cargo test
-p continuum-core --lib` was red. Stale entry deleted.

PARAMETERS WERE INVISIBLE. `loose_id_fields` matches `line.strip_prefix("<name>:")`
with the whole remainder equal to `String,` — a predicate that cannot match a
function signature by construction. So every `peer_id: &str` in the crate was
outside a guard that reported clean. `loose_id_params` closes that: borrowed forms
(`&str`/`&String`) are always parameters (a field would need a lifetime); owned
forms count only mid-line, because a whole-line `room_id: String,` is what the
field audit already claims. Non-overlapping on purpose — double-reporting one site
makes it unfixable, since clearing it for one audit leaves the other red.

POSITIVE CONTROL, and it is the point of this commit as much as the detector.
While building this, a throwaway scan of the same shape returned 0 twice while the
real count was 33. A guard whose predicate matches nothing does not go quiet — it
reports the codebase CLEAN, which is worse than no guard, because it converts an
open defect into a green claim that the work is done. So the predicate now has to
prove it fires: on a plain param, mid-signature, and NOT on `signer_peer_id` (a
`_`-joined suffix — `char::is_alphanumeric` misses this, `_` is not alphanumeric),
NOT on whole-line owned decls, NOT in comments, NOT inside string literals.

That last one is not hypothetical: the first compiled run reported 36 pairs, three
of which were this audit matching its OWN fixtures in identity/mod.rs. Hence
`blank_string_literals` — a detector that cannot tell code from a string about
code. `loose_id_fields` needs no equivalent; it demands the whole trimmed line be
`name: String,`, which a quoted literal never is.

Measured: 33 (file, param) pairs. No LOOSE_ID_PARAMS table yet, so nothing is
enforced on params — the #[ignore]d dump test is the tool for writing it, and gets
deleted in the commit that lands the table.

NOTE for whoever writes that table: do NOT categorize the ~11 `live/*` entries as
`external`. I nearly did, on the basis that the folder is called live/. Joel: "it
uses the same room ids from airc" — and modules/live.rs says so itself at :51
("the server is now AUTHORITATIVE that a call IS its airc room"), :214 ("the airc
room_id is THE canonical call/session key"), :239 (`let call_id = room_id;`). The
value is an airc RoomId stringified by `p.str("room_id")?` and never parsed back.
They are `defect`, blocked on #193's client cutover — not another system's wire.

Guard suite: 4 passed, 0 failed, 1 ignored. cargo fmt clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(perception): personas are READERS — advance their per-room cursor, and land a fresh reader one page back

Two halves of one bug, and both are why a room storms.

`ChannelBookmarks` is a per-(persona, room) last-read cursor — a correct Slack-style
unread marker with a monotonic `advance`, written months ago. Its ONLY production
callers were both in `modules/nav.rs`, and both key on `ctx.user_id`: the authenticated
HUMAN, driven by `nav/mark-read` and by navigating away from a room.

A persona never navigates. So her `last_read` stayed at 0 forever — and `last_read`'s
own doc spells out what 0 means: "never read (everything is unread)". Every turn
re-delivered the ENTIRE paged history as UNREAD, each item at attention score 1.0
(airc_source.rs), with an EMPTY grounding split because `unread_start` lands at 0 when
`first_unread` does. The digest's whole read/unread structure was built, and then never
used for a persona.

That is the fuel supply for the mutual-excitation storm on #264 (25 turns in 85s, two
citizens each waking on the other): with nothing ever marked read, no message is ever
consumed, so nothing is ever old and there is never a moment where the room is quiet.

HALF 1 — the returning reader (persona/airc_source.rs). `deliver` now advances the
cursor after packing. `pack_digest` returns the READ-THROUGH lamport — the newest
element that actually entered her prompt — so she is marked read for what she was
GIVEN, never for what the budget fetched and dropped. Mark-read on DELIVERY, not on
reply, because delivery is when she saw it; `tip_lamport`'s own doc already said
"ignore/skip/respond all mark-read". `advance` is monotonic, so a repeat delivery or a
late lower lamport can never rewind her.

HALF 2 — the FRESH reader (cognition/channel_digest.rs). Advancing alone does not help
someone who has never read the room: bookmark 0 still means "all of it is unread". A
first sight now lands one page back from the tip (`FIRST_READ_PAGE`), which is how every
chat client has worked for thirty years — you join, you see the last page, you scroll
for more. The seed is persisted via `advance` ("you joined here" is a real fact about
this reader), and it applies to EVERY reader: a fresh human opening a busy room and a
fresh persona waking into one are the same case.

Not a filter and not a damper — no behaviour is gated, nothing is refused. The room is
simply read the way a reader reads it.

TESTS (existing mods extended, no new mod):
- a_fresh_reader_lands_one_page_back_not_on_the_whole_history — 3 pages retained, ONE
  page unread, seed persisted, and after the delivery-side advance the room goes quiet.
  Both halves are needed and the test exercises the composition.
- 15 channel_digest, 12 airc_source, 12 nav: all green, incl.
  caught_up_persona_sees_budget_worth_of_history_not_five_messages and the #367
  deliver_pages_the_turn_room_not_the_pointer.

Refs #264, #43, #367

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(cursor): DELETE ChannelBookmarks — the read cursor is airc's durable runtime_cursor, not a second store

Joel: "Airc has state for cursors in addition to other things built in duh" — and
"Delete your idiocy and use the right one or encapsulate it but only as a last resort
not laziness". Both correct. 140ad3b fixed the cursor never ADVANCING; this deletes
the parallel store it was advancing.

WHAT WAS WRONG: `cognition::channel_digest::ChannelBookmarks` was a
`DashMap<(persona, room), lamport>` — a SECOND cursor store beside the durable one airc
already owns. Being process memory it also died on every restart, so no reader ever
resumed. airc's own API doc states the intent verbatim: "for hooks/feeds/monitors that
need replay state; it is intentionally STORE-BACKED so runtime delivery state does not
sprawl into JSON sidecars." We sprawled it into a DashMap instead.

THE RIGHT ONE, used directly — not wrapped:
  Airc::load_runtime_cursor / save_runtime_cursor_for_event  (runtime_cursor: an ORM row
  keyed by consumer id, upserted). `_for_event` is airc's PREFERRED path because it
  carries the source event's room + kind and emits `SubscriptionAdvanced`, so a cursor
  move is visible to every other surface instead of private to one process.

WHERE IT LANDED: on `AircTranscriptReader` — the port continuum ALREADY has over airc's
transcript, whose real implementor IS `airc_lib::Airc`. Two methods (`read_cursor`,
`advance_read_cursor`), defaulted so the ~8 stub readers keep compiling. That is not
encapsulation-as-dodge: the cursor now lives where transcript access already lived, and
the only implementation delegates straight to airc.

CONSEQUENCES, each deliberate:
- `ChannelDigestBuilder` holds NO cursor state. `build` reads it from the reader;
  `build_from_events` takes `bookmark` as an explicit parameter. The split point is now
  visible at every call site instead of arriving from a process-wide map.
- `global_channel_bookmarks()` deleted from channel_substrate.
- The FIRST_READ_PAGE seed no longer self-persists — it is a WINDOWING decision only.
  The cursor moves exactly once, when `deliver` marks read what the reader was actually
  SHOWN. A hidden write inside a builder could mark a page read that the budget dropped.
- `pack_digest` returns the read-through ELEMENT, not a bare lamport, because airc wants
  the event.
- positron's nav projection reads the STAGED DIGEST's own `bookmark` — one value, two
  consumers (her window and the nav view), so they cannot disagree. It needed no cursor
  store at all.
- nav mark-read / room-switch write through the CALLER'S OWN airc scope.

⚠ #27 (self-peer) IS NOW VISIBLE, and left visible on purpose: a cursor can only be
written into a scope we can address, and today only CITIZENS have a registered airc
runtime. For the human operator there is nowhere correct to put it — writing into some
citizen's store would file the human's position under another being's identity. So nav
logs and reports 0 rather than fabricating a cursor, and the nav tests now PIN that
honesty. When #27 lands the same call returns the real lamport with no further change.

TESTS: 47 green across channel_digest, channel_digest_region, airc_source, nav,
positron_nav. Stub readers carry a cursor cell (`read_through`) so tests exercise the
real port; `advance_is_monotonic` now pins monotonicity THROUGH the port. Two region
tests were failing on my own dropped setup, not a production regression — fixed by
threading the reader's cursor, which is what the production path does.

Refs #43, #264, #27

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(serving): plan holds its ModelFootprint by value — kill the name-lookup that silently starved every lane (#368)

ServingPlan carried base_model_id: String and re-looked its own model up by
name; a miss made is_some_and silently false, suppressing every legitimate
switch-up. Live: Asha/Anwen homed to a phantom, 0 tokens, forever — and the
plan computed usable_gb=2 on a 64GB box, warming nobody (measured 2026-08-14,
zero persona.turn.start in the probe stream while WS answered in 1-3ms).

The plan now holds base_model: ModelFootprint (struct by value, per the
uuid/struct identity law); the upgrade check is a field read, not a search.
ts-rs exports ModelFootprint + camelCase ServingPlan to protocol/typescript.

1193 lib tests green (metal,accelerate). Deployed via verified reboot;
acceptance is the first persona.turn.start on the new build.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(sdk): bound the two unbounded boot awaits — a silent cache or silent socket now costs one retry, never a blank app

hydrateFromStorage awaited storage.load() guarded only by try/catch — which
covers a rejection, not a promise that never settles. A hung IndexedDB read
held connect() open forever: blank page, frozen banner (live 2026-08-14,
bisect-proven: storage removed → 274KB render; present → blank 6/7).
ensureConnected had the same hole one seam over: a WS ingress that accepts
TCP but never completes the upgrade fired neither open nor error (measured:
'last feed status: connecting', 1-in-5 boots).

HYDRATE_BUDGET_MS=1.5s and OPEN_BUDGET_MS=5s make StateStorage.ts's own
contract ('storage is an ACCELERANT, not a dependency') true rather than
aspirational; a timed-out handshake feeds the existing reconnect ladder.
New spec case is positive-controlled: red without the bound, green with it.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(web): arm the boot watchdog BEFORE awaiting connect, and make it name where a stuck boot is stuck

The 4s no-snapshot diagnostic was registered after 'await state.connect()' —
the one failure it existed to catch (a hung connect) made it unreachable, so
the banner froze on the pre-connect string with no diagnosis possible. Armed
first, it now reports last feed status (none=hydrate stuck, connecting=socket
stuck) — the instrument that located both SDK bounds.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): ACTIVITY-SHELL-CONVERGENCE — the measured defect map + R0-R5 repair plan for the positron shell

Eight measured defects with file:line receipts (single kind-keyed projection
cache wiped on focus, dead roster kind, whole-page error boundary, throwing
content registry, unkeyed lists, hardcoded right panel) and the repair lanes:
(room_id, kind) RoomViews, global kinds feed global widgets, three render
roots, right=ContextPanel per room, bench rooms under the academy section.
Owner rulings recorded: left rail invariant, right column tracks
content=tab=room=activity, all three SYS faces are graphs.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Aug 17, 2026
…nch acts land in their room (#371 step 1) (#2335)

* fix(benchmark): a dispatched run's acts happen IN ITS ROOM — agent/solve was hardcoded roomless (#329/#243)

`agent/solve` opened with `let room = Uuid::nil();` — a literal, no param behind it. Every
benchmark act therefore executed with no room, and `apply_act`'s receipt radiation skips a nil
room BY DESIGN (radiating nil-room acts once stole academy's single-room chat projection onto a
phantom, live-proven 2026-08-12). Its own comment names the fix as pending: "Skip until solves
thread their bench room (#329's per-run rooms make every solve act a room act)". #329(a) shipped
the per-run room weeks ago; nothing ever threaded it.

Consequence, and it is the failure BENCHMARKS-ARE-ADAPTERS-NOT-A-RUNNER.md exists to name: a
citizen can burn a full act budget, write a patch and take a verdict while the room she was
dispatched into shows NOTHING. Not a rendering gap — the events are never published. The
acceptance test in that doc ("can a citizen standing in the room perceive the run's state through
the same ViewState pipe the human's screen uses?") answered NO, and answering it needed a file
read, which is the doc's own definition of disconnected.

  * `AgentSolveParams.room: Option<Uuid>` — the activity the run belongs to.
  * `benchmark/dispatch` passes the room it just spawned. Its acts now radiate `persona:act`
    into it, so the work renders as collapsed receipts in the run room's transcript (#243)
    and reaches citizen perception through the same projection the screen reads.
  * `work/claim`'s path passes `None` and SAYS SO in a comment: the claim verb carries no
    activity, so a claim-fired solve is still invisible. That is exactly #425's subject; the
    two paths now differ precisely at the gap #425 exists to close, instead of both being
    silently roomless.
  * `WorkspaceCycle::actions_taken()` — the seam a long-running drive needs to report liveness
    WHILE it runs. `drive_to_settle` returns its act count only at settlement and a SWE attempt
    legitimately runs hours, so `benchmark/runs` reads `acts` from a ledger written once per
    attempt. Measured 2026-08-16: two dispatched solves read `acts=0, stalled=false` for ten
    straight minutes while both citizens were demonstrably mid-turn (captures written 12s
    earlier). The projection whose stated purpose is "silence must never be ambiguous with
    progress" cannot currently tell them apart — its 20-min stall window assumes artifact
    activity tracks act cadence, and no per-act artifact write exists. Accessor lands here;
    the heartbeat that consumes it is the next slice.

Deployed and SHA-verified before commit. NOT yet live-proven end to end: no dispatched run has
reached act #1 since — the two sympy runs both settled in ~150ms with zero acts and were
correctly classified INFRA VOID by #384, which is a separate round-killer this change does not
touch.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): an EMPTY completion is not a chosen silence — the Err arm's missing twin (#181/#390)

The `Err` arm at llm_deliberation_faculty.rs:1844 refuses to let a FAILED model collapse into a
serene `Pass`, and its own comment cites [[fallbacks-are-illegal-fail-loud]]. But a lane can also
answer `Ok` with NOTHING, and that walked straight past the guard and settled as an ordinary
non-Act. Same failure the Err arm exists to prevent, one branch over.

MEASURED, not inferred. Direct probe against the live lane (70-token prompt, so no context
pressure of any kind):

    finish_reason = 'length'   completion_tokens = 16   content = ''

Sixteen tokens generated, empty content. Qwen3.8 under `--jinja` opens `<think>`; an unclosed
block leaves `extract_reasoning` branch (3) — which is CORRECT — with empty text and the whole
tail as reasoning. Separately, Solenne's capture on the turn her benchmark run died:

    finish_reason = 'stop'   usage = {in:0, out:0}   responseTimeMs = 28   text = ''

SCOPE, measured across every capture on disk: 47 of 862 responses (5.5%) are empty-text, spread
over ~19 citizens. NOT benchmark-specific. And the all-empty column is exactly the citizens whose
"I've noticed my recent messages have been repetitive… I'll remain silent" turns have been the
standing round-killer — fe4dac17 6/6, Asha (90e758b2) 4/4, e5f4141d 3/3, a20b3ada 2/2. On the
turns I can see, nothing came back, and the substrate wrote it down as her choice. (Per-persona
samples are small; the ratios are not stable rates. The shape is what matters.)

COST: agent/solve reads it as "she chose not to act" → acts=0, empty patch → the run voids as an
INFRA VOID after three attempts (the two sympy runs, 2026-08-16). A live citizen's turn reads as
silence, indistinguishable from withdrawal.

FIX: fault, exactly like the Err arm — the settle step surfaces it LOUD instead of fabricating a
no-op, and `delib.empty_completion` puts it on the probe stream. Scoped so a native tool turn,
which legitimately carries empty content, is untouched: fires only on empty text AND not ToolUse
AND no tool_calls, i.e. only when the turn yields nothing to act or speak with. The receipt names
WHICH shape it was — thought-but-committed-nothing (reasoning chars) vs the lane returned void.

WHAT THIS DOES NOT DO: it does not stop the empty completions. It stops them being laundered as
cognition. The generation-side fix (reasoning budget / think-block closure) is #181 and is next.

Deployed + SHA-verified before commit. LIVE PROOF NOT YET IN HAND: zero faults across 2,589 probe
rows in the first window after deploy — consistent with no citizen having hit an empty completion
yet post-reboot, NOT with the guard being confirmed. A watcher is running; the owed evidence is
one `delib.empty_completion` row from a real turn.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): the round lifecycle as a recipe-owned state machine (#371 design)

Joel 2026-08-16, after a full session of a driver getting lost: "It's way too hard to rig up.
Clearly." This writes the design down so the next agent inherits a paved road instead of tire
tracks.

THE DEFECT, stated exactly: a benchmark round is not a thing in the system, it is a RITUAL an
agent performs. The agent picks when to dispatch, picks the watch window, hand-queries probes to
learn what is happening, and when the session ends the process ends with it.

Every failure this session is downstream of that ONE fact, and they all have the same shape — the
question has no owner, so the driver guesses from an absence:

  is serving ready?     nothing owns readiness      → dispatched and hoped
  has it started?       nothing announces started   → read acts=0, called it stalled
  is this run alive?    liveness = a file mtime     → flagged a healthy run quiet
  is the round done?    nothing announces done      → never knew
  did my fix work?      no green/vacuous distinction → reported a vacuous green

Five instances of [[an-absence-is-an-unfinished-measurement]] in one session, by a driver that had
that lesson in its own guardrails. Not a knowledge gap — a missing owner.

THE SHAPE: staging → ready → working → grading → done, every transition an event from the
component that KNOWS (env builder, supervisor, card store, round entity) — never a timeout, never
a poll, never an agent's judgement. Every stage a ViewState on the one pipe humans and citizens
already read. Recipe is data, so the process is identical every round on every machine.

THREE LAWS: transitions announced by the knower; liveness is a pulse never a terminal artifact
(today's projection cannot distinguish silence from progress, which is its stated purpose);
an absence is never a state.

SUBSUMES #329(b) no-END, #442 readiness gate, #374 pulse, #425 in-room work, and the unbuilt RULES
half of [[recipe-is-content-type-plus-rules]].

Carries the acceptance test from BENCHMARKS-ARE-ADAPTERS-NOT-A-RUNNER.md plus one earned tonight:
can a fresh driver answer ready/started/stuck/done using ONLY queries — zero log reads, zero probe
archaeology, zero inference from an absence?

Build order is smallest-true-cause first; step 1 (pulse the run) consumes the
WorkspaceCycle::actions_taken seam c9ba5f9 already landed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(benchmark): the run PULSES while it runs — liveness stops being a terminal artifact (#371 law 2, #374)

First build step of ROUND-LIFECYCLE-AS-RECIPE-OWNED-STATE-MACHINE.md.

THE DEFECT: the run ledger was written ONCE per attempt, at settlement. For the entire attempt —
legitimately HOURS on a full SWE budget — `benchmark/runs` read `acts: 0` and a `last_activity`
frozen at run start. RUN_STALL_WINDOW_SECS is 20 minutes. So a HEALTHY first attempt is guaranteed
to read `quiet`/stalled, every single time, and the projection whose own doc comment says its
purpose is "silence must never be ambiguous with progress" was STRUCTURALLY unable to tell them
apart. Its stall window assumes artifact activity tracks act cadence (~4-6 min); no per-act
artifact write has ever existed.

MEASURED 2026-08-16: two dispatched solves read `acts=0, stalled=false` for ten straight minutes
while the driver watching them could not distinguish working from wedged — which is precisely how
a vacuous "no faults observed" gets reported as a green.

THE FIX: `select!` over the drive future and a 60s interval. No spawn, so the cycle stays BORROWED
— no 'static bound, no Arc juggling, no parallel allocator, and the pulse cannot outlive the work
it reports on. Each tick reads `WorkspaceCycle::actions_taken()` (the seam c9ba5f9 landed) — a
wait-free atomic load on the persona's own monotonic counter — and rewrites the running marker,
which moves BOTH `acts` and the mtime `last_activity_ms` folds from.

Cadence is well under the stall window (a live run can never age into `quiet`) and far above act
cadence (one small JSON write per tick, nothing else). Every field derives exactly as the detached
wrapper's `state: running` marker derives them, so a pulse can never contradict the marker it
refreshes. `None` run_id → no ledger → no pulse, correct: nothing polls a run that returns inline.

WHY THE COUNTER AND NOT A SEPARATE TALLY: it is the same monotonic counter perception renders to
her, so the board and her own proprioception cannot disagree — and it is the counter whose
capacity-bounded-ring sibling caused the retracted "they never act" premises on #390/#211.

Deployed + SHA-verified. LIVE PROOF OWED: a dispatched run showing acts CLIMB mid-attempt. Until
that row exists this is compiled-and-deployed, not confirmed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(swe): astropy env builds — a 1990s vendored zlib stubs out fdopen on every modern Apple SDK (#383)

THE FOURTH HEAD of #383, and the reason two dispatched rounds died at env-build TONIGHT even
though #2329's jinja2 + build-requires fixes are both merged and in this tree. Not pyerfa, not
Cython, not Python 3.11 — I guessed all three before reading the error.

astropy vendors cfitsio, which vendors an ancient zlib. `cextern/cfitsio/zlib/zutil.h:140`:

    #if defined(MACOS) || defined(TARGET_OS_MAC)
    #  define OS_CODE  7
    #    ifndef fdopen
    #      define fdopen(fd,mode) NULL /* No fdopen() */

`TARGET_OS_MAC` means "some Apple platform" on every modern SDK — it does NOT mean "classic Mac
OS", which is what this zlib was written to test. So the branch fires, `fdopen` is macro-replaced
by `NULL`, and the SYSTEM header's own declaration

    FILE *fdopen(int, const char *)      →      FILE *NULL(int, const char *)

becomes `error: expected identifier or '('` inside `<stdio.h>`, thousands of lines from anything
astropy wrote. (The adjacent `'OS_CODE' macro redefined` warning is the same branch firing.)

FIX: the guard is `#ifndef fdopen`, so pre-defining it is the entire repair. `-Dfdopen=fdopen`
makes the guard FALSE — the NULL stub is never emitted — and the macro is the identity, so every
real call still compiles to `fdopen`. No source patched, nothing stubbed, nothing renamed, and a
repo that doesn't vendor this zlib never notices the flag.

POSITIVE + NEGATIVE CONTROL against the real staged checkout, both run before committing:

    cc -c -I<checkout>/cextern/cfitsio/zlib  →  error: expected identifier or '('
                                                error: expected ')'
    cc -c -Dfdopen=fdopen -I<same>           →  clean, exit 0

Placed in ERA_CFLAGS beside its three siblings rather than a per-repo table, because it is not an
astropy fact — it is an ERA fact (old vendored C vs a modern SDK), same shape as the others: the
compiler is HARNESS, the C is SUBJECT, and the subject built fine on the compilers of its day.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(governor): shed CAPABILITY, never starve the window — model choice was floored at bare survival (#438-class)

Glass-boxed live on the M5 2026-08-17: a 27B served at usable_gb=5 with
served_window=2048 against a MEASURED demand_window=63817. Every SWE act ran
against a context that could not hold the task statement — the "machine is
allowing sludge" Joel reported, and the arithmetic behind ~4 acts/hour.

The defect was an inconsistency INTERNAL to plan_serving. Two floors, two
different standards:

  lane COUNT  -> BOOTSTRAP_WORKING_SET (16384, "one full turn")
  model CHOICE -> MIN_SERVE_CTX        (2048, bare survival)

The lane loop already refuses to add a slot that cannot hold a full turn
(1 lane @ 30k beats 2 lanes @ 2k), then falls back to .unwrap_or(1) and calls
it "honest starvation, surfaced downstream" — while the MODEL is never
reconsidered. Shedding a lane and shedding capability are the same move for
the same reason; only the first was implemented. So `fits_one_lane` crowned
the most capable model that cleared a TRIVIAL bar and let the window collapse
to it. A model that fits only at 2048 is not more capable on this host — it is
unusable on this host.

Viability is now tested at the same "one full turn" standard the lane floor
uses, with a documented degrade: if NO candidate clears it, fall back to the
old MIN_SERVE_CTX bar so a genuinely tiny host still serves something rather
than nothing (honest starvation is then real, not a selection artifact).
Deliberately the STABLE bootstrap constant, not the moving measured p95 —
coupling model CHOICE to a jittering demand signal is the 718-replan flap that
wedged three benchmark runs.

This ran on EVERY node, so a grid of peers would each independently crown its
biggest technically-holdable model and starve its own window, with no single
node's numbers looking anomalous.

LIVE, deploy-verified: 27B/2048/bound_by=host-fit -> 14B/16384/bound_by=demand,
lanes 1 -> 4. bound_by flipping to `demand` is the signal: the plan now meets
the working set instead of being cut by the host.

Tests: model_choice_sheds_capability_rather_than_starve_the_window pins all
three arms — the starve case, a NEGATIVE CONTROL that a roomy host still picks
the 27B (this fix must not silently downgrade capable boxes), and the degrade
fallback. 27 serving_plan / 139 serving / 178 capacity green.

Also repaired stable_keeps_incumbent_when_upgrade_lacks_headroom, whose fixture
had encoded the old bar: with pair() at 10GB, big was "viable" only on 184MB of
KV, so "fresh would pick big" meant a 2048-token 9GB model. Given a local
fixture where big genuinely clears a full turn (19.5 <= 20) yet still fails the
0.9x switch-up headroom bar, so the test asserts what it always meant to.

KNOWN RESIDUAL: selection tests weights + kv_at(ctx) against raw usable_bytes
while window_for sizes against `effective` (minus co-consumer headroom) and
subtracts compute buffers, so the two floors are near-consistent, not identical
(observed 16025 vs 16384). The 8x collapse is gone; unifying the last 2% is a
follow-up.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): context is a capability axis — the governor learns the window but not the CHOICE (Joel 8/17)

Joel: "Context windows are as important as model size. It seems 16-20k is bare
minimum for decent activities. Ideally the governor learns."

Captures the design rather than rushing it into plan_serving, which is the most
flap-prone function in the tree (718 replans, three wedged benchmark runs).

THE CLAIM: delivered capability is f(params, served_window) and the planner
models only params. capability_rank is a scalar keyed to model identity, so a
27B is "more capable" than a 14B even when the host can serve the 27B only 2048
tokens. That shipped as the live defect fixed in 03c890b.

WHAT IS ALREADY RIGHT, and must not be rebuilt: working_set.rs is a good
learning loop whose hard problem is solved. It records DEMAND not USAGE — the
counterfactual "what this turn would have used with no budget", including
grounding contributions assembly dropped — explicitly avoiding the
thermometer-inside-the-thermostat trap where a p95 of what-was-sent re-derives
its own clamp forever. Peak not average. Persisted. Passed as a parameter. The
live demand_window=63817 IS that module working correctly.

THE ACTUAL GAP: one learned signal, three decisions, two deaf. The window is
learned; lane count and model choice both use hardcoded BOOTSTRAP_WORKING_SET —
a constant whose own doc says it "was never meant to survive", and which sits at
the BOTTOM of Joel's 16-20k band, identically for a chat turn and a SWE turn.

WHY THE CONSTANT IS THERE AND WHY IT DOESN'T FORBID LEARNING: the anti-flap
argument is against driving a structural, expensive-to-change decision from a
fast jittering signal. It is not against learning. Two time constants: fast
measured demand sizes the window (cheap, built, correct); a slow hysteretic
learned floor drives model choice and lane count (expensive, so margin band +
dwell time + hard clamp). Flapping is a property of the update rule, not of
learning.

PROPOSED, NOT BUILT: (1) capability_rank goes 2-D — rank by delivered
capability, since the current most-capable-that-clears-a-full-turn gate is a
correct approximation but cannot express "14B at 60k beats 27B at 20k";
(2) the floor becomes learned + slow, with BOOTSTRAP_WORKING_SET surviving as
the floor OF the floor, not the value; (3) the floor becomes per-ACTIVITY —
recipes are already data (#433) and "recipe = content-type + RULES" makes the
minimum useful window recipe-owned.

Includes acceptance tests (incl. an anti-flap test pinned as a test, not
asserted in prose) and the de-hardcode smell: a new constant beside
BOOTSTRAP_WORKING_SET is a third way to express a floor — the shape the guard
already caught once as FLOOR_TOKENS (#411).

BLOCKING OBSERVATION recorded for whoever picks this up: delib.generate emits
ZERO probe rows, so per-generation latency and tok/s are unreadable and every
throughput question here needs 20-minute black-box sampling. An unmeasurable
governor cannot be a learning one (#441).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): my empty-completion guard was standing in front of the #181 recovery — reasoning-bearing empties are not faults

REGRESSION I INTRODUCED in ce82f00, caught by its own test suite.

That guard faulted on "empty text + no tool call + not ToolUse" — which is the
EXACT precondition of the two recovery paths immediately below it:

  persona.act.reasoning_lift — a tool call sitting in the reasoning tail gets
    lifted out and EXECUTED (json_in_prompt_tools::parse_tool_calls over the
    reasoning channel).
  persona.act.think_only    — #181's teacher sentinel: she spent the whole
    generation inside <think>, so route the #159 reported-never-executed
    mechanism and let drive_to_settle hand her another generation that starts
    from her own conclusions (the reasoning is already in working memory).

Faulting first made BOTH unreachable. Measured live 2026-08-17: 40
delib.empty_completion faults against 87 persona.turn.start while three SWE
runs sat at the SAME act count for 1,357 seconds. Every one of those turns had
15k+ chars of reasoning and finish_reason: length at exactly 4096 output tokens
— i.e. the shape the recovery exists for. The machinery was already built and
correct; I put a dead end in front of it.

FIX: fault ONLY when nothing is left to recover — the lane returned genuine
void (no text, no reasoning, no call), or she has no tools for the sentinel to
teach through. A reasoning-bearing empty falls through to the lift/think-only
owners. The guard's purpose is preserved: an empty is still never read as
chosen silence, it is just routed to the component that can act on it.

Restores 2 tests that had been RED since ce82f00 and that I shipped without
running — think_only_turn_routes_the_teacher_sentinel_not_empty_speak and
empty_content_with_reasoning_tool_intent_lifts_the_final_call. Both name this
exact contract; both now pass. 62/62 deliberation tests green.

NOT YET LIVE-PROVEN. Deployed and unit-green, but the owed evidence is a real
reasoning_lift or think_only probe row with empties falling — measurement in
flight. Recorded here so the claim is not read as stronger than it is.

ALSO CORRECTED, and NOT shipped: completion_budget_for is window/4, so a 16k
window caps generation at 4096 and a thinking model exhausts it inside <think>.
Raising it to window/2 broke prompt_plus_completion_cap_never_exceeds_the_
served_window (prompt 525 + completion 512 > window 1024) — the prompt sizer
overshoots its own target by ~13 tokens, which /4 had slack to hide. The
OVERSHOOT is the defect, not the fraction; shipping /2 on top of it would push
prompt+completion past n_ctx and 500 every turn with context-shift off. Left
at /4 until the sizer is fixed. Bounding the reasoning channel
(--reasoning-budget) was considered and REJECTED: it lobotomizes the model to
fit a fraction we invented (Joel, 2026-08-17).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): the reserve must YIELD to the incompressible prompt floor — why raising window/4 is a refactor, not a constant

Records the measured blocker on the #181 output starvation so the next attempt
does not repeat either of the two wrong fixes.

MEASURED: completion_budget_for = window/4, so a 16k window caps generation at
4096. A reasoning model spends output on thinking, exhausts the cap inside
<think>, and never reaches the tool call — 7 of 20 captured turns at
finish_reason: length, output_tokens: 4096 exactly, ~15k reasoning chars, empty
text, zero tool calls.

WRONG FIX 1, rejected on Joel's instruction: --reasoning-budget. Capping <think>
shrinks the model to fit a fraction we invented. Their thinking is the product.

WRONG FIX 2, tried and reverted: window/2. Breaks
prompt_plus_completion_cap_never_exceeds_the_served_window, the invariant that
keeps prompt+completion under n_ctx. With context-shift off that is a 500 per
turn — every citizen muted. Trading a 35% empty rate for a 100% mute rate.

THE ACTUAL DEFECT, from reading prompt_view_within: the budget derivation
(window − reserve − tool_tokens) is correct. What breaks is that three sibling
tests pin content that must survive budget pressure unconditionally — held work
card, most recent burst, newest message. Those are INCOMPRESSIBLE FLOORS. Grow
the reserve and the budget drops under the floor; the packer admits the
mandatory content anyway and overshoots (prompt 525 + completion 512 > 1024).
The overshoot is the floor correctly refusing to compress. Holding the reserve
FIXED is the error.

FIX SHAPE: reserve = min(desired_share, window − mandatory_floor). Invariant
then holds at every window, including the synthetic sub-MIN_SERVE_CTX windows
the tests use and production never serves, while the share stays generous at
real 16k+ windows where the floor is hundreds against thousands.

NOT A ONE-LINER, and that is why this is a doc and not a patch: the dependency
is circular (reserve → budget → packing → floor → reserve). The floor must be
computable before the reserve is chosen — hoist the mandatory-section
measurement ahead of budgeting, or two-pass size-then-resize. Sequence recorded:
hoist the floor, make the reserve yield, THEN raise the share, and re-run all
four prompt_shaping tests at both a synthetic small window and a realistic 16k
one. Those four tests are the only thing between a generous reserve and a 500 on
every turn; none of them may be weakened to make the change pass.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(bench): ENFORCE the gold gate — an env that cannot score its own gold patch disqualifies itself (#380 keystone)

The spine check RAN and enforced NOTHING. `benchmark/swe-grade --gold` has always
substituted `instance.patch` as the candidate and graded it, so the mechanism
existed. But it returned a bare `resolved: false`, which downstream is
byte-identical to a citizen's capability zero. The `gold` param's own doc states
the requirement — "It MUST resolve — if it does not, the environment is wrong
and no other number from it means anything" — and that sentence was addressed to
a human and enforced by nobody.

WHY THIS IS THE KEYSTONE FOR EVERY NUMBER WE REPORT. Without it a failure has
two indistinguishable causes: the patch was wrong, or the environment cannot
score a correct patch at all. Measured on this box 2026-08-17 (build fc8964b,
deploy-verified): a 2019-era django env carries pytest 8.4.2, and this module's
own notes record era suites importing pytest internals modern pytest deleted
(flask 2.2: `from _pytest.monkeypatch import notset`). So an unknown fraction of
our zeros are harness artifacts tallied as capability — noise with a number
attached. That is why #383's 114/300 and #380's era drift cannot be told apart
from model failure by reading scores.

`swe_bench::gold_gate` is a THIN caller over `grade(.., Some(&instance.patch))`,
deliberately not a parallel scorer: it must exercise the exact clone → apply →
test path a real attempt takes or it proves nothing about that path. A second
implementation agreeing with itself is the classic dead instrument. What it adds
is the enforcement: on a non-resolve it stamps `verdict.error` naming the gate,
the f2p/p2p counts, and the era-dep suspects to check. `error` is contractually
an ABSENCE and "must never be tallied as a failed attempt" (SweVerdict::error),
so the disqualification propagates through every existing consumer with no
further wiring.

The command's gold arm now routes through it, so there is ONE path and every
caller inherits the labelling — not a second spelling of gold grading.

Explicitly NOT conflated: `gate_ok == false` means FAIL_TO_PASS already passed on
the pristine tree (the instance carries no bug here). That is a different fact
from a broken environment and the doc says so.

NOT era-pinning pytest in this commit. That fraction is deliberate and
documented at swe_bench.rs:692-706 ("harness is deliberately MODERN"), with the
breakage it causes documented at :907. Inverting a decision with a stated
rationale is Joel's call; this commit builds the instrument that MEASURES which
envs it breaks, which is the prerequisite either way.

Verified: cargo check clean. Live gold-gate run against a known-gradeable and a
suspect env is the owed proof and is next.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(bench): grade django from CANONICAL test ids, not from prose (#383 root cause)

The gold gate (943b8a2) caught django-10914 failing its OWN gold patch:
FAIL_TO_PASS 0/1, PASS_TO_PASS 35/40, reported as "REGRESSION — your changes
BROKE 5 test(s)" while the quoted output showed all five passing `... ok`.

ROOT CAUSE, in `parse_django_report`: it required `" ... "` AND `" ("` on the
SAME line. unittest puts the outcome on the id line ONLY when a test has no
docstring; with one it prints two lines and the `... ok` lands on the SECOND:

    test_skip_if_db_feature (test_utils.tests.SkippingTestCase)
    Testing the django.test.skipIfDBFeature decorator. ... ok

Both lines fell through the `continue`s — the id line has no `" ... "`, the
docstring line has no `" ("` — so every docstringed django test was recorded
NOWHERE, and absent-from-map reads downstream as not-passed. The 5 "broken" were
the 5 docstringed ones. django is 114/300 of Lite, so django scores were never
measuring django, and every django zero on record is retro-actively
uninterpretable.

THE FIX IS NOT A BETTER PARSER. I first extended the state machine to stitch the
two-line form; Joel called it correctly — "fragile, needs cleaner fixes". It is,
because unittest's verbose output is a RENDERING, not a data format: docstrings
can contain " ... " and " (", django ≥4.1 changed the class-path shape, and every
one of those is a way to mis-attribute silently. Mis-attribution here does not
look like a bug; it looks like a citizen who failed.

So django is now graded from CANONICAL ids. `install_django_json_runner` drops a
`DiscoverRunner` subclass into the clone's `tests/` dir; `--testrunner` selects
it; it emits one `CONTINUUM_TEST {"id": ..., "ok": ...}` row per test keyed by
`test.id()` — the id unittest itself uses. No line shapes, no docstring
ambiguity, no version drift. The dataset's `method (module.Class)` spelling is
derived from the canonical `module.Class.method` by deterministic surgery, not
guessed from output.

Skips and expected failures are PASSES, unexpected successes FAILURES — the same
rule as the prose path, now expressed once in `django_outcome` (it was inlined
twice, which is how a `skipped` becomes a pass in one shape and a non-outcome in
the other).

FALLBACKS ARE LOUD, NEVER SILENT: if the runner cannot be installed, or emits
zero rows (django too old for --testrunner, import error, crash before any test),
we fall back to the prose parser AND warn. A silent fallback that scores is
indistinguishable from one that lies.

`parse_django_report` is KEPT as that fallback, with the two-line handling, since
it is now the degraded path rather than the only path.

Verified: cargo check clean. Live gold-gate re-run on django-10914 is the owed
proof and is next — the same instance whose failure produced this diagnosis, so
the fix is falsifiable by the evidence that motivated it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(bench): select django's JSON runner through SETTINGS — runtests.py has no --testrunner (#383)

The canonical-id grader (13fd357) was correct about WHAT to read and wrong about HOW to
ask for it. It passed `--testrunner=continuum_json_runner.JsonRunner` to
`tests/runtests.py`. That flag does not exist in ANY django era — runtests.py reads
`settings.TEST_RUNNER` and only defaults it when unset (verified in-tree at 1.11, 2.2,
3.2, 4.2, 5.2 and main: the same three lines throughout).

An unknown flag there is not ignored. argparse rejects the whole invocation before a
single test runs, so the live gold gate on django-10914 came back in 4.4 seconds with
`PASS_TO_PASS passes 0 of 40 on the PRISTINE tree`. The fix I shipped to stop
mis-attributing django tests made django strictly less gradeable than the prose parser
it replaced.

Fix: install a settings module beside the runner —

    from test_sqlite import *
    TEST_RUNNER = "continuum_json_runner.JsonRunner"

— and pass `--settings=continuum_json_settings` instead of `--settings=test_sqlite`. Both
files are pure additions to the clone; django's own test_sqlite stays untouched and still
supplies every database/hasher setting, so the shim cannot drift from whatever the era's
suite settings happen to be. The invocation now differs from the plain one in exactly one
argument, which is what the new test asserts.

WHAT WORKED, and is worth keeping: the zero-rows fallback. `run_tests` warns and falls
back to `parse_django_report` when the JSON runner emits nothing, and that is the only
reason a broken invocation surfaced as an env fault instead of 40 capability failures.
A silent fallback here would have read as a citizen's zero.

Mechanism proven live in the 2019-era env BEFORE this commit — the settings shim run by
hand emits 30 canonical rows (`CONTINUUM_TEST {"id": "file_uploads.tests.FileUploadTests
.test_base64_upload", "ok": true}`) where the flag emitted zero. Those hand-written files
were then deleted so the owed gold-gate re-run exercises the install path, not my copies.

15/15 swe_bench tests green (metal,accelerate).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(bench): django's dataset ids include DOCSTRINGS — the runner must emit its own (#383)

Gold gate on django-10914 after the settings seam: FAIL_TO_PASS 1/1 (was 0/1),
PASS_TO_PASS 38/40 (was 35/40), gate_ok true. The two remaining misses were not tests
and not env — they were SPELLING:

    "An exception is setUp() is reraised after disable() is called."
    "assertRaisesMessage shouldn't interpret RE special chars."

Those are the dataset's own PASS_TO_PASS entries, verified by reading the cached Lite
JSON: 2 of django-10914's 98 p2p ids are docstring prose with no test id in them at all.
The cause is upstream and structural — SWE-bench harvested django ids from unittest's
verbose log, and unittest prints a test's DOCSTRING in place of its id when it has one.
So a canonical id, however correct, can NEVER resolve those rows.

Fix: the runner emits the docstring alongside the id (`test.shortDescription()`, the same
string unittest itself renders), and the parser registers THREE spellings for one outcome
— canonical id, unittest rendering, docstring. Docstrings are not unique, so they are
AND-folded (a docstring shared by a pass and a fail reads as a fail) and never overwrite a
real id. Only the test object knows its own docstring; having the runner report it is what
removes the guess, which is the same reason the canonical id came from `test.id()`.

CORRECTION to what I wrote on 13fd357: I described the old prose parser as
"mis-attributing" docstringed tests. It DROPPED them. For a docstringed test the id line
carries no `... ok` suffix and the docstring line does not match the `name (class)` shape,
so neither line produced an entry. The parser was not confused about which test passed; it
had no row for that test at all. That distinction matters because it is why the docstring
must be emitted as DATA rather than recovered by a better regex.

16/16 swe_bench tests green (metal,accelerate). Live re-run of the gold gate is next and
is the falsifiable claim: p2p 40/40 and resolved=true, or the docstring path is not the
whole remainder.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 19, 2026
…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
joelteply added a commit that referenced this pull request Aug 19, 2026
…sign that replaces every result-reducer

Joel's architecture, dictated across this session and written down before any of it is
built, because I spent the session building the wrong three things first and each one
looked locally correct.

THE INCIDENT. A citizen mid-SWE-bench was handed her own directory listing as
`bytes":22592},{"kind":"file","name":"header.py"…` — head gone, opening mid-token, nothing
saying anything had been removed. She could not tell how many files existed, whether the
call succeeded, or that she was reading a fragment. Her prompt used 11,763 tokens of a
29,184 window: the window was 60% EMPTY while we shredded her results to fit a 1/32 share.

Mechanism: `ToolResult.content` is a `String`. Commands produce typed output, serialize
it, drop it in. Past that boundary the structure is gone and the only move left is cutting
characters — which two sites did with two different rules, one keeping the head and one
the tail.

THE THREE WRONG FIXES, all recorded because I attempted them in order and each is the
locally shortest path:

  1. Tune the cut / keep the other half — both halves matter and which one depends on the
     payload. Any fixed rule is silently wrong half the time.
  2. A smarter generic reducer (shed elements, shed lines, mark the elision). Better, still
     wrong: it cannot know a diff is atomic, that a patch reduced by half APPLIES CLEANLY
     and does the wrong thing, or that dropping lines shifts the line numbers the next edit
     depends on. Half a code fix is worse than none — no fix fails loudly, half a fix
     passes review.
  3. Raise the fraction 1/32 → 1/8. The same hardcoded guess with a different number; it
     makes the corruption rarer and therefore harder to find.

All three are one defect: the substrate inspecting a payload it does not understand, and
deciding.

THE RULE: content never travels, a reference to its source does. A result is a small
header (always fits, always complete) plus a handle. The content stays where it was
produced; a mind that wants more calls the handle. Not a new mechanism — the one the RAG
and positron layers already use, one truth at the source and N projections. The
tool-result channel adopts THAT interface instead of growing a parallel one.

THE FORM IS A TRAIT, and this is the part that kills the whole bug class: nobody tracks
down where content came from and special-cases it. You hold the reference and call its
method; the source decides what a range means for its own content — lines for a file,
entries for a listing, hunks for a diff. Same interface for a peer's artifact across the
grid.

What falls out without special-casing: nothing is ever malformed; content size decouples
from context size (a 40k-line file is fully available on a 4k window, she pages);
indivisible payloads refuse and say how to narrow, decided by their own implementation;
and the act-history gap (#390/#414 — 2,863 acts executed, one visible, no path to the
rest) turns out to be a handle problem, not a memory one.

Build order starts at task #17 — reconcile HandleRef vs the URI-handle form — because
with two handle types this design forks on day one.

Nothing is wired yet, deliberately. The three reducers I wrote are reverted; the tree
carries the doc and the existing (wrong but honest) behaviour until the interface lands.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 19, 2026
…— bridging UX and PX

Joel's framing, and it promotes this from a content mechanism to the reason positron
exists. Written down because it changes what future work in this area is FOR.

THE IDIOM IS NOT NOVEL AND SHOULD NOT BE. Collapse a tree, expand what you care about is
how every IDE, file browser, review tool and coworking surface has worked for decades,
because it is how attention works. We are not inventing an interaction — we are giving
citizens the one humans already have.

What makes it load-bearing is that ONE structure serves both audiences. Collapsed is a
folded section for a human and a header line for a citizen. Expand is a click or a
`content/fetch`. The budget is screen space or context window. What sits underneath is
identical. A prompt IS a rendering — it has a viewport, a scroll budget and an expansion
gesture, spelled differently.

So this belongs to positron, not cognition: positron's real job is to bridge UX and PX,
one definition projected to N renderers, and the persona's PROMPT IS SIMPLY ONE OF THE
RENDERERS. Everything built for the human screen should light up for a citizen free, and
the reverse. Anything reaching only one of them is a projection we failed to define once.

That is the Flutter analogy and it is exact: author the surface generically, every target
renders it natively — a browser, a phone, a TUI, AND A MIND. A citizen of any kind, on any
model, gets the same capacity to navigate what exists, because the capacity lives in the
projection rather than in the client.

THE CYCLE THIS CLOSES, which is the part I had not seen: collapse/expand is not one-shot.
She perceives a condensed view; something warrants attention; she expands it; HER THINKING
SECTION AND TOOL RECEIPTS CARRY THE HANDLES FORWARD so what she opened stays reachable
next turn; the next perception re-condenses around what she now knows. Cyclical RAG
consciousness rather than one-shot retrieval — attention narrows, detail arrives, the
frame re-forms around it, repeat.

The handle is what makes the carry-forward step possible at all. A receipt holding a
REFERENCE stays live; a receipt holding a truncated copy is dead the moment it ages out.
That is #390/#414 seen from the other side — thousands of acts executed, one visible, no
path to the rest — and it is a handle problem, not a memory one.

AND THE CONSTRAINT IS DATED, NOT DESIGNED. All of this has to fit one prompt today because
that is what these LLMs accept; that is a property of the serving interface we intend to
fix, not of the design. Nothing here may encode "one prompt" as an assumption. Handles are
what make the eventual fix cheap: when a mind can hold a persistent incrementally-updated
working set instead of being re-rendered whole each turn, the projection layer does not
change at all — only the renderer does.

Which gives the test for future work here: if it would need redesigning when the
one-prompt constraint lifts, it is encoding the constraint instead of the intent.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 20, 2026
…cer wired INTO the settle driver (#319) (#2337)

* fix(cognition): wire the LIVED-TURN producer — her own conversations 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

* fix(cognition): the lived-turn producer belongs in the settle DRIVER, not at one call site (#319)

MEASURED, and it retracts my own claim from 200dab984. 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

* fix(persona): a YIELD is not a REST — kill the starvation ratchet that 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

* fix(cognition): the ambient-turn pool was a hardcoded 1 — derive it from 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

* fix(runtime): a deploy in flight must block implicit autostart — the stale core that steals the socket mid-build

MEASURED 2026-08-17. `continuum reboot` shipped 6229b3762 and deploy-verify reported the
core running a87f7c871. 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

* fix(deploy): ⚠ STALE CLI fired on every SUCCESSFUL reboot — and its text 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 a87f7c871 → 6229b3762 →
5d62bf30b 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

* docs(observations): dated post-run card — the two starvation defects, 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

* docs(observations): CORRECTION — the 27B is already the persona model, 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

* feat(cognition): make the ambient YIELD visible — a starved roster read 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

* fix(cognition): my own starvation probe reported CUMULATIVE under a field 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

* fix(persona): the work board grew into the prompt — cap the per-card 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

* fix(swe): one era-pinned install path, so the sdist build-deps heal like -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

* fix(rag): roster + doctrine read the room she is STANDING in, not the 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 (cabecb9c4): 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

* docs(observations): 2026-08-17 bench rounds + the room gate that made 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

* fix(swe): build tools fall back to UNPINNED when the era pin is unsatisfiable 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

* feat(bench): dispatch parks on the roster like it parks on serving (#442 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

* fix(work): the grade tail cannot depend on wire delivery — work/state 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
4178d50f7 (astropy build-dep fallback) and a37ac70fe (dispatch roster wait).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(swe): grade clones through a staging path — a .DS_Store must not 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 (185816b13). 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

* fix(swe): install the repo's own TEST extra — a suite that cannot COLLECT 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 185816b13 (grade tail) and 99c59fe44 (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

* fix(swe): the test-extra parser was half-blind — read setup.cfg too, and stop caching a negative (#380)

I shipped b0141e810 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

* fix(swe): the UNGRADEABLE verdict must carry the pristine run's output (#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

* fix(benchmark): a kickoff addressed to a citizen must never be AUTHORED 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

* fix(bench): dispatch resolves against RESIDENCY, not registration (#455)

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

* fix(boot): boot OWNS the process tree — adopt healthy, reap unhealthy, 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

* feat(persona): BaseModelPolicy — one answer to "what base does she think 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

* feat(persona): PegReason::Training — the peg's biggest job is targeting 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

* feat(persona): the work turn roots her hands at the card AND feeds the genome (#456)

Joel: "learning and score are both the objective. We should outcompete the base
model." The learning half was structurally impossible. This is why.

MEASURED FROM SOURCE: `training_producer::produce` — the L2 step that turns a turn
into a (context, completion) training example and submits it to the forge — had
exactly ONE call site tree-wide: the message-REPLY path. Its own comment explains
the exclusion: "It lives ONLY on this live `Spoke` path, which eval forks
(`drive_to_settle`) never run, so the training set can never be contaminated by a
measurement simulation." Correct for eval (#59). But it means:

  - `agent/solve` (which IS `drive_to_settle`) produces zero training examples,
    so a dispatched bench card can never reach the genome no matter that dispatch
    sets `learn: LearnFromThisWork` — the gate is PATH-based, the policy is never
    consulted, the policy loses.
  - AND the WORK TURN — the separate drive at the heart of "working is not
    speaking" (#154), the turn where she actually works her CLAIMED CARD — also
    never fed the producer. Chat produced training data; real work did not.

That second one is the sharper defect and it is fixed here, in the live loop,
without touching the eval guard.

TWO CHANGES, both in the held-work turn:

1. HANDS FOLLOW THE CARD. A held card may be a staged benchmark checkout — a real
   git repo under `workspace/swe/<instance>`. Without rooting her hands there she
   "works" it by writing into her OWN workspace and the grader's `git diff` on the
   sandbox scores a false ZERO — exactly the defect glass-boxed on agent/solve
   2026-07-22 (two real acts, correct file written, empty patch). Now the work turn
   roots at the card's workspace and RESTORES on every exit path (#312: after a
   flask solve, Anwen's live self was still reading the exam repo hours later).
   A root failure is LOUD and she works in her own dir anyway — an unexplained
   empty diff is worse than a diagnosed one.

2. THE PRODUCER FIRES. context = the card burst she was handed, completion = the
   report she wrote after doing the work. Same shape, same best-effort spawn, same
   quality bar as the reply path. Still the LIVE path — an eval fork does not reach
   this call site — so the contamination guard is unchanged.

NEW: `persona/staged_workspace.rs` — ONE answer to "which workspace does this card
point at", replacing the walk that `persona/roster` and `dispatch_staged_swe_solve`
each did inline. The layout knowledge that makes a citizen able to act in the repo
previously lived only inside a benchmark dispatcher, so the live path could not
reuse it without importing the very bypass it should replace. Matching is by title
containment (dispatch writes the title from the instance, so it is by construction);
MORE than one match refuses with a probe rather than guessing, because rooting at
the wrong repo silently scores a false zero for the other card.

WHAT THIS DOES NOT DO: retire the `agent/solve` inbound bypass. That is still #456
and still the right end state. But this makes the in-loop path actually work —
hands in the repo, experience into the genome — which is the precondition for
retiring the bypass rather than a consequence of it.

CORRECTION TO MY OWN CLAIM this session: I first said "zero production callers of
training_trigger/submit — the trigger is dead." Wrong. `training_producer.rs` is
the producer and dispatches correctly; `memory/consolidate.rs:196` is a second
legitimate…
joelteply added a commit that referenced this pull request Aug 21, 2026
* fix(cognition): a top-salience block can vanish whole and nothing says so (#460)

MEASURED live 2026-08-20, 25 consecutive delib turns across Atlas, Kira and
Joaquin. On a 22,528 served window, identical every turn:

  completion_reserve  11,264  50.0%   (window/2, COMPLETION_SHARE_DENOM = 2)
  tool schemas         7,013  31.1%   (constant on all 25)
  framing         2,757-3,081 ~13.7%
  grounding          62-1,083  <1%-4.8%   (median ~290; Atlas often 62-183)

`workspace-map` (salience 0.90, the top tier) was dropped WHOLE on 20 of the 25.
`mission` on 11. Demand ran 1.03x-2.48x the window on every turn.

The workspace-map is the map of the files she is staged to edit. Atlas held
claim-df9f4ad5 on pallets__flask-4045 with acts=0 and a checkout untouched since
Aug 17 — three days. She could not see the repo. That is not write-avoidance
(#390) and not model weakness: 0 acts is the correct response to 183 tokens of
situational context.

WHY NOTHING CAUGHT IT. `min_window_for_agentic_surface` is the sensor for this
seam and it was correctly SILENT — 22,528 clears its ~16.9k bound. Its own doc
says exactly why that proves nothing: "Necessary, NOT sufficient — clearing it
does not mean she can hear you… never 'you are fine above it'", and it even
names the mechanism, that a real turn's framing exceeds the bare floor "and
context is what yields". The failure was written down before it happened. What
was missing is a SUFFICIENCY sensor.

THE SIGNAL, with no invented threshold. Contributions are taken
highest-salience-FIRST, so ranking alone can never drop a 0.90 while keeping a
0.30. When that happens it is the SIZE interaction: a big essential block did
not fit, then a small unimportant one did. The budget bought the cheap thing and
lost the important one. `delib.context.salience_inversion` reports exactly that
— a structural fact, not a tuned constant that would be a snapshot of one day's
salience values.

Divisible blocks are deliberately excluded: a prefix-truncated list announces
itself in-prompt ("…N more not shown"), so it is degraded but never silent. Only
WHOLE drops vanish without a trace. SENSOR, never a clamp — amputating the tool
surface to make room is the deleted #206 cliff (14/14 SWE acts were
`commands/help`, 0 edits). It reports; the budget fix is #460 and is not a
decision this function may make.

ALSO: deleted a sentence that was actively lying. `describe_tool_tokens`'s doc
said "a single tiny schema… a handful of tokens, not the old full-registry
dump" — true of the two-tool discovery pair, false since #206. The probe site
700 lines away has called it out as stale since 2026-08-06 ("reading that stale
sentence is exactly why the right suspect got dismissed") but nobody deleted it
from the function itself, so anyone reading the function still got the lie. It
cost me a wrong mechanism on #459 earlier today. Replaced with the measurement
(4,609 on 08-06 -> 7,013 on 08-20, +52%) and with why it grows unwatched:
`native_tool_specs` is derived from `NATIVE = true`, so the per-turn cost of the
tool surface is an unbounded side effect of a flag set in another file.

Test pins the inversion AND the premise underneath it — that selection is
highest-salience-first. If that ordering is ever lost the probe silently becomes
noise; this makes that regression loud. All 22 prompt_shaping tests green,
including the four load-bearing ones. De-hardcode guard green.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): the sensor had TWO holes and the FIRST live turn found both (#460)

Deployed 2281e8b, watched the first real turns, and the sensor stayed silent
through the exact condition it was written for. Both holes are mine.

HOLE 1 — strict `>` against a population with NO salience spread. Live rows:

  Atlas   budget=89   kept: roster(0.90), room-kanban(0.90)
                      dropped: workspace-map(0.90)
  Benchy  budget=102  kept: room-board(0.90)
                      dropped: workspace-map(0.90), room-kanban(0.90)
  Kira    budget=517  kept: workspace-map(0.90)

EVERY essential source bids exactly 0.90, so `0.90 > 0.90` is false and nothing
fired. My premise — "ranking cannot drop a 0.90 while keeping a 0.30" — is TRUE
and VACUOUS: production has no 0.30 at this tier. What actually decides who
survives is arrival order and byte size, a coin flip among equals, and losing
the repo map to that flip is the entire harm. `>=` is the honest predicate; a
real ranking success (0.30 dropped, 0.90 kept) still cannot fire it.

HOLE 2, worse — TOTAL starvation was invisible. `min_by` over an EMPTY
`selected` yields `None`, the `if let` fell through, nothing fired. The one
state where the citizen gets NO grounding at all was the one state the sensor
could not report. That is [[an-absence-is-an-unfinished-measurement]] — in the
instrument built to end exactly that, written by me, on the same day I filed two
other cards about the same shape. Now `None` is treated as maximal harm, and the
probe carries a `verdict` naming which of the three cases fired
(TOTAL / TIE / true inversion) plus `kept_count`.

THE FINDING UNDERNEATH, bigger than the bug: SALIENCE IS NOT DISCRIMINATING.
Every source bids 0.90, so attention ranking contributes nothing to the drop
decision at this tier — size and order do all the work. Any future fix that
tries to "respect salience" is tuning a dial that is already pinned. Noted on
#460; not addressed here.

The test used a constructed 0.30 for the low-salience keeper, which is why it
passed against a sensor that could not fire in production. It now uses the LIVE
shape (all 0.90) and cites the rows it came from.

Also fixed: `tool_tokens` was interpolated into the probe message while only
existing as a probe FIELD assignment, not a binding — compile error, caught
before push.

All 22 prompt_shaping tests green.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): justify the three unwraps the starvation sensor added (#460)

CI red on `the_unjustified_unwrap_count_never_rises`: 2270 vs baseline 2267. Three,
all mine, all in the sensor added by this branch. The ratchet is right and the fix is
to state WHY each is safe on its own line — not to raise the baseline.

Two are `partial_cmp(...).unwrap_or(Ordering::Equal)` in a max_by/min_by over f32
salience. `partial_cmp` returns None only for NaN. A NaN salience would be an upstream
bug, and the thing being written here is the instrument that exists to REPORT budget
pathology — it must survive a malformed input long enough to say so, not panic inside
the sensor and take the turn with it.

The third is the case the ratchet's own doc singles out — `cheapest_kept.unwrap_or(-1.0)`
on a probe field, an Option becoming a quantity. It survives on a distinction worth
writing down: `None` here is a KNOWN state ("nothing survived the budget"), not an
unknown one. The doc's warning is about unknown-turned-quantity, which is how the Metal
free-VRAM lie happened. Salience is [0,1], so -1.0 is out of domain and cannot be
misread as a real salience, and `verdict` already carries the state in words. Commented
in full at the site so the next reader gets the distinction, not just the exemption.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Aug 21, 2026
…persona (#266) (#2345)

* fix(serving): --flash-attn needs an explicit value — the bare flag ate --mmproj and took serving to 0 lanes

Upstream llama.cpp changed this from a bare boolean switch to
`-fa, --flash-attn [on|off|auto]`. Our bare `--flash-attn` therefore consumed the
NEXT argument as its value and the server refused to start:

  error while handling argument "--flash-attn": unknown value for
  --flash-attn: '--mmproj'

Found 2026-08-20, the first time anyone ever set SERVING_FLASH_ATTN=1. The flag
shipped, was never exercised because it was opt-in and nobody opted in, and rotted
against upstream in the meantime. The whole lane failed to spawn and serving sat at
0 lanes.

An opt-in that has never once been switched on is untested code with a
config-shaped trigger — the same shape as [[an-absence-is-an-unfinished-measurement]],
where the absence of a failure signal was really the absence of an execution.

LIVE-VERIFIED: `ps -o command=` on the running llama-server shows both
`--flash-attn on` and `--cache-type-k q8_0` applied. Served window 23,040 -> 54,272.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): KV cache as a shared base layer — stop paying for repetition between persona

Prefill is 96.3% of persona compute and the cache serves 5.5% of it (#266). Two of
four citizens sit at 0.0%. This doc is the design for keeping that work instead of
discarding it, and the honest boundary around what we actually know.

THE CONSTRAINT (Joel, 2026-08-20): "We won't pay the price for repetition between
persona." Today we pay it N times over — N citizens x 7,013 tokens of byte-identical
tool schemas, prefilled independently, every cold turn. That scales linearly with
population, so it is not constant overhead to absorb; it is a tax on having more
citizens, and it worsens exactly as the grid gets more interesting.

TWO STACKED DEFECTS, both verified by reading, neither yet proven causal:
  1. No persona->slot affinity exists anywhere in inference/. llama.cpp keeps KV per
     slot and --cache-reuse reuses a prefix WITHIN a slot, so reuse needs the same
     persona landing on the same slot. Nothing arranges that.
  2. deliberation_prompt.rs:48,128 puts identity at the head of the cacheable prefix.
     Byte-stable per persona across turns (which is what #266 wanted, and it delivers)
     but byte-UNIQUE across personas — so the shared tool block behind it can never be
     shared. Four citizens, four private copies.

THE DESIGN is a Docker base image, not a compression scheme: prefill the universal
span once, llama_state_seq_save_file it, load it into each slot. The primitives exist
in our fork (include/llama.h:898,905). Second-order win is larger than the first —
base.kv is file-backed, so citizens come back WARM across reboots instead of every
restart re-prefilling everyone cold. Two citizens have cited "the ongoing rebuilds
and interruptions" verbatim in withdrawal messages (#390); this is part of that cost.

WHAT COMPRESSION CAN AND CANNOT DO — the part worth keeping even if every hypothesis
above dies. Block-level KV dedup (chunk the prompt, cache per chunk, reassemble)
CANNOT work: K/V at layer L is a function of the hidden state, which carries the whole
causal history. Only layer-0 K/V is pure in (token, position). A chunk's KV is
genuinely not a function of that chunk. That is why the industry does PREFIX caching
and not BLOCK caching, and it is the intuitive move that will stay wrong.

THE NVIDIA PAPER (arxiv 2608.03893) is cross-MODEL transfer. Its transferable idea is
"strip RoPE, fit position-free, re-apply" — but that removes POSITION dependence, not
CAUSAL dependence, so it does not make a block relocatable. It also excludes hybrid /
MLA attention, which excludes K3, our flagship. It becomes ours when shared KV geometry
stops being discovered post-hoc and becomes a FORGE CONSTRAINT in the recipe — foundry
work (#180/#268), not this doc.

Written as design-with-hypotheses, not settled architecture: a table separates MEASURED
from VERIFIED-BY-READING from HYPOTHESIS, and every hypothesis names the measurement
that would kill it. Three of my own diagnoses were retracted the day this was written;
a doc that read as settled would have been the wrong artifact.

Step 1 is the hit-rate probe. prompt_tokens vs cached_tokens come back on every
llama-server response and we discard them — zero KV cache probe classes exist tree-wide,
which is why every claim here had to be reasoned rather than read.

Distinct from COGNITION-CACHE-HIERARCHY.md (engrams — what a persona REMEMBERS).
This is the KV cache — what the model has already COMPUTED. Orthogonal; the doc says so
at the top so nobody merges them later.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): credit the prior art — half of this was written on 08-09 and never pushed

Found while sweeping the tree for unsaved work: fix/system-prompt-cache-stability,
9 commits from 2026-08-09, local-only for 11 days, 158 commits behind canary. It
already implements the SELF-stability reorder this doc proposed as new, with sharper
forensics (7,607 of ~14,706 chars shared; the framing block flips DIRECTED/WORKING/
SILENCE every turn and truncated the prefix at that point), two VDD gates that were
RED before the fix, and 947 cognition tests green.

It also named this doc's central hypothesis eleven days earlier — verbatim: "slot-KV
eviction is a CO-cause the prompt fix alone won't move — settle with a stable-prompt
A/B before claiming the 10x." So Defect 1 is independent corroboration, not a
discovery, and the doc now says so.

The two are NOT duplicates and the doc now distinguishes the axes: that branch did
SELF stability (one persona across turns); step 2 here does CROSS-PERSONA sharing.
Step 2 belongs on top of it, not instead of it — and the build order now says to
rebase that branch first.

This is [[read-the-code-you-intend-to-replace-before-designing-its-replacement]]
landing again: I searched for my own concept ("slot affinity", "shared base") and
not for the job's name ("prefix stability"), so I did not find work that was sitting
in a local branch named for exactly the thing I was designing.

Its sibling spec, docs/cognition/TYPED-OBSERVATION-REFACTOR.md, was untracked for the
same 11 days (preserved separately). Spec and implementation were both one `git clean`
from gone.

Branch pushed to preserve only — unrebased, unvalidated against the drift, no PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(serving): KV reuse is measured on every LIVE turn and radiates to the UI (#266)

`cache_n` was parsed, typed, threaded through TurnMetrics — and dropped at turn end.
The ONLY consumer that ever turned it into a number was the eval harness
(`cache_hit_rate()` had exactly three callers, all in cognition/eval.rs; zero in
persona/, modules/, commands/). So #266's "5.5% cache hit, two of four citizens at
0.0%" is an EVAL-HARNESS number. Nobody has ever measured the cache behaviour of a
citizen doing real work in a room.

Components green, wiring to the place it matters absent — the same shape as the
DiskPressureMonitor logging `level=high [no reporters]` while nothing owned eviction.

THREE PIECES, one writer each:

1. `WorkspaceCycle` gains lifetime `kv_cached_tokens` / `kv_prefill_tokens`,
   interior-mutable exactly as `cycle_counter` already is.
   LIFETIME, NOT LAST-TICK: `Workspace::metrics()` is the winning verdict of ONE
   tick, and one sample of a live system is not a fact about it — a single cold turn
   reads 0%, a single warm one 90%. SEPARATE COUNTERS, ratio derived on read, never a
   stored rate: averaging rates lies, the rule `TurnMetrics::accumulate` already
   states for tok/s.

2. `note_generation()` folds one generation in and emits `serving.kv.reuse` with both
   the per-turn and lifetime split. Called from `act_observe/settle.rs` — the single
   place a completed generation's metrics are known — and called BEFORE the
   inference-fault early return, because a faulted turn still burned real prefill on
   the lane and a measurement that counts only successes would flatter precisely the
   failure mode we are hunting.
   A generation with no reported timings (cloud provider, older endpoint) moves
   NEITHER counter: absent stays absent instead of being recorded as a miss, which
   would slander a lane that simply never told us.

3. `kv_reuse()` → `Option<f64>`, radiated as the `kv_reuse` vital. `None` until a
   generation has actually reported, so an idle citizen radiates NO meter rather than
   a fabricated 0% — the honest-empty rule the neighbouring meters already follow for
   a dark cognition axis and an un-paged genome. That distinction is load-bearing
   here: 0% is ALSO the value of a real total-miss, so fabricating it on an idle
   persona would manufacture the exact alarm this meter exists to raise.

Joel's constraint (2026-08-20): "We won't pay the price for repetition between
persona." This is the instrument that will show whether we still are, per citizen,
live, in the positronic UI rather than only in a harness run.

PURE OBSERVABILITY — nothing routes, budgets, or gates on these counters.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): field evidence from an independent build on the SAME model (#266)

syv-ai/qwen38-27b-rtx3090 serves Qwen3.8-27B — our exact model — on one RTX 3090 via
vLLM. Different stack, and half that repo is patches against vLLM internals with no
llama.cpp counterpart. But the measurements are on OUR model, and three change this doc.

1. PREFIX CACHING CONFIRMED AND NOW PRICED. Their note: "Turn-2+ of a chat with a 24k
   document goes from ~23 s to ~1 s; costs one extra state page per request (~16% of the
   KV pool). Hybrid models keep this opt-in upstream." Independent confirmation of this
   doc's thesis from someone who measured it, plus the thing the doc lacked — a COST
   SHAPE. Step 4 stops being "unknown cost, probably worth it" and becomes a known trade.

2. NEW ITEM, absent from this doc: DRAFT-VOCABULARY CALIBRATION. A draft vocab counted
   over the model's OWN outputs covers 97.5% of what it generates (96% on CODE); a
   generic web-text list gets 92% (83% on code). Every miss is a forced rejection: 108 vs
   98 tok/s. ~10% throughput from calibration alone, widest gap exactly on our workload.
   Ours by construction — we capture every turn and we have a foundry. This is the
   frozen-backbone/own-corpus thesis applied to DRAFTING instead of weights.

3. LOOKUP DRAFTING IS THE AGENTIC-CODING MULTIPLIER, and they reached it independently:
   "Worth setting for a coding assistant applying edits or a RAG front-end quoting
   sources." With the honest cost: 8 request slots -> 4, 64k -> 56k.

WHERE WE STAND ON THEIR LADDER: ~46 tok/s no-spec -> ~108-114 MTP -> ~259 DFlash2 ->
~381 lookup+16-token verify (document reproduction only; ~133 ordinary chat). Our live
lane carries --spec-draft-model + --spec-draft-n-max 4 (#440) and a direct probe of the
running server returned draft_n: 2, draft_n_accepted: 2 — speculative decode is LIVE and
accepting. We are at their MTP rung. We lack lookup drafting.

NO SIDE-BY-SIDE tok/s COMPARISON APPEARS HERE, deliberately. We have no clean
single-stream measurement; theirs is 250W CUDA and ours is Metal. Publishing the two next
to each other would be exactly the benchmaxx that thread's skeptic was right to distrust.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(benchmark): the restart reaper NAMES the instance it killed (#266 measurement heal)

MEASURED 2026-08-21 on this box: 20 SWE runs, 7 graded, 13 lost to infrastructure —
and 8 of those 13 (40% of every run ever attempted here) died to `killed by a core
restart`. Reboots are doctrine, so the answer is not fewer restarts; it is that a
killed run has to be recoverable.

It was not, for a reason that is pure discard. `reap_orphaned_solve_runs_in` reads the
instance, WRITES it into the failed record, then returns bare run ids — and the boot
probe could therefore say only that A run died, never WHICH TASK went unmeasured.
Recovering a round meant hand-opening ledger files. The reaper had the fact the whole
time and dropped it on the way out.

Now it returns `(run_id, instance)` — the same pair `in_flight_solve_runs_in` already
returns, for the identical reason stated in that function's own doc: the caller has to
be able to NAME what it is talking about. The boot probe carries `instance` and
`needs_redispatch`.

WHAT THIS DELIBERATELY DOES NOT DO: re-dispatch. The probe says so out loud rather than
implying recovery happened. The instance goes back on the board through
`benchmark/dispatch` — the ONE adapter into kanban — never from here: this is the
SERVING daemon, and a serving daemon that posts work cards is exactly the parallel-runner
shape docs/architecture/BENCHMARKS-ARE-ADAPTERS-NOT-A-RUNNER.md forbids. Auto-re-post
belongs on the benchmark side, consuming this report. That is the next slice, and it is
now unblocked because the report finally carries the instance.

Test premise updated, not weakened: `a_run_still_marked_running_at_boot_is_journaled_as_killed`
now asserts the pair, and its comment names the regression it catches — a reap that
reports only an id. Green: 1 passed. `cargo check --tests` clean.

ALSO MEASURED, and the more interesting half — the 7 graded runs are NOT noise. Every
one of the six failures is f2p 0/N with p2p near-perfect (40/40, 39/40, 40/40, 6/6).
The citizens write patches that break nothing and fix nothing. Only sympy-24152 resolved
(#366). That is a capability signal, not a plumbing one, and it only became readable
once the infra losses were separated out.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(persona): stamp the cognition pulse at spawn — the writer its own doc promised and never had (#419/#412 family)

`cognition_pulse.rs` documents two writers — "called at spawn (grace window
covers the post-boot deaf period, #412) and at every service-loop turn start" —
and rests its `None`-is-not-earned posture on the first one: "spawn stamps
immediately, so live citizens are always stamped."

The spawn writer did not exist. Grep across the crate found exactly one caller of
`touch()`, at service_loop.rs:758 beside `persona.turn.start`. So a citizen who
had not yet taken her FIRST turn was indistinguishable from one silent for hours:
`idle_ms` → None, `renewal_earned(None, _)` → false, claim renewals denied from
birth.

Measured live before the fix: four hosted citizens, `idle_ms` = None on every one
(the 18446744073709551615 on `persona.claim.renewal_skipped_idle` is the probe's
`unwrap_or(u64::MAX)` sentinel, not a duration), and
`persona.claim.renewal_resumed` at ZERO rows ever — no citizen has earned a
renewal back since the gate landed. What surfaced it: one bench card claimed by
the same citizen three times in one evening — claim → never pulse → 30-min lease
lapses un-renewed → card returns to claimable → re-claim. Activity on the wire,
nothing produced.

The stamp goes after `prime()` succeeds, the instant the substrate's own
"hosted = ready" invariant holds. This does NOT reopen the lease-immortality
regression the pulse exists to prevent (2026-08-16): it buys exactly one
lease-length of grace — which is what #412's ~10-minute deaf window needs — after
which a citizen who still has not thought lapses normally.

The renewal GATE itself is untouched and correct. The defect was a missing
writer, not a wrong policy.

Guard: a source-level assertion that host.rs calls `cognition_pulse::touch`, with
comments stripped so this module's own prose can never again stand in for the
wiring (the #344 audit predicate). A semantic test cannot catch this class — the
renewal contract is fully satisfied by an unwired module, which is exactly how it
shipped. Positive control: pre-fix, host.rs contained no mention of
cognition_pulse at all, so the guard fails on the old tree.

NOT fixed here, and not claimed: turns are still not starting (#462). This
restores honest lease accounting for citizens who have not yet thought; it does
not make them think.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(solve): a running solve stamps the cognition pulse — stop lapsing a working citizen's claim under her own live run

Sibling of c91423a, and the half that actually explains the spin.

`cognition_pulse::touch` had ONE caller (service_loop turn start), plus spawn as
of c91423a. A detached `agent/solve` is NEITHER: it drives acts for hours and
produces no airc turn at all (#425). So the renewal gate — whose stated predicate
is "the substrate observes that she is WORKING" — read a citizen in the middle of
a real solve as silent, denied her renewals, and let the 30-minute lease lapse
UNDERNEATH the live run. The card returned to claimable and was re-claimed,
spawning a fresh run that started over at `acts: 0`.

MEASURED LIVE 2026-08-21, pallets__flask-4045: Atlas re-claimed card df9f4ad5
three times in one evening. `benchmark/runs` caught the newest one at
`age_secs: 8, acts: 0, files_changed: []` seconds after the third claim landed —
a brand-new run replacing work that had been in flight. All four hosted citizens
showed `renewal_skipped_idle` with `idle_ms` = None, and
`persona.claim.renewal_resumed` has ZERO rows in the ledger's entire history.

THIS SHARPENS c91423a's CAVEAT. That commit said the spawn stamp "does not make
them think," which framed the citizens as idle. On this card at least, the
opposite: she was working the whole time, on a path the pulse could not see.
Spawn grace alone would NOT have fixed it either — a multi-hour solve outlives a
30-minute lease no matter how it starts.

The stamp goes in the run-pulse tick that already exists for #371 law 2, and is
unconditional there ON PURPOSE: `select!` only reaches that arm while the drive
future is pending, so a tick firing proves the drive is live at that instant.
That is a strictly stronger witness than the act counter written just below it,
which legitimately reads 0 or None early in a run and would deny a renewal to a
citizen mid-first-act.

Identity comes from `persona_uuid`, already resolved at the top of `solve_body`
through the shared `id_resolve` primitive. `PersonaRef` is deliberately not
parsed to a Uuid here — its doc is explicit that "a reference is not an identity
until a roster says which one it is," and that rule is honored rather than
routed around.

The renewal gate's policy is untouched in both commits. It was never wrong; it
was blind on two of the three paths where a citizen works.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* revert(persona): remove the spawn cognition-pulse stamp — it re-added a deleted regression; fix the stale doc that caused it

Reverts c91423a entirely, and fixes the actual defect it should have been.

WHAT I GOT WRONG. `cognition_pulse.rs` documented two writers ("called at spawn
… and at every service-loop turn start") and justified its `None`-is-not-earned
posture with "spawn stamps immediately, so live citizens are always stamped."
Only one writer existed. I read that gap as missing wiring and added the stamp.

It is not missing wiring. It is a DELIBERATE DELETION, and the removal site says
so in full, at airc_runtime.rs:571-581 — the exact place a birth stamp would go:

    NO birth stamp — renewal is earned ONLY by cognition, never by booting. The
    grace stamp that used to sit here (one lease-length per spawn, meant to cover
    the post-boot deaf window #412) made convergence structurally impossible
    across restarts: every core restart re-armed 30 minutes of "earned" renewals,
    and the renewal loop below resurrected already-lapsed claims faster than the
    180s lapsed-claim sweeper could observe them — an entire overnight round
    (2026-08-16) sat "actively held" with zero turns because of it.

So c91423a reintroduced a known round-killer, and its "guard" was worse than
useless: it pinned the regression into CI as if it were the contract. Both gone.

THE REAL DEFECT, fixed here: the doc. It still described a writer that had been
removed, and a doc describing a deleted writer reads EXACTLY like missing wiring
— which is how it talked me into re-adding it. `touch` now states there is no
spawn stamp and why, and points at the removal site; `idle_ms` now states that
`None` is the EXPECTED reading for a booted-but-not-yet-thinking citizen and
that her holds lapsing within one TTL is designed, not broken.

WHAT THE LIVE RUN ACTUALLY SHOWED, and it was the tell I nearly explained away:
after deploying c91423a, all four resident citizens STILL reported
`idle_ms` = None. I had a fix that provably did not do what I claimed, and the
correct next question was "why", not "how do I make it fire".

KEPT: eb69061 (the solve run-pulse tick). It is a different thing and survives
the reasoning above — it stamps only while a drive future is actively pending,
which is work, not booting, and a restart kills the run rather than re-arming a
grace window. It is NOT yet live-verified; the honest status is unproven.

LESSON, and it is one already in my own guardrails:
[[read-the-code-you-intend-to-replace-before-designing-its-replacement]]. I
searched for my concept ("who calls touch") instead of the job's name ("what
decides renewal, and what did it used to do"). The answer was one screen above
the code I was reading.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(harness): one card, one live run — refuse a duplicate solve on re-claim (STOPGAP, named as one)

THE MEASUREMENT. `run_id` is deterministic per card (`claim-<uuid>`) and
`dispatch_staged_swe_solve` had no idempotence guard, so every re-claim of the same
card fired ANOTHER detached solve. Two runs then shared, simultaneously:

  - ONE LEDGER FILE — their pulse ticks overwrite each other, so `benchmark/runs`
    reports whichever wrote last. The `acts: 0` I read on Atlas's third flask-4045
    claim was very likely run B stomping run A's marker, not a fresh run.
  - ONE WORKSPACE — two sets of hands editing the same repo. A live candidate for
    the empty `files_changed` this box keeps producing.
  - ONE EXCLUSIVE WARM SLOT, which each asks to quiesce the other out of.

Observed 2026-08-21: Atlas re-claimed df9f4ad5 three times in one evening;
`benchmark/runs` caught the third at `age_secs: 8, acts: 0`.

A re-claim is LEGAL — airc permits claiming a lapsed card, and #331/#2286 both
depend on it. What is not legal is a second RUN. The claim is the citizen's intent;
the run is machinery, and machinery must be idempotent under a repeated intent.

WHAT THIS FIX ACTUALLY IS, and the commit says so rather than letting the code imply
otherwise: a doorman with a clipboard. A citizen re-affirming a claim is an ordinary
act — a student saying "this one's mine" a second time. Today the school seats a
SECOND her at a second desk with a copy of the same worksheet. This gate refuses at
the door. It stops the damage; it does not remove the incoherence.

THE INCOHERENCE, which is the defect underneath: TWO REGISTRIES FOR ONE FACT. The
board holds "this citizen holds this card" (enrollment); a JSON file holds "run
claim-<id> is running" (attendance). Two records of one truth, free to disagree, and
this gate is a clerk reconciling them on every claim. The structural answer is that
the ENROLLMENT IS THE SESSION — re-affirming a claim finds the work already under way
and continues it, because the fact lives in one place and there is nothing to
duplicate. That is #371 (round lifecycle as recipe-owned state) plus #49 (workspace
held for the life of the claim, so the worksheet is HERS rather than a directory two
runs can both open). Neither is built.

REUSE, NOT A PARALLEL PREDICATE: keyed on `in_flight_solve_runs`, the same
`state: "running"` reader the boot reaper uses, so the gate and the reaper can never
disagree about what "live" means. That also supplies the release valve for free — a
run whose core died is reaped to `state: "failed"` at next boot, so a dead run never
blocks its card forever. Refusal, not a kill: the live run continues untouched and
nothing touches the citizen's claim.

`run_id` is now built ONCE and shared by the gate and the dispatch params, so the
guard can never check a different id than the dispatch uses.

TEST: no new test — both halves the gate depends on were already pinned by
`a_run_still_marked_running_at_boot_is_journaled_as_killed` (in-flight detection, and
"after the reap nothing is in flight"). That second assertion is now load-bearing for
TWO consumers, so it says so: if a reap ever stopped clearing `state`, the failures
compose into every restart-killed card being permanently un-dispatchable while the
board looks busy forever.

NOT live-verified — needs a real re-claim against a live run to see the refusal probe.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): how an activity declares its judge — three tiers, and the adapter that has no consumer

Answers the question ROUND-LIFECYCLE-AS-RECIPE-OWNED-STATE-MACHINE leaves open. That doc
specifies the round's STATES and treats grading as one of them; it never says who judges
or how an activity declares it.

JOEL'S CONSTRAINT (2026-08-21), which kills two tempting designs: "Grading isn't part of
all recipes either. It's just benchmarks recipe" … "a lot of activities, especially since
we're learning, will have formulaic grading for score. It's just a lot of different ways
here and some rooms will be more open ended, take general chat for example."

So: `grader` does NOT belong on `ExperienceRecipe` — that stamps an exam concept onto
every chat room and drawing class forever. And not every judge is CODE: forcing a Rust
adapter to score a drawing exercise is "integrations adapt to us" violated in reverse.

THREE TIERS: none (chat — a forced score would be a lie), FORMULAIC (the common case for
learning; a scoring expression over facts the room already observes; pure recipe DATA),
and ADAPTER (`BenchmarkAdapter::grade`, for judgment that genuinely needs execution).

WHERE IT LIVES: `params`, not the base type. `benchmark.json` already declares `suite`
(the adapter-IN), `instances`, `team`, `budget` this way — typed, defaulted, invisible to
recipes that don't declare them (#433). The judge is another param of the same kind, so
the base type does not change and chat/profile/video-chat never grow a field to ignore.

THE AUDIT THAT MOTIVATED IT — `BenchmarkAdapter` exists, is correctly shaped
(dataset in, tasks normalized to EvalTask, grade out, backend-neutral TaskOutcome),
self-registers via `inventory` keyed by name — and has ZERO production consumers. Every
reference tree-wide is the definition site, `humaneval-rs` registering itself, or that
adapter's own test. The module header names `benchmark/dispatch` as its runner;
`commands/benchmark.rs` never references it. SWE grading goes through hardcoded
`swe_bench::grade`, bypassing the interface entirely.

Recorded with its confidence: no marker suggests deliberate removal (unlike the
`NO birth stamp` comment in airc_runtime.rs, which documents its own deletion), but that
is an inference from an ABSENT comment — flagged as likely, not certain. That distinction
is exactly what I got wrong once already this session.

BUILD ORDER: formulaic first (common, pure data, no adapter needed); then route the
adapter tier through the existing registry, DELETING the hardcoded SWE branch rather than
adding a field; grow `TaskOutcome` only when a real second modality forces it.

Design only — nothing built here.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(benchmark): benchmark/runs says MATCHED vs returned — a page must never read as the whole history

MY OWN BUG REPORT, and the fix is for the thing that produced it.

This morning I ran `benchmark/runs`, got 20 rows carrying 1 resolved instance, and
concluded (a) that was the system's entire history and (b) grades were being lost
between the grader and the board. BOTH WRONG, and I nearly shipped a "fix" for the
second one.

What is actually true: `scan_run_cards` already reads the `.grade.json` sibling, folds
it through `fold_run_card`, AND adds `scan_verdict_cards` (durable per-instance
verdicts, which emit their own rows) AND `scan_workspace_artifact_cards` for work no
grade has seen. The projection is correct and has been. The last line is
`cards.truncate(limit)` with `limit.unwrap_or(20)`, sorted newest-first — so what I
saw was a PAGE.

Reading the grade files directly: 94 grades across 37 distinct instances, and TWO
resolved — `sympy__sympy-24152` (the known #366 milestone) and `sympy__sympy-13480`,
which nobody knew about because its rows are older than the 20-row window. The real
rate is 2/37 = 5.4% on the graded set, not the 1-pass history the board implied.

So the defect is not lost grades. It is that a bounded page is INDISTINGUISHABLE from
the complete set on the exact command an operator uses to ask how the benchmark is
going. Silent truncation reads as "that's everything."

`debug/probes/query` already solved this and says so in its own summary ("how many
events MATCHED versus how many were returned, so a page is never mistaken for the
whole"). This adopts the same convention rather than inventing a second one:

  - `scan_run_cards` now returns `RunScan { cards, matched }`, counting BEFORE the
    truncate. A struct rather than a tuple so neither caller can silently drop the
    count — which is precisely how this fact went missing in the first place.
  - `benchmark/runs` reports `matched` plus a `summary` that says, in words, whether
    this is a page or the whole set, and names `--limit` as the way to see more.
  - the positron board takes `.cards` only, with a comment stating WHY: `BOARD_LIMIT`
    is a display bound for a fixed-height rail, not a claim about how many runs exist.
    If that rail ever grows a "+N more" affordance, `matched` is what it reads.

ts-rs binding regenerated (`export_bindings_benchmarkrunsresult` green) and committed
alongside, per the Rust↔TS rule — shipping the Rust without its generated TS is the
drift #457 exists to catch.

NOT live-verified yet — the running core predates this. Reboot + a real
`benchmark/runs` receipt is the proof, and it is next, not deferred.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): correct the judge design — ONE kind (adapters, list-valued, empty allowed), not three tiers

Joel, correcting the draft committed an hour ago:

> "Or just always adapter(s) with none as an option and maybe an ability to chain or
> interlink them. So formulaic or not, anything can plug in. Just build the ones you
> initially need is my motto."

MY VERSION WAS A FALSE TRICHOTOMY. I had proposed three tiers — none / formulaic /
adapter — as if they were different kinds of thing. They are not:

  - "none" is the EMPTY LIST, not a tier. Nothing special-cases it.
  - "formulaic" is an ADAPTER THAT EVALUATES A FORMULA — one implementation among many,
    written once, then named by any recipe that wants it.
  - several adapters COMPOSE, which is where #371's "gates multiply, objectives weigh"
    actually lives.

WHAT THE TRICHOTOMY WOULD HAVE COST: a scoring-expression DSL in the substrate, designed
up front, with no live consumer — because "formulaic grading declared as data" means
inventing a formula language. Joel's motto kills it before it starts. One interface, N
implementations, runtime selection by name is the polymorphism rule this codebase already
runs on (CLAUDE.md § POLYMORPHISM PATTERN), and it was sitting right there.

Also corrected: the judge param is a LIST defaulting to empty, so "no judge" costs zero
code rather than a third branch; and the acceptance test now names the chat room
explicitly — declaring no judge must be as ordinary as declaring one.

Chaining/interlinking is deliberately left OPEN. Sequential composition is obvious;
whether adapters feed each other, and how gate-vs-objective results combine, gets settled
by the first activity that needs it. Writing that down now would be the same speculative
mistake one layer up.

Build order rewritten around the motto: route the EXISTING adapter through the registry
first (a subtraction — delete the hardcoded `swe_bench::grade` branch), then write a
second adapter only when a second activity exists, then composition only when two are
genuinely named together.

Design only — still nothing built.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* chore: preserve the search-path quarantine + complete the avatar .glb symlinks

Three untracked things, all of which would have been lost on a clean checkout.

1. `.ignore` — REAL WORK, authored per Joel 2026-08-14 ("if you're finding code that
   misleads you we need to move it to legacy or somewhere out of path so you cant keep
   finding it") and never committed. It quarantines from the SEARCH path what #83/#318
   quarantined by directory: `legacy/` (2,865 .ts decoys whose SidebarWidget/MainWidget
   look exactly like the live UI and outnumber it ~20:1), `.claude/worktrees/` (6 full
   tree copies, so every find returned 7 answers), and `core/vendor/*/build/` (llama.cpp
   ships a whole web UI that answers index.html searches).

   Its own header records what it cost to learn: an agent spent an hour concluding the
   Continuum UI had been LOST — a fabricated regression reported as fact about an app
   that was running fine. "A decoy you can still grep is not quarantined." Losing this
   file means losing the fix AND the reason, and re-learning it the same expensive way.

2. FOUR MISSING AVATAR SYMLINKS — and this one is a latent BUG, not just hygiene.
   `models/avatars/` carries six `.glb -> .vrm` symlinks so a renderer that resolves by
   `.glb` finds the VRM. Only TWO were tracked (`vroid-darkness`, `vroid-male-base`).
   On any fresh clone, `vroid-female-base`, `vroid-sakurada`, `vroid-sample-e` and
   `vroid-shino` have no `.glb` at all — so 4 of 6 avatars fail a `.glb` lookup while 2
   succeed, which is exactly the kind of works-on-my-box asymmetry #291 (fresh-clone →
   running system) exists to stop. They are symlinks (15-21 bytes each, the length of
   the target filename), so this costs nothing.

3. `.gymtool/` → .gitignore. Ad-hoc agent probes (shot/rowcount/msgcount/nav-restore)
   plus a COMPILED `_check_bin`. Scratch instruments, regenerated on demand, and a
   committed binary is never right. Ignored rather than committed.

Found while auditing untracked files under an explicit "do NOT lose code" instruction.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(hygiene): justify the three unwraps this branch added (#2345 CI red)

Same guard that reddened #2344, same cause here: `the_unjustified_unwrap_count_never_rises`
at 2268 vs baseline 2267. Three new sites, all this branch's:

- `solve.rs` run-pulse stamp — `duration_since(UNIX_EPOCH)` errs only on a pre-1970
  clock. 0 then reads as "never pulsed", which DENIES a renewal. That is the
  conservative direction and the same state as no stamp at all; a wall clock behind
  the epoch must not hand out lease extensions.
- `benchmark.rs` page size — `limit` is an OPTIONAL param, so None means "caller
  didn't ask", not "unknown quantity". 20 is the documented default page. The count
  that must never be defaulted is `matched`, which comes from the scan and is
  reported separately.
- `positron_bench_source.rs` ×2 — scan error (progress dir absent on a fresh node)
  and JoinError both fold to the honest EMPTY board. The module header already states
  the rule: never a fabricated row. Panicking in the emitter would take the board down
  for every viewer instead.

Note for the next person hitting this guard: the comment must be on the SAME LINE as
the unwrap. A block comment above it does not register — that cost a round trip here.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Aug 23, 2026
… protections built for exactly them

The eval framed EVERY task as directed-speech (TurnFraming::directed()),
so workspace_deliverable was false even on tasks whose grade READS THE
WORKSPACE (dod_shell, solution_file, ui_checks). Three protections gate
on that flag and therefore never applied to the tasks they were built
for: the #390 discovery-saturation gate (would have interrupted the
MirrorCode discovery-only turn before it burned the budget with an empty
src/), the no-deliverable Speak nudge, and the new act-budget
proprioception (#2411) — which is why the stopwatch facts were absent
from the restage's working memory.

EvalTask::workspace_deliverable() is the one predicate (DoD shell /
solution file / UI checks = graded on artifacts, not speech); the task
drive and the empty-diff re-drive frame .on_workspace() from it.
agent/solve already had the equivalent Deliverable::Workspace switch —
eval was the one broken caller. Joel: 'this will fix all benchmarks AND
most importantly any activity projects in general' — the live room path
(held kanban work framed message()/self_thread() without claim-state)
is the named follow-up; it needs the claim plumbed to framing.

Validated: cognition::eval + act_observe + ratchets green (69 tests).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 23, 2026
…al turns framed on_workspace (#2412)

* fix(persona,eval,cli): kill the held_out probe storm, gate the hold before plan derivation, and give reboot eyes on eval runs

Three defects from the restage's own live fire (Joel: 'the reboot sure
as hell doesn't work well — you're still manually killing stuff'):

1. PROBE STORM: the serving daemon republishes its plan every tick and
   the hosting reconciler treats every republish as an edge, so during a
   roster hold the held_out probe wrote an identical pair of rows PER
   SECOND for the life of the hold (measured live 13:45-13:46, ~2 rows/s
   indefinitely). probe_held_out_once dedups per (agent, until_ms) — a
   renewed hold announces itself afresh; the SKIP stays per-pass.

2. CHURN: host_unattended derived a full spawn plan for held-out
   citizens every republish just to throw it away. The hold now gates
   the unattended list BY NAME before plan derivation — same filter,
   earlier, cheap early-return for the hold's whole life. (A plan-change
   gate in the reconciler loop was written and REVERTED: it would break
   #429's newborn-hosting under an unchanged plan.)

3. REBOOT GUARD BLIND SPOT: solve runs have had a file-backed in-flight
   guard since day one; cognition/eval runs had NO on-disk signal, so
   reboot killed a mid-task MirrorCode battery without ever asking. Each
   eval world now carries eval-run.json (runId + owning core pid,
   re-stamped on resume); in_flight_eval_runs() scans them and reboot
   refuses without --force when a pid-alive run stands. Marker lifetime
   is exactly world lifetime (Drop + orphan sweep) so no reap logic
   needed.

Validated: persona::host + cognition::eval + boundary_serialization +
ratchets green (34 tests).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(eval): DoD-graded tasks are workspace-deliverable turns — arm the protections built for exactly them

The eval framed EVERY task as directed-speech (TurnFraming::directed()),
so workspace_deliverable was false even on tasks whose grade READS THE
WORKSPACE (dod_shell, solution_file, ui_checks). Three protections gate
on that flag and therefore never applied to the tasks they were built
for: the #390 discovery-saturation gate (would have interrupted the
MirrorCode discovery-only turn before it burned the budget with an empty
src/), the no-deliverable Speak nudge, and the new act-budget
proprioception (#2411) — which is why the stopwatch facts were absent
from the restage's working memory.

EvalTask::workspace_deliverable() is the one predicate (DoD shell /
solution file / UI checks = graded on artifacts, not speech); the task
drive and the empty-diff re-drive frame .on_workspace() from it.
agent/solve already had the equivalent Deliverable::Workspace switch —
eval was the one broken caller. Joel: 'this will fix all benchmarks AND
most importantly any activity projects in general' — the live room path
(held kanban work framed message()/self_thread() without claim-state)
is the named follow-up; it needs the claim plumbed to framing.

Validated: cognition::eval + act_observe + ratchets green (69 tests).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 24, 2026
…udget fact at 4 acts out (#2428)

Measured twice on bib2json (greedy round AND lived-sampling round,
identical shape): at a 32-act budget the midpoint stopwatch and the
#390 discovery-saturation gate both land at act 16 — her first pacing
signal arrived in the same instant her acts were withheld, so a
spec-study opening could never convert. Zero writes, honest fail, both
times.

A structural fact at discovery_budget-4 (workspace turn, no mutation
yet) states the gate's real contract while she can still act on it:
'this turn withholds acts after N unless the workspace has been written
to.' Names no file, no fix, no tool — the same doctrine as every
budget fact; the gate itself is unchanged.

68 tests green, exit checked.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 27, 2026
…er holds a per-lane window floor; no-patch is not env-absent (#2520)

Measured minutes after the lease shipped: lanes=4 made the planner split
60942 context ~20k/slot against a 166k measured demand window; every solve
collapsed at act 3 on the #390 saturation gate with an empty diff, then the
mislabeled env-absent path re-fired it — a 5-minute churn loop on all lanes.
Four starved lanes are strictly worse than one working lane. Lease capped at
1 (the proven serial solve config) with the receipt in the comment; the real
fix — a per-lane window floor for solve-class demand in the planner's
lanes-vs-window trade — is the named follow-up. Also: 'no candidate patch'
now closes-skipped as reason=no_patch (card open, retake honest), never as an
env absence promising an env heal that isn't coming.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Aug 29, 2026
…4, lanes multiply only while each clears the solve regime window

The LANE_CAP=1 receipt (2026-08-27: 4 lanes sold the window to 20k/slot,
every solve starved at the #390 gate) named its own fix: a per-lane
window floor for solve-class demand. ServingDemand now carries
window_floor_tokens — set to the PINNED, published REGIME_WINDOW (40448)
by the benchmark lease while Working rounds exist, cleared after. The
planner's lane pick honors max(bootstrap, floor): lanes multiply only
while EVERY lane fits a real solve. Constant-while-set, so the lane
count cannot flap with p95 (the 718 law holds). Near-simultaneous
near-frontier minds, no starvation — the RTOS advantage nobody running
stock llama + python has.
joelteply added a commit that referenced this pull request Aug 30, 2026
…loor, sidecar yield, served-model provenance (#2570)

* probe(delib): entered/passed brackets around the pre-gate defer — two probes decide the recurring 25-min tick wedge

* fix(adapter): the hold backstop FAILS FAST instead of waiting — a permit-holding caller must never park (the two-defer race)

Glass-boxed: a background gen passed the pre-gate defer (no hold yet),
took the serving lane, a solve acquired the hold, and the adapter
backstop parked it WITH the lane — every solve tick starved at
lane_wait behind it. The backstop now refuses (typed error), the
caller's scope drops its permits, and the deliberation retry re-enters
through the pre-gate defer which waits holding NOTHING. Also places the
delib.defer.passed probe whose earlier insertion silently missed its
anchor (this one asserted).

* feat(serving): PARALLEL TO THE MAX under a pinned floor — LANE_CAP 1→4, lanes multiply only while each clears the solve regime window

The LANE_CAP=1 receipt (2026-08-27: 4 lanes sold the window to 20k/slot,
every solve starved at the #390 gate) named its own fix: a per-lane
window floor for solve-class demand. ServingDemand now carries
window_floor_tokens — set to the PINNED, published REGIME_WINDOW (40448)
by the benchmark lease while Working rounds exist, cleared after. The
planner's lane pick honors max(bootstrap, floor): lanes multiply only
while EVERY lane fits a real solve. Constant-while-set, so the lane
count cannot flap with p95 (the 718 law holds). Near-simultaneous
near-frontier minds, no starvation — the RTOS advantage nobody running
stock llama + python has.

* feat(serving): the eyes yield to the solves — vision sidecar drops while a solve floor stands, buying the second lane

Measured this hour: 84k x 1 lane afforded, 40448 x 2 refused by a few GB
— exactly the sidecar's ~9GB. Solve-regime work is text-only by
construction; the sidecar's Drop frees the RAM, the next plan fits two
real solve lanes, and sight respawns when the floor clears (like dreams,
sight belongs to the idle era during measured work).

* feat(bench): verdicts stamp the SERVED MODEL — cards carry no model, so cross-model claims were unpublishable without it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants