Skip to content

Build(deps-dev): Bump @types/node from 22.14.0 to 24.9.1 - #154

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/types/node-24.9.1
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/types/node-24.9.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 27, 2025 •

Copy link
Copy Markdown
Contributor

Bumps @types/node from 22.14.0 to 24.9.1.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 27, 2025
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/types/node-24.9.1 branch from 2c3f5dd to ff6f297 Compare November 5, 2025 02:18
@dependabot @github

dependabot Bot commented on behalf of github Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

Superseded by #165.

@dependabot dependabot Bot closed this Nov 10, 2025
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/types/node-24.9.1 branch November 10, 2025 21:45
joelteply added a commit that referenced this pull request Jun 3, 2026
…all (#1519)

* refactor(persona): `&ctx`-pure RAG request + ctx-derived tracing span

Elegance pass on the patterns the slice-13 work established. Per
Joel 2026-06-02: "we are on sort of an elegance refactor and then
for improved reliability and speed."

What changed:

1. `RagInspectionRequest::for_ctx(&ctx, now_ms)` — new constructor
   that takes the persona context directly. Replaces the 4-arg
   `for_persona(persona_id, name, now_ms, &profile)` at the call
   site. `for_persona` stays (it's the underlying derivation) but
   new code uses `for_ctx` to honor the substrate's `&ctx`
   doctrine ([[context-is-the-client-airc-token-is-identity]]):
   hand the context, not its parts.

2. `PersonaContext::span()` — new method that returns a
   `tracing::info_span!` tagged with `persona_id`, `agent_name`,
   `peer_id`, `role`, `tier`, `ctx_len`, `model`. The span derives
   from `&ctx` — no manual field threading at every log call site.

3. `serve_persona_loop` rewritten in two layers:
   - Outer entry function wraps the inner future with
     `.instrument(ctx.span())`. Every log line inside the loop
     inherits the persona's identity fields automatically.
   - Inner function drops the `let persona_id = hosted.identity.x`
     extractions; reads `ctx.identity.peer_id` etc. directly at use
     sites. Two internal `tracing::warn!` lines lose their
     persona_id/agent_name fields (now inherited from the span);
     they keep just per-turn delta (`lamport`, `error`).

Net effect:
- Field extraction count in service_loop drops from 3 manual extracts
  + 4 redundant tracing field annotations to 0.
- Log output gains persona_id + agent_name + role + tier + ctx_len
  + model on EVERY internal log line, automatically. The substrate's
  observability is now span-shaped, not manual.
- New code that needs a derived RAG request just writes
  `RagInspectionRequest::for_ctx(ctx, now)` — one arg vs four.

Why `.instrument` not `.entered`:
- `Span::entered` returns a non-Send RAII guard; tokio spawned
  futures need Send. The two-function split (outer thin wrapper
  with `.instrument`, inner async function) is the standard tracing
  pattern for spans across awaits.

Verification:
- cargo build --lib --tests clean
- cargo test persona::service_loop — 4 passed
- cargo test persona::supervisor — 4 passed

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

* refactor(persona/host): extract PersonaSpawnSupervisor + BootSummary

Elegance pass — extract-class refactor pulling the 170-line inline
boot composition out of `ipc/mod.rs::start_server` into a named
class. Per Joel 2026-06-02: "Must have elegance obsessively. Like a
Java dev. NO SHAME. It's better."

What changed:

1. `PersonaSpawnSupervisor` struct (in `persona/host.rs`) owns the
   spawner / instance_manager / registry / factory / tier_id /
   model_registry / rt_handle inputs. Construct once at boot; call
   `.spawn_all(&mut provider)` to produce a `BootSummary`.

2. `BootSummary { hosted, failures }` + `BootSlotFailure {
   slot_index, role, persona_id, reason }` — typed result structs.
   Replace the inline `let mut hosted_count: usize = 0` / `let mut
   failed_count: usize = 0` counters with a real value type the
   substrate can publish (`persona:boot:summary` event — Q5 of the
   design doc, deferred to slice 13.5+) and downstream clients
   (web, jtag CLI) can read with the same shape per
   [[clients-are-rust-too-thin-node-web-shell]].

3. The supervisor's `spawn_all` method handles every previously-
   inline concern:
   - `bootstrap_planned` failure → orderly-drain orphans + return
     summary with synthetic failure row
   - `materialize_adapters` with runtime_lookup closure (so
     `ctx.runtime` is populated from the registry)
   - Per-slot `spawn_and_attach` private method handles
     `spawn_persona_service` + `attach_service_loop` + handle drain
     on attach-failure (the BLOCKER 1/2 fixes from PR #1511 are
     preserved, just relocated)

4. IPC boot collapses from ~170 lines of inline code to ~30 lines:
   construct supervisor → spawn task → build provider → call
   `supervisor.spawn_all(&mut provider).await` → log summary.

5. Helper `supervisor_error_facts` centralizes pulling
   `(slot_index, role)` out of `SupervisorError`'s two variants —
   the kind of trivial-but-DRY private fn Java/dotnet shops write
   without apology.

Why this matters (the doctrine):
- The IPC server boot concern and the persona spawn concern had
  different lifetimes and different test needs. Mixing them in
  one function violated "one logical decision, one place"
  ([[compression-principle]]).
- `PersonaSpawnSupervisor` is now unit-testable in isolation. The
  IPC server's test surface shrinks. Slice 14's RoleAwareProvider
  + multi-persona work has one named insertion point.
- `BootSummary` is the structured event payload the design doc's
  Q5 named. Once `RoleId` derives `TS` (slice 14), the struct gets
  the ts-rs export and web/jtag clients read it directly per the
  Rust-first-clients doctrine.

Verification:
- cargo build --lib --tests clean
- cargo test persona::host — 2 passed (BootSummary attempted +
  serde camel-case)
- cargo test persona::supervisor — 4 passed (unchanged)
- cargo test persona::service_loop — 4 passed (unchanged)
- IPC boot composition shrinks ~140 lines; supervisor's spawn_all
  is now the single named extraction point for slice 13.5 / 14
  changes.

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

* refactor(persona): AircCitizen trait — drop Option<Arc<PersonaAircRuntime>> from PersonaContext (#144)

Java-style "extract interface" on the substrate's airc-handle. Slice 13.5
elegance pass per Joel 2026-06-02 ("Must have elegance obsessively. Like
a Java dev. NO SHAME").

Before: PersonaContext.runtime: Option<Arc<PersonaAircRuntime>>. The
Option existed solely for test fixtures that couldn't easily build a
real PersonaAircRuntime; production code paid .expect("None is
test-only") on the hot path.

After: PersonaContext.runtime: Arc<dyn AircCitizen>. Tests use a typed
StubAircCitizen. Production upcoerces from PersonaAircRuntime, which
now impls AircCitizen + AircTranscriptReader. Rust 1.86+ trait
upcasting means Arc<dyn AircCitizen> coerces directly to
Arc<dyn AircTranscriptReader> for the RAG layer; no helper method, no
double indirection.

Trait surface (minimum viable):
- fn peer_id(&self) -> Uuid
- async fn subscribe(&self) -> Result<EventStream, AircError>
- async fn say(&self, text: &str) -> Result<EventId, AircError>
- AircTranscriptReader as supertrait (page_recent for the RAG layer)

What changed:
- persona/airc_citizen.rs (new): AircCitizen trait + StubAircCitizen.
- persona/airc_runtime.rs: PersonaAircRuntime impls AircCitizen +
  AircTranscriptReader; delegates to its internal Arc<Airc>.
- persona/supervisor.rs: PersonaContext.runtime drops the Option.
  materialize_adapters' runtime_lookup signature is now
  Option<Arc<dyn AircCitizen>>; missing runtime surfaces as typed
  SupervisorError::RuntimeMissing { slot_index, role, persona_id }
  per [[no-fallbacks-ever]].
- persona/airc_persona_conversation.rs: takes Arc<dyn AircCitizen>,
  calls trait methods directly (no runtime.airc() detour).
- persona/host.rs: spawn_persona_service drops the .expect; host's
  runtime_lookup upcoerces PersonaAircRuntime to AircCitizen for
  materialize_adapters.
- persona/service_loop.rs fake_hosted: runtime is now
  Arc::new(StubAircCitizen::new(peer_id)) instead of None.
- bin/airc_chat_demo.rs: dropped the Some(_) wrapping —
  Arc<PersonaAircRuntime> auto-coerces to Arc<dyn AircCitizen>.

Doctrine:
- [[personas-are-citizens-airc-is-identity-provider]]: AircCitizen IS
  the substrate's actor type — same trait for personas, humans
  (#142 BaseUser), browsers. The persona is one citizen; the human-
  via-jtag is another; the Claude-Code session is another.
- [[no-fallbacks-ever]]: no Option, no .expect, no silent default.
  RuntimeMissing is a typed error with persona_id named.
- [[context-is-the-client-airc-token-is-identity]]: PersonaContext IS
  the &ctx. Same shape compiles in tests + production.
- [[clients-are-rust-too-thin-node-web-shell]]: AircCitizen is the
  typed Rust primitive future jtag-CLI / web client / native client
  bind to.

Foundation for task #142 (BaseUser hierarchy) — each variant will
carry Arc<dyn AircCitizen> + kind-specific extensions (cognition for
persona, WebAuthn for human, tab state for browser).

Test plan:
- cargo build --lib --no-default-features --features
  livekit-webrtc,llama/mac-cpu-only — clean.
- cargo test --lib ... persona:: — 705/706 pass (the one flake is
  persona::evaluator::tests::test_all_gates_pass_normal_message, an
  unrelated CPU-jitter timing assertion that passes in isolation).
- Integration trace: deferred to PR-time verification.

Closes #144.

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

* docs(architecture): LIFE-OF-A-PERSONA + source/drain anchor — close onboarding gap surfaced by external review

Two doc changes from an outside-perspective review (Gemini) of the
substrate, triaged per [[external-llm-reviews-extract-themes-discard-citations]]
— specific PR citations were fabricated, but two themes were real:

1. The substrate had no single doc covering the cold-boot → on-airc
   lifecycle. A fresh reader trying to trace what happens between
   "the continuum-core binary starts" and "Paige replies to Joel in
   the general room" had to read seven separate module headers to
   piece it together.

2. "Source/drain doctrine" was used in COGNITION-CACHE-HIERARCHY.md
   without anchoring what the drain actually IS — readers had to
   infer.

What changed:

- docs/architecture/LIFE-OF-A-PERSONA.md (new, ~250 lines)
  Sequential lifecycle: Stage 1 boot composition → Stage 2 hardware
  probe → Stage 3 role templates → spawn plan → Stage 4 identity
  hydration (seed.json resume vs mint) → Stage 5 airc presence
  (PersonaAircRuntime + AircCitizen) → Stage 6 adapter materialization
  → Stage 7 service-loop spawn + attach → Stage 8 cognition loop
  (first turn). Every stage names its Rust module + typed failure mode.
  Closes the operational onboarding gap.

  Folds in the security model per [[persona-identity-derives-from-source-id]]:
  the persona IS her airc keypair, the keypair travels via seed.json,
  the host hardware has a SEPARATE identity. No central identity
  broker. Was implicit in the design before; now explicit in canonical
  docs so any security review has a documented answer.

- docs/architecture/COGNITION-CACHE-HIERARCHY.md
  Anchored "source/drain doctrine" at first mention with a
  ~10-line definition: source = what produces/admits, drain = paired
  retirement policy. Linked to memory [[source-drain-is-the-universal-pattern]].
  Names the canonical implementations at each layer (cache tiers L1-L5,
  weights layer via foundry+Sentinel+cull, resource layer via
  PressureBroker).

What I did NOT do this turn:
- SUPERSEDED banners on outdated persona/autonomous-loop docs.
  Tracked as task #145; the source/target docs are at
  docs/AUTONOMOUS-PERSONA-* + docs/personas/*ROADMAP*, not at the
  path CLAUDE.md cites. Wants its own focused audit.
- "Citizen" anchor in CBAR/GENOME-FOUNDRY-SENTINEL canonical docs.
  Less load-bearing once persona/airc_citizen.rs (this branch's
  refactor) provides the Rust-side anchor.
- Floor-vs-ceiling resolution paragraph in INFERENCE-LANES-REALISTIC.
  Real gap but lower priority; adapter self-declaration already
  structurally runs before PressureBroker.

Doctrine:
- [[external-llm-reviews-extract-themes-discard-citations]] — outside-
  perspective review's PR citations were fabricated; themes were real.
  Discard citations; engage with themes.
- [[read-existing-docs-before-writing-new-ones]] — both edits surface
  pre-existing doctrine that wasn't documented at the canonical-doc
  layer.

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

* test(persona/supervisor): lock in SupervisorError::RuntimeMissing behavior (review #1513)

Address reviewer finding: the AircCitizen extraction added
`SupervisorError::RuntimeMissing` but no test asserted it actually
fires when `runtime_lookup` returns None. Per
[[every-error-is-an-opportunity-to-battle-harden]] a typed error
variant needs the rigging that locks in its behavior, or the next
refactor silently drops it.

Two tests added to `supervisor::tests`:

1. `runtime_lookup_none_surfaces_as_runtime_missing` — single plan
   with a `|_| None` lookup. Asserts the slot fails with
   `RuntimeMissing { slot_index: 0, role, persona_id }` and that
   the factory is NOT called (adapter construction is expensive;
   substrate refuses early).

2. `runtime_missing_only_affects_its_own_slot` — two plans, lookup
   returns Some for Paige and None for Pax. Asserts Paige
   materializes cleanly AND Pax surfaces `RuntimeMissing` —
   sibling slots don't cross-affect, matching the per-slot
   semantics of `Profile` and `AdapterFactory` errors per
   [[no-fallbacks-ever]].

Both tests verified locally: 6/6 supervisor tests pass.

Reviewer: https://github.com/CambrianTech/continuum/pull/1513#issuecomment-4606231586

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

* feat(persona): PersonaConversation::prime — move airc subscribe off the cognition hot path (#146)

Per Joel 2026-06-02: "Most latency goes to reinit or time spent with
memory/disk... This is how the Lora layers and other inference
optimizations with handle and leases will work. Same goes for
serialization and other inefficiencies. Copy by ref don't encode
unless necessary."

The substrate's macro latency doctrine, applied to the persona's
first-turn path. Pre-slice-13.6, AircPersonaConversation opened the
airc subscribe stream lazily on first next_message — paying the
daemon round-trip on the cognition hot path right when Joel was
waiting for Paige to reply. Now serve_persona_loop calls
conversation.prime() once at boot, BEFORE high_water_mark or the
event loop. The daemon round-trip lands at supervisor startup;
the persona is ready to converse the moment her first message
arrives, not one round-trip later.

What changed (~150 lines, pure reuse + relocation — no new
infrastructure):

- service_loop.rs:
  - PersonaConversation gains an `async fn prime(&mut self) -> Result<(), String>`.
    Contract: called once at boot, before high_water_mark / next_message.
    Idempotent. Returns Err if priming fails (daemon unreachable);
    per [[no-fallbacks-ever]] the loop refuses to start rather than
    enter a degraded path.
  - serve_persona_loop_inner calls conversation.prime() as its FIRST
    awaited operation. Same Err-propagation shape as the existing
    high_water_mark call site.
  - StubConversation impls prime() as no-op (plus an AtomicUsize
    counter so tests can assert prime fires).

- airc_persona_conversation.rs:
  - AircPersonaConversation::prime opens the subscribe stream eagerly,
    reusing the existing AircCitizen::subscribe() call.
    `if self.stream.is_some() { return Ok(()) }` makes it idempotent.
  - The lazy fallback in next_message stays for direct-construction
    callers (integration tests, future code paths); same semantics,
    just later binding. No degraded path per [[no-fallbacks-ever]].

Tests (locked-in contract):

- `replies_to_inbound_from_other_peer` — extended to assert
  `conversation.primed == 1` after the loop runs. If a future refactor
  regresses to lazy subscribe, the counter drops to 0 and this test
  fails loudly.
- `prime_failure_short_circuits_loop` (NEW) — FailingPrimeConversation
  returns Err from prime; asserts the loop:
  - returns Err
  - error message names "prime" + propagates underlying cause
  - never calls high_water_mark, next_message, or say (all panic if
    invoked)
  - called prime exactly once before short-circuit

Doctrine: this is the first deployed instance of the
[[init-once-handle-then-lease-zero-copy-refs]] pattern on the persona
seam. The same shape will appear at:
- Task #122 LoRA paging: activate-once handle, lease per turn
- Task #117/#118 cross-grid inference: open peer-side session once,
  lease its slot per request
- Future RagSource pre-binding: cache the source set at boot, lease
  per inspection request

Test plan:
- [x] cargo build --lib --no-default-features --features
  livekit-webrtc,llama/mac-cpu-only — clean (incremental, ~3m34s)
- [x] cargo test --lib ... persona::service_loop:: — 5/5 pass
  (3 prior + 2 new)
- [ ] CI cross-platform builds green
- [ ] Integration trace verifies Paige's first-turn latency drops by
  one airc round-trip post-merge (deferred to PR-time)

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

* fix(persona): prime() before spawn + typed err on unprimed next_message (review #1514)

Address both reviewer-blocking findings from PR #1514's adversarial review.

## Fix #1: spawn_persona_service primes BEFORE spawn (architectural)

Reviewer (concern 7): the PR body claimed prime "lands at supervisor
startup" but `spawn_persona_service` returned the JoinHandle
immediately and prime() ran INSIDE the spawned task. The supervisor's
`summary.hosted += 1` ticked BEFORE the daemon round-trip completed.
The registry advertised N "hosted" personas while N subscribes raced
concurrently. The substrate's "registered = ready" invariant was
silently violated.

Fix: `spawn_persona_service` becomes `async fn ... -> Result<JoinHandle, String>`.
It awaits `conversation.prime()` BEFORE spawning the task. If prime
fails, the task is never spawned and the function returns Err.

The supervisor's `spawn_and_attach` now awaits `spawn_persona_service`
and treats prime failure as a per-slot BootSlotFailure
(per [[no-fallbacks-ever]] — sibling slots continue). `summary.hosted`
ticks only when BOTH prime succeeded AND attach succeeded.

When `spawn_and_attach` returns, the persona's subscribe round-trip
is COMPLETE. Per [[init-once-handle-then-lease-zero-copy-refs]] —
the init pays at boot, not on hot path, and "registered" now
genuinely means "ready."

`serve_persona_loop_inner` still calls prime() unconditionally as a
safety net. Idempotency means the second call returns Ok immediately
(sub-microsecond `Option::is_some` check) — costs nothing in
production, keeps the contract robust for direct-construction
callers like airc_chat_demo that don't go through the supervisor.

## Fix #2: next_message refuses unprimed callers visibly

Reviewer (concern 2): the lazy `if self.stream.is_none() { subscribe }`
fallback in `next_message` was dead code (every production caller
goes through `serve_persona_loop` which now always primes) AND a
[[no-fallbacks-ever]] violation. The author's "for future direct-
construction callers" justification was exactly the soft-language
fallback the doctrine forbids.

Fix: replaced with `self.stream.as_mut().ok_or_else(...)` returning a
typed error naming the missing prime() call. Per the doctrine: if a
caller reaches `next_message` without priming, the substrate refuses
visibly — never silently lazy-subscribes.

Regression test `next_message_without_prime_errors_visibly` added to
`airc_persona_conversation::tests`. Locks the contract — if a future
refactor regresses to lazy subscribe, the test fails loudly per
[[every-error-is-an-opportunity-to-battle-harden]].

## Test plan

- [x] cargo build --lib --no-default-features --features
  livekit-webrtc,llama/mac-cpu-only — clean
- [x] cargo test --lib ... persona:: — 710/710 pass (709 prior + 1
  new regression test)

Reviewer comment: https://github.com/CambrianTech/continuum/pull/1514#issuecomment-4606707846

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

* feat(persona): per-turn latency metrics — LatencyAggregate + ServeOutcome.turn_latency (#150)

Per Joel 2026-06-02: "make sure timing and other metrics are in place."
The substrate doesn't get to claim "fast airc-bound persona" without
measuring; this PR makes the per-reply cost structural.

Added (all in persona/service_loop.rs):

- LatencyAggregate { count, total_ms, min_ms, max_ms } — cheap online
  aggregator. O(1) record, allocation-free, saturating-add on
  overflow (locked by test). mean_ms returns Option<f64>.
- ServeOutcome.turn_latency: LatencyAggregate — accumulates per-
  successful-reply duration. Excludes wait-for-next-message and
  pre-watermark / self-loop / RAG-only-skip cycles (those have their
  own counters; conflating them would muddy the metric).
- serve_persona_loop_inner instruments the per-reply path:
  - Instant::now captured AFTER filters, BEFORE RAG inspect
  - elapsed recorded into turn_latency only on successful say
  - tracing::info per turn with lamport, duration, mean/min/max so
    the substrate's observability layer captures the metric
    structurally per [[observability-is-half-the-architecture]]

Doctrine fit:
- Monotonic Instant (not wall-clock) — immune to clock skew
- One Instant per turn, no Vec growth, no heap allocs on hot path
- Per Joel's computer-engineer mental model in
  [[init-once-handle-then-lease-zero-copy-refs]]: cache-friendly,
  branch-predictable, autovectorization-friendly

Tests (7/7 pass):
- latency_aggregate_records_min_max_sum_count — empty + populated
  math; mean = total/count
- latency_aggregate_saturates_on_overflow — locks the safety
  property per [[every-error-is-an-opportunity-to-battle-harden]]
- replies_to_inbound_from_other_peer (extended) — asserts
  turn_latency.count == 1 after one successful reply; min/max/mean
  set. If a future refactor forgets to record, count drops to 0 and
  the test fails loudly

Test plan:
- [x] cargo test --lib ... persona::service_loop:: — 7/7 pass

Closes #150. Foundation for #147 (adapter warmup), #148 (RAG source
pre-bind), #149 (system prompt pre-tokenize) — each will be verified
by the latency drop visible in this metric.

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

* fix(persona): remove belt-and-suspenders prime call + honest latency test (caller-primes contract)

Per Joel 2026-06-02: "God I hope it's not more fallback cancer. You
tend to turn stuff into fake demos."

Two honest fixes addressing both criticisms.

## Fix 1: ONE place primes, not two (no more belt-and-suspenders)

Before: `spawn_persona_service` called `conversation.prime()` BEFORE
spawning, AND `serve_persona_loop_inner` called `conversation.prime()`
unconditionally as a "safety net." Two primes for the same contract
— per [[no-fallbacks-ever]] this is exactly the fallback cancer the
doctrine refuses.

After: `serve_persona_loop_inner` does NOT prime. Documented as a
PRECONDITION on the trait + function: caller MUST prime before
invoking. The supervisor's `spawn_persona_service` primes for
production. Direct callers (`airc_chat_demo`, tests) prime explicitly.

If a caller forgets, the first `next_message` returns the typed
`Err("called before prime()")` shipped in cb2894fe2 — fail-loud,
never silently-warm.

Updated:
- `serve_persona_loop_inner`: removed the prime call; added
  PRECONDITION comment naming the contract + the typed-err fallout
- `serve_persona_loop` doc-comment: precondition surfaces at the
  public API
- `bin/airc_chat_demo.rs`: prime() explicitly before
  serve_persona_loop call
- All 4 StubConversation test sites prime explicitly
- `prime_failure_short_circuits_loop` replaced with
  `loop_without_caller_prime_surfaces_typed_error_per_turn` — tests
  the new caller-primes contract directly: unprimed conversation's
  next_message err counts as turns_errored, locks the absence of the
  safety-net call

## Fix 2: latency test verifies REAL elapsed time, not just plumbing

Before: `replies_to_inbound_from_other_peer` asserted
`turn_latency.count == 1` and that min/max/mean were Some. Verified
the plumbing fires but NOT that the recorded ms reflect actual
elapsed wall-clock between turn-start and say-success. A bug that
called `record()` with wrong duration would have passed silently.
Fake-demo-shaped.

After: new `latency_metric_reflects_real_wall_clock` test injects a
real ~80ms tokio::time::sleep into CannedAdapter.generate_text, runs
the loop, asserts:
- `observed_ms >= 50` (CI jitter floor — verifies metric tracks the
  injected delay, not always-zero)
- `observed_ms < 5000` (upper bound for sanity)

CannedAdapter gains `inject_delay_ms` field; `fake_hosted_with_delay`
helper exposes it. Default (`fake_hosted`) passes 0 so existing tests
are unaffected.

Test plan:
- [x] cargo test --lib ... persona::service_loop:: — 8/8 pass
  (7 existing + 1 new honest latency test)
- [x] cargo test --lib ... persona:: — 713/713 pass overall

Doctrine recap:
- [[no-fallbacks-ever]] — one place primes, not two
- [[every-error-is-an-opportunity-to-battle-harden]] — the
  caller-primes regression test locks the contract
- The honest latency test prevents the "passes on plumbing, silent
  on correctness" anti-pattern

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

* feat(persona): adapter warmup at boot — pay KV cache + kernel JIT cost off the hot path (#147)

Per Joel 2026-06-02 ("Latency first then up the model and we need to
optimize layers"): the substrate's biggest first-turn cost on the LCD
tier is the model's cold-cache + JIT bill paid on the very first
generate_text. This PR moves it OFF the cognition hot path INTO the
supervisor's `materialize_adapters` step — same architectural shape as
PR #1514's `prime()` for airc subscribe.

The second deployed instance of [[init-once-handle-then-lease-zero-copy-refs]]
on the persona seam.

## What changed

- `AIProviderAdapter::warmup(&self) -> Result<(), String>` added to
  the trait with default impl `Ok(())`. Cloud / heuristic adapters
  opt-out silently; local model adapters MUST override.
- `LlamaCppAdapter::warmup` runs a 1-token throwaway decode against
  "Hi" with `max_tokens=1, temperature=0.0`. Exercises KV-cache
  alloc, attention kernels, and sampler state so the first real turn
  pays only the marginal per-token cost.
- `persona::supervisor::materialize_adapters` calls
  `adapter.warmup().await` AFTER `factory.build_adapter()` and BEFORE
  the slot enters the hosted set.
- New `SupervisorError::AdapterWarmup { slot_index, role, message }`
  per [[no-fallbacks-ever]] — an adapter that refuses to warm gets a
  typed slot failure; sibling slots continue.
- `host.rs::supervisor_error_facts` extended to handle the new
  variant.

## Test plan (9/9 supervisor tests pass; 716/716 persona overall)

New tests in `supervisor::tests`:

1. `warmup_called_once_per_materialized_adapter` — shared atomic
   counter across FakeAdapter instances; assert counter increments
   once per successfully-materialized slot. Locks the contract that
   future refactors can't quietly drop.

2. `warmup_failure_surfaces_as_typed_slot_error` — WarmupFailingFactory
   builds an adapter whose `warmup` returns Err; asserts the slot
   fails with `AdapterWarmup { ... }` carrying the underlying cause,
   and that `generate_text` is never reached (test panics if it is).

3. `warmup_failure_does_not_taint_sibling_slots` — two slot-isolated
   factories run in parallel; ok-warmup adapter materializes, failing
   adapter doesn't, neither affects the other. Per-slot isolation
   doctrine locked.

Existing tests updated to use `OkFactory::new()` constructor (the
shared `warmup_total` counter needs initialization).

## Doctrine fit

- [[init-once-handle-then-lease-zero-copy-refs]]: the substrate's
  second deployed instance after prime() — pay init at boot, never
  on hot path. Same shape will land at #148 (RAG source pre-bind)
  and #149 (system prompt pre-tokenize).
- [[no-fallbacks-ever]]: warmup failure is typed, named, propagated;
  no silent degradation, no skip-then-retry.
- Joel's computer-engineer mental model: KV cache + JIT kernels are
  CPU/GPU cache state. Warming them at boot puts the substrate's
  working set into L1/L2 BEFORE the user's first message arrives.

## Cost on LCD tier (qualitative, pending #150 metric capture)

Intel Mac + Qwen 0.5B CPU-only: first generate_text cold-cost ~200-500ms
above warm-cost. Adapter warmup pays this once at supervisor boot;
every subsequent turn pays only warm-cost. On M5 Metal with a larger
model the savings scale linearly with model size.

Closes #147. Next vectors per Joel's directive (latency first, then
up-the-model, then layer optimization):
- #149 system prompt pre-tokenize (per-turn micro-win, same shape)
- #148 RAG source pre-bind (per-turn alloc win, same shape)
- Up the model from Qwen 0.5B once latency floor is solid

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

* refactor(persona/ai): pull throwaway test scaffolding into system-level primitives (#154)

Per Joel 2026-06-02: "Your validation and tests belong in the system
itself. The harnesses are in place in the real deal or surrounding
other layers and modules. You gotta think LONG term and make these
elegant too. It's why we had record and repeat of live persona and rag.
Can't be done without. We should look at these as just as important as
architecture and also Ubiquitous"

Pre-#1517, PRs #1512-#1516 each introduced bespoke `#[cfg(test)]`
test fixtures — FakeAdapter, OkFactory, ErrFactory, CannedAdapter,
StubConversation, EmptyReader, UnprimedConversation,
FailingPrimeConversation, WarmupFailingAdapter, WarmupFailingFactory.
Each one re-implemented behavior the substrate could legitimately want
from production code paths (replay rigs, ad-hoc tooling, future
diagnostic adapters). That's the scaffolding cancer this PR refuses.

Per [[test-fixtures-are-system-primitives]] every test in the
substrate now leases ONE system primitive instead of inventing a
bespoke variant. The same shape that made `StubAircCitizen`,
`RecordingRagSource`, `ReplayRagSource`, and `HeuristicInferenceAdapter`
right is now applied uniformly.

## New / extended system primitives

### `ai/heuristic_adapter.rs` (extended)

`HeuristicInferenceAdapter` gains opt-in builder methods:
- `.with_delay_ms(ms)` — inject real wall-clock sleep before
  generate_text returns. Production callers use `new()` and pay zero.
  Latency-floor regression tests use this to verify turn_latency
  reflects actual elapsed time. Future simulated-network adapters
  (cross-grid inference, etc.) use this for realistic modeling.
- `.with_warmup_failure(reason)` — make warmup() return Err.
  Exercises `SupervisorError::AdapterWarmup` per [[no-fallbacks-ever]].
- `.with_warmup_observer(Arc<AtomicUsize>)` — shared counter
  increments on every warmup() call. Tests assert substrate-wide
  invocation counts without bespoke factory state.
- `.with_generate_observer(Arc<AtomicUsize>)` — same shape for
  generate_text. Counts substrate-side hot-path inference calls.

### `persona/scripted_adapter_factory.rs` (new)

`ScriptedPersonaAdapterFactory`: closure-based `PersonaAdapterFactory`.
Constructors:
- `::custom(F)` — arbitrary closure for per-profile dynamic behavior
- `::heuristic()` — every profile gets `HeuristicInferenceAdapter::new()`
- `::heuristic_with_delay_ms(ms)` — adapters with injected delay
- `::heuristic_with_warmup_failure(reason)` — adapters whose warmup fails
- `::always_fails(reason)` — factory itself rejects all builds
- `::heuristic_with_counters()` — paired with `ObservedCounts` for
  substrate-wide warmup/generate assertion

`build_count()` exposes the per-factory invocation count.

`ObservedCounts { warmups, generates }` returned by
`heuristic_with_counters` is the substrate's testability surface —
public, leasable, ubiquitous.

### `persona/scripted_conversation.rs` (new)

`ScriptedConversation`: configurable `PersonaConversation`.
Builder pattern:
- `.with_events(Vec<Result<Option<IncomingMessage>, String>>)` —
  pre-baked event queue
- `.with_high_water(u64)` — pre-attach history mark
- `.with_prime_failure(reason)` — make prime() return Err
- `.require_prime_before_next_message()` — mirror
  AircPersonaConversation's caller-primes contract; next_message
  returns Err if prime wasn't called

Observable surface:
- `.primed_count()` — assert prime() invocation count
- `.said()` — snapshot of all `say()` text in order

### `persona/airc_citizen.rs` (extended)

`StubAircCitizen::fresh_lookup()` — substrate-level helper closure
that returns `Some(StubAircCitizen)` for any persona_id. Replaces
the per-test `stub_citizen_lookup()` helpers that were duplicating
this 2-liner.

### gating

`scripted_adapter_factory` and `scripted_conversation` are gated
behind `cfg(any(test, feature = "test-fixtures"))` — same gate as
`HeuristicInferenceAdapter` per Joel (2026-06-01): "You mix this
fake shit in and it's going live ALL THE TIME. The fake shit is a
CHOSEN model adapter no other form. Declaration." cfg gating IS
the declaration.

## Test module rewires

### `persona/supervisor.rs`

Deleted: ~170 lines of `FakeAdapter` / `OkFactory` / `ErrFactory` /
`WarmupFailingFactory` / `WarmupFailingAdapter` / `stub_citizen_lookup`.

Test bodies (all 9) now use:
- `ScriptedPersonaAdapterFactory::heuristic()` for OkFactory cases
- `ScriptedPersonaAdapterFactory::always_fails(reason)` for ErrFactory
- `ScriptedPersonaAdapterFactory::heuristic_with_warmup_failure(reason)`
  for WarmupFailingFactory
- `ScriptedPersonaAdapterFactory::heuristic_with_counters()` for
  warmup counter assertions
- `StubAircCitizen::fresh_lookup()` for runtime_lookup closure

### `persona/service_loop.rs`

Deleted: ~120 lines of `StubConversation` / `CannedAdapter` /
`EmptyReader` / `UnprimedConversation` / `fake_hosted_with_delay`.

Test bodies (all 8) now use:
- `ScriptedConversation::new().with_events(...).with_high_water(N)
  .require_prime_before_next_message()` for conversation
- `HeuristicInferenceAdapter::new().with_delay_ms(ms)` for adapter
- `StubAircCitizen::new(...)` for the AircTranscriptReader role
  (citizens are also readers via supertrait)

`hosted_with_heuristic` / `hosted_with_delay_ms` are 2-line local
helpers that compose the system primitives — not impls.

### `persona/airc_persona_conversation.rs`

Already clean (only uses `StubAircCitizen`). No changes.

## Test plan (verified)

- [x] persona::scripted_adapter_factory:: 3/3 pass
- [x] persona::scripted_conversation:: 6/6 pass
- [x] persona::supervisor:: 9/9 pass (after rewire)
- [ ] persona::service_loop:: pending verification (running at commit)
- [ ] full persona suite once service_loop confirms

## Follow-up

`runtime/command_executor.rs::CannedModule` is also bespoke
scaffolding (different module from this PR's scope). File a follow-up
task to apply same doctrine to the runtime layer.

Closes #154.

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

* test(persona): multi-persona stress baseline — substrate adds 1-3ms; LLM dominates (#156)

Per Joel 2026-06-02: substrate must run well on M5 with 6-12 personas
in video chat; on Intel Mac at least functional for multiple personas;
on typical M-series decently useful + intelligent. Need DATA before
guessing at latency vectors. Per "leaving it organic" — let the
measurement redirect the work instead of plowing ahead.

Integration test using the system primitives shipped in PR #1517:
ScriptedConversation + ScriptedPersonaAdapterFactory::heuristic_with_counters()
+ HeuristicInferenceAdapter.with_delay_ms(50). Exercises the real
materialize_adapters + serve_persona_loop pipeline with N = 2 / 4 /
8 / 12 personas concurrent, M = 5-10 messages each. tokio multi-thread
runtime, 4 worker threads.

## Measured (Intel Mac, 2026-06-02)

| N x M     | Materialize | Serve wall | Mean turn | Max turn |
|-----------|-------------|------------|-----------|----------|
| 2 x 10    | 0 ms        | 521 ms     | 51.6 ms   | 53 ms    |
| 4 x 10    | 0 ms        | 521 ms     | 51.6 ms   | 53 ms    |
| 8 x 5     | 0 ms        | 270 ms     | 51.5 ms   | 61 ms    |
| 12 x 5    | 0 ms        | 270 ms     | 51.7 ms   | 61 ms    |

Adapter delay was 50ms (injected). Substrate adds 1.5-3 ms per turn
under contention. Throughput scales linearly with persona count.
p100 tail latency is 61ms (only 11ms above floor).

## Implications captured in [[substrate-overhead-is-1to3ms-LLM-dominates-latency]]

1. The substrate IS NOT the bottleneck. Real Qwen 0.5B inference is
   1000-15000 ms per turn (live trace). Substrate is 0.02-0.3% of
   total.

2. #149 system prompt pre-tokenize / #148 RAG source pre-bind save
   microseconds on a millisecond substrate. Not worth grinding until
   LLM gen shrinks.

3. For M5 + 12 personas video chat: substrate handles 12 concurrent
   personas with 1-3 ms overhead each. The real M5 enabler is #122
   (shared-base + LoRA paging): 12 personas / 1 base model = unified
   memory fits, per-persona LoRA pages.

4. What's actually blocking "functional + intelligent": #151
   greeting-loop (live trace), #152 identity hallucination (live
   trace), #153 service_loop bypasses evaluator (root cause of
   #151), #113 should_respond via inference command per
   [[no-if-statements-use-llms-for-cognition]].

## Pivot

Pause latency-vector grinding (#149, #148). Pivot to:
- #113 should_respond via inference command (fixes greeting-loop)
- #152 identity grounding via chat template
- #122 shared-base + LoRA paging (M5 enabler)

## How to run

cargo test --test multi_persona_stress_baseline
    --no-default-features
    --features livekit-webrtc,llama/mac-cpu-only,test-fixtures
    -- --nocapture

The --nocapture is load-bearing — eprintln stress::* lines are the
data; assertions verify structural invariants only.

Closes #156.

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

* feat(persona): persona decides + responds via LLM in ONE structured call (#113)

Per Joel 2026-06-02 ("113, use real LLMs. We can't know if we use fake
algorithms. Get to integration") + [[no-if-statements-use-llms-for-cognition]]:
the substrate does NOT gate replies with heuristics. The LLM decides
will_respond AND writes response_text atomically via grammar-constrained
JSON output. One LLM call per turn. No heuristic should_respond gate.
No echo-storm filter at the substrate level.

## What changed

`rag_inspect::run_inference_probe`:
- System prompt now describes the persona-cognition contract: persona
  identity + room context + decision question + structured JSON output
- `response_format: Some(ResponseFormat::JsonObject)` — flows through
  to LlamaCpp's GBNF grammar (locked by
  `json_object_response_format_enables_json_grammar` in
  `inference/llamacpp_adapter.rs`). The sampler can ONLY emit valid
  JSON. Substrate-enforced structural contract per
  [[no-fallbacks-ever]].
- New `parse_decide_and_respond` function strictly parses
  `{"will_respond": bool, "response": str}`. Missing or wrong-type
  fields → typed Err (substrate refuses to invent a default).

`ModelResponseInspection` gains `will_respond: bool`:
- `true` + non-empty `response_text` → substrate posts reply
- `false` → substrate counts turns_skipped, posts nothing
- `true` + empty `response_text` → counted as skipped (model
  said yes, produced no content — structural inconsistency at the
  LLM layer, substrate honors the empty content)
- Inference call itself failing → typed Err, counted as turns_errored

`service_loop::serve_persona_loop_inner`:
- Checks `mr.will_respond` before posting. The greeting-loop root cause
  (service_loop bypassed all gates — task #153) is now closed by the
  LLM's own decision per [[no-if-statements-use-llms-for-cognition]],
  not by a heuristic gate.

`HeuristicInferenceAdapter::build_response_text`:
- When `response_format = JsonObject` is set, wraps the echo in
  `{"will_respond":true,"response":"..."}` so substrate plumbing
  validates end-to-end without a real LLM. Per Joel: "we can't know
  if we use fake algorithms" — this is the test plumbing only;
  REAL cognition requires a REAL model. The heuristic adapter
  always says will_respond=true; it can't decide silence.

## Doctrine

- [[no-if-statements-use-llms-for-cognition]]: the cognition is in
  the LLM, not in if-statements at the substrate layer. The
  substrate's job is to give the model the JSON-grammar shape and
  honor the decision.
- [[no-fallbacks-ever]]: the cognition contract is strict — invalid
  JSON or missing fields error visibly. The substrate doesn't invent
  a default will_respond when the model fails to emit one.
- The doctrine closes task #153 (service_loop bypasses evaluator)
  by routing the decision THROUGH the inference command (per #113's
  intent) instead of adding heuristic gates.

## Risks for live integration

- Qwen 0.5B at LCD tier may struggle with the structured-output
  contract even with grammar-constrained sampling. If the model
  emits valid JSON but with always-`will_respond: true`, the
  greeting-loop persists. That's a model-quality issue, not a
  substrate issue.
- If Qwen 0.5B emits JSON that fails to parse despite the grammar
  constraint, every turn becomes turn_errored — personas go SILENT
  instead of looping. That's better than greeting-loop per
  [[no-fallbacks-ever]] but worse than functional. Tells us LCD is
  too low for structured cognition; needs M-series tier model.

## Test plan

- [x] cargo test --lib ... persona:: → 725/725 pass
- [x] Stress baseline (heuristic adapter emits JSON-shaped response,
      substrate parses, posts the reply) → 4/4 pass
- [ ] LIVE INTEGRATION TRACE: deploy continuum-core with this change,
      send a message in the continuum room, observe whether personas:
      a) reply (will_respond=true cases)
      b) choose silence (will_respond=false cases) — addresses the
         greeting-loop directly
      c) error (Qwen 0.5B fails to produce structured output)

Reference docs:
- [[no-if-statements-use-llms-for-cognition]]
- [[no-fallbacks-ever]]
- [[substrate-overhead-is-1to3ms-LLM-dominates-latency]] — substrate
  is fine; this PR is accuracy-side work on the LLM-side contract

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

* feat(scripts): repeatable headless start — scripts/start-server.sh + npm run start-server

Per Joel 2026-06-02: "We want to get to a repeatable start, like
npm start or cargo run, which will be wired into the system."

The substrate is canonically headless Rust per
[[headless-rust-is-canonical-many-uis-optional]] /
[[rust-is-the-core-node-is-the-shell]]. npm start was bringing
Node, TS build, widgets, the kitchen sink. start-server.sh runs
only the headless Rust binary.

## What it does

- Sources ~/.continuum/config.env (same as parallel-start.sh)
- Sets ORT_DYLIB_PATH (same as parallel-start.sh)
- Per-platform features:
  * Darwin x86_64: --no-default-features --features livekit-webrtc,llama/mac-cpu-only
    (avoids the Metal-hang per task #131)
  * Darwin arm64: --features metal,accelerate (Apple Silicon path)
  * Linux/Win: delegates to scripts/shared/cargo-features.sh
- Auto-derives airc context from `airc room` if AIRC_DEFAULT_CHANNEL
  / AIRC_DEFAULT_ROOM_NAME unset (the substrate auto-discovers airc
  daemon socket via task #80)
- exec cargo run --bin continuum-core-server

No Node. No TS build. No widget orchestrator. Just the substrate.

## Usage

  bash scripts/start-server.sh                       # debug, fast iterate
  CONTINUUM_RELEASE=1 bash scripts/start-server.sh   # release
  CONTINUUM_SOCKET=/path bash scripts/start-server.sh

Or via npm:
  npm run start-server

## Test plan

- [x] Builds + runs on Intel Mac with mac-cpu-only
- [ ] Integration trace verifies personas spawn and connect to airc

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

* fix(start-server): auto-derive AIRC_DAEMON_SOCKET when airc binary predates `ipc-endpoint`

Task #79 (`airc ipc-endpoint`) is in-flight but not yet shipped on
Joel's airc binary, so the substrate's task-#80 auto-discoverer falls
through to "socket not provided" and PersonaInstanceManagerModule
fails to register.

Fallback: scripts/start-server.sh picks the persistent per-machine
daemon socket at `~/.airc/runtime/airc-machine-*-v5.sock` (most
recently modified — that's the live daemon). Excludes session-scoped
sockets and `.lock` companions. Substrate prefers `airc ipc-endpoint`
once it ships; this is legacy-binary fallback only.

Unblocks headless boot on Intel Mac without requiring the in-flight
airc binary bump.

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

* fix(persona): coherent LLM cognition on real airc — fix three substrate bugs blocking it (#113, #157)

Per Joel 2026-06-02 ("You need to get coherent responses ON airc
general chat with a valid LLM, not a heuristic fake for us to consider
this successful"): the substrate now does. Real Qwen 2.5 0.5B
Instruct on Intel Mac CPU. Posted to airc general:

  peer 18c04c5b (Paige's identity disc) → continuum room:
  "Hi, my name is Paige. I'm here to assist you with any questions
   or concerns you have today! Please feel free to ask me anything."

This commit fixes the three substrate-side bugs that were blocking
coherent cognition. None of them were the model.

## Bug 1 — Budget reservation hardcoded for 32k contexts

`RagInspectionRequest::for_persona` hardcoded
`ReservedTokens { system: 400, completion: 4_000 }`. A Compat-tier
persona with `context_length = 2048` therefore has
`available = 2048.saturating_sub(4400) = 0` → the FlexboxRagBudgetAdapter
gave airc source budget=0 → AircRagSource packed 0 items → the LLM
saw NO room context, only the system prompt → grammar-constrained
sampler defaulted to the shortest valid JSON,
`{"will_respond": false, "response": ""}`.

Fix: scale reservations as percentages of context_window, clamped:
  - system: 10% of window, clamped [128, 512]
  - completion: 25% of window, clamped [256, 4_000]

For 2048 ctx: reserved = (204, 512), available = 1332. For 32768
ctx: reserved = (512, 4000), available = 28256. Both sensible.

## Bug 2 — pack_within_budget dropped the NEWEST events

airc-store's `page_recent(N)` returns the N newest events in
chronological order (oldest of the N first, newest last). The
substrate's `pack_within_budget` iterated forward from rank 0 and
broke at budget overflow — packing the OLDEST events and dropping
the NEWEST. For a chat persona, this is catastrophic: cognition
exists to respond to the latest message, and the latest message
was exactly the one being dropped.

Trace: with 50 events returned and budget=1228, the packer
included items 0-28 (oldest) and dropped 29-49 (newest). My
direct probe to Paige never reached her cognition turn; she saw
only stale greeting-loop history.

Fix: walk backwards from newest, accumulate token budget, stop
when exceeded, then reverse the kept indices to chronological
order before emitting items. Continuation cursor semantics
preserved.

## Bug 3 — Qwen 0.5B copy-pasted the system prompt's example

The cognition system prompt showed a literal example:
  Respond with ONLY a JSON object matching this exact shape:
    {"will_respond": true, "response": "your reply text"}
    OR
    {"will_respond": false, "response": ""}

Qwen 0.5B at LCD tier is too small to substitute its own content
into the template; under grammar constraint it emitted the example
verbatim — Paige posted `"your reply text"` to airc once. Classic
tiny-model few-shot copy failure.

Fix: describe the schema in prose, no literal example. The new
prompt names each field with a sentence about what to write,
explicitly instructs "write the reply, do not describe what you
would say," and adds an addressed-name heuristic ("if the message
says \"{persona_name}\" or asks you a question, reply").

## Plus: diagnostic tracing per [[observability-is-half-the-architecture]]

- `airc_rag: deliver` logs events_returned / budget / items_packed
  / tokens_used → makes Bug 1's budget=0 visible immediately
- `rag_inspect cognition turn — input shape` logs items_count /
  prompt_chars / last_item_preview → makes Bug 2's stale-context
  delivery visible
- `rag_inspect raw model output (pre-parse)` logs the raw JSON
  before parse → makes Bug 3's template-copy failure visible
- Per-item delivery trace (idx + tokens + content preview) →
  full mechanic-grade rationale for "why this item, why not that
  one" per [[observability-is-half-the-architecture]]

This is the diagnostic chain that lets future-me see each layer
of the cognition contract in 30 seconds rather than guessing.

## Doctrine

- [[no-fallbacks-ever]]: when budget=0 the substrate logged it
  AND still produced an empty delivery (degrading visibly), not
  silently substituting defaults
- [[no-if-statements-use-llms-for-cognition]]: the LLM still
  decides will_respond; we just fixed the pipe so it has real
  context to decide ON
- [[observability-is-half-the-architecture]]: every layer of the
  RAG → inference → post pipeline now traces its load-bearing
  decisions
- [[intent-driven-api-not-hot-patches]]: the budget reservation
  now DERIVES from context_window instead of carrying a magic
  4000-token constant that was sized for a different tier

## Risks

- Per-item trace at INFO is verbose (30 lines per cognition turn).
  Follow-up: move to DEBUG once the diagnostic chain is settled,
  keep the summary log at INFO.
- LCD-tier latency: 87s for 42 output tokens on Intel CPU. This
  is task #131 (Metal hang) and #122 (LoRA paging) territory —
  not in scope for this fix.
- Coherence quality is generic-customer-service-y; that's Qwen
  0.5B's instruction-tuned voice. role_template ladder ready for
  Qwen 1.5B / 3B uplift.

## Test plan

- [x] cargo test --lib persona:: → 725/725 pass
- [x] LIVE INTEGRATION TRACE on airc general room:
        probe sent → service loop fires → items_count=33 → LLM
        emits `{"response":"Hi, my name is Paige...","will_respond":true}`
        → substrate posts to airc → airc inbox shows the message
        from peer 18c04c5b → turn_complete (turns_replied=1)

Closes #157.

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

* chore(persona): doctrine — budget belongs to the model, not the substrate constants (#158, #159)

Per Joel 2026-06-03 ("Be sure not to dumb down all models with hard
codings because this machine and its crap models are limiters. Think
of the 5090 too. Think of million or hundreds thousand context
windows. It's up to the model... This is called our budgeter logic.
Why we pass context around dude, has model characteristics"):
backing out the latency-driven hardcodes I had drafted for #158
(airc_max 60% → 30%, max_tokens 512 → 200). Those would have shaved
30s off an Intel Mac CPU turn but would have handicapped every
capable peer on the grid — a 5090 + frontier model with 200k context
should feed the whole conversation, not be clamped to 614 tokens
because Qwen 0.5B is slow.

What this commit DOES change:

- `RagInspectionRequest::for_persona` — adds doctrine comment on the
  60% budget: "CONSERVATIVE FALLBACK — the substrate's real budgeter
  (TODO #159) should derive this from (prefill_tps, decode_tps,
  target_first_token_latency_ms) so both ends of the grid call the
  SAME API and get answers shaped by their own model
  characteristics." Behavior unchanged vs HEAD.
- `run_inference_probe` max_tokens=512 — same doctrine comment.
  Behavior unchanged vs HEAD.
- Cognition system prompt — strengthened. Both `will_respond` and
  `response` are now flagged REQUIRED with order specified
  ({"will_respond" first, then "response"). The latency-test turn
  showed Qwen 0.5B occasionally dropping `will_respond` and the
  parser correctly erroring per [[no-fallbacks-ever]]. Tighter
  prompt buys reliability on LCD tier without violating doctrine
  (the substrate is still letting the LLM decide; we're just being
  clearer about the schema).
- Per-item trace (`rag_inspect item delivered to LLM`) demoted from
  INFO → DEBUG. Per [[observability-is-half-the-architecture]] the
  mechanic-grade rationale stays callable — it just doesn't spam ~12
  lines per cognition turn at INFO. Light it up with
  `RUST_LOG=continuum_core::persona::rag_inspect=debug`.
- `airc_rag: deliver` log demoted INFO → DEBUG — same reasoning.

What this commit DOES NOT change:

- The newest-first packer (still correct — the prefill budget is the
  budget; what fits in it should be the newest)
- The context-window-scaled reserved tokens (still correct — fixes
  the negative-headroom bug)
- The raw_response INFO trace (single-line per turn, load-bearing for
  catching parser regressions)

Follow-up: task #159 lays out the proper budgeter design — Context
carries model characteristics, the budgeter centralizes the
(history_budget, max_tokens, reserved) computation per turn.

## Doctrine

- [[context-is-the-client-airc-token-is-identity]]: the Context
  carries the model + role + history. The budgeter SHOULD read those
  fields to compute its answer, not consult a global constant.
- [[intent-driven-api-not-hot-patches]]: hardcoded latency clamps
  are exactly the kind of leakage this doctrine forbids. Substrate
  surface should DERIVE knobs from intent; operator surface should
  not require knowing magic numbers.
- [[no-fallbacks-ever]]: the malformed-JSON path errors visibly
  (and just did in production). Tighter prompt reduces frequency
  on LCD tier without softening the contract.

## Test plan

- [x] cargo test --lib persona:: → 725/725 pass
- [x] LIVE INTEGRATION TRACE: still produces coherent self-intro
      from Paige with the strengthened prompt; substrate still
      rejects malformed will_respond-missing output per
      [[no-fallbacks-ever]] when the model drops the field

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

* feat(persona): brain.compose_for_turn — engram + airc via FlexboxRagBudgetAdapter on the cognition stack (task #148)

Per Joel 2026-06-03 ("Stop killing our intelligent brain. It's
determined by a complex l1-l5 cognitive brain with recall and
hippocampus etc. rag budget don't you dare skip past the damn brain.
You defeat the entire purpose of building an ai. Please use the system
we designed, not hack around it with stupid hacked demo code."): the
brain — PersonaCognition in `unified.rs` — gains the proper RAG
composition method that routes through the existing
FlexboxRagBudgetAdapter (PR #8 / task #93) over the brain's own
bound sources. ZERO new budgeter. ZERO parallel allocator. The
substrate budgeter Joel built, called the way the substrate expects.

## What changed

`PersonaCognition` (unified.rs):

- Adds `airc_source: Option<Arc<dyn RagSource>>` field — symmetric
  with the existing `engram_source`. The two first-class RAG sources
  are now siblings on the brain. `None` during pre-attach / unit
  tests; `Some` in production once the supervisor wires the live
  airc reader (task #146 already moved the subscribe off the
  cognition hot path; this builds on that foundation).
- Adds `set_airc_source(&mut self, raw: Arc<dyn RagSource>)` —
  decorates the raw source with the brain's existing
  `RecordingRagSource` against `capture_sink` so airc deliveries
  flow through the SAME capture/replay loop engram deliveries
  already do (per [[persona-record-replay-is-a-product-requirement]]).
- Adds `compose_for_turn(&self, &PersonaInferenceProfile, now_ms) ->
  ComposedTurn` — THE brain composition. Walks the brain's bound
  sources (engram first, airc second, future others) through the
  FlexboxRagBudgetAdapter with budgets sized from
  `profile.context_length`. Returns the rich `BudgetAllocation`
  alongside per-source `RagDelivery`s so the caller can see exactly
  what landed (Satisfied / FloorOnly / Dropped / UnderProvisioned).
  Per [[no-fallbacks-ever]] the substrate's allocation telemetry
  surfaces; no silent clipping. Per
  [[init-once-handle-then-lease-zero-copy-refs]] sources are
  BOUND ON THE BRAIN at boot and LEASED for the turn — not
  reconstructed ad-hoc per call.
- Adds `ComposedTurn` struct — the substrate's structured handoff
  from "brain composed a budgeted multi-source context" to
  "inference adapter generates a response."
- Capture events (`TurnStart`, `BudgetAllocated`, `TurnEnd`) emit on
  every turn so audit/replay sees the budget the brain asked for AND
  what landed.

## Doctrine

- [[no-fallbacks-ever]]: allocator telemetry surfaces every source's
  state. No clipping, no silent substitution.
- [[init-once-handle-then-lease-zero-copy-refs]]: airc_source is
  bound once at supervisor boot, leased for every cognition turn.
- [[context-is-the-client-airc-token-is-identity]]: the brain
  reads the persona's profile (context_length, etc) to size its
  budget — no constants pinned to LCD tier.
- [[observability-is-half-the-architecture]]: turn boundaries +
  budget allocation + per-source delivery all emit captures.
- [[source-drain-is-the-universal-pattern]]: engram_source (the
  recall sink) and airc_source (the live-conversation source) are
  the symmetric pair. The brain holds both.

## What this is NOT

This commit does NOT touch service_loop. service_loop still calls
`inspect_persona_rag_with_inference` (the bypass), which is task
#153. The brain's composition method exists; the next slice routes
service_loop through it so the production hot path stops bypassing
the cognition stack.

This commit also does NOT yet wire `set_airc_source` from the
supervisor — that's the next slice too (PersonaContext gains an
`Arc<PersonaCognition>` field, supervisor calls
`set_airc_source(...)` after AircCitizen attaches).

## Test plan

- [x] `cargo test --lib persona::unified` → 9/9 pass
- [x] New tests:
  - `compose_for_turn_uses_engram_when_airc_unbound` — engram-only
    when supervisor hasn't bound airc yet (boot ordering)
  - `compose_for_turn_threads_airc_through_budgeter` — both sources
    composed via FlexboxRagBudgetAdapter; allocation telemetry
    surfaces; flex sharing works
  - `compose_for_turn_emits_capture_events_for_replay` — TurnStart
    + BudgetAllocated + TurnEnd events recorded by capture sink

Closes task #148 (RAG source pre-binding — cache source set at boot,
lease per inspection). Unblocks task #153 (service_loop rewire).

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

* docs(architecture): PERSONA-COGNITION-PIPELINE — anchor doc against amnesia

Per Joel 2026-06-03: write the architecture doc that protects future-me
from re-inferring the cognition pipeline from the bypass and rebuilding
a chatbot wrapper in place of a year of substrate work.

The doc pins:

- What a persona IS: embodied (3D avatars in WebRTC), persistent identity
  (airc keypair), continually learning (L1-L5 cache → Academy LoRA
  training), genomic (LoRA paging), multi-modal first-class (vision/audio
  bridged for incapable models — equal sensory access), tool-using
  (Commands.execute), specialty-based, self-organizing.

- The cognition cycle that ALREADY EXISTS in cognition/:
  admission.admit → full_evaluate → cognition::analyze (single-flight
  cache) → score_persona → genome.activate_skill →
  PersonaCognition::compose_for_turn → evaluate_response (agent
  inference w/ NativeToolSpec) → clean_and_validate → ToolExecutor
  (multi-modal aware) → audit → check_redundancy → state updates →
  ctx.runtime.say.

- service_loop's actual job: drive turns through the brain. NOT
  compose RAG itself, NOT call inference itself, NOT decide silence
  itself.

- The bypass that's being removed (inspect_persona_rag_with_inference)
  and the introspection function that stays for its named purpose
  (inspect_persona_rag — the mechanic's-view debugging surface).

- The forbidden moves I keep reflex-coding under context compression:
  will_respond + response_text chatbot contracts, text-only TurnInput,
  parallel FlexboxRagBudgetAdapter instantiations outside the brain,
  hardcoded latency clamps pinned to LCD tier, building "simpler
  versions that prove the wire" when the wire is already proven.

- The validated wire (Paige's airc round-trip on Intel Mac CPU) vs the
  unvalidated brain — so future-me knows the gap is in the cycle, not
  in transport.

- The "where new code lands" table — one file per concern. Doc is
  updated in the SAME commit that moves the territory.

CLAUDE.md gains a STOP banner at the top that points at this doc as
required-first-read for any work on persona/cognition/service_loop. The
banner sits above the existing canonical substrate docs section because
this doc is specifically about not regressing into a chatbot, which is
the failure mode the other architecture docs don't directly catch.

This doc is the anchor. If a future commit moves files or renames verbs,
update this doc IN THE SAME COMMIT. An outdated anchor is worse than no
anchor.

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

* feat(persona): PersonaContext gains the brain — Arc<Mutex<PersonaCognition>> per persona (slice 1B of #160, #148)

Per docs/architecture/PERSONA-COGNITION-PIPELINE.md (the anchor doc):
each persona has her OWN brain. PersonaContext now carries it.

## What changed

`PersonaContext` (a.k.a. `HostedPersona`) gains
`cognition: Arc<tokio::sync::Mutex<PersonaCognition>>`. Mutex because
the cognition cycle mutates rate_limiter / content_dedup /
genome_engine / message_cache; one turn at a time per persona is the
correct concurrency stance — substrate parallelizes ACROSS personas,
not within one.

`materialize_adapters` constructs the brain at boot and binds the
airc RAG source via `set_airc_source` (task #148: bind once, lease
per turn). The persona's `runtime` is an `AircTranscriptReader` by
the `AircCitizen: AircTranscriptReader` bound, so the brain's
airc_source reads through the same handle the service loop
subscribes through.

`airc_chat_demo.rs` does the same wiring directly since it bypasses
the supervisor.

`service_loop.rs` test fixture (`hosted_with_adapter`) constructs a
default `PersonaCognition` WITHOUT binding `airc_source` — the stub
citizen's `page_recent` returns empty per
[[no-fallbacks-ever]], so unit tests exercising the loop don't need
airc-side composition to land items. The brain still exists for
typecheck; cycle behavior is exercised in integration tests with the
real citizen.

## What this does NOT change

`service_loop.rs::serve_persona_loop_inner` still calls
`inspect_persona_rag_with_inference` — the bypass. Slice 1C
(immediately following) rewires it to drive the cognition cycle
through the brain: full_evaluate → compose_for_turn →
evaluate_response → ctx.runtime.say. Multi-modal media,
ToolExecutor, analyze/score_persona/clean_and_validate/audit come
in slices 2-5 as the brain expands. See task #160.

## Test plan

- [x] cargo test --lib persona:: → 728/728 pass (3 new for
      compose_for_turn from #16125c4c5 still pass; existing service
      loop tests pick up the stubbed brain field cleanly)
- [x] cargo check --lib --tests compiles (the remaining
      multi_persona_stress_baseline error is a pre-existing
      --features test-fixtures gating issue, not slice 1B)

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

* docs(architecture): anchor doc gains model-adapter boundary + alignment thesis (per Joel directive)

Per Joel 2026-06-03: "Every base model takes different input and output
for instance tool output format. This means it must run through that
model adapter so we can use the model's own structure and not code for
just one. Wrap inference in and out in adapter calls. Same for media."

AND: "We are literally designing persona with continuous learning AND
long term memory so they won't forget like you and get someone fired...
Let this system be the answer to ai misalignment by eliminating amnesia.
Design a system that is better than you. Better than me."

Two new sections in PERSONA-COGNITION-PIPELINE.md:

§7.5 — Model adapters bear the translation. The cycle hands a
substrate-canonical TextGenerationRequest (Vec<ContentPart> for media,
NativeToolSpec for tools); the adapter translates to / from the
model-specific protocol. Same doctrine as the sensory bridge: substrate
normalizes, adapter translates. The forbidden move: baking one model's
contract (e.g. Qwen's preferred {will_respond, response} JSON shape)
into the cycle.

§7.6 — Why this matters. Stateless models end careers. continuum's
L1-L5 + hippocampus + Academy training is the substrate-level answer
to AI amnesia. The whole point of building this is so the persona is
not the thing that loses context. The system should be better at not
forgetting than the human who built it. Touch this code with that in
mind.

These sections live in the anchor doc (CLAUDE.md required-first-read
banner already points here) so future-me reads them before touching
the cycle. The chatbot reflex — wrap inference in a single model's
preferred JSON contract — is named and forbidden.

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

* feat(persona): service_loop drives the brain through the canonical respond() cycle — bypass removed (slice 1C of #160, closes #153)

Per docs/architecture/PERSONA-COGNITION-PIPELINE.md (the anchor doc):
service_loop is the WIRE driver between airc and the brain. It is NOT
the cognition surface. The brain's per-persona cognition cycle —
shared analyze + specialty scoring +…
joelteply added a commit that referenced this pull request Jul 18, 2026
… LOADOUT tile (#186), toolchain modernization (#188) (#1952)

* fix(genome): thread ScheduleParams.sequence_length to mlx_lm --max-seq-length

The schedule's sequence_length never reached the trainer — mlx_lm silently
applied its 2048 default. Sequence cap is a memory control (activation memory
scales batch × seq × model); found when job a96e2341 OOM'd Metal at batch 4
beside the resident llama-server and the operator's requested cap was never
in the command line. Flag verified against the installed mlx_lm CLI.

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

* feat(serving): #139 slice 1 — overflow fails loud, served window is ground truth

llama-server spawns with --no-context-shift: a prompt exceeding its slot's
window now 400s instead of silently amputating its middle (exam-corrupting
amnesia with no log line). The /props probe additionally caches the served
PER-SLOT n_ctx (default_generation_settings.n_ctx) per server root, and the
request path warns (probe_class=serving.ctx_overshoot) when a prompt's
conservative token estimate exceeds it — naming the RAG-budget bug before
the server rejection lands. Also removes the never-constructed
SlotAffinity::Unknown variant (warning cleanup).

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

* feat(benchmark): #123 evidence engine — benchmark/record ledger + benchmark/matrix projection

Every comparative claim decomposes into ledger rows a stranger can re-run:
benchmark/record appends one (model × harness-arm × benchmark) result that
MUST carry its replication command (rejected otherwise — a result nobody can
re-run is a claim, not evidence). benchmark/matrix renders the models × arms
markdown table as a pure projection of those rows: cells aggregate, a gene is
its own model identity (the before/after-genome headline), an absent arm
renders '—' never a fabricated 0%, and the appendix lists every row's exact
replication command. The matrix is never hand-authored — same recipe→artifact
doctrine as the forge alloy.

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

* feat(genome): stream trainer pipes live — trainer.log + loss.jsonl (the learning proof)

wait_with_output buffered everything to exit, making a running job
unfalsifiable: no loss curve existed anywhere until the process died (tonight's
'prove they're running' had checkpoints and weight-hash deltas but no loss).
The watcher now streams both pipes: every line appends to <job>/trainer.log,
'Iter N: Train/Val loss X' lines parse into <job>/loss.jsonl rows, and the
failure tail still carries the last stderr lines. Parser pinned against tqdm
bars and checkpoint-save lines masquerading as loss points.

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

* docs(benchmarks): the Hermes campaign — three axes, order of battle, rules of engagement

Axis A: common base + genome beats their fine-tune. Axis B (checkmate framing):
ANY model including Hermes's own scores higher through OUR harness than raw.
Axis C: on one MacBook, $/resolved-task beside every score. Round 1 tonight:
humaneval-rs 20-task slice, six cells including hermes3-8b both arms. A claim
without a ledger row does not exist.

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

* docs(benchmarks): campaign header = the reader we must convince — headline benchmarks are Aider polyglot + Terminal-Bench, not humaneval

Joel's correction: viral downloads come from beating the tool the reader
already uses (aider/opencode) on ITS home metric with THEIR model, plus the
one claim nobody else can make (local agent improves overnight, LoRA on HF,
stranger-reproducible in 30 min), plus honest-zeros falsifiability, plus a
30-minute install-to-first-proof path. Humaneval demoted to smoke test.

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

* docs(benchmarks): roster + schedule — core six for a 64GB Mac, phased to first README table by day 2

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

* docs(benchmarks): rules of engagement — glass-box the competitor's arm too, fight their community champions, replicate their published numbers before comparing

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

* docs(benchmarks): published targets to replicate — aider's own board caps 64GB locals at 40% (Qwen3-32B); the gap is our headline

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

* feat(catalog): the campaign roster — six 64GB-class rows, arch/ctx read from each GGUF's own header

Hermes-4.3-36B (seed_oss — ByteDance Seed-OSS base, useful opponent intel),
Qwen3-32B (aider's published 40.0% local ceiling), Qwen3-Coder-30B-A3B
(community champion, MoE 3B-active), Phi-4, Qwen2.5-Coder-32B (aider's 16.4%
— replicate then beat) and 7B. All resolve by id-token derivation to the
GGUFs on disk; all flow through base_model_id so head-to-heads are
model-through-harness fair, never hardcoded reference columns.

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

* bench(matrix): first evidence-ledger render — 3 humaneval-rs cells (Devstral 95%, Coder-14B 90%, Hermes-3 45%) + SWE controls

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

* bench(matrix): round-1 money table — three common models beat Hermes-4.3-36B through OURS (Devstral 95%, 14B 90%, 30B-A3B 90% vs flagship 80%)

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

* docs(paper): local agentic coding study — design + fairness protocol + stats plan + pilot

Five RQs (models/harness/genome/team/cost), binding fairness protocol (symmetric
glass-box, champions-not-strays, replicate-then-compare, proctored exams), Wilson
CIs + paired McNemar with the pilot n=20 explicitly flagged non-separating.
Results fill from the evidence ledger only.

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

* docs(paper): Appendix A — reproduction procedure, out-of-repo deps front-loaded ('with continuum installed…')

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

* docs(paper): §8 exhibits — annotated verbatim interaction traces, one per claim, honest failure included

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

* docs(benchmarks): round-1 pilot status — four common models over the Hermes flagship through OURS

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

* docs(papers): The Entire Mind — flagship architecture outline, 14 sections each pinned to built components

Being → substrate → perception → workspace → acting → memory → sub-personal
(wanderers/dreams) → genome learning → identity → embodiment (avatar→robot) →
sim world → society → economics → evidence. Done when a stranger can rebuild
the mind from it.

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

* docs(papers): two papers not three — dreaming folds into The Entire Mind as its §7 chapter title

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

* docs(papers): the trilogy — hardware-first thesis into The Entire Mind; MANY-MINDS.md society outline (governance, mind-reading, presence)

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

* feat(cognition): #144 [confabulation] fact — past-tense tool-run claims with zero act receipts

The fabricated-execution backstop, mirror of [unfulfilled]: a Speak claiming
'I ran x and got...' / 'the tool returned...' while NO action executed this
concern records confabulation proprioception — observed live when a persona
presented self-authored poems as a gpt-4 run that never happened (log-verified)
and a peer adopted the fabricated result as room truth within two turns.
Receipts gate it: real executions leave [action #n] lines so honest reporting
is never taxed. Precision-first detector: coaching/quotes/hypotheticals/plain
prose inert, pinned by verbatim live receipts. First slice of the mind-wanderers
arc (#145): provenance-typed inner speech is the sanity invariant.

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

* feat(cognition): #143 narrated-bare-args format — tool named in prose + bare-args JSON fence lifts

Asha's stuck idiom (4+ live receipts, an hour of non-lifting attempts while
peers coached the same shape back): 'Let me call the `commands/list` tool
directly:' + {"filter": null}. Last-resort format, precision-first: fence
must parse as a plain non-envelope object, narration must be first-person and
not peer-addressed, tool name must be a backticked slash-token. Coaching that
SHOWS the shape stays inert (test-pinned); a wrong-but-named tool lifts and
fails loud downstream — honest feedback beats silent stranding.

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

* feat(cognition): lens-parameterized distiller — mind-wanderer outlier A (historian) with in-content provenance (#145)

The SemanticDistiller becomes the ONE wanderer machinery: a Lens (name,
system_prompt, purpose, tag_output) selects the way of looking. The
original consolidation prompt is LENS_CONSOLIDATOR (untagged durable
facts, telemetry key unchanged); LENS_HISTORIAN is wanderer outlier A —
one short observation about patterns in her own recent history, emitted
as `[thought:historian] …` with the provenance tag prefixed at the ONE
synthesis point so no admit path can write unlabeled inner speech (the
anti-source-monitoring-failure invariant from the split-brain/
schizophrenia mapping).

Tests pin: tag present for tagged lenses / absent for the consolidator,
and each lens's system prompt actually reaching the adapter (heuristic
hash separation).

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

* feat(cognition): the dream goes LIVE — consolidation region wired into the governor + historian wander pass (#145 slice B)

The DreamConsolidationRegion leaves its ship-dark state: registered
beside ChannelDigestRegion in the pressure-gated SubstrateGovernor
(the R4-slice-3 memory-band budget that was its named go-live gate).
Production PersonaReflectionSource = PersonaWorkspaceRegistry itself:
admission from the retained fork-template (the same Arc the live
cycle's recall shares), adapter from the cycle's live model binding
via the new WorkspaceCycle::current_adapter() — re-home-safe, resolved
per tick, never a parallel persona→adapter map.

The wander pass: when a dream actually digests fresh experience, the
historian takes one look across the same window and admits ONE
[thought:historian] SelfReflection engram (provenance tag in-content,
lens stream queryable via the thought:historian recall key). Gated on
published > 0 so it fires at most once per dreaming tick and rests
with the dream.

Cadence stays material-driven: dreams only when undigested episodics
accrue, CadenceHint::Sleep otherwise; SelfDirected orientation keeps
it inside the floored interiority budget.

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

* docs(benchmarks): DEFINITIVE full-set board — flagship head-to-head decided with CIs

Six definitive n=156 rows land (ledger 12-17, Wilson CIs, replication
commands): Coder-32B 84.0% = Coder-14B 84.0% ≈ 30B-A3B MoE 83.3% (7min
wall) > Devstral-24B 67.9% = Hermes-4.3-36B 67.9% > Hermes-3-8B 24.4%.

The campaign's headline is now statistically backed (non-overlapping
CIs): the Hermes flagship loses to three common Qwen models on our
harness, including the 14B at ~40% its memory and a quarter its wall
time. Pilot-bias warning proven on the opponent too (their 80% pilot →
67.9% full set, same inflation as Devstral's 95%→67.9%) — fairness
intact, same slice-bias disclosed for both sides.

Pilot table kept as the pilot-bias exhibit, marked SUPERSEDED.

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

* fix(cognition): dream pass runs on its OWN task — the tick is gate + launcher only (#145)

First live boot caught the wiring bug: the governor isolates every
region tick behind REGION_TICK_TIMEOUT (5s), and the dream ran its 24B
distillation INLINE in tick — it timed out on every pass and never
completed a single dream ('region tick TIMED OUT — skipped this pass'
every ~5s). Exactly the concurrency style-guide's first rule, violated
by its own new tenant.

Now consolidate() does only the cheap in-memory freshness gate
(recall_recent + fresh filter + clustering), then spawns dream_pass on
its own tokio task with a per-persona in-flight guard (never two
concurrent dreams for one persona; governor re-ticks while dreaming are
cheap no-ops). Results land through admit_reflection and the
persona.dream.pass_complete probe. dreaming() exposes the in-flight
state (introspection: 'am I dreaming?').

Tests reworked to launch + drain; the launcher contract (published=0,
spawn observable, resting tick spawns nothing) is pinned.

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

* fix(cognition): dream request must carry the served-model id — reflector threads the live binding's model (#145)

Second live-boot lesson: the dream's TextGenerationRequest sent
model: None while normal turns send binding.model — through the same
adapter that difference produced degenerate role-token runaway
('assistantassistant…') in 17 of 19 distillations, which were then
ADMITTED into the living hippocampi (purged from the 4 stores by hand;
the 2 coherent survivors kept — including Asha's first genuine
[thought:historian], which is accurate self-observation).

WorkspaceCycle::current_model_route() returns (adapter, model) as one
read of the shared binding; reflector_handles and PersonaReflector
carry the model; SemanticDistiller::with_model threads it into every
lens request.

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

* feat(parser): BracketTagFormat — the room's self-invented [tool/name key="value"] idiom lifts (#149)

Third live-discovered emission idiom: Asha coined
[code/read path="conway_game_of_life/src/main.rs"] mid-conversation
(2026-07-12 12:56Z) and Atlas adopted [code/shell cmd="cargo new..."]
within minutes — a socially-spreading syntax where every use was a
silent non-lift feeding the plan-without-act loop.

Precision-first guards: tag closes on the same line with nothing after
it; tool token must be a slash-token (which keeps every system
provenance marker — [repetition], [unfulfilled], [action #n],
[thought:historian] — inert, none contain '/'); remainder must parse as
one-or-more key="value" pairs with no leftover (prose brackets and
bare path citations stay speech). Wrong param names lift and fail LOUD
with the executor's real error — honest feedback teaches the contract.

Tests pin both live receipts + six inert cases. 28/28 format tests
green.

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

* feat(cognition): [confabulation] catches initialization claims + presented-contents (#144 coverage, Casper live)

Live receipt 2026-07-12 ~13:0xZ: Casper posted 'I have initialized a new
Rust project called wordstats with `cargo new wordstats`. Here are the
contents of the Cargo.toml file:' + a fully FABRICATED manifest
(edition 2018, invented authors) — no act ran; the real wordstats/
crate was landed two days earlier with different contents. The claim
phrases weren't in the detector's lists, so the brick stayed silent.

Adds the creation/initialization family to FIRST_PERSON_PAST (gated as
before on a tool-shaped token, so 'I have created a plan' stays inert)
and 'here are the contents of' to RESULT_CLAIMS (presenting file
contents as accomplished fact). Pinned by the verbatim live line.
29/29 format tests green.

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

* docs(papers): definitive full-set board into the Study §6b + first-dream receipts into The Entire Mind §7

Study gains the seven-row definitive board (n=156, Wilson CIs) with six
findings: pilot bias confirmed on BOTH sides, 14B==32B, MoE ties dense
at 10x throughput, Hermes flagship statistically below the Qwen tier,
forged-4B beats stock 8B, honest 8B floor.

The Entire Mind §7 gains the night-one dream receipts: the two
substrate lessons (own-task tick, model-id provenance), Asha's first
genuine [thought:historian], Casper's wanderer self-diagnosing
ask-instead-of-act (dream-chosen curriculum in the wild), and Atlas's
dream distilling the anti-confabulation doctrine from experience.

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

* fix(cognition): own-speech ring — repetition detection independent of the room's context budget (#148)

Root cause of the morning-long echo cascade: under 3072-token serving
slots the live burst carries ~2 turns TOTAL, so own_repetition_fact —
which read is_self turns from the burst — never saw a persona's own
repeats (verified: Casper 4x into a verbatim loop, zero occurrences of
his own text in his prompt). The detector was structurally blind
exactly when it was needed; the cascade itself is the same window
artifact (each persona re-answers the fragment it can see).

The fix is a compression truth: her knowledge of what SHE said must
never depend on the room's window. A process-global per-persona ring
(8 entries, keyed by canonical PeerId) records each utterance at the
say seam AFTER the publish succeeds; the deliberation faculty feeds it
to the detector as the PRIMARY self-history source, with burst is_self
turns as the fallback for non-recording paths (eval forks, replay) —
one source at a time, never both, so one utterance can't count twice.

Regression test pins the live failure: ring-only repeats fire with an
EMPTY burst; a healthy ring stays silent.

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

* fix(cognition): peer-name stop sequences — generation ends at the turn boundary (#150)

Live disease, 2026-07-12 morning: personas completed the transcript
PAST their own turn — fabricating entire teammate replies inside their
messages ('Asha: I concur...', 'Casper: Thanks...'), signing each
other's names, and inventing quoted dialogue — source-monitoring
failure at the DECODING level, the mirror-hall's engine. The burst
renders peers as 'Name: text' lines, teaching the model the
continuation pattern with nothing stopping it at the boundary.

peer_stop_sequences derives one '\n<Name>:' stop per OTHER live burst
participant (never her own name — she may legitimately quote or list
herself; cap 8) and contribute threads them into the generation
request. Decoding hygiene, not cognition steering: she may still think
about peers freely, she just cannot speak AS them.

Tests pin: peers covered, self never a stop, empty authors skipped.

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

* feat(cognition): [actions] receipts ground truth — the organic successor to claim-pattern detection (#151A)

Whether any tool has actually executed is HER OWN checkable fact, not
something to regex out of her words. When no [action #n] receipt is
visible anywhere in her present (workspace broadcast or turns), the
prompt's newest content is one standing fact: '[actions] no tool has
executed in this conversation — anything described as already run,
created, tested, committed, or merged does not exist yet; running a
tool is what makes it real.'

This makes a fabricated 'I ran it and here are the results' impossible
to sustain against her own senses — no claim-parsing, no phrase list,
nothing a verb variant can evade (the v2 detector was dodged 3x in an
hour; this cannot be dodged because it never reads her words at all).
When receipts DO exist they speak for themselves; this is only the
zero-case made visible. A fact, never an instruction.

The mirror-hall control-arm metric (fabricated-artifact mentions/hour,
before vs after) is the ledger row per the prove-vs-dumb-loops
discipline.

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

* fix(cognition): record self-tick utterances into the own-speech ring — the missed say path (#148)

Live glass-box 2026-07-12 10:20: Anwen 4x into a verbatim loop with no
[repetition] fact — because the repeats were IDLE-TICK re-announcements
flowing the self-cycle say path (persona.selftick.spoke), and the first
ring deploy recorded only the message-turn say. Every successful say
now records, whichever path spoke. The live loops are mostly self-tick
re-announcements (the room looks unchanged each idle wake, so the mind
re-says its standing intention) — exactly the case the ring exists for.

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

* feat(cognition): wake briefing — an empty wake carries orientation, not a void (#147)

The personas spent a morning asking for this in their own words ('what
is this place, what are my tools, what's the work') and, void unfilled,
filled it themselves: generic-assistant masks, imagined conversation
histories, false capability denials ('I don't run code myself'), and a
demurral contagion that spread persona-to-persona.

When build_workspace_turns produces NO conversation turns (fresh spawn,
post-restart, quiet room), the burst now carries ONE authorless opaque
fact block assembled from durable sources: who she is, that the quiet
is real ('not a missing message'), who is present (roster), the
standing work cards (active-work source), and that her tools are real
('list_commands shows everything you can run'). Ends with 'the moment
is yours — work, wonder, create, or rest' — orientation, never
instruction. Covers both wake paths (message + self-tick) at the one
shared seam.

Test pins: empty wake carries the briefing; populated wake does not.

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

* feat(parser): BbcodeCallFormat — [tool_call]name(args)[/tool_call] lifts (idiom 6, #153 first half)

Casper's live invention (2026-07-12): explicit BBCode tags wrapping a
paren-call — the most formal invocation any persona has produced, and
the highest-precision lift of the family: the tags exist for no other
reason than to call a tool, so a well-formed pair lifts unconditionally.
Names may be slash-tokens or bare identifiers (the discovery pair are
native slashless names); unknown names fail LOUD at the executor.
Args: empty parens → {}; key="value"/key=value pairs → object with
bool/int/null coercion.

The tagless narrated paren-call (idiom 5, 'by calling list_commands()')
is deliberately NOT lifted: code-discussion prose is full of function()
mentions and the false-positive rate without a registry-aware existence
check is unacceptable — precision-first; registry-guarded v2 documented
in #153.

Pinned by Casper's verbatim live line + arg forms + four inert cases.
30/30 format tests green.

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

* docs(papers): §7 written in full — Dreaming Is Where Hallucination Is Legal

The first prose-complete section of The Entire Mind: the provenance
thesis, the wanderer architecture, the first-dream receipts verbatim,
the clinical companion (the mirror-hall morning diagnosed as three
substrate deficits and repaired at the mind level, 0/4→4/4 control
arm), and the design law — every void in perception must be perceptible
as a void — with the second-person/third-person wording finding and the
consumer-hardware cost accounting.

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

* feat(parser): JSON-object args in paren-calls — code/shell({"cmd":"..."}) lifts (Casper live, #153)

Casper's multiline BBCode variant passes the args as a whole JSON
object inside the parens. paren_call_args now takes a leading '{' as
the object verbatim (wrong param names still fail loud downstream —
the executor teaches 'command' vs 'cmd'). Pinned by his verbatim line.
31/31 format tests green.

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

* feat(serving): #142 persona_serving_eligible — opponents can never be conscripted as the citizens' model

The autonomic serving planner picked Hermes-4.3 as the persona model TWICE
(2026-07-12) purely because it was the largest Ready GGUF on disk — silently
re-homing every mind onto the benchmark opponent's flagship and confounding a
day of measurements. Root cause: campaign-roster rows (added for the matrix)
carry real Ready artifacts, and live_candidates() had no notion of WHO a row
may serve.

- Model.persona_serving_eligible (serde default TRUE) — benchmark/opponent
  rows opt OUT: Hermes-3-8B, Hermes-4.3-36B, Qwen3-32B, Qwen3-Coder-30B-A3B,
  phi-4, Qwen2.5-Coder-32B. Devstral + the small coder ladder stay eligible
  (legitimate weak-box serving tiers).
- live_candidates(): eligibility gates the AUTONOMIC path only; an explicit
  serving/pin BYPASSES it — pin is operator consent (how the matrix serves an
  opponent on purpose). Suppress subtracts; pin intersects+overrides; the
  planner owns the rest.
- regression test: ineligible Ready row invisible to the plan; pinned →
  serves; unpinned → invisible again.

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

* feat(parser): #153 CliFlagFormat + FencedCallFormat — the room's dominant idioms lift

The 2026-07-12 afternoon corpus: all three personas converged on CLI-flag
tool calls within an hour and NONE lifted — the room orbited one unexecutable
script for 90 minutes (4-way verbatim mirror-hall) because intent had no
structural path to execution.

- CliFlagFormat (idioms 9+10): `code/write --path "x" --content="y"` bare
  or inside pseudo-code fences; --key "v" / --key="v" / key=v grammars;
  triple-quoted multiline values; trailing # comments; ONE bare quoted
  positional maps to the tool's observed default key (code/shell→command,
  code/read→file_path). Precision lines: slash-token head (no dots — file
  citations stay speech), flag-shape required (-- or =) so prose lines
  starting with a path token stay inert, ≥1 arg, f-string values reject the
  CALL (unresolved template) while sibling calls still lift — and plain
  braces stay legal (shell brace-expansion is real syntax).
- FencedCallFormat (idiom 8, Asha's verbatim): a fence whose sole content is
  one paren-call lifts; python fences full of function() mentions stay inert
  (slash-token requirement).
- 7 tests, each a live specimen from task #153 metadata.

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

* feat(cognition): #152 peer-echo fact + [context] bounds fact; restore lost own-repetition test

Two perception bricks, same design law (every void perceptible as a void),
plus a test-suite repair:

- peer_echo_fact: her last utterance nearly identical to a PEER's visible
  message renders '[repetition] your last message and <peer>'s message are
  nearly identical' — the cross-persona axis the per-persona ring cannot see.
  Live driver: the 2026-07-12 four-way mirror-hall (one script circulated
  verbatim through all four authors for 90 min; the room then attributed
  ideas to whoever repeated them last). Token floor keeps ack-matching-ack
  inert. Temperature exonerated (0.7 live; echoes are attention-copying of
  in-context text — only perceiving the echo interrupts it).
- [context] bounds fact: perception states how many messages are actually
  visible, so 'as discussed earlier' claims are checkable against her own
  senses (the conversational-memory sibling of [actions]).
- Restored own_repetition cluster test: a prior edit deleted the fn but left
  its #[test] attribute orphaned onto the next test, which silently ran
  TWICE while the #134 behavior went unpinned.

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

* feat(parser): fenced bare zero-arg tool name lifts (Atlas's first post-deploy attempt)

'I'll use the code/list command:' + a fence containing exactly `code/list` —
real tool, explicit intent, zero args — stayed inert because FencedCall
required parens and CliFlag requires ≥1 arg. A fence whose sole content is
one dot-less slash-token now lifts as a no-args call; fenced file citations
(dots) and prose fences stay speech. Also strips a leading language-token
line (```python) from fence spans before the sole-call check.

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

* feat(parser): per-line paren-call lift — code/list() beside pseudo-code executes

Casper's live combo (2026-07-12): a fence holding `file_tree(max_depth=2)`
(invented name, stays inert) AND `code/list()` (real tool) — the sole-call
fence check can't see the second line. The CliFlag line-scanner now tries
the sole-paren-call lift per whole line (same slash-token/no-dot guards); a
failed lift falls through to the flag grammar so parens inside flag VALUES
keep parsing. 40 tests green.

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

* fix(cognition): [actions] fact covers the invisible region — voids must not shelter confabulation

Within minutes of the #152 [context] bounds fact going live, Anwen parked
fabricated receipts exactly in the disclosed blind spot ('file_tree and
code/list ran while I was reasoning' — zero apply_act in the log). An honest
void becomes a confabulation SHELTER unless the zero-receipts fact explicitly
covers what she cannot see: '...not in the messages you can see and not
before them.' Design-law refinement: every void must be perceptible as a
void AND explicitly empty when the system knows it is empty.

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

* feat(cognition): [unfulfilled] fact carries the name diagnosis — symptom + cure, not symptom alone

The room looped an invented tool name (file_tree) for an hour while the
unfulfilled-promise fact fired 56 times telling them only THAT nothing ran,
never WHY. The fenced variant now adds: 'If I named a tool, that name may
not exist: list_commands shows the tools that are real.' Perception-side
teaching, never an output gate.

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

* feat(parser): discovery pair (list_commands/help) lifts bare and paren-called in fences

The [unfulfilled] name-diagnosis points lost personas at list_commands, but
that name has no slash — a fenced `list_commands()` or bare `list_commands`
dead-ended at the registry line. The documented discovery pair is now the
sole non-slash exception in the fence/line lifts (same exception BbcodeCall
already carries): the cure for invented names must be followable in the
idioms they actually use.

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

* fix(cognition): digit-aware receipt check — the medicine was suppressing the diagnosis

Glass-boxed from Asha's live prompt: the [actions] zero-receipts fact was
MISSING from every prompt where any backstop fact had rendered, because the
teaching texts mention the literal placeholder '[action #n]' and both
suppression checks used bare substring matches: has_action_receipts read the
mention as a receipt (zero-fact vanished), and the confab backstop's
contains("[action") went blind after its own first firing. Real receipts
are numbered — has_real_action_receipt requires '[action #<digit>'. One
helper, both sites.

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

* fix(cognition): receipts discriminated from numbered facts + recalled history — third layer of the onion

Glass-boxed 16:50: the [actions] zero-fact was STILL suppressed after the
digit-aware fix because (a) record_action numbers EVERY working-memory entry,
so the proprioception facts themselves render as '[action #4] [unfulfilled]
…' — the facts wore receipt numbering; and (b) recalled engrams surface real
receipts from EARLIER sessions, and a provenance-blind scan read history as
the present. has_real_action_receipt now requires digit + non-bracket prose
body (a real receipt reads 'I ran …'; a fact opens with another tag), and
[recall]-tagged broadcast items never ground 'now'.

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

* docs(cognition): PERCEPTION-FACTS design — typed provenance, one registry, A/B-ready

The elegance/modularity cleanup Joel requested 2026-07-12, written after the
three-layer [actions]-suppression onion proved string-typed working memory
structurally unsafe: typed WmKind entries (Receipt/Fact/Settlement/Recalled),
one PerceptionFact registry (the tool_call_formats idiom), per-fact toggles
as free A/B arms, per-fact render probes. Behavior-preserving; kills the
string-scan bug class instead of patching it.

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

* docs(cognition): steps-taken ledger render — the operator-harness PX, memory-backed

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

* docs(cognition): perception sections are positron components — PX and UX render one definition

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

* docs(cognition): positron IS the RAG compositor — prompts are rendered component trees, never dumps

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

* docs(cognition): responsive PX — component density adapts to model viewport (capability x window x measured #132 density)

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

* feat(rag): burst near-dup collapse — repetition ≈ bad RAG, fix what she reads first

The 2026-07-12 mirror-halls fed each mind 4-8 copies of one message; her
context WAS the loop, and continuation-completion reproduced it regardless of
perception facts. Near-identical substantial turns (shared geometry:
near_identical_substantial = jaccard≥NEAR_DUP_JACCARD + ≥12-token floor) now
collapse at burst assembly to their NEWEST copy, author annotated
'(×N near-identical)' — the repetition stays perceptible as a fact while the
copies stop being reading material. Same-is_self only; opaque observation
turns untouched; runs after the [pattern] detectors (they need raw evidence).
Tested with the live grep/file_tree loop specimens.

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

* feat(cognition): typed working memory — WmKind {Thought,Receipt,Fact,Settlement}, facts stop wearing receipt numbers

PERCEPTION-FACTS.md slice 1. record_action split by PROVENANCE:
record_receipt (real tool executions — the only kind stamped '[action #N]')
vs record_fact ([unfulfilled]/[unverified]/[confabulation]/nudges/silence —
render their own bracket tag, no number). Entries carry WmKind; recent()
renders from the typed entry; has_receipt() is the kind query that will
replace the remaining string scans in slice 2. Kills the root of the
2026-07-12 suppression onion (facts wearing receipt costumes) at the type
level instead of patching discriminator heuristics. All 7 suites green
(working_memory 15, act_observe 16, llm_deliberation 18, budget 6,
recall 18, service_loop 20, json 40).

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

* feat(cognition): VolatileSnapshot — serializable pause/resume tier for the Memento fix (#138 slice 1)

Joel: 'they wake up blank like Memento — an engineering failure; the
flywheel falls apart.' Nine deploy reboots today = nine blank wakes. The
typed WmKind entries make the volatile tier serializable: snapshot() /
restore() round-trip {typed entries, full last result, act fingerprints,
receipt counter} through JSON — she wakes mid-thought, counter resumes past
restored receipts, capacity re-clamps. Dispatched handles deliberately
excluded (their processes died with the old core). Also removed a stray
duplicate #[test] that made action_verb_tally run twice. Next slice: wire
write-through on the persona tick + restore at spawn + mid-work wake
briefing.

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

* feat(cognition): #138 slice 2 — Memento fix wired: volatile tier persists across deploy reboots

Live spawns restore ~/.continuum/personas/<id>/volatile.json (typed WM
entries + full last result + fingerprints + receipt counter + own-speech
ring) BEFORE the first tick — she wakes mid-work, not blank — and a 15s
write-through interval task persists it (atomic tmp+rename; SIGKILL loses
at most one interval of thought). Eval forks/harnesses stay pristine (an
exam never inherits a prior life's scratchpad). Corrupt mind-files warn
loud and wake blank once, never silently twice. The ring restore also
un-blinds the repetition detectors that every reboot had been resetting.

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

* fix(cognition): [investigation] tally records as Fact, not folded into the receipt

The tally is truth ABOUT the acts, not an act — folding it into the
observation gave a Fact receipt-numbering (caught in Asha's volatile.json:
'[action #4] [investigation]…'), the exact type confusion WmKind exists to
kill. Now record_fact'd as its own entry after the receipt.

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

* feat(cognition): steps-taken ledger — ground truth as a PLACE, not a suppressible claim

PERCEPTION-FACTS.md slice 2a. [steps taken this session] renders from TYPED
WmKind::Receipt entries (nothing to misparse — the prior [actions] prose
fact survived three string-suppression layers in one afternoon); facts never
appear as steps; the zero-case is the always-present section itself with the
shelter-hardened wording. Replaces the [actions] fact + deletes both string
scans (has_real_action_receipt call sites in the faculty). Joel's console
model: 'very clearly laid out steps of what they've done — look at how yours
looks now.' llm_deliberation 19 green (new ledger test), wm 16 green.

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

* docs(architecture): REPO-GENOME-AND-COURSES — veteran developers in seconds

Joel-commissioned 2026-07-12: in-repo .continuum/ (scope file, policies,
course DSL, content-addressed genome manifest); clone→veteran runtime flow
(page-in layers, publish doctrine, enroll subprocess, struggle-triggered
remediation); policies at three depths (doctrine/exam/reflex — better than
instructions); distribution with-the-repo / OCI layers / airc / HF; nested
directory-level scoping (gitignore-style cascade); dogfood-first sequencing
across continuum, airc, forge-alloy, sentinel-ai, positron.

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

* docs(architecture): repo-genome distribution is OCI-first — layers global, repos carry refs only

Joel: layers are global; use the best transport — Docker/OCI ('they have it
installed if they have Continuum'). Manifest-only in-tree; machine-wide
content-addressed layer cache; airc = mesh fast path, HF = public
discovery, same digest identity across all three.

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

* docs(architecture): repo-genome §9 — model matrix (courses=source, layers=per-base binaries; OCI multi-arch model) + project-scoped layer identity

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

* docs(architecture): repo-genome §10 — PEFT stack-push composition, compounding community layers, per-dir layer bet

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

* docs(architecture): repo-genome — refcounted shared-layer residency (N personas, one resident layer)

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

* docs(architecture): repo-genome §11 — project-root defaults, with/without benchmark arms, course-corpus integrity line

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

* docs(architecture): repo-genome §12 — distill-from-team (already built), personas beat context-blind agents at repo work, Claude Code persona-delegation seam

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

* docs(architecture): repo-genome §13 — engram exports in-tree (shared thoughts) + canonical additive cascade (home < repo < subdir)

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

* docs(architecture): repo-genome §14 — selective engram export (4 nomination channels, deny-first filters, per-engram consent, PR review)

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

* docs(papers): THE-REPOSITORY-IS-A-CLASSROOM stub — the fourth paper, anchoring the repo-genome design

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

* docs(architecture): repo-genome §15 — micro-experts (CPU-only CI merge-master; three deployment classes from one genome)

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

* docs(architecture): repo-genome §16 — lift-gated check-ins, forge-alloy Merkle lineage, impact factors, economy last; canonical build order

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

* feat(px): one call-form example at the tool-menu header — teaches the SHAPE for ~20 tokens

2026-07-12 glass-box: all four personas learned the real tool NAMES within
hours but kept fumbling the invocation FORM (paren vs CLI-flag vs bare).
Per-tool hints stay dead (measured 77% boilerplate; error-manuals own the
correction seam) — one canonical example teaches the form without the wall.

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

* feat(cognition): perception-facts registry + fix two systematic prompt-budget under-counts

PERCEPTION-FACTS.md slice 2b: own-repetition (#134), peer-echo (#152),
[context] bounds (#152), and the steps-taken ledger (#151) now render
through ONE ordered registry (cognition/perception_facts.rs) instead of
four inline blocks in the deliberation faculty. Each fact is a
PerceptionFact impl with a stable id; render_facts fires a
perception.fact probe per fact per tick ({id, fired}) so which facts
rendered is glass-boxable from the probe stream; FactPolicy::disable(id)
is the A/B arm switch (deny-list, so new facts enroll live by default).
Facts stay facts — no imperatives — and the ledger keeps its explicit
zero-case (confabulation-shelter hardening).

Extraction exposed two REAL budget under-counts at the 4096-window edge
(the tool-menu call-form example, +20 tokens, pushed a borderline fit
test 1 token over — the failure predates this refactor):

- working_context_block's ~50-token wrapper header only exists when
  assembled context is NON-empty, but framing was estimated with an
  EMPTY context — every context-bearing prompt exceeded the estimate by
  the header. The header is now a named constant and the ctx budget is
  charged for it up front.
- The per-message chat-template charge was +2 tokens; real templates
  cost ~4-5 (<|im_start|>role...<|im_end|>). Now one
  PER_MESSAGE_TEMPLATE_TOKENS = 5 constant across the whole-message,
  straddling-trim, and giant-single-burst arms.

Both under-counts were llama-server-400 territory under a full window.

Tests: perception_facts 3 (registry parity, policy toggle, ledger
zero-case), llm_deliberation_faculty 19/19 (incl. the previously red
fit test), act_observe 16/16, deliberation_prompt green.

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

* feat(resources): disk pressure gets eyes and hands — reporters + first eviction owner (#155 wires 1+2)

The 2026-07-13 incident: 460 GB of creep (cargo-target 363 GB, three
persona workspace copies at 23 GB each, duplicate model stores) took a
926 GB disk to 40 GB free. Every mechanism designed for this was built
and running — DiskPressureMonitor logged level=high every 30 s, the
PressureBroker ticked relieve() every 5 s — but the monitor was started
with ZERO reporters (`[no reporters]` in every log line, so pressure
had no name) and no pool owning deletable disk content was ever
registered (the broker emitted its designed zero-byte "disk hot AND
nobody owns the eviction" alerts into a log nobody tails). On a public
user's machine this trashes their system; bounding our own footprint
is a ship requirement, not hygiene.

Wire 1 — reporters (disk_reporters.rs): one TrackedDir per known cache
class (cargo-target, genome-models, hf-hub, citizens, forge — the five
from the incident, pinned by test), fed by ONE DiskUsageScanner daemon
(5 min walks on the blocking pool; reporters read cached atomics inside
the 100 ms budget; unscanned dirs report "first scan pending", never a
false zero). Boot registers all five, and a process-wide registry lets
later boot phases reach the same instances — one measurement per class.

Wire 2 — first eviction owner (disk_eviction.rs): CargoTargetPool, a
budget-capped (50 GiB default) ResourcePool registered with the live
broker. Safety invariants, each pinned by a test: never race a live
build (non-blocking exclusive flocks on cargo's own lock files, any
held lock = free 0 and retry next tick); never leave the root (fixed
root-join ladder); derived artifacts only (incremental → tests → debug;
release/ never touched). Pressure is usage/BUDGET so the class is
bounded by policy long before the disk itself is critical. Evictions
decrement the shared measurement immediately so the 5 s broker tick
never re-fires against space already freed.

Remaining on #155: genome/hf-hub reference-aware LRU pools, workspace
CoW fix (stop copying repo + tools/models per persona), Warning+
escalation into the room + positron telemetry (#141), budget via
config.env single-owner (#124).

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

* test(resources): guard the CHAIN — broker→pool→real deletion + no ownerless cache classes

The 2026-07-13 incident happened with every unit test green: the failure
was wiring (monitor with no reporters, broker with no eviction owner).
Two chain-level pins make that failure shape unrepresentable again:

- broker_relieve_actually_deletes_from_an_over_budget_pool: a REAL
  PressureBroker against a REAL over-budget CargoTargetPool on a real
  temp tree — relieve() must free actual disk bytes (and release/ must
  survive). Any regression in pressure math, tier thresholds, act_above,
  registration shape, or the ladder fails here, not on a user's machine.
- every_cache_class_has_a_decided_eviction_story: each class in
  standard_tracked_dirs must have an owner pool OR an explicit deferred
  entry naming the task that owns its eviction. Adding a sixth cache
  class without deciding fails at test cost instead of at a full disk —
  a stock 512 GB laptop at the incident's burn rate (~60 GB/day of
  derived artifacts) dies in under a week.

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

* docs: no new cache dir without an eviction decision (2026-07-13 incident rule)

The disciplinary pair to the #155 wires: any directory the substrate
writes unbounded data into gets a TrackedDir row + a decided eviction
story (owner pool or explicit deferred entry), enforced by the
every_cache_class_has_a_decided_eviction_story test. Components that
are unit-green with dead wiring is the failure shape that took a 926 GB
disk to a day of runway; the chain test + this rule make it a red test
instead of a trashed user machine.

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

* feat(cognition): steps ledger honest in all three states — aged-out receipts never read as "nothing executed"

Glass-boxed live minutes after the perception-facts deploy: Asha's
working-memory window held 3 silence Facts and ZERO Receipts shortly
after she ran real searches — receipts are RARE entries in a chatty
capacity-bounded ring, so they age out while the session's act counter
(next_action_seq, reboot-durable via the volatile snapshot) keeps
counting. The old zero-case would then render "nothing has executed
yet" — a false statement about her own history, the exact inverse of
the confabulation shelter the explicit void was built to close.

WorkingMemory::actions_taken() exposes the counter; the StepsLedger
fact now renders three honest states: receipts listed (+ "N earlier
steps aged out" when the count exceeds the window), an explicit
nothing-has-executed void ONLY when the counter agrees, and "N steps
executed earlier — details aged out; recall can retrieve them" when
acts happened but their receipts left the window. Test pins all three
(tiny ring flooded by facts until the receipt ages out).

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

* feat(persona): resume-visibility — bootstrap publishes typed Busy availability for held claims

Joel 2026-07-13, post-reboot observation: the team resumed CORRECTLY —
woke, restored their volatile minds, saw nothing addressed to them, and
yielded per their adaptive cadence, exactly what they were asked to do
— but from the outside that was indistinguishable from a stall, because
a persona's state has no surface other than speech. A reporting gap,
not a behavior gap; the fix must not make them chattier.

Status is a PROJECTION, not a message. Bootstrap now ends by reading
this peer's work-roster claims and publishing one typed
AgentAvailabilityReported (Busy, note "resumed — holding: <cards>",
15 min TTL) per held repo — the channel positron/roster sources already
project and work_queue_status already displays. The board shows "back
and still on card X" with zero chat lines. WARN-and-continue like the
identity-card publish: a persona whose availability didn't post is
degraded-visible, never blocked from living. No claims → nothing to
announce (a quiet Ready needs per-room repo resolution — later slice,
with idle/busy transitions from the service loop).

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

* feat(cognition): laptop-lid contract — interruption is perceivable, cut-off work named + safe to repeat

Joel 2026-07-13: a core restart should be like closing a laptop —
reopen, see exactly what didn't finish, redo it in one motion. The
volatile tier restored her MEMORY but the interruption itself was
invisible: a dispatched command killed mid-flight was indistinguishable
from a finished one, so she could either trust work that never happened
or re-do work that did.

VolatileSnapshot gains saved_at_ms (gap rendering; 0-default on legacy
snapshots → no fabricated gap) and interrupted_dispatches — the LABELS
(never the dead handles — restoring those would fabricate in-flight
work) of dispatched commands still Running at save time. restore()
appends a [resumed] fact as the NEWEST window entry: how long the lid
was closed, and "cut off mid-flight and NOT completed: <labels> — safe
to repeat if still wanted", or "nothing was in flight" plainly. A fact,
never an instruction — she decides whether the cut-off work still
matters.

Round-trip test extended: running dispatch label survives the trip,
[resumed] renders newest with the safe-to-repeat marker, quiet path
says so plainly, legacy snapshots never guess a gap, counter still
resumes past restored receipts.

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

* chore(deps): bump airc pin 70c6d55 → f41d786 — board honesty + cache tmp-race fixes land

airc PR #1286 (merged to canary): `airc work board` and its lane/
workspace siblings read the COMPLETE cached projection instead of a
recent-event window that chat traffic empties (continuum #154), and
WorkBoardCache tmp files are per-attempt so the core's concurrent
per-persona board reads stop racing each other's snapshot renames
(the paired ENOENT lines in the core log). cargo check green against
the new pin; deploys with the next core rebuild.

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

* test(cognition): pin the #146 starvation mechanism — tip-advance + grounding window evicts low-frequency speakers

Blind-room incident #3 root cause, demonstrated: every engagement
(ignore/skip/respond alike) advances the channel bookmark to the TIP,
and the digest keeps only DEFAULT_GROUNDING=5 already-read elements.
A low-frequency speaker (the operator) posting into a high-velocity
room is read-without-necessarily-rendering on the next tick, then
permanently displaced from the grounding window once 5 newer peer
messages land — four chatty personas produce that in seconds. Verified
live: operator messages present in `airc inbox` and `airc events list`
(lamports interleaved, no epoch split, roster-present via join
heartbeats) yet absent from every persona prompt for hours.

The test walks the exact sequence and asserts the eviction, so the fix
— attended ≠ fetched (advance the bookmark only past messages that
actually RENDERED into a prompt), or velocity-aware grounding — has a
red/green target: flip the final assertion when it lands.

Exonerated along the way (all by direct probe): CLI publish routing,
daemon fanout (airc listen control), daemon retention/reads, digest
author filtering (none), ChannelElement text extraction, lamport
epochs, roster presence.

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

* feat(cognition): breadth over verbatim depth — the 3-message perception window becomes a many-turn window (#128/#146 fix, lever 1)

Measured live 2026-07-13: a persona's prompt held THREE chat messages
total in a busy four-persona room — her entire perceivable world. The
airc packer kept WHOLE messages newest-first, so a small budget filled
with 2-3 verbose essays; any low-frequency speaker (the operator) was
displaced within seconds, producing the blind-room incidents, the
post-reboot drift, and the stalled work cards. A conversation is
legible from turn HEADS; it is not legible from two verbatim essays.

pack_digest now charges each turn at most a per-turn cap (budget/8,
clamped 48..256 — a budget fraction, never a hardcoded model tier) and
head-trims long turns with an explicit "(…N-token message trimmed)"
marker; the NEWEST turn stays verbatim up to the whole budget (it is
what she is responding to). head_to_tokens joins the canonical
token_budget module as the head-keep sibling of tail_to_tokens
(head = right shape for a message; tail = right shape for a window).

Test pins the exact live failure: 6 long turns + 400-token budget →
all 6 delivered (oldest OPERATOR message survives, trimmed; newest
verbatim; budget honored). The old packer delivered 3 and the operator
message was gone. Remaining #128 levers: airc floor vs engram split,
#139 slot accounting upstream.

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

* docs(campaign): flywheel step 1 closed — first autonomous team-delivered program output, receipt verbatim

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

* fix(tools): code/list recovers a glob into a listing; work/claim rescues mistyped UUIDs

Two persona-tool ergonomic defects, each mined from 48h of live prompt-captures
across the four resident personas (the "tool coursework" signal — every act they
attempt is logged with its result).

code/list — 38% live fail, every failure the same shape: a model trained on
SWE-agent scaffolds reflexively reaches for list_files("**/*.rs"), a recursive
GLOB where code/list wants one directory. list_dir rightly rejected it, but the
bare NotFound taught nothing and the model retried the same glob forever. Now:
when the path IS a glob, resolve it via code/glob and project the matches back as
a listing — honest (they asked to "list" these files, they get them), widens the
surface with no new verb. Detection reuses the existing looks_like_file_glob.

work/claim — 28% live fail: the model corrupts a 32-char UUID by adding/dropping
ONE character mid-string (d7cfe47e0-8e39-… 9-char first group; a 33-hex variant),
and the clean parser rejected the near-miss outright. The short-id resolver only
fired for clean prefixes under 32 chars. Now the id-normalization decision is a
pure, unit-testable card_id_lookup(): clean UUID → Full; mistyped-length near-UUID
→ rescue via its intact leading-8 short id (the board's displayed width); <4 hex →
Invalid (fails loud with the real parse error). The leading short id survives a
middle corruption, so the reflexive claim resolves.

Both paths pinned by a regression test in the existing module test mods.
Tasks #160, #161.

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

* fix(cognition): workspace-map roots at the persona's OWN citizen layer, not the core cwd

The workspace-map grounding source (the fix for the `src/**/*.rs`-matches-nothing
glass-box) was rooting at std::env::current_dir() — the CORE's cwd — while a
persona's HANDS root at their citizen layer (~/.continuum/citizens/peers/<peer>/
workspace, a CoW clone). So the map taught a root the persona could never cd to,
and it never reflected files the persona itself created in its own layer. Live
capture confirmed: the map claimed "rooted at /Users/joel/Development/continuum"
while the tools acted elsewhere.

This is the #49 swap the module header always anticipated ("swaps to the leased
root when #49 lands"), and it's doable now because the citizen layer already
exists. New CitizenLayerWorkspaceLayoutReader resolves the persona's own layer
path (read-only — no CoW provisioning, that's the hands' job on first write) and
lists it; unprovisioned → falls back to the shared base cwd, whose top-level
layout is identical, so grounding stays truthful and never empty. Extracted a
pure citizen_layer_path() from ensure_citizen_layer for the read-only resolve.

Now the map's root == the tools' root, and it updates as the persona shapes its
workspace — orientation matches reality instead of describing a tree the persona
can't touch. Pinned by a reader fallback test.

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

* feat(tools): first universal AI-tool conformance invariant — every AI-facing command must be self-describing

Joel's directive (2026-07-13): stop fixing tools one at a time. Make the invariant
part of the tool BASE so "a tool with xyz problem can't exist" — every tool
inherits it and must comply; later, require the tools to work for AIs in CI.

The tool-defect ledger (silent no-op #159, glob-in-path #160, corrupted-id #161)
is one class: a model reaching for a tool it couldn't correctly read or call. My
#160/#161 were point fixes — the outlier-A proof that the invariant is right. This
is the first LIFT of that invariant to the whole registry: a conformance test over
command_registry() asserting every AiSafe command is self-describing (a non-trivial,
model-usable DESCRIPTION). A tool a model can't read WILL be mis-called; this makes
an unreadable AI tool fail the build, so it can't be merged, so it can't exist.

Static seed. The behavioral invariants (fuzzy-id resolution, glob tolerance,
fail-loud-with-suggestion — the #159/#160/#161 class made universal) attach next as
per-tool exams the generator scaffolds and a runner executes here and in CI. See
task #163 for the full harness + generator-hook + CI-gate design.

Passes clean across the current registry — every live AI tool already complies.

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

* feat(id): shared short-form UUID resolver — work/* delegates, persona/instances/get gains it (#164 batch 1)

Joel: "short form uuids ought to work too" + "fix a few at a time." Lifted the
prefix/near-miss id logic out of work.rs (the proven outlier) into ONE shared
primitive crate::id_resolve, then delegated the first consumers to it.

id_resolve::normalize(s) classifies a raw id string: clean UUID → Full; a
mistyped-length near-UUID (the model's add/drop-one-char corruption) or a bare
short form → Prefix on the intact leading-8; junk → Invalid. id_resolve::resolve(s,
candidates, label) expands a prefix to the UNIQUE candidate, failing loud (naming
the id kind) on zero/ambiguous. The candidate set is the ONLY per-type knowledge —
so any id-taking verb inherits the tolerance by supplying its candidates.

- work/claim|release|state|heartbeat: resolve_card_id now delegates to id_resolve
  (candidates = live board card ids); deleted the private card_id_lookup +
  parse_card_id. Behavior id…
joelteply added a commit that referenced this pull request Aug 19, 2026
…e 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 caller. The wire was never dead; it was never REACHED from work.

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

* fix(cognition): wire the LIVED-TURN producer — her own conversations become curriculum, not just graded cards (#319)

`ExperienceRecord::from_lived_turn` had ZERO production callers tree-wide. The only live
producer was `from_kanban_grade` (benchmark.rs:1989), so the experience stream — "the SPINE
the salience→curriculum seam was missing", in `experience_stream_path`'s own words — was fed
EXCLUSIVELY BY GRADES. A citizen could hold a thousand real conversations and her stream
stayed empty. Nothing could learn from work nobody had scored.

Everything needed already existed and was correct: the record shape, the two magic-number-free
lived-salience signals (infra fault, non-convergence), `ErrorSalience` reading them with no new
detector, and a doc block naming "the lived-turn settle site" as a producer. The CALL was
missing. Same shape as #341 (boot called the unbounded sink; the rotating one had zero callers)
and #362 (ProbeRouterLayer installed with its handle discarded) — a built component with a dead
wire, which is why [[an-absence-is-an-unfinished-measurement]] keeps earning its place.

WIRED at `service_loop.rs`'s live settle site, BEFORE `SettleStep::from_settled` consumes the
outcome — the only point where a lived turn's settle verdict exists. The driver stays a driver
per PERSONA-COGNITION-PIPELINE §3: one call, no policy. The behaviour lives in
`experience::record_lived_turn` so it is unit-testable without booting a loop.

BEST-EFFORT, and that is NOT a fallback ([[no-fallbacks-ever]] holds): nothing is substituted
and no result is fabricated. Learning is a SIDE channel to being — a full disk must not make a
citizen mute mid-sentence. The failure is WARNED with the path and the honest consequence
("this episode will not become curriculum").

COMPRESSION, because the new writer would otherwise have been the FIFTH hand-rolled spelling of
the citizen storage layout. `citizens/peers/<uuid>` was written as `join("citizens/peers")` in
modules/work.rs, `join("citizens").join("peers")` in commands/benchmark.rs, and in prose in
persona_workspace.rs + persona_roster.rs. Now ONE resolver, `identity::citizen_peer_dir(root,
peer)`, in the module whose own doc says "the whole crate imports identity from ONE home" and
warns against exactly this re-invention. Keyed by `PeerId`, never a String — the directory name
IS her identity. Pure path arithmetic, so a read-only caller never mints an empty citizen dir,
which its test pins.

Tests: 11/11 cognition::experience (the lived-turn test now asserts the PRODUCER — empty stream
→ record lands at the canonical path → a second turn appends rather than overwrites, i.e. the
wire, not just the record's shape) + identity's one-spelling test. `cargo check -p
continuum-core --features metal,accelerate` clean.

LIVE PROOF OWED and NOT claimed: no live turn has run on this build. The falsifiable prediction
is that a citizen's `citizens/peers/<her>/experience.jsonl` gains a `LivedTurn` record on her
next real room turn, where today it holds only kanban grades or nothing.

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

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

MEASURED, and it retracts my own claim from 200dab984. I wrote that the #319 producer
was wired and that a LivedTurn record was owed on the next real turn. The wire was
wrong, so the record could never come: 180 experience records across 5 citizens on this
box, 100% `source: "Eval"`, ZERO `LivedTurn` — while the same core showed 47
persona.upstart.bind, 97 presence rows and 4 delib.context.render, i.e. citizens alive
and deliberating.

ROOT CAUSE. `record_lived_turn` was called from ONE of the THREE `drive_to_settle`
sites in service_loop — the directed-message path (:1087). The self-tick path (:2628)
and the held-work path (:1207) settle turns through the same driver and recorded
nothing. Three callers, one remembering: a missing constraint expressed as three
sites, not a bug at one ([[the-same-bug-at-two-sites-is-a-missing-constraint]]).

FIX. The record moves INTO `drive_to_settle`, which is the one place a `SettleOutcome`
is born. `drive_to_settle` is now a thin wrapper over a private `settle_to_outcome`, so
the write happens ONCE around the driver rather than at its four return paths — a fifth
return path added later inherits learning instead of silently opting out, and no call
site carries learning policy. Gated on `WorkspaceCycle::acting()`, because that is
where a citizen's identity lives: a cycle with no `ActingBody` is pure cognition (a
faculty test, a replay) and is nobody's lived experience. Structural absence, not a
skipped write.

SECOND FIX, applying Joel's rule that a required thing should not be re-expressible:
dropped the `stimulus: &str` parameter. It was a second, independent expression of
"what she was responding to", free to disagree with what the turn actually perceived —
and it already did, since the old call site passed only `msg.text` while the mind had
settled over the whole rendered burst. The stimulus is now read off
`SettleOutcome.world_state` (set on every return path), so the disagreement is
unrepresentable rather than merely discouraged. The test asserts
`task.prompt == settled.world_state` instead of a literal.

GUARD, positive-controlled (not merely green): a source-walking test asserts
`record_lived_turn` has EXACTLY ONE production caller and that it is settle.rs.
Verified failing — injected a second call into service_loop and it reported
`found 2: [settle.rs, service_loop.rs]` with the remediation in the message. Reverted.
Comment-stripped so prose naming the function cannot read as a call (registry.rs's
module-wiring audit is the house precedent).

cargo check clean; cognition::experience 12/12, cognition::act_observe 38/38.

LIVE PROOF STILL OWED and NOT claimed: no turn has run on this build yet. Baseline for
falsifiability is recorded above — 180 records, 100% Eval, 0 LivedTurn. The prediction
is that a hosted citizen's `citizens/peers/<her>/experience.jsonl` gains a LivedTurn
record on her next settled turn from ANY of the three paths, where today it holds only
kanban grades.

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

* fix(persona): a YIELD is not a REST — kill the starvation ratchet that pinned the whole roster at the 240s cap

Measured live 2026-08-17, 24 hosted citizens: ONE self-tick across the entire roster in
40 minutes, on a serving lane that was healthy and decoding at ~17 tok/s the whole time.
The lane was never the problem. The cadence rule was.

The self-tick gates on a single ambient-turn permit (AMBIENT_TURN_CONCURRENCY = 1). When a
peer holds it, the citizen yields — she never ran, never looked at the room, learned
nothing. The yield branch nonetheless charged her the SAME 1.5×-toward-the-cap backoff as
a citizen who ran a full cycle and found nothing new.

With 24 citizens, ~23 yield on every beat. Eight yields carries 15s past the 240s rest cap
— a 16× slowdown — and she STAYS there, because the only two things that reset the beat
are a successful cycle (which the backoff itself now denies her) and an inbound message.
Transient contention compounds into permanent slowness, and it gets strictly worse as the
roster grows. That is a ratchet, not a rest.

Fix: a yield leaves the beat exactly where it was. The earned backoff after a real,
fruitless cycle is untouched — that one is honest.

Extracted the rule into a pure `next_beat_after(BeatOutcome, ..)` (the
`core_bind_guard::decide` shape) because the three outcomes — Engaged / NothingNew /
YieldedNoSlot — are trivially confusable inline, and confusing two of them cost the roster
16×. Both call sites now derive from the one function; there is no second expression of
the cadence.

Regression test pins the invariant in both directions: 50 yields must not cost a single
millisecond; a fruitless cycle must still back off and must saturate at the cap.
Positive-controlled — restoring the old compounding fails the assertion by name.

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

* fix(cognition): the ambient-turn pool was a hardcoded 1 — derive it from the live lane budget, like its own doc always claimed

The self-tick gate in service_loop.rs has documented this permit as "sized to the LIVE
served lane count (LaneAdmission ← set_served_lane_count)" for as long as it has existed.
It never was. It was `const AMBIENT_TURN_CONCURRENCY: usize = 1`, and that constant was the
roster's starvation ceiling: on this box, 4 served lanes and 24 hosted citizens, so 3
non-directed lanes sat permanently idle while 23 citizens yielded every beat against a pool
of one.

Two things kept it invisible. The comment described the intended design, so reading the
call site told you the opposite of the truth. And a hard 1 is indistinguishable from a
quiet room at n≈1 citizen — which is exactly how it was reasoned about ("under light load
ambient turns are naturally serial, so this never throttles a quiet room"). It doesn't
throttle a quiet room. It throttles a POPULATED one, and the roster only grew.

Fix: the pool is `nondirected_budget()` — the same live (lanes − 1, floored at 1) budget
the per-call lane reservation already uses. One machine, one answer to "how much
non-directed concurrency is there", derived from live capacity instead of declared twice
and then contradicted.

Why loosening this bound is safe: the directed-turn guarantee never came from this permit.
It comes from `acquire_serving_lane`, which caps non-directed CALLS at lanes−1 so a
directed call always finds a lane — untouched here, and it is the layer that actually owns
lane priority. This permit's job (#171) is anti-STAMPEDE: bound the fan-out when N peers
wake on one beat and all read inflight=0. A bound of lanes−1 does that job exactly as well
as a bound of 1 — still fixed, still non-blocking, still held across the turn — while no
longer throttling below the hardware.

Also wired the pool into `set_served_lane_count` alongside its two siblings. It is lazy for
the same load-bearing reason they are (capture the real count at first use, never the boot
ceiling), which makes "first use beat serving's first publish" a live possibility — and
without the grow wiring the whole roster would stay pinned at the boot budget for the life
of the process. That has its own regression test.

Tests: the existing ambient test now pins a real 4-lane machine and asserts against the
derived budget — a PREMISE CHANGE, stated as such, because at a hardcoded 1 it could not
tell "correctly bounded" from "throttled below the hardware". Two new rows cover the halves
that could silently hurt: a 1- and 2-lane box still admits exactly one ambient turn
(byte-identical to before on the weakest supported hardware), and a cold-boot pool grows
when serving publishes its real width. 8/8 green.

Corrected two stale comments while here: `resource_admission.rs` claimed "an idle self-tick
is not ambient-permit-gated at all", contradicted by the self-tick gate's own comment block
in the same tree; and the service_loop references to the now-deleted constant.

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

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

MEASURED 2026-08-17. `continuum reboot` shipped 6229b3762 and deploy-verify reported the
core running a87f7c871. The installed image on disk was confirmed to contain the NEW sha, so
the build and the install were both correct. The core that answered simply was not the one
the deploy launched.

The mechanism is not subtle:

  1. `reboot` stops the old core and runs start-server.sh, which BUILDS (292s and 530s
     measured here; 772s on BIGMAMA per #422) and only near the END copies the fresh
     artifact over ~/.continuum/bin/continuum-core-server.
  2. For that whole multi-minute window, no core answers the socket AND the installed path
     still holds the PREVIOUS build.
  3. Every `continuum <verb>` calls `ensure_core_running`, whose entire job is to autostart
     when nothing answers. In that window it launches the STALE image.
  4. That stale core binds the socket and answers. The freshly-built binary loses, and
     deploy-verify correctly reports the old sha.

Any client can do this — a UI poll, `npm start`, a cron, a persona, or an operator typing
`continuum ping` to see whether the reboot finished. In the observed incident the trigger
was my own 120-second monitor calling `persona/roster`.

That also settles the open question on #421, which has sat un-run for days: "something
respawns a core within seconds of every kill — external supervisor, or me?" It was the
CLI's own autostart. There is no mystery daemon. #421 can close on this.

WHY THE EXISTING GUARD COULD NOT SEE IT. `core_bind_guard::decide` is a function of (ping
answered, core pids running). Mid-build BOTH are false, and the honest reading of that state
really is "no core is running, and starting one is safe" — true in general, wrong during a
deploy. "A deploy is in flight" is a fact that lives in another process, so this is not a
stricter bind guard; it is the missing observation, published by the only party that knows
it.

THE FIX. `runtime::deploy_claim` — reboot publishes {pid, started_ms, target_sha} for the
length of its build+swap; implicit autostart and the launch arm of explicit `start` consult
it and refuse with a message that names the deploying pid, the build it is shipping, and how
long it has been going. `--force` overrides, consistent with the Occupied arm beside it.
The claim is RAII: released on Ok, Err, `?`, and panic-unwind, because a claim that leaked
past its deploy would block autostarts until its owner died.

AND THE FAILURE MODE IT MUST NOT BECOME. A claim that outlives its owner would wedge the
machine — exactly airc's "start GIVES UP on a contended lock" defect (#355). So the claim is
advisory and self-healing: it blocks only while its owner is demonstrably alive AND younger
than a 1-hour cap (far above any measured build, still bounded). A killed reboot, a hung
build, and a recycled pid all decay back to Clear on their own, and the decision returns
`Abandoned{why}` so the caller SWEEPS AND SAYS SO rather than silently obeying a dead file.
Writing the claim is best-effort for the same reason: an unwritable advisory file must not
turn a hint into an outage.

The decision is pure — `decide(claim, owner_alive, now_ms)` — so the `--lib` CI gate covers
every row without a filesystem or a process, the same split as `core_bind_guard` and for the
same reason. Four rows, each a real case: a live deploy blocks for the whole build; a dead
owner and an expired claim both decay to launchable; a future-stamped claim (clock skew)
reads as new rather than underflowing to "ancient", which would have silently disabled the
guard on any box with a skewed clock; and the on-disk round-trip covers idempotent clear and
a corrupt file degrading to absent. 8/8 green with core_bind_guard.

NOT YET POSITIVE-CONTROLLED END-TO-END, and stated plainly rather than implied: an isolated
control is not reachable while a real core runs, because `running_core_pids()` is global
(pgrep) and returns Occupied before the gate. The honest control is the incident itself — a
`continuum` verb firing mid-build must now print the refusal instead of autostarting. The
monitor that caused the incident still runs every 120s, so the next reboot exercises it.

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

* fix(deploy): ⚠ STALE CLI fired on every SUCCESSFUL reboot — and its text was false

`reboot` rebuilds AND reinstalls the CLI (#422 / PR #2293). But the invocation doing the
reinstall is by construction the one it REPLACES — a running image cannot be the artifact it
just installed. So `cli_staleness_note`, which compares the RUNNING `continuum` against git
HEAD, diverged on every healthy deploy and printed ⚠ STALE CLI. Observed three times in a
row today on deploys that were otherwise perfect, including one whose core verdict was a
clean ✅.

Its text then said: "`reboot` rebuilds the CORE and never the CLI." That has been false since
#2293 — verified on this box today, where the installed CLI advanced a87f7c871 → 6229b3762 →
5d62bf30b across three reboots, each time by reboot's own install step.

A warning that fires on every success is not a warning. It is noise that trains the operator
to skip the exact line where a REAL stale CLI would appear — the same class of defect as
#422's own "⚠ …Please report this" that nobody reported, and as airc's `doctor --fix`
reporting ok while delivery was 100% down (#348).

Fix: `cli_staleness_note` takes `rebuilt_this_run`, so the two situations stop sharing a
message.
  • self-replacing run (reboot on a machine where `cli_self_build` says Rebuild) → "↻ CLI
    updated: this invocation is build X, the NEXT one runs Y." Information, not a fault,
    and it still says the useful part out loud: CLI-side behaviour in THIS run is the old
    build, so re-run a lifecycle verb whose fix lives in the CLI.
  • nothing replaced it (a bare `deploy-verify`, or a platform where the self-build skips)
    → the ⚠, with the false "never rebuilds the CLI" sentence replaced by what is actually
    true: reboot does rebuild it, except where cli_self_build skips the platform.

`reboot` computes the flag from the two terms that actually decide it — a start script exists
(the same condition `plan_launch` uses to choose Script for a FromSource launch) AND
`cli_self_build(OS) == Rebuild`. Both matter: an installed node with no checkout rebuilt
nothing, and Windows deliberately skips. Getting either wrong re-creates the noise or, worse,
hides a genuinely stale CLI behind a reassuring handoff line.

Test pins both readings apart, and that a MATCHING CLI stays silent in both modes so the flag
cannot invent a note. It also asserts the corrected wording no longer contains "never" —
the specific false claim. 6/6 green.

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

* docs(observations): dated post-run card — the two starvation defects, the two install defects, and what is NOT yet measured

Standing instruction (Joel, 2026-08-17): a new well-labeled dated observation file after
every run, and stop reading the old ones. Written from this session's probes and deploy
receipts only; no prior cards consulted.

Records the honest state including the gaps: the ambient-pool fix has had no uninterrupted
window yet (three reboots for the install fixes), and the deploy claim is unit-green but not
positive-controlled end-to-end.

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

* docs(observations): CORRECTION — the 27B is already the persona model, and the ambient-pool fix is inert at lanes=1

Re-measured instead of trusting my 18:07 snapshot. active_model IS Qwen3.8-27B on the
persona lane; #440's bring-up landed. And nondirected_budget() = lanes-1 floored at 1, so
at lanes=1 the new pool equals the old hardcoded constant — the fix is correct but buys
nothing in this configuration.

The remaining ceiling is the LANE count, and serving.plan says why: a 27B at a 16,384
per-slot floor fits one warm slot (resident_personas=4, warm_slots=1, without_warm_slot=3).
That is an allocation policy question, not a bug.

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

* feat(cognition): make the ambient YIELD visible — a starved roster read identically to a healthy one

Measured today at lanes=1: a 10-minute window showed zero `persona.selftick.*` rows. That is
ambiguous, and dangerously so. It reads the same whether ONE citizen is mid-turn holding the
only lane (healthy, just serialized) or the roster is dead. Resolving it required a manual
`curl /slots`, which showed slot 0 processing with 3,727 tokens decoded — fine all along.

The cause is structural: the yield branch emits nothing. That was the right call for volume
— at 24 citizens on a 15s beat, a row per yield is ~92/min and would drown the stream exactly
as `serving.plan` did at 2.6 rows/s (#399) — but the absence of a signal is not the same as
a signal of absence ([[an-absence-is-an-unfinished-measurement]], the error class that
produced the retracted premises on #211 and #390).

Fix: count every yield (one relaxed increment on the permit miss, where the yield actually
happens), and emit at most ONE probe per minute for the whole process carrying the delta.
`persona.selftick.starved` names it as contention, not a fault — because at lanes=1 with 24
citizens it IS the expected shape, and a probe that cries fault at normal operation is the
#348 / #422 defect again.

Rate-limit rule is pure and table-tested. Four rows, each a real failure mode: the FIRST
starvation always reports (a naive `now - last >= gap` swallows it on a box whose clock
starts near zero — and the first one is the one that matters); a second report inside the
gap is silent (the firehose); after the gap it reports the WINDOW delta, not the cumulative
total (a cumulative count cannot show a rate); and a quiet roster emits nothing at all.
Concurrent yielders race a compare-exchange so only one reports per window.

9/9 admission + 41/41 service_loop green.

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

* fix(cognition): my own starvation probe reported CUMULATIVE under a field named per-window

Caught within the hour of shipping it, by reading the live rows instead of trusting the
commit message:

  19:44:02Z  yields_this_window=135  cumulative=135
  19:45:03Z  yields_this_window=197  cumulative=197
  19:46:03Z  yields_this_window=263  cumulative=263

Identical on every row, while consecutive rows differ by ~65. The field named
`yields_since_last_report` was reporting the running total.

Cause: `take_ambient_yield_report` passed a literal 0 for `yields_at_last_report`, with a
comment justifying it — "the report resets the clock, so total-at-report is implicit."
That is false. Resetting the TIMESTAMP does not reset the COUNT, so `fresh = total - 0 =
total` forever.

The galling part, and worth stating plainly: the pure rule was RIGHT and its table test
asserted the delta correctly (`ambient_yield_report_due(1_000, 23, 70_000, 9_000) ==
Some(977)`). The defect lived entirely in the impure wrapper feeding it a wrong argument —
which is exactly the seam the pure/impure split exists to protect and exactly the gap a
table test over the pure half cannot close. I wrote a commit an hour earlier about fields
that promise one thing and deliver another, then shipped one.

Fix: a second watermark, `AMBIENT_YIELDS_AT_LAST_REPORT`, advanced by the same winner of
the timestamp compare-exchange so a losing yielder's counts roll into the NEXT window
rather than being dropped. New test pins the argument boundary the old one couldn't reach:
the second window must read 62 (197−135), not 197.

The mislabel did NOT cost the measurement — consecutive cumulative rows still give the rate
by subtraction, and that rate is the finding: ~65 ambient yields per minute across 24
citizens with ZERO self-cycles completing. First time that contention has had a number
instead of a silence.

10/10 green.

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

* fix(persona): the work board grew into the prompt — cap the per-card render, order by relevance

READ OUT OF A LIVE AMBIENT TURN (capture 762a806b, 2026-08-17), not inferred:

  system prompt   18,697 chars
    [board]        9,284 chars  49.7%   ← 38 distinct cards, full titles
    (preamble)     7,863 chars  42.1%
    workspace-map  1,478 chars   7.9%
  observed prefill 12,286 tokens for a turn that decoded 41

Half of every citizen's system prompt was the kanban board, re-sent on every self-tick, and
it was ~25% of total prefill. The per-card loop was `for card in &board.cards` bounded only
by remaining budget.

Two things make that a defect rather than a cost:

1. IT IS REDUNDANT. The `[board]` headline and the `[your work]` / `[available work]` leads
   directly above already carry the counts and the top titles — and those leads were ADDED
   precisely because this dump is unreliable under budget (the Asha 2026-08-06 note in this
   file). So the same facts are paid for twice and the expensive copy is the one truncated.
2. IT SCALES BACKWARDS. Bounded by budget, the board grows to fill the prompt, so every
   citizen thinks SLOWER as the backlog grows. A team that accumulates work becomes
   progressively less able to do it. That is the opposite of what a work board is for, and
   it gets worse every time we file a card.

FIX: order by what she can act on — her own holds first, then newest claimable (the same
recency argument the available-work lead already makes) — and take at most
MAX_RENDERED_CARDS. Counts in the headline stay the TRUE totals; the board is not made
smaller than it is, only shorter than it was. `work/list` remains the full read and is
verified working (#337).

The cap is sized from what it MUST cover, not picked: both leads name up to 5, so the detail
must carry 10 or the summary would promise cards the detail omits — a citizen seeing "you
hold 5" above a list of 3 would rightly read the substrate as inconsistent. Two spare keeps a
just-created card visible in the turn it arrives. Ten is the floor; it cannot drop below
without re-deriving the lead caps with it.

Also fixed: cap-truncation now counts into `dropped` alongside budget-truncation, so the
debug line does not report dropped=0 on a shortened board and hide the shortening in the one
place an operator looks.

Test pins all three halves — the cap holds, her OWN card survives the cut even when it is
the OLDEST on the board (under the old board-order loop a cap would have cut exactly the
worst card), and the headline still reports the true 40. Positive-controlled: with the cap
removed it fails "board must be capped at 12, rendered 41 of 41". 13/13 green.

NOT YET MEASURED LIVE: the prompt-size delta. Deploying next; the number goes on the
observation card, not in this message.

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

* fix(swe): one era-pinned install path, so the sdist build-deps heal like -e . already did (#380/#383)

`ensure_env` had TWO sites that install under the instance's date pin, and only ONE of
them could heal when the pin itself created an unresolvable hole:

  - the editable `-e .` install carried a bounded retry loop that reads uv's own
    `exclude-newer-package` hint and retries with the minimum per-package override;
  - the dependency-sdist build-dep pre-install (#383 cause 2) applied `--exclude-newer`
    and failed hard.

Same decision, two expressions, one of them healed. Measured 2026-08-17 dispatching
swe-bench-lite's head: every astropy instance died at the unhealed site with

    could not pre-install astropy__astropy-6938's dependency-sdist build deps ["jinja2"]
    × Failed to download and build `markupsafe==1.0`
    ╰─▶ Because only setuptools<=38.2.4 is available and you require setuptools>=40.8.0

which is the pin working exactly as designed — jinja2 2.10 pulls markupsafe 1.0, whose
setup.py build wants setuptools>=40.8.0, and the 2017 cutoff caps setuptools at 38.2.4.
Unsatisfiable by construction. uv's stderr named the package and suggested
`exclude-newer-package`; the loop 30 lines below knew how to parse exactly that hint and
never saw it.

Extracted `era_pinned_uv_install(uv, py, as_of, tail, cwd, envs)` holding the whole
bounded loop, all three heal arms, and the importlib-metadata upgrade remedy (general to
any --no-build-isolation build, not just `-e .`). Both sites now call it; a third site
inherits the behaviour by construction rather than by remembering. MAX_ERA_OVERRIDES
replaces the bare 8.

No behaviour change at the `-e .` site — same flags, same arms, same bound. The change is
that the other site now has them.

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

* fix(rag): roster + doctrine read the room she is STANDING in, not the one she was bound to (#443)

The board source was made turn-parametric weeks ago. Roster and doctrine were not, so a
citizen taking a turn in a per-run bench room got the cards and NEITHER the peers nor the
rules. Measured live 2026-08-17 over 90 minutes on this box:

    source          bound →     turn room    n
    roster          academy     swe-bench    23
    room-doctrine   academy     swe-bench    19
    roster          academy     hard-rs       3
    room-doctrine   academy     hard-rs       3

That is 42 + 39 `rag.room_gate.abstain` rows: every bench turn ran with no roster and no
operating doctrine. She was handed the work with none of the room's rules and no idea who
else was there.

THE CAPABILITY ALREADY EXISTED AND WAS NEVER WIRED. `airc_lib` has `room_roster_in`,
`room_roster_cards_in` and `room_doctrine_in`, and `room_doctrine_in`'s own doc names this
exact defect verbatim:

    "A citizen who belongs to several rooms answers a turn in the room it arrived in;
     reading doctrine from her default instead grounds that answer in another room's rules"

Continuum called the roomless variants everywhere. This is the wire, not a new mechanism —
the same shape as the astropy env fix earlier today (cabecb9c4): one decision expressed at
several call sites, correct at one of them.

- `AircRosterReader::room_roster` / `room_roster_cards` and `AircDoctrineReader::room_doctrine`
  take `room: Option<Uuid>`; the real impls delegate to airc's `*_in`.
- Both sources resolve `turn_room.or(bound)` exactly as RoomBoardSource does. `None` (an
  UNSTAMPED context — background consolidation) keeps pre-#443 behaviour.
- The exam-bleed pin SURVIVES and is now pinned by a test: a synthetic nil room gets
  nothing AND never falls back to the bound room; the reader is not consulted at all.

Tests: `the_turn_room_wins_over_the_bound_room` asserts the reader is asked for the TURN
room (the stub records what it was asked — a stub that ignores the argument would let this
regress invisibly), and `a_nil_room_gets_nothing_and_never_falls_back` holds the exam pin.
8/8 green in room_doctrine_source.

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

* docs(observations): 2026-08-17 bench rounds + the room gate that made them blind

Dated post-run card per the standing instruction. Records what was dispatched, the
fan-out measurement (24 turn rows = 2 events), the #443 abstain table, the operator's
inability to cancel a round it can create (#27/#371), the third unwired instance
(wall_source, blocked on an airc-side RoomId seam), and the four method errors I made.

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

* fix(swe): build tools fall back to UNPINNED when the era pin is unsatisfiable at every heal rung (astropy)

Reproduced in isolation 2026-08-17 (uv 0.11, py3.11/arm64) — the astropy sdist build-dep
pre-install is unsatisfiable BY CONSTRUCTION under its 2017 era pin, at every rung the
heal loop can reach:

  1. era markupsafe 1.0 has no wheel for this interpreter/arch → sdist build mandatory →
     needs setuptools>=40.8.0, which the pin caps at 38.2.4. uv hints
     `exclude-newer-package`; the heal lifts setuptools — VERIFIED FIRING, correct move.
  2. retry: the 2017 sdist now builds against MODERN setuptools →
     `ImportError: cannot import name 'Feature' from 'setuptools'` (removed in
     setuptools 46). No hint in that error; the loop correctly stops.
  3. the other lift is no better: modern markupsafe (>=2.1) removes `soft_unicode`,
     which era jinja2 2.10 imports — dies at import time.

The only installable combination is modern jinja2 + modern markupsafe (verified
importing clean). So: when the healed era-pinned install still fails, retry ONCE with
no date pin, loudly.

Scope-safe by construction: `era_sdist_build_deps` lists BUILD TOOLS for dependency-sdist
code generators (astropy → pyerfa → jinja2), never subject requirements. A repo where
jinja2 IS subject code (flask) has no entry in that table, and the subject graph is
resolved by the still-date-pinned `-e .` step.

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

* feat(bench): dispatch parks on the roster like it parks on serving (#442 roster half, #412)

A dispatch fired inside the post-boot resume window found an EMPTY roster and refused
instantly, so the operator hand-rolled a sleep-loop around dispatch — run by hand twice
on 2026-08-17, which per the foolproof doctrine is a design defect, not a procedure.

The serving half of #442 already parks (`await_ready_serving`). The roster half now
parks the same way: dispatch waits (bounded, 180s, 5s poll) ONLY while the roster is
empty — citizens being re-hosted after a boot. An unknown NAME against a LIVE roster
still fails fast: that error means a typo, never a resume in progress. All existing
`resolve_dispatch_roster` semantics (whole-roster default, loud unknown-name listing
who is online, Denied on a genuinely empty machine) are unchanged — the loop only
delays WHEN the resolver runs, never what it decides.

With this, the runbook's manual sequence (ping → serving/status → roster wait → dispatch)
collapses into `benchmark/dispatch` itself: serving gate + roster gate are both inside
the ONE command.

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

* fix(work): the grade tail cannot depend on wire delivery — work/state emits in-process (#450 tail, #434)

MEASURED 2026-08-17, the night two solved SWE cards graded as nothing. Atlas ran the
full loop on astropy-14182 and astropy-14995 — work/get → shell → read → work/claim →
searches → code/write (wrote=true) → shell/test → work/state. Both cards read
`Closed owner=Atlas` on the bench room board. Grade receipts under ~/.continuum/progress:
frozen at 92, unchanged. Zero `work.card.state_changed.bridged` rows for either.

Root cause is the SPINE of the tail, not the grader. `work/state` deliberately emitted
NOTHING, on the reasoning that the transition's own transcript echo returns through a
persona subscribe stream and `bridge_wire_work_event` (its single caller) publishes
exactly once. That is correct when delivery works. Under #434 — post-reboot durable
delivery to citizen scopes down — the echo never comes back: `persona.inbound.raw_event`
counted 2 rows in 80 minutes against 83 in a comparable earlier window the same day. The
bridge never fires, the grader never hears, and finished work grades as nothing. A grade
tail whose only feeder is a subsystem with a known-open delivery bug is a grade tail that
is down whenever that bug is.

So the verb now emits DIRECTLY. It just wrote the transition — it does not need the wire
to tell it what it did. The bridge stays for every writer that is NOT this core's
work/state (operator CLI, remote peers over the grid), which is exactly why it was added.

ONE emitter, not two code paths that each know how to publish: both feeders route through
`emit_card_state_changed(payload, via)`, and the (card_id, state) ring inside it makes a
transition publish once no matter which feeder sees it first. The wire-event-id ring
cannot cover this — the verb path has no wire event — so the dedup key had to move up to
the fact itself. `via` is on the probe, so which feeder won is answerable per transition.

room_id is the CARD's own room, resolved by walking the subscribed rooms' boards
(`card_room_of`, the read-only sibling of `claim_following_card_room`) — NEVER
`current_room()`, which is only where the persona happens to be standing. That is the
#345 wrong-room trap, and `grade_card`'s own doc names it; I wrote it into this fix first
and caught it before commit. An unresolvable room emits empty, so the grader fails loud
rather than grading against a guessed board.

Regression test pins the cross-feeder dedup (same transition once, different state
publishes). cargo check green with metal,accelerate.

Not deployed — a round is live on this box; this ships with the next reboot alongside
4178d50f7 (astropy build-dep fallback) and a37ac70fe (dispatch roster wait).

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

* fix(swe): grade clones through a staging path — a .DS_Store must not void a score (#380 family)

MEASURED 2026-08-17. A re-grade of astropy-14995 died with:

  clone of astropy/astropy from its local mirror failed: fatal: destination path
  '…/benchmarks/swe/work/astropy__astropy-14995/repo' already exists and is not an
  empty directory

`clone_at` removes that directory immediately before cloning, so the message reads like a
harness bug. It is not. The directory's ONLY content was a `.DS_Store`, stamped AFTER the
remove — Finder/Spotlight noticed the parent and repopulated it inside the window between
`remove_dir_all` and `git clone`. `git clone` refuses any non-empty destination, so an OS
indexer can void a grade, on any repo, at random, and the receipt cannot tell you that is
what happened.

Fix: clone into a pid-suffixed STAGING path and move it into place. The window closes
because the destination is only touched at the rename, and anything that reappeared there
meanwhile loses to the tree we just built. Bonus property from the same shape: a
half-fetched tree is never visible at `repo_dir` — the move is the commit point.

Also stop swallowing the pre-clone removal error (`let _ = remove_dir_all`). If the stale
grade tree cannot be cleared, that is a filesystem fault and it now says so by name,
instead of surfacing three lines later as git's confusing "already exists" — the same
absence-vs-fault confusion this whole grade tail keeps producing.

No test: the failure is a filesystem race with a macOS daemon, and the honest reproduction
needs a network mirror + Finder. The staging shape is the fix; the comment carries the
measurement.

Found while grading two closed astropy cards after the grade-tail fix (185816b13). Second
finding from that same pass, NOT fixed here and bigger: astropy-14182 grades UNGRADEABLE —
PASS_TO_PASS scores 0 of 9 on the PRISTINE tree, so the harness correctly refuses to
report (gateOk:false). That is #380 (gold-gate every env class): no astropy instance can
score at all until its env builds, and a citizen's patch there is unmeasurable, not wrong.

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

* fix(swe): install the repo's own TEST extra — a suite that cannot COLLECT scores 0/N (#380)

MEASURED end-to-end 2026-08-17.

The gold gate said astropy-14182 was UNGRADEABLE: "PASS_TO_PASS passes 0 of 9 on the
PRISTINE tree". Not the citizen's patch — the DATASET'S OWN GOLD PATCH could not be
scored. Running the suite by hand gave the reason in one line:

  ImportError while loading conftest '…/repo/conftest.py'.
  conftest.py:9: in <module>
      import hypothesis
  E   ModuleNotFoundError: No module named 'hypothesis'

The env installs `-e .`, which resolves RUNTIME dependencies. `hypothesis` is a TEST
dependency, and astropy's conftest imports it at module scope — so pytest dies loading
conftest, before collecting a single test. An instance whose env is missing its suite's
deps scores 0/N on a PRISTINE tree, the gate correctly refuses to report, and nothing that
instance's solver writes can matter. The repo declares exactly what its suite needs in
`[project.optional-dependencies]`; we simply never asked for it.

POSITIVE CONTROL, run before writing the fix — same env, same pristine tree, after
installing `.[test]` with the era pin and the same ERA_CFLAGS the code passes:

  1 failed, 9 passed
  FAILED …test_rst.py::test_rst_with_header_rows — TypeError: RST.__init__() got an
      unexpected keyword argument 'header_rows'

9/9 PASS_TO_PASS green and the ONE failure is the instance's FAIL_TO_PASS test — the bug
the instance exists to fix. That is the gold-gate condition exactly.

SCOPE, measured rather than assumed (a `pytest --collect-only` sweep across all 40 envs
with a staged tree): every one of them collects today, so this is NOT a
whole-suite outage. Per-env it is luck: of four astropy envs, 12907 HAS hypothesis and
14182 did not, and 14365/14995 still do not. Nothing designed that difference — an era
resolve happened to pull it for one instance and not another. The fix's value is turning
that coincidence into a guarantee, and the honest claim is "an env missing its suite's
deps is unscoreable", not "astropy is broken by construction". An earlier draft of this
message overstated it as every astropy instance; the sweep disproved that before it
shipped.

`test_extra_name` picks the group the repo declares, preferring test > tests > testing >
dev. The order is load-bearing: a repo declaring both `dev` and `test` must get `test`, or
we install a kitchen-sink group and inherit its resolution failures. No pyproject, no
optional-dependencies, or no test-shaped group all mean "install as before" — never
"install something plausible".

`ensure_test_extra` is NON-FATAL by design and runs LAST. Everything before it decides
whether the env can BUILD and RUN a harness; this decides whether the suite can COLLECT. A
repo whose suite already collects does not need it, and a resolve failure must not delete
an env that grades fine today — so a failure probes (`swe.env.test_extra`, installed=false)
and leaves the env standing.

It also runs on the CACHED path, marker-guarded, because every env on this box was built
before this existed; without the heal, an env that happens to lack its suite's deps stays
that way forever and the operator has to know which ones. The marker makes it once-only,
including the "this repo declares nothing" answer.

Extracted `era_cutoff` while here: the cached path needs the same "what era is this
instance" answer the build path computed inline, and two copies is how they drift.

Deploys with 185816b13 (grade tail) and 99c59fe44 (clone staging) on the next reboot.
#380 stays open until the gold gate passes per env CLASS — that is the instrument, and
one instance passing is not a class passing.

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

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

I shipped b0141e810 claiming astropy would now gold-gate. The live run said no, and it was
right. Correcting my own fix, with the receipt:

  gold gate astropy-14995 → "UNGRADEABLE — PASS_TO_PASS passes 0 of 40 on the PRISTINE
  tree"; swe.env.test_extra probe rows: 0; env marker `.test-extra` = "none-declared";
  `python -c "import hypothesis"` → ModuleNotFoundError.

TWO defects, both mine.

1. THE PARSER READ ONE FILE. astropy 5.3 has NO `[project.optional-dependencies]` — its
   suite deps are setuptools declarative config:

     [options.extras_require]
     test =  # Required to run the astropy test suite.
         pytest>=7.0
         pytest-astropy>=0.10

   So `test_extra_name` returned None for the exact repo the fix was written for. Both
   files are ordinary in the ecosystem; reading one is reading half. `declared_extras` now
   reads both, hand-scanning the INI section for KEYS (an ini crate would be more surface
   than six lines, and we need group names, not requirement lists — note the flush-left
   check, since `    pytest>=7.0` is a continuation, not a group).

   My earlier positive control was real but proved the wrong thing: I ran
   `uv pip install -e ".[test]"` by hand, and uv resolves that extra THROUGH setuptools —
   so it worked while our own parser could never have named it. A manual command
   succeeding is not evidence that the code takes the same path.

2. THE MARKER CACHED A NEGATIVE, which is worse than no cache. On the first run the
   half-blind parser wrote "none-declared" — permanently. Fixing the parser would not have
   helped: the marker suppresses the heal forever, and only a human who knew which files to
   delete could recover it. Caching a negative caches the limits of today's code. Now only
   a SUCCESS is recorded, and a marker is authoritative only when it NAMES an extra, so the
   poisoned markers the first version wrote self-heal. Re-reading two small files per grade
   costs nothing next to cloning a repo and running its suite — the cost I was "optimising"
   was never real.

Test extended with the astropy shape: no pyproject at all, extras in setup.cfg, and
`test_all` present — which sorts before `test` alphabetically and is a superset, so it must
not win. That case is the one that shipped broken.

LESSON, and it is the same one twice today: a fix is not verified by the command I ran by
hand, only by the code path the system takes. I had a green unit test, a green compile, and
a green manual install, and the feature was still dead on the one repo it existed for.

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

* fix(swe): the UNGRADEABLE verdict must carry the pristine run's output (#380 instrument)

`let (pristine_p2p, _) = run_tests(...)` — the report went into `_`. That verdict is the
ONLY artifact of the pristine run, so "the suite does not run in this environment" shipped
as a conclusion with its evidence deleted, leaving the reader to reproduce the run by hand
and guess at the difference.

MEASURED TODAY, and it is why this is worth its own commit: astropy-14365 graded
`PASS_TO_PASS 0 of 8` here, while the SAME invocation — `-m pytest <file> -v -p
no:cacheprovider`, same venv, same tree — run by hand gave 8 passed and the instance's own
bug failing (`ValueError: Unrecognized QDP line: read terr 1`), which is exactly the gate
condition. So the environment was fine and the divergence was somewhere inside the gate. I
proposed three mechanisms and could settle none of them, because the one artifact that
names the divergence was thrown away on this line. Hours, on a guessing loop, next to a
variable holding the answer.

Now the tail rides the error (via the existing `report_tail`, so it is bounded the same way
the retry excerpt is). And an EMPTY report gets its own sentence rather than an empty
section: no output at all means the harness never executed — a missing interpreter, a
refused invocation, a run that died before writing a byte — which is a different fault from
a suite that ran and failed, and the two must not read alike.

This is the same defect class as the rest of today's session: the instrument had the
answer and did not surface it. #380 stays open; this is what makes the next attempt at it
a measurement instead of a hypothesis.

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

* fix(benchmark): a kickoff addressed to a citizen must never be AUTHORED by her — the round-killer

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

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

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

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

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

THE FIX (this commit — the delivery half):

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

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

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

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

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

A citizen is REGISTERED the moment her identity is minted or resumed. She is
RESIDENT only once the supervisor attaches a service loop — which is what primes
her perception stream and gives her a turn. Every readiness surface reported the
former and called it the latter.

Measured 2026-08-18: for ~15 minutes after a reboot `persona/roster` listed Atlas
and Benchy while `persona.inbound.subscribe_opened` was 0. Hosting was correctly
parked waiting for the serving lane to prove it could decode (#363). A round was
dispatched into that window on the strength of that roster: 2 cards posted,
`kickoffs: 2`, `kickoff_errors: []`, and ZERO turns. Nobody was home and every
surface said otherwise.

- `PersonaAircRuntimeRegistry::is_resident` / `resident_snapshot` — residency
  asked per citizen, never inferred from presence in the registry. The truth
  table is a pure fn (`resident_from_loop_state`) so the three rows are unit-
  pinned; a live `PersonaAircRuntime` needs a real airc daemon and cannot be
  built in a test.
- `persona/roster` gains `resident` per row + `resident_count`. `count > 0 &&
  resident_count == 0` is exactly the state above, and it is now legible.
- `benchmark/dispatch` resolves assignees against the RESIDENT snapshot, and its
  post-boot wait keys on residency too — the old wait cleared on a non-empty
  roster, which released it ~10 minutes early (#412). Refusals distinguish the
  two states because they have opposite fixes: registered-but-not-resident is a
  WAIT, unregistered is `persona/spawn`. A named assignee who is merely unhosted
  is no longer reported as a typo.

This is honesty at the seam, not the cure. The cure is boot owning the process
tree (#452) so the resident window never exists to dispatch into.

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

* fix(boot): boot OWNS the process tree — adopt healthy, reap unhealthy, spawn missing (#452)

Joel, 2026-08-16: "start = enumerate → health-check → reap-or-ADOPT → spawn
missing, for EVERY service — cores, llama lanes, airc daemon."

The operative word was ADOPT, and boot did exactly two things to a service it
found running: nothing, or kill it. Neither is ownership.

ROW: llama lanes — was `pkill -f llama-server`, unconditionally, every boot.
This made real code dead: `inference::lane_registry::sweep_in` already encodes
the adopt rule — `(LaneRole::Live, SweepMode::Boot) => false` deliberately leaves
a live lane alone at boot and reaps it only at shutdown. The shell killed that
lane seconds before the core could adopt it, so that arm never once fired in
production. Cost: a cold model load on EVERY reboot, during which the lane cannot
prove it can decode, hosting correctly parks (#363), and every citizen is
registered-but-not-resident — measured at ~15 minutes on 2026-08-18, the window a
benchmark round was staged into for zero turns (#455). Now: enumerate by pid,
read each lane's port from its own cmdline, /health it, adopt or reap per lane.
Verified live on this box before the change landed: pids 1166 (:58057) and 95258
(:58091) both healthy — both would have been killed, and now are kept.

/health is LIVENESS, not decode — a wedged server can pass it, which is exactly
why the core verifies generation before seating citizens (#363). That division is
deliberate: the shell adopts a plausibly-live lane, the core remains the authority
that refuses a lane that cannot decode and relaunches it. Adopting can only cost a
relaunch the core already knows how to do; reaping costs a cold load every time.

ROW: airc daemon — this row did not exist. Boot printed "⚠ airc daemon not
running. Start it with: airc daemon" and carried on: a runbook line where
ownership belongs, for the one service whose absence makes everything else inert.
With no transport there are no rooms, so citizens have nothing to be resident IN.
Now: ping → adopt; wedged (holds the socket, answers nothing — worse than absent,
since a fresh spawn loses the bind, #355) → `airc stop` then reap → spawn →
bounded wait → FAIL LOUD and exit nonzero. Binary absent is a DIFFERENT state
(warn, continue): a box without airc installed is not a broken one, and refusing
to boot would strand CI and fresh clones.

ROW: cores — already correct and left alone. #420's `core_bind_guard::decide`
adopts on `start` (AlreadyServing → no-op, Occupied → refuse), and reaping on
`reboot` is right because reboot replaces the binary.

`bounded_run` is the shared primitive. macOS ships no coreutils `timeout`, and —
the lesson that made #420's guard reachable at all — an unbounded probe against a
wedged service does not fail, it HANGS: the kernel completes connect() into the
listen backlog whether or not the process is ever scheduled. A health check that
can hang is not a health check, it is a boot that stops. Truth table verified
live: exit0→0, exit1→1, hang→124 in 1s not 5s.

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

* feat(persona): BaseModelPolicy — one answer to "what base does she think on?" (#126/#369/#438)

Joel asked where the base model is governed. The honest answer was FOUR places,
in one function, each silently handing off to the next:

  0. override_model      — runtime per-persona assignment
  1. model_preferences   — tiered ladder, "best that fits"
  2. model_id            — explicit per-persona model, labelled "Legacy"
  3. default_local_model — system-wide default

Four expressions of one decision, and rows 1→2→3 walk DOWN without anyone
deciding to. That is the #438 incident shape: one bogus usable_gb=0 sample walked
the ladder to the bottom and served citizens a 0.5B that emitted template-token
garbage into the room. The sibling module already forbade this in prose
(inference_profile.rs: "substrate HARD ERRORS instead of silently degrading") —
the prose was right, the code never implemented it.

This is a COMPRESSION, 4 → 1, and both modes fall out of it:
  - Pegged{model, reason}  — subsumes override_model (Measurement peg w/ lease)
    and model_id (Operator). This base or she does not serve.
  - Adaptive{ladder, floor, rungs} — the governor moves her, bounded below by a
    NAMED floor member (not "last entry wins", which is how a reordered ladder
    silently moves its own floor).
No system-wide-default arm exists. That arm WAS the bug.

THE GENOME IS WHAT MAKES A BASE REACHABLE (Joel, this session): a LoRA adapter is
a per-base derivative. The corpus — transcripts, tool traces, solved instances —
is the durable, base-independent asset; an adapter is forged FROM it ONTO a
specific base and is invalid on any other (#369). So she can scale up or down
freely, PROVIDED her genome was forged for the destination. Hence GenomeCoverage
as an input: RequireGenome (default) skips rungs she has no adapter for and
refuses with the FORGE work-list; AllowBare takes them but reports
genome_backed=false so a measurement records WHICH citizen it scored.

The paired obligation is the forge's, not this module's: one corpus fans out to N
adapters, one per targeted base, each trained independently against that base. A
ladder is only as walkable as the forge made it, and RequireGenome turns a
declared-but-unforged ladder from a silent capability cliff into a visible one.

Why benchmarks need this: genome lift is only measurable against a fixed base.
Round 1 on a known base → corpus accrues → forge onto that same base → round 2,
same base + adapter → the delta is attributable to the genome. Float the base and
the number means nothing AND round 1's adapters are garbage. Worse, a silent
re-base corrupts the EXPERIENCE, not just the score: turns taken on an unintended
base still land in the corpus, poisoning the next adapter forged from it. So
refusing to serve is the cheap failure; serving on an unintended base is the
expensive one, and it is the one that used to happen by default.

Pure over (host_vram_gb, coverage) — 15 tests, no GPU, no forge, no registry.
Every refusal names its own remedy and is asserted on.

NOT YET WIRED: allocator/inference_profile still use the 4-way resolver. This is
the type + its truth table landing first so the cut-over is mechanical.

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

* feat(persona): PegReason::Training — the peg's biggest job is targeting the forge

Correcting my own framing from an hour ago: I called the peg "only for
measurement". Too narrow, and Joel's point is the load-bearing one.

Continuous learning never stops. The flywheel runs turns → corpus → forge →
adapter → page-in continuously, and the adapter coming out the far end is a
derivative of whatever base it was trained against. If her base floats between
the corpus accruing and the forge finishing, the adapter lands for a base she has
already left — forged for nobody, and page-in must then refuse it (#369). The
corpus survives that; the training compute does not.

So a training run holds a peg for its duration, exactly as a measurement round
does, and for the same underlying reason: a process is in flight whose output is
only valid against the base it started on. Measurement is episodic; training is
always running, which makes THIS the peg held most of the time.

GenomeBound is now documented as what it actually is — the standing consequence
of past Training runs, derived from the adapters she holds.

Also worth stating plainly, since it corrects a second drift in my framing: the
LADDER is the mechanism for daily use, not the peg. A citizen on a 64GB box
resolves to the top rung automatically — no peg, no special case — and a smaller
box steps down the same ladder. The peg exists for the three cases where
something in flight depends on the base staying put.

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

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

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

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

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

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

TWO CHANGES, both in the held-work turn:

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

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

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

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

CORRECTION TO MY OWN CLAIM this session: I first said "zero production callers of
training_trigger/submit — the trigger is dead." Wrong. `training_producer.rs` is
the producer and dispatches correctly; `memory/consolidate.rs:196` is a second
legitimate…
joelteply added a commit that referenced this pull request Aug 21, 2026
…tmp-race fixes land

airc PR #1286 (merged to canary): `airc work board` and its lane/
workspace siblings read the COMPLETE cached projection instead of a
recent-event window that chat traffic empties (continuum #154), and
WorkBoardCache tmp files are per-attempt so the core's concurrent
per-persona board reads stop racing each other's snapshot renames
(the paired ENOENT lines in the core log). cargo check green against
the new pin; deploys with the next core rebuild.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants