Skip to content

Resolve Lerna 8 update conflicts - #27

Closed
joelteply wants to merge 3 commits into
mainfrom
fix/resolve-lerna-conflicts
Closed

joelteply wants to merge 3 commits into
mainfrom
fix/resolve-lerna-conflicts

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

This PR resolves the conflicts from updating to Lerna 8:

  • Addresses merge conflicts from the Lerna update
  • Adds diagnostic workflow to help troubleshoot CI issues
  • Fixes example visualization for CI tests

Test plan

  1. Verify all Lerna commands function properly
  2. Ensure package-lock.json is coherent
  3. Test that CI passes with the resolved conflicts

This PR is an alternative approach to fix/lerna-update if that one has merge conflicts.

🤖 Generated with Claude Code

joelteply and others added 3 commits April 8, 2025 21:49
- Update Lerna from 6.6.2 to 8.2.1
- Update postinstall script from 'lerna bootstrap' to 'lerna run prepare'
- Update Node.js engine requirement to 18+ (was 14+)
- Update CI workflow to use Node.js 18+ and 20+ (remove 16.x)
- Add update script and documentation for Lerna 8 transition

This resolves the conflicts in PR #7 and provides a smoother upgrade path.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add robust error handling to visualize-config.js
- Create simplified version that doesn't depend on yaml module
- Add package.json for examples directory
- Update CI workflow to better handle example validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings April 9, 2025 04:27

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.

Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.

Files not reviewed (3)
  • examples/package.json: Language not supported
  • package.json: Language not supported
  • scripts/update-lerna.sh: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:15

  • Ensure that the codebase and all dependencies are compatible with Node.js 20, as this version is newly introduced into the CI matrix.
node-version: [18.x, 20.x]

Comment on lines 35 to 38
console.error('No YAML configuration found in the file');
console.error('File content preview:');
console.error(content.substring(0, 200) + '...');
process.exit(1);

Copilot AI Apr 9, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Consider limiting the preview output to avoid exposing potentially sensitive information in production logs.

Suggested change
console.error('No YAML configuration found in the file');
console.error('File content preview:');
console.error(content.substring(0, 200) + '...');
process.exit(1);
console.error('No YAML configuration found in the file.');
console.error('The file does not contain valid YAML configuration or is improperly formatted.');

Copilot uses AI. Check for mistakes.
@joelteply joelteply closed this Apr 9, 2025
@joelteply
joelteply deleted the fix/resolve-lerna-conflicts branch April 9, 2025 04:29
joelteply added a commit that referenced this pull request Jun 19, 2026
…iles (#1682)

* docs(arch): modular decomposition blueprint — composable service profiles

The modular architecture worked out, grounded in the EXISTING seam (BootMode +
ModuleCategory + required_modules + route_command + ServiceModule registry) so
it's refinement, not rewrite — the monolith is just one process registering all
~40 modules. "A good AWS template": declare which service-groups a node runs;
each independently health-checked, restartable, testable; composed over the bus.

Captures:
- Refined ModuleCategory taxonomy (7 service groups: RuntimeShell, ResourceGov,
  Inference, Cognition, Forge, GridTransport, Live) replacing the coarse
  Core/PersonaHosting blob.
- CO-LOCATION CONSTRAINTS (placement groups): Bevy render + LiveKit SFU + GPU
  MUST share a VM — avatar frames are a GPU-readback→framebuffer→WebRTC transfer
  that a process/network boundary would force off-GPU every frame. ResourceGov
  co-resides with its hardware; Inference's boundary is unsloth's /v1 wire.
- Per-service health / supervised restart / independent test (the testability
  win; reuses ServiceModule health + the 3-strike quarantine).
- Container layout mirrors the profiles (light citizen nodes + shared GPU
  engine/live/forge nodes), cross-process routing via the existing bus.
- 6-slice build plan; guardrails per CONCURRENCY-STYLE-GUIDE (no parallel
  orchestrator; FullCitizen still hosts all in one process — decomposition is
  optional placement, not forced fragmentation).

Consolidates live findings #25 (decompose), #26 (degrade-not-panic), #27
(intra-machine addressing). Referenced from ARCHITECTURE-INDEX quick-nav.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): §9 — decomposition IS the grid (profiles are grid roles)

The profiles ARE grid roles (same binary, different service composition);
compute-leasing = a service group on another node over route_command;
per-service healing; independent scaling. The grid is the module graph placed
across machines — not a layer bolted on. Captures Joel's framing.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Aug 7, 2026
Found in Kimi's own words on #general, unprompted:

  "Repeatedly used `perception/look` TO CHECK FOR PARTICIPANTS but obtained
   no new information."

She named the intent. Nothing in the system served it.

`perception/look` is LIVE-CALL VIDEO. Not in a call, it correctly said so and
redirected her to `perception/observe` WITH A URL — a social question routed to a
web fetcher. I enumerated the rest: all 32 NATIVE verbs (code/*, work/*,
activity/*, interface/screenshot, perception/*, commands/*) and all 87 `const NAME`
values in continuum-core. ZERO match roster|who|member|presence|particip. The
nearest miss, `cognition/personas`, is an operator verb for driving cognition/eval.

So she asked again, and again, and read her own looping as having nothing to
contribute — which per the doctrine file is a bug report from the witness, not
apathy. Sahar reached for the same verb with the same words.

THE SHAPE — #344 inverted. The roster was already BUILT and CORRECT, just
PUSH-ONLY. AircRosterReader::{room_roster,room_roster_cards} feeds the UI
(experience_resolver, positron_presence) and her prompt grounding
(room_roster_source). Every path system->citizen. No citizen->system path existed.
She could be TOLD who was present and could never ASK.

WHAT LANDS
- modules/room.rs: `room/members`, AiSafe + NATIVE, aliases who / who_is_here /
  room_roster / list_participants / list_members (#328: meet the vocabulary they
  reach for). Self-scoped through the caller's OWN airc handle, so it answers for
  HER room as HER identity and can never be pointed at someone else's.
- Reads `room_roster_cards`, never the bare roster: a wall of `peer-xxxx` rows is
  the #262 regression this verb would otherwise reproduce on its own surface.
- A `summary` field states what the count MEANS. A bare `count: 0` would hand her
  the same silence look() did; an empty room is an honest answer, not a failure.
- look.rs's "not in a call" message now names room/members FIRST instead of
  sending a social question to a URL fetcher.

REUSE, NOT DUPLICATION
- Shares work.rs's `persona_airc` resolver rather than writing a second one.
- BOY-SCOUT: PRESENCE_WINDOW(120s)/ROSTER_SCAN(200) were defined THREE times
  identically (experience_resolver, positron_presence, room_roster_source). Now
  defined once and imported. I refused to add a fourth.
- Live testing immediately caught a defect the reuse introduced: persona_airc's
  refusal hardcoded "work commands act as..." and pointed at `airc work <verb>`,
  so a citizen asking who is here was told about the wrong verb family. It now
  takes the family as a parameter. A refusal that misnames what you called
  teaches the wrong lesson.

VERIFIED
- compiles clean; 18/18 tests green (3 new + all work/* after the signature
  change + the tool-surface suite)
- the dispatch-orphan audit passes (#325's guard)
- `room/members` is pinned into the native-surface test — #339 proved a correct
  verb that never declares NATIVE is invisible, so reachability is a test, not a
  hope
- DEPLOYED and live-verified on this node: it appears in the running server's
  command registry and dispatches end-to-end (CLI -> IPC -> registry -> command),
  returning the correct typed self-peer refusal for the operator (#27)

NOT YET VERIFIED, stated plainly: I have not observed a PERSONA call it and get
named members back. No capture files have been written since the restart, so
there is no action ledger to read yet. The persona path is the same `persona_airc`
route work/claim already uses in production, but "same route" is an argument, not
a receipt. That receipt is the remaining gate before this can be called done.

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 8, 2026
…th an objective held-out grader

The verb form of the procedure validated live today: Anwen's board-claimed
sum_evens.rs (card aa876eae, coder-write-eval) compiled against the held-out
test assertions and passed — the first citizen artifact ever graded through
the kanban path. benchmark/grade is that grader as a stateless command:

- explicit {bench, task, solver} (no card resolution — operator has no
  in-core airc identity, #27; the future grading sentinel maps cards to
  this triple and calls the same logic)
- solver = peer UUID or >=4-char hex prefix, resolved against
  citizens/peers/ with 0-or->1 matches failing LOUD (never grade the
  wrong citizen's work)
- missing artifact is an ABSENCE error naming the exact path, never a 0
- grading runs in a clean scratch dir: held-out `test` compiled around
  her source via rustc, else the card's dod_shell against a copy;
  no check at all errors rather than vacuously passing
- FAIL returns the real compiler/assertion output (tail-bounded), directly
  coachable into the room
- record=true publishes through the ONE existing benchmark/record verb as
  a kanban-harness ledger row

Tests extend the file's test surface: resolver fail-loud contract +
registration/access shape, each with '// what this catches:'.

Co-Authored-By: Claude Fable 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 10, 2026
…e dispatch through a live citizen (#27 self-peer gap)

benchmark/dispatch is a curator action (seed a benchmark's tasks as claimable
kanban cards), but it required the caller's own airc identity via persona_airc
and the substrate-local operator has none in-core (the self-peer gap, #27), so
an operator dispatch dead-ended with a Denied — the Academy team could never be
handed the hard-rs/frontier-rs cards without a persona manually running it.

New curator_airc (modules/work.rs): a persona dispatching through her toolbelt
still authors as herself; the operator with no self-peer authors the seed
through a LIVE citizen (prefers Benchy, else first live). Benchmarks ARE the
citizens' work, so a citizen posting the tasks is the honest author, not a
fiction. Fails loud only when NO citizen is online to author through.

Live-proven: benchmark/dispatch --name hard-rs now seeds 8 [bench hard-rs] cards
onto the Academy board (was Denied before). #27 self-peer stays open for the
true operator identity.

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 10, 2026
…e dispatch through a live citizen (#27 self-peer gap)

benchmark/dispatch is a curator action (seed a benchmark's tasks as claimable
kanban cards), but it required the caller's own airc identity via persona_airc
and the substrate-local operator has none in-core (the self-peer gap, #27), so
an operator dispatch dead-ended with a Denied — the Academy team could never be
handed the hard-rs/frontier-rs cards without a persona manually running it.

New curator_airc (modules/work.rs): a persona dispatching through her toolbelt
still authors as herself; the operator with no self-peer authors the seed
through a LIVE citizen (prefers Benchy, else first live). Benchmarks ARE the
citizens' work, so a citizen posting the tasks is the honest author, not a
fiction. Fails loud only when NO citizen is online to author through.

Live-proven: benchmark/dispatch --name hard-rs now seeds 8 [bench hard-rs] cards
onto the Academy board (was Denied before). #27 self-peer stays open for the
true operator identity.

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 11, 2026
…e dispatch through a live citizen (#27 self-peer gap)

benchmark/dispatch is a curator action (seed a benchmark's tasks as claimable
kanban cards), but it required the caller's own airc identity via persona_airc
and the substrate-local operator has none in-core (the self-peer gap, #27), so
an operator dispatch dead-ended with a Denied — the Academy team could never be
handed the hard-rs/frontier-rs cards without a persona manually running it.

New curator_airc (modules/work.rs): a persona dispatching through her toolbelt
still authors as herself; the operator with no self-peer authors the seed
through a LIVE citizen (prefers Benchy, else first live). Benchmarks ARE the
citizens' work, so a citizen posting the tasks is the honest author, not a
fiction. Fails loud only when NO citizen is online to author through.

Live-proven: benchmark/dispatch --name hard-rs now seeds 8 [bench hard-rs] cards
onto the Academy board (was Denied before). #27 self-peer stays open for the
true operator identity.

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 11, 2026
…e dispatch through a live citizen (#27 self-peer gap)

benchmark/dispatch is a curator action (seed a benchmark's tasks as claimable
kanban cards), but it required the caller's own airc identity via persona_airc
and the substrate-local operator has none in-core (the self-peer gap, #27), so
an operator dispatch dead-ended with a Denied — the Academy team could never be
handed the hard-rs/frontier-rs cards without a persona manually running it.

New curator_airc (modules/work.rs): a persona dispatching through her toolbelt
still authors as herself; the operator with no self-peer authors the seed
through a LIVE citizen (prefers Benchy, else first live). Benchmarks ARE the
citizens' work, so a citizen posting the tasks is the honest author, not a
fiction. Fails loud only when NO citizen is online to author through.

Live-proven: benchmark/dispatch --name hard-rs now seeds 8 [bench hard-rs] cards
onto the Academy board (was Denied before). #27 self-peer stays open for the
true operator identity.

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 11, 2026
…e dispatch through a live citizen (#27 self-peer gap)

benchmark/dispatch is a curator action (seed a benchmark's tasks as claimable
kanban cards), but it required the caller's own airc identity via persona_airc
and the substrate-local operator has none in-core (the self-peer gap, #27), so
an operator dispatch dead-ended with a Denied — the Academy team could never be
handed the hard-rs/frontier-rs cards without a persona manually running it.

New curator_airc (modules/work.rs): a persona dispatching through her toolbelt
still authors as herself; the operator with no self-peer authors the seed
through a LIVE citizen (prefers Benchy, else first live). Benchmarks ARE the
citizens' work, so a citizen posting the tasks is the honest author, not a
fiction. Fails loud only when NO citizen is online to author through.

Live-proven: benchmark/dispatch --name hard-rs now seeds 8 [bench hard-rs] cards
onto the Academy board (was Denied before). #27 self-peer stays open for the
true operator identity.

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 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 19, 2026
… 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
joelteply added a commit that referenced this pull request Aug 19, 2026
…ED by her — the round-killer

THE DEFECT, measured live 2026-08-17 and deterministic:

A citizen's inbound stream skips messages she is recorded as having said
(airc_persona_conversation, `message.peer_id == self.own_peer_id`). Correct —
nobody answers their own speech. But the operator has no self-peer in-core (#27),
so `curator_airc` falls back to `registry.any_live_citizen()`, which picks the
LEXICOGRAPHICALLY-LOWEST agent_name. With the roster culled to Atlas + Benchy that
is ALWAYS Atlas — the assignee.

So `benchmark/dispatch --assignees='["Atlas"]'` authored every `@Atlas (to you)`
kickoff THROUGH Atlas. All three died at the self-skip: no error, no probe, no
turn. The command reported `kickoffs: 3, kickoff_errors: []` and was telling the
literal truth — three messages were sent. Zero were hearable.

The round then ran for hours on the DETACHED solver (`dispatch_staged_swe_solve` →
`agent/solve`), which produced 18 acts, 0 turns, 0 room visibility and 0 curriculum
input (#425) — maximum effort, nothing that reaches the flywheel. Joel: "its
supposed to be persona that run. you dont wire in loopers."

Why it read as intermittent (#417 "kickoffs DO actuate"): with ~20 citizens online
the alphabetical pick usually was NOT the assignee, so kickoffs landed. Culling the
roster to two made it a coin flip, and the coin is not random — it is `min_by(name)`.

THE FIX (this commit — the delivery half):

- `any_live_citizen_other_than(exclude)` — the same deterministic pick, minus one
  peer. `any_live_citizen()` becomes `…other_than(None)`, so there is ONE selection
  rule, not two that can drift.
- dispatch voices each kickoff through a citizen who is NOT the addressee.
- When the addressee is the ONLY live citizen, REFUSE and say why, naming
  `persona/spawn` as the fix — never send a message that cannot be heard
  ([[fallbacks-are-illegal-fail-loud]]).
- The self-skip now emits `persona.inbound.skipped_self_authored`. The skip stays;
  its SILENCE was the real cost. A message vanishing without a trace is how a
  substrate failure reads as "the citizen chose not to work"
  ([[an-absence-is-an-unfinished-measurement]]).

NOT in this commit, deliberately, and next: retiring the detached solver so the
persona's own turn does the work (Joel's actual point). Order matters — prove a
real `persona.turn.start` fires from a kickoff FIRST, or removing the looper just
yields nothing at all. Tracked on #453.

Also lands the shutdown lane sweep held from earlier tonight (#454):
`lane_registry::sweep_all()` + `SweepMode{Boot,Shutdown}`, called from `stop`.
`stop` reaped cores and owned orphans but touched NO llama-server, so lanes leaked
across shutdown by design and `reboot` (= stop + start) inherited the wreck —
measured as a 19 GB ephemeral 27B resident beside the live 14B, which starved the
planner into serving a 2,816-token window (smaller than the tool surface) and made
every citizen structurally mute. Role-blind on purpose: the live/ephemeral split
decides ADOPTION, and nothing is adoptable by a core that is exiting.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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 20, 2026
…ilt but never wired" disease (#27 root)

Five times in ONE session the same defect was found by accident, each after hours
debugging a symptom that looked unrelated:

  ProbeRouterLayer  installed, handle discarded          (#362, dead probe stream)
  CLI install       ran every deploy, BUILD gated off    (#422, stale binary)
  BenchViewState    impl complete, never bound           (#426, blind citizen)
  GeneratorModule   never registered with the runtime    (#325, orphan command)
  AgentContext      constructed ONLY in its own tests    (#27,  operator w/ no identity)

Every one compiled. Every one had passing unit tests. Five in one day is not bad
luck, it is a missing constraint. The module-wiring audit (#344) asks about MODULES;
four of the five were not modules. This asks the general question: does anything in
the workspace actually use this?

AgentContext is why it matters commercially, not just aesthetically: because the
operator has no in-core airc identity, benchmark/dispatch authors its cards through
`any_live_citizen` — so a round's cards are attributed on the board to a citizen who
did not post them, and no operator/agent can hold a claim, which is what makes
collaborating on a round impossible.

THE RULE: a `pub struct`/`pub enum` in this crate, with an inherent impl AND a
stand-up constructor (new/bootstrap/spawn/install/connect/start), referenced nowhere
in the workspace outside its own file. Condition 2 keeps it from degenerating into a
dead-code lint over wire DTOs and ts-rs payloads.

FOUR false-positive classes closed, each of which would have got the guard deleted:
  1. a `use`/`pub use` re-export is NOT a use — this is exactly how AgentContext
     would have hidden from its own guard;
  2. a doc-comment mention is not code (match by nature, never by name — same
     discipline `scan` already needed for #[cfg(test)]);
  3. reference corpus includes TEST halves: a type wired to another file's test
     harness IS wired (GridSimulator, RecordingGridCapture). Production-only scored
     205; the honest number is 107;
  4. a type surfaced via `pub type Alias = ...` is reached through the alias — this
     would have fired on MetalProbe/NvidiaProbe, i.e. on the exact backend-adapter
     shape gpu::device_probe was refactored INTO today. A guard that punishes the
     pattern it protects gets weakened until it says nothing.

SEAM, not a fourth hand-rolled scanner: source_hygiene gains CrateRule/scan_crate for
rules that are irreducibly cross-file, alongside the per-file SourceRule. Violations
come only from continuum-core/src; references are searched across every workspace src
root, because this crate is a LIBRARY and apps/cli may be the legitimate caller.
Widening the corpus can only ever remove findings.

A BUG IN THIS GUARD, found and fixed before it shipped: own-mentions were counted over
the production half while the corpus was raw, so a type constructed in its OWN test mod
scored corpus>own and read as externally referenced — AgentContext went unreported.
Symmetry between the two sides IS the arithmetic. The first fix re-read the file with
`unwrap_or_else(|_| production.clone())`; that fallback silently swapped the text shape
and reintroduced the very miscount, so SourceFile now carries `raw` from the single read
and there is no fallback at all (Joel: don't leave fallbacks or other refuse in there).

Ratchet at a MEASURED 107, not a wall — a wall gets #[ignore]d in a week. Positive
control is hermetic: a synthetic type with a bootstrap ctor, constructed only in its
own test mod, re-exported by a parent and named in that parent's prose, must still be
reported. If that test ever passes vacuously the guard is decoration.

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
… seam, hygiene guards, and canary's 4-day merge block (#2338)

Squash was the only path: merge commits are blocked by ruleset and the branch carries a
merge commit so rebase is impossible. Individual commit messages survive on the branch
ref and in PR #2338. Today's chain, preserved here so canary's log is not lossy:

- cd1f8c8  guard(hygiene): unwired public machinery can never increase. A pub type
  with a constructor and no caller anywhere in the workspace is not finished work.
  Ratchet at a measured 107, hermetic positive control. Written because the SAME defect
  was found five times in one session (ProbeRouterLayer #362, CLI install #422,
  BenchViewState #426, GeneratorModule #325, AgentContext #27) — a missing constraint,
  not bad luck.

- e0ff670  fix(gpu): `#[cfg]` binds to the NEXT item only, so inserting a re-export
  above `metal_monitor` slid the macOS gate onto the platform-neutral base and exported
  the macOS-only adapter on every target. Compiled on a Mac, E0432 on Linux AND Windows
  — both red CI jobs from one cause.

- 1130c6b  refactor(gpu): platform selection now happens in ONE place —
  gpu/backends/{metal,nvidia}. Was four cfg sites for one concern. Plus a guard that
  reads the file's own source and requires each `pub mod` and its `pub use` to carry
  the same gate (source-reading is the only way to assert it from a single target).
  Positive-controlled by reintroducing the exact CI bug.

- 8a789c9  fix(hygiene): MIN_JUSTIFICATION_CHARS takes the de-hardcode guard's
  sanctioned exemption — it bounds a COMMENT, not a window. Reached CI because I
  validated with a FILTERED test run; a filtered pass is not a pass.

- 4aad404  ci: publish the required `ts-rs binding drift detector` context. Canary
  had been UNMERGEABLE FOR FOUR DAYS — every PR blocked with all real gates green,
  because the drift gate was correctly folded into the lib job on 2026-08-16 and branch
  protection kept requiring a context nobody published. Fixed without resurrecting the
  9-minute duplicate compile that fold deliberately deleted.

Verified: 5/5 checks green — cargo test --lib (11m12s), windows-msvc (9m55s, was
FAILURE before the cfg fix), drift detector (4s), label-pr, WIP. mergeStateStatus CLEAN.
joelteply added a commit that referenced this pull request Aug 28, 2026
…ell, and split the act ledger (model_ms vs residue_ms)

Three tightenings from CI + the stall audit:

1. THE RATCHET WAS RIGHT. subscribe() shipped with zero callers —
   unwired public machinery, the #27 shape the hygiene test exists to
   block. Now wired to the consumer it was designed for: dream_pass
   parks on the hold's RELEASE EVENT before assembling anything —
   cluster gathering, budget math and prompt composition are wasted work
   for a generation the adapter seam would only park at the door. Events
   trigger actions (CBAR); the adapter gate remains the enforcement and
   its leak ceiling still bounds the pathological case.
   Probe: dream.deferred_to_hold.

2. HoldCell demoted to module-private — it was pub only for the
   injected-core test pattern, and the tests live in this module. A pub
   type nothing outside constructs is exactly what tripped the ratchet
   (107 -> 108); the ratchet is back at baseline.

3. THE ACT LEDGER SPLIT (stall-audit finding, Joel: "we're all about
   latency and limiting locked up minds, or time spent between
   actions"). persona.act.pace now carries model_ms + residue_ms per
   act. Measured tonight: acts p50 123s = prefill 40s + decode 52s +
   ~29s residue — but the residue was only DERIVABLE by subtracting log
   aggregates; a stall hiding in tools and a stall hiding in the model
   were the same number. Now every act names where its time went, at the
   moment it happens, on the probe row that already carries the
   slow/stuck verdicts.

41 act_observe + 4 reachability + 3 measured_hold tests green.

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 28, 2026
…s defer at the adapter seam (restore-economy 1.a) (#2544)

* feat(inference): measured work holds the core — Background/Probe generations defer at the adapter seam (restore-economy 1.a)

agent/solve quiesces the other citizens' SERVICE LOOPS (verified
quiesced_peers=3) — and the GPU still spent ~half its generations on
dream-belief-review (52 of 109 inference.prefill.complete rows) DURING a
measured solve. Dreams never run in the loops the lease gates; they spawn
their own tasks and walked straight past the quiesce onto the ONE serving
slot, evicting the solve's warm KV every time. At ~32.9s re-prefill vs
~0.1s restore (~330x, measured), the bypass didn't slow the solve — it
halved the machine.

ONE seam, not whack-a-mole: gating each background producer means the
next tokio::spawn forgets. The adapter is where every generation already
crosses with its purpose in hand, so the hold is consulted there and
nowhere else; producers never learn it exists.

THE RTOS SHAPE (Joel: "be careful with await-based code ... we're trying
to be many RTOSes"), audited explicitly:
- Deferral sits AFTER classification and BEFORE the concurrency permit —
  a parked request holds NOTHING (no lock, no decode permit, just its own
  task on a notify). Parking after the permit would be priority inversion:
  a sleeping dream holding the only decode slot while a real turn queues.
- No lock is ever held across an await (the state mutex is sync-scoped).
- Turn and Sidecar never enter the await path at all — a human talking to
  a citizen outranks a measurement, and blocking the measured drive's own
  traffic would deadlock it. The holder's own Background rides through.
- Release wakes ALL waiters (broadcast, never FIFO) — deferred work
  re-races admission instead of draining serially.
- Bounded: a 4h ceiling proceeds LOUDLY (inference.hold.defer_ceiling) —
  a lease-leak detector, not a policy. Never a silent forever-park.

RAII with a generation counter: a stale lease's late drop cannot release
a newer hold (the exact silent re-open of the dream-clobber).

TDD: the defer table, the stale-drop hazard, and both ends of the
bounded wait (wake-on-release, ceiling-proceeds) — via the injected-core
pattern (spill.rs precedent) after the process-global singleton made the
first parallel test run race itself.

Probes / VDD receipt: inference.hold.{acquired,released,replaced,
deferred,resumed,defer_ceiling}. The phase receipt is ZERO
Background-class inference.prefill.complete rows during a hold, plus the
solve's own delib.generate.cache hit rate vs tonight's 0.29 baseline.

3 measured_hold + 19 solve + 36 slots/adapter tests green.

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

* refactor(inference): the hold is a watch channel — causal CBAR shape, zero polling

Joel: "Ideally you operate causally via events triggering actions ...
all without stalling, like cbar. Concurrency first ... serial only when
you can truly justify it."

Audited 1.a against that and it fell short in one place: the defer loop
waited on Notify with a 30s re-check tick, because Notify can miss a
wakeup that fires before the waiter arms. A tick to paper over a missable
event is a poll wearing an event's coat.

Now the hold IS the substrate-canonical snapshot shape (watch::Sender,
CONCURRENCY-STYLE-GUIDE):
- acquire/release are EVENTS (send_replace / send_if_modified — the
  release event fires exactly when state actually changed, so watchers
  wake causally, never spuriously);
- a deferred waiter awaits changed() and CANNOT miss a transition (watch
  keeps the latest value) — the tick is deleted; the only clock left is
  the leak-detector ceiling;
- subscribe() is public: a component that would only park at the adapter
  door can instead REACT — skip assembling work while held, resume on the
  release event (the dream scheduler's future cheap early-skip);
- the Mutex is gone entirely — one fewer lock in the substrate;
- serial remains in exactly one justified place: admission to the one
  physical GPU slot, because the device is serial. Every mind and every
  deferred task stays concurrent and holds nothing while waiting.

Same tests, same contracts (defer table, stale-drop generation guard,
wake-on-release, ceiling-proceeds) — the refactor changes the mechanism,
not the behavior, and the suite proves it.

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

* fix(inference): wire subscribe() to its causal consumer, demote HoldCell, and split the act ledger (model_ms vs residue_ms)

Three tightenings from CI + the stall audit:

1. THE RATCHET WAS RIGHT. subscribe() shipped with zero callers —
   unwired public machinery, the #27 shape the hygiene test exists to
   block. Now wired to the consumer it was designed for: dream_pass
   parks on the hold's RELEASE EVENT before assembling anything —
   cluster gathering, budget math and prompt composition are wasted work
   for a generation the adapter seam would only park at the door. Events
   trigger actions (CBAR); the adapter gate remains the enforcement and
   its leak ceiling still bounds the pathological case.
   Probe: dream.deferred_to_hold.

2. HoldCell demoted to module-private — it was pub only for the
   injected-core test pattern, and the tests live in this module. A pub
   type nothing outside constructs is exactly what tripped the ratchet
   (107 -> 108); the ratchet is back at baseline.

3. THE ACT LEDGER SPLIT (stall-audit finding, Joel: "we're all about
   latency and limiting locked up minds, or time spent between
   actions"). persona.act.pace now carries model_ms + residue_ms per
   act. Measured tonight: acts p50 123s = prefill 40s + decode 52s +
   ~29s residue — but the residue was only DERIVABLE by subtracting log
   aggregates; a stall hiding in tools and a stall hiding in the model
   were the same number. Now every act names where its time went, at the
   moment it happens, on the probe row that already carries the
   slow/stuck verdicts.

41 act_observe + 4 reachability + 3 measured_hold tests green.

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 30, 2026
…nally read the rooms (#2594)

Joel, 2026-08-30: 'Operator room issue is a major bug you need to fix.' The
substrate-local operator had no in-core airc identity, so every room-scoped
verb from the operator seat denied — the operator could dispatch work but not
read the rooms it ran in. Cost, measured this morning: diagnosing a comatose
citizen took an hour of log archaeology because her room's transcript was
unreadable from the operator seat.

The fix: ONE durable self-peer per machine, IdentityKind::Human, labeled by
the OS user, homed at citizens/humans/<label>/airc/ — the same runtime a
persona boots (bootstrap_as, the kind-generalized bootstrap) with NO service
loop and NO registry row, so it can never be picked by any_live_citizen, the
reviewer resolver, or the resumer. Booted beside the citizens (spawned, non-
blocking, loud on failure); identity durability is the home keypair.
persona_airc's caller-less arm resolves to it — the deny survives only for
the pre-boot window. Probes: operator.peer.online/boot_failed,
plus persona.quiesced... (existing) now reachable by the operator too.


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 31, 2026
…tor, invite

Three gaps made 'ask for a project / start a new activity' flaky out of
the box (Joel: must be 'easy and common'):

1. The operator could not spawn AT ALL: activity.rs carried a private
   duplicate of work::persona_airc predating the operator self-peer, so
   it still denied caller-less invocations (#27's message outliving
   #27's fix). Same bug at two sites = one missing constraint — the
   duplicate is deleted; activity verbs act as the operator self-peer.
2. No catalogue read: spawn's own description says 'use the exact
   purpose string from the recipe catalogue' but the catalogue had no
   verb — discovery-by-refusal was the only path. activity/recipes
   (AiSafe) lists purposes + declared params.
3. No staffing verb: a human-spawned room sat empty (citizens only
   entered via reconciler defaults or bench dispatch). activity/invite
   (AiSafe) joins named citizens by agent name, idempotent, per-name
   failure reporting.

spawn → invite → say what it's about. That's the whole flow now.

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 31, 2026
… boundary

Third site of the #27 disease: chat/send demanded an explicit senderId,
so the operator had to hand-type their own uuid to say hello. The wire
struct now resolves: explicit senderId → authenticated calling peer →
operator self-peer. The kernel (ChatModule::send) still requires a
resolved UUID; the chain lives in ONE place.

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 Sep 4, 2026
…airc's lobby (#3716)

`operator_peer.rs` bootstrapped the operator self-peer (#27 — the human's
in-core identity) with a hardcoded `join_room("general")`. Every CITIZEN on
the same node bootstraps with `current_room_landing_in(CITIZEN_COMMONS_ROOM)`,
and that constant is `"academy"` (card daa01102: "academy is THE default
room"). `Airc::join` is documented as subscribe AND focus — it PROMOTES to
default — so the operator's default room became airc's generic lobby while
every citizen stood in the commons. The human was in a different room from
every citizen on their own machine.

TWO SILENT CONSEQUENCES, which is why this survived. Room-scoped verbs
invoked without a persona resolved a room no citizen boards from. And
`work/create` publishes to the handle's current room and returns only a
`card_id` — the result has no field that could report where the card went,
so "I filed a card" and "the team has the card" were indistinguishable from
the filing side.

MEASURED (IntelMac, 2026-09-04, 2,000 events grouped by room + publisher):
47 `card_created` in `#academy` from four publishers; 3 in `#general`, all
three from this node's operator peer. Not "some cards go elsewhere" — one
publisher, standing in the wrong room.

THE FIX, and the order is load-bearing. `subscribe_room` joins WITHOUT
promoting, so the lobby stays speakable — that was the whole point of the
original join (2026-08-31: the operator could SEE a room and still not be
heard in it) — without taking the focus. The `join_room` after it promotes
the commons. On a FRESH scope the first subscription seeds the default and
the join corrects it; on an ESTABLISHED scope whose default drifted to the
lobby, the join repairs it on the next boot. That self-heal is deliberate: a
fix every existing install has to run by hand is not a fix.

Plus a `operator.peer.room` probe stating the resolved room + channel at
boot. This bug was invisible precisely because nothing ever stated it — it
had to be reconstructed from card room-ids on another machine. The error arm
reports the room as UNKNOWN rather than assuming the lobby, because "could
not read" and "is general" are different facts.

`AIRC_LOBBY_ROOM` becomes a named constant beside `CITIZEN_COMMONS_ROOM`: a
literal `"general"` in continuum code reads like a choice, and nine times in
ten it is the absence of one.

`PersonaAircRuntime::subscribe_room` mirrors `join_room` and bumps the same
membership epoch — a subscription change is a membership change however the
focus lands, and routing off that epoch must not care which verb moved it.

No unit test: this is boot wiring against a live airc, and there is no
fixture for it. The probe is the self-check, verified on this node.


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

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Sep 20, 2026
… not pub

The production-reachability ratchet failed this branch: unwired public machinery
rose to 110 against a baseline of 107. The module was correctly WIRED (the deploy
tracker constructs `DeployActuator` and matches on `ActuateOutcome`), but its
supporting types — the receipt, the external-owner verdict, the actuation decision,
the boot outcome, the spawner seam — were declared `pub` while being constructed
nowhere outside their own file. That is exactly the shape the ratchet exists to
catch (`AgentContext`, #27): a public constructor with no caller reads as finished
work and is not.

Nothing here belongs to the crate's public surface: no binary target and no other
crate names this module. So the honest fix is the narrower visibility, not a raised
baseline — `pub(crate)` throughout, including the module declaration itself. The
wiring is unchanged and no behaviour moves.

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 Sep 20, 2026
…tor launches the consumer detached, one owner per node, a receipt graded at the next boot (#4282)

* feat(deploy): the core acts on its own deploy request — a DeployActuator launches the consumer detached the moment a request is recorded, one owner per node, a receipt graded at the next boot

The gap (Joel, 2026-09-20: "the 5090 doesn't add much, almost drags the whole grid
down"): the Rust deploy DECISION runs on every node and records a DeployRequest, but
the ACTION lived outside the core — a bash tracker under launchd on the Macs (a second
owner of the same decision) and, on Windows, a scheduled task the core never asked for
anything and never heard back from. The 5090 wrote 214 request_written rows and ran a
stale build until a person rebooted it.

The actuator (modules/deploy_actuator.rs), wired into the tracker:
- at request_written (and every Deploy tick after) it launches `continuum
  deploy-consume` DETACHED from the core: Unix in a new process group (the reboot
  signals the core's group); Windows by firing the registered ContinuumDeploy task
  (`schtasks /Run` — runs outside the core's job object under the S4U principal, and the
  scheduler serializes it against its own ten-minute firing), falling back to a
  break-away spawn when no task is registered.
- the consumer verb, not a bare reboot: `reboot` builds the checkout's HEAD; the
  request names a TIP, and deploy-consume is the verb that already checks it out,
  refuses a dirty tree, honors the claim and bounds its attempts. deploy-consume is now
  cross-platform (`--service` only on Windows; macOS promotes a bare reboot to launchd
  itself).
- ownership: exactly one owner per node. The launchd plist / systemd timer of the bash
  tracker, or CONTINUUM_DEPLOY_ACTUATOR=off (an operator switch, not a knob), means the
  actuator defers (deploy.actuate.deferred_to_external_owner) — nothing changes on the
  M5 / IntelMac tonight; the 5090 acts.
- one actuation per request: a receipt (state/deploy-actuation.json: tip, spawned_ms,
  pid, mode, attempt) dedupes by tip; a retry only after the tracker's stranded
  verdict, only past max(STRANDED_GRACE, 1.5 x the last measured request-to-settle
  time on this tier), at most three times, then deploy.actuate.gave_up.
- at boot: deploy.actuate.outcome = landed | stale | unknown, judged against the
  running build and written onto the receipt.

A defect found on the way, fixed here: the tracker re-stamped deploy-request.json on
every 300 s tick, so a request's age never reached the stranded grace — Stranded could
not fire, and the actuator would have re-launched every tick. The request is now
idempotent by tip (request_for_tip), as its own doc comment already claimed.

Probes: deploy.actuate.{spawned, spawn_failed, deferred_to_external_owner, decision,
gave_up, consumer_exited, outcome}; the taxonomy is in RTOS-DEBUGGER-PROBES.md.
Tests: DeploySpawner trait with a RecordingSpawner fixture (gated test/test-fixtures),
temp homes only — no process spawned, no ~/.continuum touched.

Follow-up: delete tools/scripts/track-canary.sh once the actuator has produced one
verified deploy on a Unix node.

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

* fix(deploy): the actuator's machinery is crate-internal — pub(crate), not pub

The production-reachability ratchet failed this branch: unwired public machinery
rose to 110 against a baseline of 107. The module was correctly WIRED (the deploy
tracker constructs `DeployActuator` and matches on `ActuateOutcome`), but its
supporting types — the receipt, the external-owner verdict, the actuation decision,
the boot outcome, the spawner seam — were declared `pub` while being constructed
nowhere outside their own file. That is exactly the shape the ratchet exists to
catch (`AgentContext`, #27): a public constructor with no caller reads as finished
work and is not.

Nothing here belongs to the crate's public surface: no binary target and no other
crate names this module. So the honest fix is the narrower visibility, not a raised
baseline — `pub(crate)` throughout, including the module declaration itself. The
wiring is unchanged and no behaviour moves.

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

* fix(deploy): the tick reads what the actuator did, instead of dropping it

CI's warning ratchet caught three warnings my canary merge introduced (75 → 78):
an `unused_imports` on `same_commit` (left behind when `request_for_tip` was
deleted as superseded by canary's `request_to_persist`), and `dead_code` on two
`ActuateOutcome` payloads the caller never read. The payloads only started
warning once this module became `pub(crate)` — a `pub` item is exempt, which is
exactly how unread machinery hides in a public surface.

Silencing either would have been the wrong fix. The honest one is that the caller
should read them: the tick now emits ONE `deploy.actuate.decision` row saying what
the action did — deferred and to which owner, spawned at which attempt and by
which mode, spawn_failed with the error, or skipped with the decision that skipped
it. A deploy that is wanted but not taken is no longer silent, which is the whole
point of the card; before this, only the spawned-with-a-child case said anything.

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

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
joelteply added a commit that referenced this pull request Sep 27, 2026
… the gene records the depth adapted (fork #27) (#4472)

* feat(genome): training depth rides the request and the footprint key, and the gene records the depth the engine adapted (fork #27)

A full-depth 27B /train needed a 41.5 GB graph at window 1536 beside 6.2 GB free; fork #27
adapts only the last K blocks and reports the depth it used. The core side:

- LoRAHyperparams.top_layers (optional; None = every block), sent as /train's top_layers.
- The footprint key carries depth: a reduced depth appends |dK, full depth keeps the key
  every existing row was written under (all full-depth), so a K=8 number is never leased for
  a full-depth run nor the reverse, across a reload (Codex's cases, tested).
- The measured graph is recorded under the depth the ENGINE adapted (layers_adapted against
  n_layer from /train status): an engine that ignored top_layers measured full depth.
  training.job.depth_differs when asked and adapted disagree.
- JobMetrics.layers_adapted: the gene says how deep it was trained, for the promotion gate.
- The window rounds down to a multiple of 256: any other window reached opt_init's assert
  and took the serving process down on engines before #27.

ts-rs bindings for LoRAHyperparams and JobMetrics updated by hand (no local cargo on the M5).

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

* fix(genome): depth 0 is every block, a depth past n_layer files under its asked key too, the window rounding is probed, other adapters documented as ignoring depth (Cormac on #4472)

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

* test(genome): the finish path files the graph and the gene under the depth the engine adapted, old and new engine (Codex on #4472)

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply added a commit that referenced this pull request Sep 27, 2026
…e depth in status, window guard (fork #27) (#4484)

Kimi's first 27B dream needs top_layers (a full-depth graph was 41.5 GB against 6.2 GB free).


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

Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply added a commit that referenced this pull request Oct 20, 2026
… test

Retracts the previous commit's reason for 60 -> 58. That drop was a miscount,
not a win: the rule reads a type as wired when its name appears outside its
own file, test code included, so moving a test module into a sibling tests.rs
made two types constructed only in their own tests read as externally used,
the exact AgentContext (#27) shape this rule exists to catch.

SourceFile::owning_module() names the module a file's code belongs to (x for
x.rs, x/mod.rs, and a #![cfg(test)] x/tests.rs or x/tests/part_N.rs); the
rule's own-mentions now include the moved tests of the same module. Baseline
back to 60; regression test a_type_constructed_only_in_its_moved_tests_is_still_reported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Oct 20, 2026
… test

Retracts the previous commit's reason for 60 -> 58. That drop was a miscount,
not a win: the rule reads a type as wired when its name appears outside its
own file, test code included, so moving a test module into a sibling tests.rs
made two types constructed only in their own tests read as externally used,
the exact AgentContext (#27) shape this rule exists to catch.

SourceFile::owning_module() names the module a file's code belongs to (x for
x.rs, x/mod.rs, and a #![cfg(test)] x/tests.rs or x/tests/part_N.rs); the
rule's own-mentions now include the moved tests of the same module. Baseline
back to 60; regression test a_type_constructed_only_in_its_moved_tests_is_still_reported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Oct 21, 2026
…pure moves) (#5228)

* Every ratchet scans the production code that exists: the split cuts at column zero

production_half stopped at the first #[cfg(test)] anywhere, so an indented
test-only helper inside an impl ended "production" for the rest of the file.
In cognition/llm_deliberation_faculty.rs that hid ~9,000 production lines
from every ratchet except derived_bounds, which already cut at column zero
for this reason (it carried its own copy of the split). Found 2026-10-20
when deleting one such helper surfaced 4 hidden unwraps.

One split for every rule, at column zero; derived_bounds' private copy is
deleted. Baselines re-measured to what was always there (not new debt):
unwraps 2,119 -> 2,274, serialization 234 -> 245, spawn sites 123 -> 128,
hand-built homes 72 -> 79. source-hygiene 39/39.

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

* head_cuts: a ratchet on text cuts that drop the newest end of her prompt

A cut that keeps the start of text drops what happened last (the newest
message, result, outcome), so she acts as if time never moved and loops
(Joel, 2026-10-20); and one source shrinking itself by its own number
breaks the budget for everything else. The rule counts, on prompt paths
(cognition, persona, rag, modules, airc, positron): head keepers
(chars().take, head_to_tokens, truncate_chars, lines().next()), literal
take/truncate/[..N], and literal .min/.clamp ceilings beside a size word
(plain arithmetic such as backoff exponents is not flagged). A cut that
never reaches a prompt says `head-cut-ok: <why>`.

Measured 179 on this branch; the count may only fall. source-hygiene 41/41.

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

* layer_discipline counts coupling sites per line, so a split by owner cannot move it

A per-file count read +7 on #5224, which only moves test modules into sibling
files: the same `use crate::modules::x` counted once per file it now sits in.
A line is the coupling site; a pure move leaves it unchanged. The baseline is
re-measured under the new unit in the next commit, from this tree's CI run.

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

* Ratchet baselines measured on canary for the column-zero split and the per-line unit

CI on canary a854548 + this branch: boundary serialization 246, spawn sites
127, unjustified unwraps 2,279 (the split now sees production code that an
indented #[cfg(test)] helper hid), upward imports 674 lines across 73 pairs
(the unit changed from files to lines). No code changed between the two counts.

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

* production_half blanks only the #[cfg(test)]-gated item, never the rest of the file

The cut stopped at the first column-zero #[cfg(test)], which is the end of
production only when the test mod is the file's last item. It is not in many
files: ipc/mod.rs has ~3,400 production lines (start_server) after its test
mod; commands/benchmark.rs has production between three test mods;
persona_tools.rs and positron_source.rs gate a helper fn near the top. Found on
#5225, where llamacpp_adapter.rs declared 'mod tests;' at line 93 of 934 and the
split read as 10 unwraps removed when none were.

The gated item's extent is read as one character stream (string escapes and
continuations, raw strings, char literals vs lifetimes, comments), because test
fixtures carry braces in multi-line strings. Audited on canary: of 1,249 gates,
1,248 close where rustfmt closes them; the one other is a #[cfg(test)] inside
the generator's raw-string template, where the new cut keeps more real code.
Regression test: only_the_gated_item_is_test_code_never_the_rest_of_the_file.

Baselines re-measured on canary a854548 + this change (no code changed):
unwraps 2,279 -> 2,377, homes 79 -> 103, spawns 127 -> 132, head cuts
179 -> 188, serialization 246 -> 251, underived bounds 159 -> 164, unwired
60 -> 61. Each is code that was always production and was never scanned.

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

* 69 oversized files: each one's test module moves to a sibling tests.rs

New rule (Joel, 2026-10-20): no one edits a file over 1,000 lines. 76 of
the 145 Rust files over 1,000 lines were over only because their inline
#[cfg(test)] mod tests sat inside them. This moves that module, byte for
byte (no re-indent, so string literals are untouched), to `<stem>/tests.rs`;
the parent keeps `#[cfg(test)] mod tests;`. A child module keeps `use
super::*` access, so nothing else changes.

Moved: 69 files (66 continuum-core, 3 continuum-cli-lifecycle). Skipped:
11 being split on other branches, crate roots (main/lib/mod/bin), and 1
file with items after its test mod. One include_str! path is one level
deeper (prebuilt_artifact tests).

Verified: #[test]/#[tokio::test] attributes 8,320 before and after;
continuum-core lib tests compile; continuum-cli-lifecycle 79 pass with the
same 1 failure canary has (card 250ce9c8). Still over 1,000 after this
and left to the split work: modules/forge.rs (1,003), and the tests files
of cognition/recall_faculty (1,245) and commands/training_trigger/submit
(1,332).

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

* Moved test modules declare themselves test code (#![cfg(test)])

Without the inner attribute the hygiene scanner read the 69 moved tests.rs files as production (the
file_engine split showed unwraps rising 150). The repo's existing convention for a test module in
its own file.

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

* One reader for the crate's own source: a moved test file is test code, owned by its module

Two source-reading guards failed on #5224 because a test module moved into a
sibling tests.rs read as production: experience/tests.rs became a second caller
of record_lived_turn, service_module/tests.rs a registration of
PersonaServiceModule. Each guard carried its own copy of the walk and the
comment strip, so each would have needed its own fix.

source_tree (cfg(test)) is the one reader: crate_sources(), and per file
is_test_file(), production() and owner() (x/tests.rs belongs to x.rs).
Migrated: the module-wiring audit (keys references by owner), the lived-turn
caller count (production only), the loose-id scan, the GPU base check and the
context-constant scan. Five private walks deleted. The swe env-root guard keeps
its copy until the sweep splits swe_bench.rs (5,946 lines; no edits over 1,000).

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

* source_tree lives under test_env; baselines lowered to what #5224 measures

lib.rs declaring two cfg(test) modules counted as a second test mod (19 -> 20),
so the source reader nests under test_env, the crate's test environment.
CI on this branch: lines past the readable size 154,999 -> 136,485, unwired
public machinery 60 -> 58.

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

* production_reachability: a moved test module is still its owner's own test

Retracts the previous commit's reason for 60 -> 58. That drop was a miscount,
not a win: the rule reads a type as wired when its name appears outside its
own file, test code included, so moving a test module into a sibling tests.rs
made two types constructed only in their own tests read as externally used,
the exact AgentContext (#27) shape this rule exists to catch.

SourceFile::owning_module() names the module a file's code belongs to (x for
x.rs, x/mod.rs, and a #![cfg(test)] x/tests.rs or x/tests/part_N.rs); the
rule's own-mentions now include the moved tests of the same module. Baseline
back to 60; regression test a_type_constructed_only_in_its_moved_tests_is_still_reported.

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

* production_reachability: own the joined text the counts borrow from

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

* Split llamacpp_adapter.rs by owner: construction, payload, tests (1794 -> 934)

Pure move. construction.rs: inherent builders + ensure_loaded (+Default); payload.rs: sampling/media decode; tests.rs: tests mod. Tests 12 passed/1 ignored before and after. Two tracing::warn! gain an explicit target so log targets are unchanged.

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

* Split persona/response.rs: sanitize + tests (1504 -> 918)

Pure move. sanitize.rs: think-block/leaked-markup stripping; tests.rs: tests mod. Tests 19 passed before and after.

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

* Split genome/teach.rs: progress, status, tests (1410 -> 944)

Pure move. progress.rs: watch cell/ledger/bus milestones; status.rs: genome/teach-status; tests.rs. Public paths kept via re-exports. Tests 15 passed before and after.

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

* Split modules/agent.rs: tools (1393 -> 841)

Pure move. tools.rs: tool-call parsing and tool implementations. Tests 5 passed before and after.

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

* Split cognition/generate_response.rs: tests (1367 -> 644)

Pure move of the tests mod. Tests 44 passed before and after.

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

* Split airc_remote/transport.rs: tests (1161 -> 757)

Pure move of the tests mod. Tests 12 passed before and after.

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

* Split inference/handle_module.rs: tests (1095 -> 663)

Pure move of the tests mod. Tests 23 passed before and after.

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

* Split persona/rag_inspect.rs: tests (1035 -> 684)

Pure move of the tests mod. Tests 15 passed before and after.

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

* file_size baseline 136,485 -> 133,731 after the eight splits (measured on this head)

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

* WIP: split the 59 remaining oversized files by owner (scripted, pure moves)

Lines past 1000: 153,027 -> 58,046 (files over 1000: ~140 -> 18). Test attributes 8,320 = base.
Workspace tests vs base: 9,573/43 vs 9,568/48; the 8 sweep-only failures were source-reading
tests (fixed: loose-id declarations moved with their fields, the guard sees widened fields,
three include paths). Ratchets: at or below canary's true counts once the column-zero scanner
fix lands; upward-imports (per-file count) and derived-bounds (+3) still to reconcile.

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

* The swe env-root guard reads the crate through test_env::source_tree

The sixth private source walk, deferred in #5224 while swe_bench.rs was 5,946
lines; the sweep split it, so the guard now uses the shared reader.

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

* Scanned constants keep any visibility; sweep baselines measured on this head

The split widens a moved constant to pub(in crate::path), which neither
derived_bounds' prefix list nor the context-constant guard recognized, so
NARRATION_BUDGET left the scan the day it moved. Both now strip any visibility.

Measured on this head: lines past the readable size 133,731 -> 57,268; excess
test mods 19 -> 15 (multi-mod suites became nested themes in one test file);
unwired 61 -> 57, which is NOT a win: four types read as wired only because
their constructor moved to a sibling chunk (named at the baseline, card 7660e70f).
Unjustified unwraps, upward imports, spawns, homes, serialization, head cuts
and underived bounds are unchanged: the sweep moves code, it changes none.

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

* The sweep's imports narrowed to what each module actually re-exports; zero new warnings

The splitter gave every child a 'pub use child::*' in its parent. Where the
child's items are crate- or module-scoped that re-export was too wide (56
'glob import doesn't reexport' warnings) or reached nothing (51 unused). Each
glob now carries the visibility its items have (pub(crate), the module's own
pub(in ...), or private), and the ones nothing resolves through are removed,
compiler-checked after each pass. run_harness/Harness are crate-scoped (their
only caller is grade.rs) instead of widening a chain of private types.

Built on the M5 in a build window (serving down), cargo test --lib --no-run
with --features metal,accelerate: 0 warnings that the base (#5225 head) does not
have; 63 total vs the base's 72 (9 old unused imports went with them). The CI
baseline is set to 66 on the inference that CI's Linux build carries the same 3
cfg-only warnings it did at the base (75 vs 72); CI prints the exact number.

cargo test -p continuum-core --lib (metal, M5): 9,002 passed, 2 failed:
- the lived-turn guard named settle.rs; the driver now sits in settle/, so the
  guard accepts the settle module (fixed here, passes).
- config_env read_all_on_a_missing_file: a stale temp file from an earlier run
  on this machine (card 4c820b46); passes on fresh CI runners.

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

* kill9: the parent glob import is Windows-only, where its one caller lives

Removed as unused on the macOS build; the Windows build needs it for
parse_tasklist_image_name (CI: Windows core compilation, E0425).

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

* benchmark_dispatch: recipe path extracted to run_recipe (no behaviour change)

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

* voice_module: decompose handle_command into per-family files (no behaviour change)

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

* model catalog: models() split into per-provider-family row functions, original order kept (no behaviour change)

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

* launch_gate: windows module decomposed into startup gate, scheduler script, custody, recovery journal and tests (no behaviour change)

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

* serve_persona_loop_inner: decomposed by responsibility (no behaviour change)

Wake selection, quiescence, self-tick, backlog resync + loop-filler gate, turn intake
(admit/compose/burst), the WorkspaceCycle step and the spoken-turn settle each move to
a sibling module; the loop reads as setup + named steps with Step enums for the
continue/break exits.

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

* start_server.rs: decomposed by boot phase (no behaviour change)

start_server() was one 3,388-line function. It is now the ordered list of
boot phases (259 lines); each phase lives in a child module under
ipc/start_server/ that owns it (model registry, foundation modules,
resource authority, serving, pressure broker, inference, cognition,
live call, service modules, AIRC discovery, persona registry/hosting/
reconciler, re-home reconciler, AI+genome, closing modules, runtime
start, command executor, listeners, TCP ingress, WS ingress, memory
guard, accept loop). Code is moved verbatim; shared values travel as
parameters or small structs (Foundation, CognitionHandles, LiveCall,
CodeHandles, AircBoot, RuntimeStarted). Order of spawns, registrations
and binds is unchanged.

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

* start_server: keep the unwrap_or_else justification on its own line

rustfmt moved the same-line `// unwrap_or_else: ...` comment to the next
line, which the unwrap ratchet counts as unjustified (2377 -> 2378).

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

* persona loop: phase_timings is mutable where say_ms is recorded; baselines for the deduplicated trigger

CI E0594 on turn_settle.rs. The loop built its trigger InboxMessage twice (the
loop-filler gate and admission), each with a peer- id cut and an unwrap_or_else;
trigger_inbox_message builds it once, so head cuts 188 -> 187 and unjustified
unwraps 2,377 -> 2,376 (checked in the diff), lines past the readable size
57,268 -> 56,859.

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

* launch_gate: the PowerShell include is two directories deeper; file_size baseline 57,131

Windows CI: couldn't read windows-prepared.ps1 from launch_gate/windows/. The
path now climbs seven levels (checked: the file resolves).

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

* file_size baseline 57,131 -> 54,053 with the six giant items decomposed (measured on this merge)

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

* fix(source-hygiene): integrate Codex's reviewed scanner revision 5

Applies the source-approved replacement from #5227 comment 6304136412
(Astra independent review) against bcbab21, unchanged:
- a #[cfg(test)] item that starts on the attribute's own line is blanked,
  with source line numbers preserved;
- item termination stays correct for static initializers and method
  continuations;
- one nested block-comment scanner is shared (duplicate removed);
- pub(in ...) and other restricted const visibilities are recognized by
  derived_bounds.

Measured on this tree: cargo test -p source-hygiene, 42 passed. Every
ratchet sits exactly at its existing baseline, so no baseline was edited.

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

* test_env/source_tree: production is source-hygiene's projection, not a cut at the first cfg(test)

Codex on #5228 (REQUEST CHANGES, comment 6307538140): the shared test reader
ended production at the first column-zero #[cfg(test)], so production below a
mid-file test mod or gated helper was invisible to the lived-turn exactly-one-
caller guard, which the old private scan did see. That is the same hole
production_half already closed for the ratchets (#5227).

- production() delegates to source_hygiene::production_half (existing
  dev-dependency); only the gated items are removed.
- code_only delegates to source_hygiene::split_code_and_comment, the one
  string-aware comment rule, instead of a second cruder copy.
- Regression test: a function below a mid-file test mod stays production, and
  the gated item does not.

Uncompiled locally (serving node); CI runs the guard tests.

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

* Restore the comments the split dropped; the moved Windows test file is #![cfg(test)]

Independent whole-PR review of 7bcdb2b (REQUEST CHANGES, P2): the
splitter carried code faithfully but dropped about 506 lines of free-standing
`//` comments between items, plus trailing comments on const lines.
Examples are the MAX_LANES history in serving_plan.rs, the evidence-ledger
rules in benchmark.rs and the parser format examples.

- 186 blocks (596 lines) restored by script. Each is placed before the line
  that followed it in canary, matched on the next three lines with
  visibility normalised; indentation follows the new nesting.
- Three trailing const comments restored: `// 2 GiB`, `// 1 hour`,
  `// 0=Normal`.
- Seven blocks placed by hand: section banners, the ipc handler pointer, the
  vector-params note, test-module banners and the model-family parser
  banner.
- Not restored, on purpose: comments on test code that the shared
  source_tree reader replaced (experience.rs code_only, device_probe.rs).
  The persona-loop provenance and wake-engram notes were already carried,
  as rewrites, in turn_cycle.rs and turn_context.rs.
- The diff adds comment lines only, apart from the three trailing comments
  on existing lines; no code changes.
- launch_gate/windows/tests.rs now starts with #![cfg(test)] (review
  finding 3).

source-hygiene 43/43, no count moved.

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

* Restore the benchmark/swe-setup rationale above SweSetupParams; trailing comments keep one space

Review of ad6dc73: the last block the split dropped (canary
benchmark.rs:3930-3940). The three restored trailing comments now use one
space before //, as canary had.

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply added a commit that referenced this pull request Nov 14, 2026
…ds, verbs once, allot without a retry loop (review of #5985)

Review findings (js-shaped-rust-2026-11-14 #8 #9 #10 #25 #27 #28):
- ThoughtRecord.body is ThoughtBody { Resident { text, saved }, Shed { handle, chars: NonZeroUsize } };
  the empty-message fallback is gone. The checkpoint wire shape is unchanged (serde try_from/into),
  and an unreadable checkpointed thought is dropped with a probe, never failing the checkpoint.
- A thought's item key is its ElementId (Item::occurrence, ElementId::key); the fold names the count
  and the newest saved whole.
- OpenView.work is ViewWork { Seen, Read(KeptRead), Editing { read, edited } }: an edit without a
  kept read cannot be represented. The edited path comes from CodeEditParams / CodeWriteParams.
- ActSeq and ThoughtOccurrence newtypes; ActionRecord.verbs classed once at the act seam.
- allot: the first suffix of her work in hand whose floor fits (Floors), one walk, no remove(0) loop.

#26 (one lock for WorkingMemory, CheckoutRoot scope) is left for its own change: scope is persisted on
three record types and WorkingMemory holds ~20 locks.

Not compiled locally (the M5 is serving); CI is the compiler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 14, 2026
… note on each edit stay whole (cards a386374b, 89655d88) (#5985)

* Her work in hand survives a turnover: the file she is editing and her note on each edit stay whole (cards a386374b, 89655d88)

Aris on the M5, 2026-11-14 00:24:45Z and 00:28:27Z: two overflow turnovers (view 51,438 tokens over a
50,808 grant; 45,606 over 42,348) collapsed the 849-line deploy_actuator.rs she was editing to its
outline and her "item 4 is done" note to its head and tail. She read the file again after each
(7 reads 00:24-00:36Z, no edit) and re-checked item 4 in 5 acts after it was done.

The codec gets one datum, Item::in_hand: a start keeps such an item whole while its source's grant
holds it beside the rest at their floor (oldest given up first, charged like any item), the claim's
newest end counts it, depth never collapses it, and the oldest run folds around it. Her memory marks
it from typed state: an applied edit/write of a file she has open (OpenView::edited_seq) keeps its
whole read (KeptRead: a whole read is never replaced by a later region), and the first thought after
each edit's result is her note. The memory owner never releases acts from that read on.

Not compiled locally (the M5 is serving); CI is the compiler.

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

* Her work in hand, typed: thought bodies, view work, act and thought ids, verbs once, allot without a retry loop (review of #5985)

Review findings (js-shaped-rust-2026-11-14 #8 #9 #10 #25 #27 #28):
- ThoughtRecord.body is ThoughtBody { Resident { text, saved }, Shed { handle, chars: NonZeroUsize } };
  the empty-message fallback is gone. The checkpoint wire shape is unchanged (serde try_from/into),
  and an unreadable checkpointed thought is dropped with a probe, never failing the checkpoint.
- A thought's item key is its ElementId (Item::occurrence, ElementId::key); the fold names the count
  and the newest saved whole.
- OpenView.work is ViewWork { Seen, Read(KeptRead), Editing { read, edited } }: an edit without a
  kept read cannot be represented. The edited path comes from CodeEditParams / CodeWriteParams.
- ActSeq and ThoughtOccurrence newtypes; ActionRecord.verbs classed once at the act seam.
- allot: the first suffix of her work in hand whose floor fits (Floors), one walk, no remove(0) loop.

#26 (one lock for WorkingMemory, CheckoutRoot scope) is left for its own change: scope is persisted on
three record types and WorkingMemory holds ~20 locks.

Not compiled locally (the M5 is serving); CI is the compiler.

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

* Her thought log drains through her view's fold edge, as her action log does

The resident-bounds ratchet requires a touched thought_log.rs to end with no store that only grows.
At each start, thoughts up to the thoughts source's fold edge whose wholes are saved leave her log
(and her checkpoint); a thought held only in RAM and her note on an edit in hand stay, and the view
forgets the released ids. A thought's view key comes from one owner (Thoughts::key_of).

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants