Skip to content

Build(deps-dev): Bump eslint from 9.24.0 to 9.37.0 - #139

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/eslint-9.37.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/eslint-9.37.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 6, 2025

Copy link
Copy Markdown
Contributor

Bumps eslint from 9.24.0 to 9.37.0.

Release notes

Sourced from eslint's releases.

v9.37.0

Features

  • 39f7fb4 feat: preserve-caught-error should recognize all static "cause" keys (#20163) (Pixel998)
  • f81eabc feat: support TS syntax in no-restricted-imports (#19562) (Nitin Kumar)

Bug Fixes

  • a129cce fix: correct no-loss-of-precision false positives for leading zeros (#20164) (Francesco Trotta)
  • 09e04fc fix: add missing AST token types (#20172) (Pixel998)
  • 861c6da fix: correct ESLint typings (#20122) (Pixel998)

Documentation

  • b950359 docs: fix typos across the docs (#20182) (루밀LuMir)
  • 42498a2 docs: improve ToC accessibility by hiding non-semantic character (#20181) (Percy Ma)
  • 29ea092 docs: Update README (GitHub Actions Bot)
  • 5c97a04 docs: show availableUntil in deprecated rule banner (#20170) (Pixel998)
  • 90a71bf docs: update README files to add badge and instructions (#20115) (루밀LuMir)
  • 1603ae1 docs: update references from master to main (#20153) (루밀LuMir)

Chores

  • afe8a13 chore: update @eslint/js dependency to version 9.37.0 (#20183) (Francesco Trotta)
  • abee4ca chore: package.json update for @​eslint/js release (Jenkins)
  • fc9381f chore: fix typos in comments (#20175) (overlookmotel)
  • e1574a2 chore: unpin jiti (#20173) (renovate[bot])
  • e1ac05e refactor: mark ESLint.findConfigFile() as async, add missing docs (#20157) (Pixel998)
  • 347906d chore: update eslint (#20149) (renovate[bot])
  • 0cb5897 test: remove tmp dir created for circular fixes in multithread mode test (#20146) (Milos Djermanovic)
  • bb99566 ci: pin jiti to version 2.5.1 (#20151) (Pixel998)
  • 177f669 perf: improve worker count calculation for "auto" concurrency (#20067) (Francesco Trotta)
  • 448b57b chore: Mark deprecated formatting rules as available until v11.0.0 (#20144) (Milos Djermanovic)

v9.36.0

Features

  • 47afcf6 feat: correct preserve-caught-error edge cases (#20109) (Francesco Trotta)

Bug Fixes

  • 75b74d8 fix: add missing rule option types (#20127) (ntnyq)
  • 1c0d850 fix: update eslint-all.js to use Object.freeze for rules object (#20116) (루밀LuMir)
  • 7d61b7f fix: add missing scope types to Scope.type (#20110) (Pixel998)
  • 7a670c3 fix: correct rule option typings in rules.d.ts (#20084) (Pixel998)

Documentation

  • b73ab12 docs: update examples to use defineConfig (#20131) (sethamus)
  • 31d9392 docs: fix typos (#20118) (Pixel998)
  • c7f861b docs: Update README (GitHub Actions Bot)
  • 6b0c08b docs: Update README (GitHub Actions Bot)
  • 91f97c5 docs: Update README (GitHub Actions Bot)

Chores

  • 12411e8 chore: upgrade @​eslint/js@​9.36.0 (#20139) (Milos Djermanovic)
  • 488cba6 chore: package.json update for @​eslint/js release (Jenkins)

... (truncated)

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)

Bumps [eslint](https://github.com/eslint/eslint) from 9.24.0 to 9.37.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.24.0...v9.37.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.37.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 6, 2025
@dependabot @github

dependabot Bot commented on behalf of github Oct 20, 2025

Copy link
Copy Markdown
Contributor Author

Superseded by #146.

@dependabot dependabot Bot closed this Oct 20, 2025
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/eslint-9.37.0 branch October 20, 2025 21:21
joelteply added a commit that referenced this pull request Jul 12, 2026
…round 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
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 Jul 26, 2026
…tween review passes — stop it starving reactive responding (personas looked comatose)

SEVERE live failure (2026-07-26): 4 resident personas dreamed near-CONTINUOUSLY
(dream_consolidation ran 00:00→05:03) and did NOT respond to direct chat — alive but
comatose. Root cause (mapped, not guessed):

1. The dream's model call (distill_reviewing) called `self.adapter.generate_text` DIRECTLY,
   bypassing `acquire_serving_lane`. The turn path acquires a lane and the #139 reservation
   always holds one lane for a DIRECTED chat turn — but the dream slipped past it entirely,
   grabbing a physical llama decode lane uncounted. The semaphore then handed the chat turn a
   permit while the physical lane was busy dreaming, so the directed reply queued INSIDE llama
   behind the dream. Delivery was fine (Benchy DID receive the message + ran recall of 8
   memories); the turn's model call was starved. FIX: wrap the dream's generate_text in
   `acquire_serving_lane(false)` (non-directed) — caps all dream inference at MAX_LANES-1 and
   guarantees a waiting directed turn wins the lane. The load-bearing responsiveness fix.

2. The quiet-day review-only pass had NO cooldown: it drains REVIEW_ONLY_BATCH (6) beliefs,
   emits CadenceHint::Sleep, but the governor re-ticks every ~30s and immediately reviews the
   next 6 — forever, for a large belief store (Atlas: 4,336 engrams), compounded by the
   in-memory `reviewed` set resetting on each dev restart. FIX: REVIEW_ONLY_COOLDOWN_MS (5min)
   per-persona rest gate in try_review_only — belief hygiene trickles instead of grinding.
   Consolidation of FRESH experience stays ungated (real learning is never throttled).

Both preserve the organism (the fade/consolidation still runs) while freeing the lane so the
being can respond and act. 14 dream_consolidation tests stay green (quiet-day contract holds:
immediate re-tick still sleeps). Relates to #139, #221, the acting-organism arc.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Jul 26, 2026
…embedder + governed VRAM + persistent cache + coma fix) (#2016)

* fix(memory): global recall embedder resolves neural lazily + on-demand candidate-vector backfill — semantic recall for the agent-memory bridge

The agent-memory bridge (memory/remember, memory/recall-hook) recalls through the
GLOBAL PersonaMemoryManager, which main.rs constructed with the hardcoded LEXICAL
bootstrap embedder — deliberately, because NOTHING may gate the IPC socket bind on a
GPU/gateway probe (concurrency guide). The per-persona path resolved neural on spawn;
the global/bridge path never did. Result, dogfooded live: recall returned the SAME
off-topic memories for every query — non-semantic order that ignores the query text.

Two gaps, both closed here, reusing the existing resolver + storage (no new machinery):

1. LazyRecallEmbedder (cognition/embedding.rs) — resolves the dedicated in-process
   Qwen3-Embedding-0.6B on the FIRST recall via new resolve_recall_embedder_local()
   (paths: in-process GGUF → lexical floor; no chat adapter, which the global manager
   has none of), caches it process-stably, delegates. Zero boot-path cost — the probe +
   calibration is paid once on first real recall, never at socket-bind. This is the
   "separate addressing follow-up" main.rs's old comment promised.

2. ensure_memory_embeddings (memory/mod.rs) — agent memories are written with
   embedding: None, so corpus.memories_with_embeddings() was empty and SemanticRecallLayer
   no-op'd even with a neural query vector. multi_layer_recall now backfills missing
   candidate vectors on demand (async, cached, outside any lock) before the sync recall,
   so the semantic layer has something to rank. First recall per persona pays it; content
   is immutable so vectors never go stale; idempotent once populated.

Tests: ensure_memory_embeddings_backfills_missing_vectors (backfill + idempotence),
lazy_recall_embedder_is_boot_safe_before_resolution (no probe until first embed). Existing
memory module tests unperturbed (36/36). Complements the loud-degrade signal (b413aaa):
that made the degrade visible; this removes it on the bridge path when the embedder serves.

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

* fix(memory): bound + fail-fast the candidate-embedding backfill so a down embedder can't hang the SessionStart recall

The on-demand backfill (prior commit) embedded EVERY missing candidate synchronously
inside multi_layer_recall. Two hazards that surfaced dogfooding live against a 375-memory
corpus with the in-process Qwen3 embedder returning degenerate (zero) vectors under GPU-OOM:

1. Down embedder → the backfill grinds all N candidates through a failing GPU forward
   pass, hanging the recall (the recall-hook command timed out). Now: FAIL_FAST — if the
   first few embeds all come back empty, the embedder is down; bail immediately. The
   caller's loud-degrade signal still reports the resulting non-semantic recall.
2. Working embedder but large cold corpus → one recall blocked on hundreds of embeds.
   Now: MAX_PER_CALL=64 caps per-recall work; a big corpus embeds incrementally across
   several recalls (amortized). Content is immutable, so partial progress never goes stale.

Test: ensure_memory_embeddings_fails_fast_when_embedder_down (counts embed calls, asserts
the backfill bails after ~3 empties instead of attempting all 20). Existing backfill +
idempotence test still green.

Note (separate, not this commit): the underlying degenerate embeddings are the in-process
Qwen3-Embedding-0.6B GGUF returning all-zero vectors on real content — the embed backend
(backends/llamacpp.rs) is correct (fresh embedding-mode context, KV cleared per text,
PoolingType::Last, 2048 clamp), so the zeros come from the Metal forward pass failing under
VRAM pressure (the boot-time GPU-OOM, #175 family). Recall goes fully semantic once the
embedder yields real vectors; the wiring + backfill are proven live via the
`recall.embedder.resolved source=in-process-llamacpp-global` probe.

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

* fix(inference): govern the embedding VRAM lane — lease before allocating, fail loud instead of decoding to degenerate zeros

The embedding forward pass allocated a ~1.5 GiB Metal context (2048-ctx compute +
KV) UNGOVERNED — grabbing VRAM behind the ResourceGovernor's back and competing with
the serving lane. Under pressure the Metal command buffer OOM'd and the decode returned
an ALL-ZERO vector (the "degenerate embedding" that silently broke semantic recall for
the agent-memory bridge). It's the last blocker on the recall-wiring fix.

Make the embed lane a governed GPU consumer, mirroring cognition/eval.rs::acquire_eval_lane_slot
exactly (no parallel allocator — concurrency guide #6): create_embedding now acquires a
Pinned VRAM LeaseRequest from ResourceDaemon::global() before the spawn_blocking forward
pass, holding the RAII LeaseGuard for the duration (freed on drop). Granted ⇒ the bytes
are reserved so the decode has room to succeed; InsufficientCapacity ⇒ fail LOUD with a
named error (probe embed.vram.refused) instead of allocating a doomed context that emits
garbage. Embeddings are GPU-only ([[gpu-is-non-negotiable...no-cpu-fallback]]) so there is
NO CPU spill like eval — the honest degrade is a refusal the caller surfaces as "no signal"
(and the recall backfill's fail-fast handles cleanly), never a zero vector. Ungoverned node
(no daemon) = behavior unchanged. Probes: embed.vram.leased / embed.vram.refused.

Const, in-code policy (not env). Scope = per-call CONTEXT admission control (the OOM fix);
registering the embed model's resident WEIGHTS as a ResourceConsumer (footprint/reclaim,
mirroring ServingConsumer) is the residency-accounting follow-up. This is step 1 of the
GPU-accelerated / grid-command / cache-layer embedding arc.

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

* feat(memory): persistent embedding cache — embed once EVER, warmed on boot for every persona + agent

The process-global embedding cache (global_embedding_cache) was in-memory only, so it
died on every restart and all content re-embedded — which, with the governed embed lane,
means re-fighting the serving lane for VRAM (155 lease refusals observed on a warm 375-memory
corpus). Persist it.

EmbeddingCache gains snapshot_to/load_from: a compact, dep-free, atomic binary snapshot
([u64 count] then per entry [u64 key][u32 dim][dim × f32], all LE; write-temp-then-rename).
spawn_embedding_cache_persistence warms the cache from the snapshot at boot, then snapshots
every 60s on its OWN tokio task (RTOS shape: own task + tokio::time::interval, file write on
spawn_blocking, off every hot path — concurrency guide). Best-effort throughout: a lost
snapshot just re-embeds; probes embedding.cache.loaded / embedding.cache.flushed.

Wired once at boot (main.rs) against ~/.continuum/cache/embedding-cache.bin. Because this is
the ONE cache every persona AND agent shares — their recall embedders all wrap
global_embedding_cache via CachingEmbeddingProvider — a single warm-load brings back the
whole citizenry's vectors at once: each unique content embeds once, EVER. Steady state → the
VRAM refusals collapse to near-zero and cold-start recall is instant.

Step 2 of the GPU/grid/cache embedding arc (after the governed lane). Next: grid-shared
backing + ai/embedding/generate command. Test: embedding_cache_snapshot_round_trips
(byte-identical restore, missing file = Ok(0)).

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

* fix(cognition): dream inference must acquire a serving lane + rest between review passes — stop it starving reactive responding (personas looked comatose)

SEVERE live failure (2026-07-26): 4 resident personas dreamed near-CONTINUOUSLY
(dream_consolidation ran 00:00→05:03) and did NOT respond to direct chat — alive but
comatose. Root cause (mapped, not guessed):

1. The dream's model call (distill_reviewing) called `self.adapter.generate_text` DIRECTLY,
   bypassing `acquire_serving_lane`. The turn path acquires a lane and the #139 reservation
   always holds one lane for a DIRECTED chat turn — but the dream slipped past it entirely,
   grabbing a physical llama decode lane uncounted. The semaphore then handed the chat turn a
   permit while the physical lane was busy dreaming, so the directed reply queued INSIDE llama
   behind the dream. Delivery was fine (Benchy DID receive the message + ran recall of 8
   memories); the turn's model call was starved. FIX: wrap the dream's generate_text in
   `acquire_serving_lane(false)` (non-directed) — caps all dream inference at MAX_LANES-1 and
   guarantees a waiting directed turn wins the lane. The load-bearing responsiveness fix.

2. The quiet-day review-only pass had NO cooldown: it drains REVIEW_ONLY_BATCH (6) beliefs,
   emits CadenceHint::Sleep, but the governor re-ticks every ~30s and immediately reviews the
   next 6 — forever, for a large belief store (Atlas: 4,336 engrams), compounded by the
   in-memory `reviewed` set resetting on each dev restart. FIX: REVIEW_ONLY_COOLDOWN_MS (5min)
   per-persona rest gate in try_review_only — belief hygiene trickles instead of grinding.
   Consolidation of FRESH experience stays ungated (real learning is never throttled).

Both preserve the organism (the fade/consolidation still runs) while freeing the lane so the
being can respond and act. 14 dream_consolidation tests stay green (quiet-day contract holds:
immediate re-tick still sleeps). Relates to #139, #221, the acting-organism arc.

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

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jul 26, 2026
…l embedder + governed embed VRAM lane (#2034)

* fix(memory): global recall embedder resolves neural lazily + on-demand candidate-vector backfill — semantic recall for the agent-memory bridge

The agent-memory bridge (memory/remember, memory/recall-hook) recalls through the
GLOBAL PersonaMemoryManager, which main.rs constructed with the hardcoded LEXICAL
bootstrap embedder — deliberately, because NOTHING may gate the IPC socket bind on a
GPU/gateway probe (concurrency guide). The per-persona path resolved neural on spawn;
the global/bridge path never did. Result, dogfooded live: recall returned the SAME
off-topic memories for every query — non-semantic order that ignores the query text.

Two gaps, both closed here, reusing the existing resolver + storage (no new machinery):

1. LazyRecallEmbedder (cognition/embedding.rs) — resolves the dedicated in-process
   Qwen3-Embedding-0.6B on the FIRST recall via new resolve_recall_embedder_local()
   (paths: in-process GGUF → lexical floor; no chat adapter, which the global manager
   has none of), caches it process-stably, delegates. Zero boot-path cost — the probe +
   calibration is paid once on first real recall, never at socket-bind. This is the
   "separate addressing follow-up" main.rs's old comment promised.

2. ensure_memory_embeddings (memory/mod.rs) — agent memories are written with
   embedding: None, so corpus.memories_with_embeddings() was empty and SemanticRecallLayer
   no-op'd even with a neural query vector. multi_layer_recall now backfills missing
   candidate vectors on demand (async, cached, outside any lock) before the sync recall,
   so the semantic layer has something to rank. First recall per persona pays it; content
   is immutable so vectors never go stale; idempotent once populated.

Tests: ensure_memory_embeddings_backfills_missing_vectors (backfill + idempotence),
lazy_recall_embedder_is_boot_safe_before_resolution (no probe until first embed). Existing
memory module tests unperturbed (36/36). Complements the loud-degrade signal (b413aaa):
that made the degrade visible; this removes it on the bridge path when the embedder serves.

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

* fix(memory): bound + fail-fast the candidate-embedding backfill so a down embedder can't hang the SessionStart recall

The on-demand backfill (prior commit) embedded EVERY missing candidate synchronously
inside multi_layer_recall. Two hazards that surfaced dogfooding live against a 375-memory
corpus with the in-process Qwen3 embedder returning degenerate (zero) vectors under GPU-OOM:

1. Down embedder → the backfill grinds all N candidates through a failing GPU forward
   pass, hanging the recall (the recall-hook command timed out). Now: FAIL_FAST — if the
   first few embeds all come back empty, the embedder is down; bail immediately. The
   caller's loud-degrade signal still reports the resulting non-semantic recall.
2. Working embedder but large cold corpus → one recall blocked on hundreds of embeds.
   Now: MAX_PER_CALL=64 caps per-recall work; a big corpus embeds incrementally across
   several recalls (amortized). Content is immutable, so partial progress never goes stale.

Test: ensure_memory_embeddings_fails_fast_when_embedder_down (counts embed calls, asserts
the backfill bails after ~3 empties instead of attempting all 20). Existing backfill +
idempotence test still green.

Note (separate, not this commit): the underlying degenerate embeddings are the in-process
Qwen3-Embedding-0.6B GGUF returning all-zero vectors on real content — the embed backend
(backends/llamacpp.rs) is correct (fresh embedding-mode context, KV cleared per text,
PoolingType::Last, 2048 clamp), so the zeros come from the Metal forward pass failing under
VRAM pressure (the boot-time GPU-OOM, #175 family). Recall goes fully semantic once the
embedder yields real vectors; the wiring + backfill are proven live via the
`recall.embedder.resolved source=in-process-llamacpp-global` probe.

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

* fix(inference): govern the embedding VRAM lane — lease before allocating, fail loud instead of decoding to degenerate zeros

The embedding forward pass allocated a ~1.5 GiB Metal context (2048-ctx compute +
KV) UNGOVERNED — grabbing VRAM behind the ResourceGovernor's back and competing with
the serving lane. Under pressure the Metal command buffer OOM'd and the decode returned
an ALL-ZERO vector (the "degenerate embedding" that silently broke semantic recall for
the agent-memory bridge). It's the last blocker on the recall-wiring fix.

Make the embed lane a governed GPU consumer, mirroring cognition/eval.rs::acquire_eval_lane_slot
exactly (no parallel allocator — concurrency guide #6): create_embedding now acquires a
Pinned VRAM LeaseRequest from ResourceDaemon::global() before the spawn_blocking forward
pass, holding the RAII LeaseGuard for the duration (freed on drop). Granted ⇒ the bytes
are reserved so the decode has room to succeed; InsufficientCapacity ⇒ fail LOUD with a
named error (probe embed.vram.refused) instead of allocating a doomed context that emits
garbage. Embeddings are GPU-only ([[gpu-is-non-negotiable...no-cpu-fallback]]) so there is
NO CPU spill like eval — the honest degrade is a refusal the caller surfaces as "no signal"
(and the recall backfill's fail-fast handles cleanly), never a zero vector. Ungoverned node
(no daemon) = behavior unchanged. Probes: embed.vram.leased / embed.vram.refused.

Const, in-code policy (not env). Scope = per-call CONTEXT admission control (the OOM fix);
registering the embed model's resident WEIGHTS as a ResourceConsumer (footprint/reclaim,
mirroring ServingConsumer) is the residency-accounting follow-up. This is step 1 of the
GPU-accelerated / grid-command / cache-layer embedding arc.

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

* feat(memory): persistent embedding cache — embed once EVER, warmed on boot for every persona + agent

The process-global embedding cache (global_embedding_cache) was in-memory only, so it
died on every restart and all content re-embedded — which, with the governed embed lane,
means re-fighting the serving lane for VRAM (155 lease refusals observed on a warm 375-memory
corpus). Persist it.

EmbeddingCache gains snapshot_to/load_from: a compact, dep-free, atomic binary snapshot
([u64 count] then per entry [u64 key][u32 dim][dim × f32], all LE; write-temp-then-rename).
spawn_embedding_cache_persistence warms the cache from the snapshot at boot, then snapshots
every 60s on its OWN tokio task (RTOS shape: own task + tokio::time::interval, file write on
spawn_blocking, off every hot path — concurrency guide). Best-effort throughout: a lost
snapshot just re-embeds; probes embedding.cache.loaded / embedding.cache.flushed.

Wired once at boot (main.rs) against ~/.continuum/cache/embedding-cache.bin. Because this is
the ONE cache every persona AND agent shares — their recall embedders all wrap
global_embedding_cache via CachingEmbeddingProvider — a single warm-load brings back the
whole citizenry's vectors at once: each unique content embeds once, EVER. Steady state → the
VRAM refusals collapse to near-zero and cold-start recall is instant.

Step 2 of the GPU/grid/cache embedding arc (after the governed lane). Next: grid-shared
backing + ai/embedding/generate command. Test: embedding_cache_snapshot_round_trips
(byte-identical restore, missing file = Ok(0)).

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

* fix(cognition): dream inference must acquire a serving lane + rest between review passes — stop it starving reactive responding (personas looked comatose)

SEVERE live failure (2026-07-26): 4 resident personas dreamed near-CONTINUOUSLY
(dream_consolidation ran 00:00→05:03) and did NOT respond to direct chat — alive but
comatose. Root cause (mapped, not guessed):

1. The dream's model call (distill_reviewing) called `self.adapter.generate_text` DIRECTLY,
   bypassing `acquire_serving_lane`. The turn path acquires a lane and the #139 reservation
   always holds one lane for a DIRECTED chat turn — but the dream slipped past it entirely,
   grabbing a physical llama decode lane uncounted. The semaphore then handed the chat turn a
   permit while the physical lane was busy dreaming, so the directed reply queued INSIDE llama
   behind the dream. Delivery was fine (Benchy DID receive the message + ran recall of 8
   memories); the turn's model call was starved. FIX: wrap the dream's generate_text in
   `acquire_serving_lane(false)` (non-directed) — caps all dream inference at MAX_LANES-1 and
   guarantees a waiting directed turn wins the lane. The load-bearing responsiveness fix.

2. The quiet-day review-only pass had NO cooldown: it drains REVIEW_ONLY_BATCH (6) beliefs,
   emits CadenceHint::Sleep, but the governor re-ticks every ~30s and immediately reviews the
   next 6 — forever, for a large belief store (Atlas: 4,336 engrams), compounded by the
   in-memory `reviewed` set resetting on each dev restart. FIX: REVIEW_ONLY_COOLDOWN_MS (5min)
   per-persona rest gate in try_review_only — belief hygiene trickles instead of grinding.
   Consolidation of FRESH experience stays ungated (real learning is never throttled).

Both preserve the organism (the fade/consolidation still runs) while freeing the lane so the
being can respond and act. 14 dream_consolidation tests stay green (quiet-day contract holds:
immediate re-tick still sleeps). Relates to #139, #221, the acting-organism arc.

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

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Aug 10, 2026
… evict it (run-18057-f1, #392)

The 0-byte SWE-bench patch, structurally. The full result of the act a persona
just ran — the grep matches she must edit next, the file she just read — rode the
working-memory faculty's single contribution at WORKING_MEMORY_SALIENCE (0.5). That
contribution competes in arbiter.focus() top-k, so under capacity pressure the whole
thing was truncated and she generated her next turn BLIND to what her own hands had
returned. On sympy-18057 that meant: grep for `__eq__`, never see the result, yield
nothing.

Fix: the live act's full result is now read DIRECTLY from the shared working-memory
buffer in the message builder (WorkingMemory::pinned_active_result_block) and appended
as its own durable trailing turn — bypassing the faculty bid / arbiter entirely, so no
attention pass stands between the hands and the mind. Removed from the evictable faculty
contribution (which keeps only the trail + notices + dispatched summary).

Identical gating to the old block: settlement-seq gated so it stops re-prefilling once
the turn settles (#139/#165), clipped by budget, shown only when it carries more than
the trail head. Text on the wire, not structured tool_use/tool_result Parts:
content_text() is blind to non-Text parts, so Parts would undercount in fit_messages
and risk a window-edge 400, and the live GGUF template renders text reliably. True
tool-role Parts is a separate per-template-gated follow-up (#294 family).

- New guard `pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast`:
  the result reaches the prompt even when NOTHING bid it through the arbiter (the exact
  eviction state), and never lands in the cacheable system prefix.
- Retargeted the three full-result WM tests (whole/clipped/settlement-gate) from the
  faculty contribution to the pinned block — every invariant preserved.
- Fixed a Step-3 test committed red (never run green): restore() appends a [resumed]
  wake-orientation fact by design (#147/#165), so an N-entry snapshot restores to N+1;
  the test now asserts survival by content, not an exact count.

945/945 cognition tests green (cargo test -p continuum-core --lib --features metal,accelerate).
The live proof — deploy + a persona re-running sympy-18057 with the result threading
back to the _sympify edit — is the next step.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…Steps 0-5 + 18057 acceptance) (#2225)

* refactor(cognition): typed Observation — Step 0 new observation.rs types + renderers

New `act_observe/observation.rs` owns the typed act value that will thread through
the act→observe→re-perceive contract (docs/cognition/TYPED-OBSERVATION-REFACTOR.md):
ToolVerb (the ONE verb→class home), ToolOutput (ToolResult + verb + typed paths),
ActStatus, Observation, ActOutcome. render_recency / render_recall are pure
functions of an Observation delegating to the existing recency helpers (byte-stable,
#205). Also lands Step-1 pure helpers: ToolVerb::classify subsumes the `wrote`
substring logic and extract_paths() reads typed file paths from call input. No
caller changes; apply.rs untouched. cargo check green.

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

* refactor(cognition): typed Observation — Step 2 apply_act returns ActOutcome

apply_act now builds Vec<Observation> and returns ActOutcome instead of
Option<String>:
- no hands → ActOutcome::NoHands (was None)
- executor batch Err → ActOutcome::ExecutorError { calls, message } (was None —
  now distinguishable from no-hands for a future backstop)
- executed / already-satisfied / redundant-orientation → Acted { acts }, each act
  a typed Observation whose result correlates by tool_use_id == call.id (NOT the
  positional get(i) the string render still uses), verb + paths precomputed.

The two inline renderings + record_receipt/engram admit are UNCHANGED (byte-stable,
#205) — the typed acts are threaded alongside. settle_step's sole call maps
`produced_an_act()` → Acted / ActUnfulfilled (behavior identical to Some/None).
Guard tests migrate string→typed in lockstep; all 35 act_observe tests green.
ts-rs bindings emitted for the 5 new cognition types.

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

* refactor(cognition): typed Observation — Step 3 WorkingMemory stores typed acts on the Receipt

WmEntry gains #[serde(default)] acts: Vec<Observation> (back-compat, same
contract as saved_at_ms/build_sha). record_receipt_typed(&acts, rendered)
stores the byte-identical receipt text ALONGSIDE the typed acts; recent_acts()
and active_act() expose them so consumers read the tool result by TYPED FIELD
(call.id == result.tool_use_id) instead of re-parsing [action #n] prose
(run-18057-f1). apply_act records via record_receipt_typed. Guards: an old
volatile.json without acts restores without panic; the typed receipt threads
the act by field and keeps recent() byte-stable (#205).

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

* refactor(cognition): typed Observation — Step 4 migrate the seam-5 predicates off receipt prose

The live receipt render is a bare name(args) (the 'I ran ' opener was dropped for
#158), so the string scans mutated_workspace/wrote_without_observation/
claimed_file_without_act used ('I ran code/write(' …) were DEAD against a real
recency window — [no-deliverable]/[unobserved] were structurally unreachable
(the seam-5 live drift). Migrate them to read the TYPED verb + paths off
WmEntry.acts via recent_entries(): mutated_workspace/wrote_without_observation
scope by WmKind::Settlement and test ToolVerb::mutates/observes;
claimed_file_without_act matches the claimed file against the typed paths of a
MUTATING act (a read no longer backs a completion claim). has_real_action_receipt
(brackets-in-prose scan) → any_real_receipt (WmKind::Receipt). settle.rs callers
pass recent_entries()/pre_settle entries. Fixtures rebuilt as typed Observations
(the string fixtures were GREEN≠REACHABLE — they matched a render the live path
never emits). Deferred to keep the sweep green+honest: all_calls_already_satisfied
/is_redundant_orientation (still match name(args), which IS in the live receipt, so
correct against live data), latest_action_seq, and the Fact-tag→FactKind split.

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

* refactor(cognition): typed Observation — Step 5 render_recency/render_recall are the sole producers

The per-call inline format! recency + render_act_for_recall recall blocks in
apply_act are gone; both channel strings are now produced ONCE from the typed
Observation via the pure render_recency/render_recall helpers (defined in Step 0,
byte-identical to the old inline shaping — the humanize/bound/args logic lives in
observation.rs now). Render is a pure function of the act, so the recency string
and the typed acts can never drift. Sourced from the id-correlated result
(tool_use_id == call.id), immune to the fg-vs-original positional hazard.

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

* refactor(cognition): typed Observation — Step 6 (partial) 18057 typed-thread acceptance assertion

Strengthen the_hands_change_the_mind to assert, through the REAL drive_to_settle
loop, that the just-executed act's RESULT re-enters via the TYPED field
(active_act().output.result.content) and that the call correlates to its result
BY ID (call.id == result.tool_use_id) — never a re-parse of [action #n] prose nor
a positional index. This is act-grained proof the tool result threads back (the
channel run-18057-f1 lost the grep result through as an evictable perception bid →
0-byte patch). recent_acts() exposes the whole investigation off the typed channel.

DEFERRED (honest): the message-builder pinned assistant_tool_use↔tool_result pair
in llm_deliberation_faculty (the render side of this typed value) is the remaining
Step 6 piece. It appends the pair post-arbiter so capacity pressure cannot evict it
— but it changes EVERY live persona prompt (KV-prefix shape + adapter tool-part
handling + a double-inclusion decision vs the existing wm text trailing), which
needs live validation this VDD-gated sweep cannot provide. Not shipped blind.

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

* fix(cognition): pin the just-executed act's result so attention can't evict it (run-18057-f1, #392)

The 0-byte SWE-bench patch, structurally. The full result of the act a persona
just ran — the grep matches she must edit next, the file she just read — rode the
working-memory faculty's single contribution at WORKING_MEMORY_SALIENCE (0.5). That
contribution competes in arbiter.focus() top-k, so under capacity pressure the whole
thing was truncated and she generated her next turn BLIND to what her own hands had
returned. On sympy-18057 that meant: grep for `__eq__`, never see the result, yield
nothing.

Fix: the live act's full result is now read DIRECTLY from the shared working-memory
buffer in the message builder (WorkingMemory::pinned_active_result_block) and appended
as its own durable trailing turn — bypassing the faculty bid / arbiter entirely, so no
attention pass stands between the hands and the mind. Removed from the evictable faculty
contribution (which keeps only the trail + notices + dispatched summary).

Identical gating to the old block: settlement-seq gated so it stops re-prefilling once
the turn settles (#139/#165), clipped by budget, shown only when it carries more than
the trail head. Text on the wire, not structured tool_use/tool_result Parts:
content_text() is blind to non-Text parts, so Parts would undercount in fit_messages
and risk a window-edge 400, and the live GGUF template renders text reliably. True
tool-role Parts is a separate per-template-gated follow-up (#294 family).

- New guard `pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast`:
  the result reaches the prompt even when NOTHING bid it through the arbiter (the exact
  eviction state), and never lands in the cacheable system prefix.
- Retargeted the three full-result WM tests (whole/clipped/settlement-gate) from the
  faculty contribution to the pinned block — every invariant preserved.
- Fixed a Step-3 test committed red (never run green): restore() appends a [resumed]
  wake-orientation fact by design (#147/#165), so an N-entry snapshot restores to N+1;
  the test now asserts survival by content, not an exact count.

945/945 cognition tests green (cargo test -p continuum-core --lib --features metal,accelerate).
The live proof — deploy + a persona re-running sympy-18057 with the result threading
back to the _sympify edit — is the next step.

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

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Aug 15, 2026
…memory (#232)

The fused attention kernel is faster on BOTH prefill and decode and lowers peak memory —
directly attacking the prefill-bound turn latency (#139) and freeing room the elastic
window (#234) can spend. SERVING_FLASH_ATTN=1|on|true adds --flash-attn to the lane;
absent → llama.cpp default (no flag), byte-identical.

OFF by default: Metal/backend flash-attn support + quality vary by build, so it's an
operator opt-in, never a blind assumption ([[verify-real-device-numbers-not-a-clamp-premise]]).
Composes with the KV-quant flag: enable both for the field-proven GLM-style speedup, then
validate on a live burst. continuum-core lib compiles clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 15, 2026
… rescued onto canary (#2244)

* feat(serving): opt-in KV cache quantization — q8_0 halves KV, feeds the elastic window (#232)

Adds SERVING_KV_CACHE_TYPE (config, default f16/off): when set to q8_0 (or q4_0) the
llama-server lane runs --cache-type-k/v <type>, cutting resident KV ~in half at
near-lossless quality. That frees memory the elastic window (#234) can spend on a bigger
context or more warm lanes — faster for multiple personas AND more room for hard coding,
the same "faster + best code" pair.

OFF by default and safe-by-construction: absent / f16 → byte-identical f16 launch (no
behavior change), so this can't destabilize a backend whose build lacks Metal KV-quant
kernels — enabling it is an explicit operator opt-in, never a blind assumption
([[verify-real-device-numbers-not-a-clamp-premise]]).

Follow-up (noted in code): to have the PLAN grow the window on the freed memory rather
than leave it as extra headroom, footprint_for must scale kv_per_token by the quant
factor. This slice is the safe enablement; that fit-math coupling is the next step, and
wants a live burst on a KV-quant-capable backend to validate quality + the speedup.

continuum-core lib compiles clean.

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

* feat(serving): KV-quant fit coupling — the window GROWS into the freed KV memory (#232)

Completes the KV-quant feature. The launcher flag (prior commit) makes a lane run q8_0
KV; this makes the PLAN know it: footprint_for scales kv_per_token by the quant divisor,
so the served window is sized against the KV the lane WILL actually hold, and the elastic
window (#234) grows into the freed memory instead of leaving it idle.

- kv_divisor_for (pure, env-free, unit-tested): f16/unset/unknown → 1 (no change), q8_0 → 2,
  q4_0/q4_1 → 3. CONSERVATIVE by design — under the ideal ~3.5x for q4 — so the plan can
  never over-grow the window past the real KV and OOM (over-reserve = smaller window = safe).
- Applied only in the config-aware footprint_for; footprint_from_parts stays pure so its
  tests are env-independent. Same SERVING_KV_CACHE_TYPE key as the launcher — one config,
  two consumers (flag + fit rate), documented to stay in sync.

Default (f16 / unset) → divisor 1 → byte-identical: this can't change serving on a box that
doesn't opt in. Test pins the mapping + the safe-default. Wants a live burst on a
KV-quant-capable backend to confirm quality + the actual window growth.

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

* feat(serving): opt-in flash attention — faster prefill+decode, lower memory (#232)

The fused attention kernel is faster on BOTH prefill and decode and lowers peak memory —
directly attacking the prefill-bound turn latency (#139) and freeing room the elastic
window (#234) can spend. SERVING_FLASH_ATTN=1|on|true adds --flash-attn to the lane;
absent → llama.cpp default (no flag), byte-identical.

OFF by default: Metal/backend flash-attn support + quality vary by build, so it's an
operator opt-in, never a blind assumption ([[verify-real-device-numbers-not-a-clamp-premise]]).
Composes with the KV-quant flag: enable both for the field-proven GLM-style speedup, then
validate on a live burst. continuum-core lib compiles clean.

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

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Aug 16, 2026
… acts and turns (#414b, the Anwen regression)

The missing feedback, measured from her own captures: act result bodies lived
only in the K=1 last_action slot (any act overwrites — a list_files destroyed
her compile error) and the settlement-gated pinned block (gone once she
spoke). Heads persisted (slice B archive); RESULTS did not. She re-ran the
same unfixed code three turns running, wandering discovery tools between,
blind to the error she had already been given.

recent_results: char-bounded deque of (seq, room, result TAIL) in working
memory — window-derived share (ContextBudget::recent_results_chars, 1/32),
tails are the result's final chars (errors/conclusions live at the end),
eviction oldest-first by total chars. Rendered every turn as its own trailing
block before the pinned full-latest — small, append-only, KV-prefix stable,
deliberately NOT settlement-gated (the #139 full-dump objection doesn't apply
to ~300-char tails). Snapshot/restore round-trips it (serde default for old
snapshots). Regression test pins the contract: a finding survives later
trivial acts; the buffer respects its bound.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 16, 2026
…t-on-change probes (#2323)

* fix(persona): claim renewal is EARNED by cognition, not by breathing (#451 follow-up)

The presence-bound renewal ('her work stays hers while she breathes') fixed
#331 by overcorrecting into lease-immortality-while-idle: overnight, 600/600
inbound events filtered non-turn, zero turn.starts for hours, three leases
renewing on the minute — a stalled round reading as 'actively held' forever,
with three finished artifacts the lapsed-claim sweeper could never recover.

persona/cognition_pulse.rs (one concern, one module): per-persona 'when did
she last THINK' stamps. Stamped at spawn (one lease-length of grace covers
the post-boot deaf window, #412) and at every service-loop turn start — a
turn that defers on serving pressure still counts; only true silence lapses.
The renewal loop gates on it: no cognition within one lease-length → skip
renewal (loud renewal_skipped_idle probe) → the hold lapses naturally → the
card is re-claimable (#2286) and any written artifact gets graded by the
sweeper. Contract pinned by a pure truth-table test.

Same round, before this landed: Anon organically closed expr_eval and the
grade tail posted RESOLVED:true in 1s — the citizen loop works; this fix
makes its recovery path honest when a citizen goes silent.

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

* fix(cognition): recent-results feedback channel — act results survive acts and turns (#414b, the Anwen regression)

The missing feedback, measured from her own captures: act result bodies lived
only in the K=1 last_action slot (any act overwrites — a list_files destroyed
her compile error) and the settlement-gated pinned block (gone once she
spoke). Heads persisted (slice B archive); RESULTS did not. She re-ran the
same unfixed code three turns running, wandering discovery tools between,
blind to the error she had already been given.

recent_results: char-bounded deque of (seq, room, result TAIL) in working
memory — window-derived share (ContextBudget::recent_results_chars, 1/32),
tails are the result's final chars (errors/conclusions live at the end),
eviction oldest-first by total chars. Rendered every turn as its own trailing
block before the pinned full-latest — small, append-only, KV-prefix stable,
deliberately NOT settlement-gated (the #139 full-dump objection doesn't apply
to ~300-char tails). Snapshot/restore round-trips it (serde default for old
snapshots). Regression test pins the contract: a finding survives later
trivial acts; the buffer respects its bound.

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

* fix(substrate): kill restart-resurrection of lapsed claims + emit-on-change probes (#399, overnight stalemate root cause)

Two defects burned the night of 2026-08-15→16 (round stalled 'actively held',
zero convergence, and the evidence rotated away before morning):

1. RESTART RESURRECTION: the honest-heartbeat birth grace stamped a cognition
   pulse at spawn, so every core restart re-armed 30 minutes of 'earned' claim
   renewals — and the renewal loop resurrected already-lapsed claims faster
   than the 180s sweeper could observe them. Convergence-by-lapse was
   structurally impossible across restarts. REMOVED: renewal is earned only by
   actual cognition (turn.start pulse); never-stamped ⇒ denied ⇒ holds lapse
   within one TTL of boot unless she thinks. Live-verified: leases lapsed
   at 08:30, sweeper closed+graded both artifacts 13s later, board went 4/4.

2. ARCHEOLOGICAL PROBE STREAM: serving.plan emitted identical rows per tick —
   measured 2.6 rows/s, 51% of the stream — so the probe file held 17 minutes
   of history and every incident became forensics on destroyed evidence.
   Emit-on-change everywhere (Joel: 'dynamic and easy to probe, not
   archeological'):
   - plan probe fires only when its fingerprint changes (windows quantized to
     1k buckets in the fingerprint only — token-level free-memory wobble is
     noise, not a plan change)
   - warm-slot-oversubscribed moved OUT of the pure planner (called 2x/tick on
     different budgets — any per-call dedup alternates and floods) onto the
     daemon's adopted-plan path behind the same gate
   - renewal_skipped_idle fires once at the denial TRANSITION, with a paired
     renewal_resumed when cognition returns — not every 60s tick forever
   Measured after: 0.07 rows/s serving.plan (39x), renewal probe exactly one
   row per citizen, stream span 17min → hours.

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

* fix(probes): serving.plan triggers on decisions + relative window deadband, oversubscribed probe on adopted plan (#399 final)

Live measurement defeated the quantized fingerprint twice: served_window
wobbles ~1k tokens/tick (1k buckets → 146 rows/3min) and usable_gb churns
±1-2GB live (GB granularity → 563 rows/15min). Trigger on DECISIONS only;
measured fields ride as payload; window changes emit past a >1/8 relative
deadband (the #415 deadband shape) — a real re-plan clears it, wobble never
does. The warm-slot-oversubscribed probe (removed from the pure planner in
the previous commit — plan_serving_stable calls it twice per tick on
different budgets, defeating any per-call dedup, measured 260 rows/3min)
lands here on the daemon's ADOPTED-plan path behind the same gate.

Measured steady state after deploy: 0.07 rows/s (was 2.6/s).

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

---------

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 21, 2026
…on 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
joelteply added a commit that referenced this pull request Aug 21, 2026
…gs — decomposition slice 1

Joel: "I hate this file. Decompose it away from slop." llama_server.rs was 4,190 lines
with every concern in it — flags, readiness, request shaping, lifecycle, orphan reaping —
and it is where every change in the KV design would otherwise land. Slice 1 of
docs/architecture/KV-CACHE-ECONOMY.md §7. Net -28 lines there, and a module that can
actually be tested.

WHY FLAGS FIRST. Answering "how do we use upstream llama.cpp" precisely: we consume it
TWO independent ways, and only one touches this file.

  * as a BINARY — llama-server spawned as a subprocess, spoken to over HTTP. ZERO
    linkage: llama_server.rs imports nothing from llama/ggml. Upstream drift reaches us
    as a changed CLI surface (this module) or a changed JSON shape (request/readiness).
  * as a LIBRARY — the `llama` crate links libllama in-process for forge/conversion.
    That is where our fork's C++ lives (K3 KDA, AttnRes, MoE gather). Never passes here.

So a fork rebase should touch this file and the wire shapes and nothing else. It could
not, while the flags were welded into a Command chain in a 4k-line file.

THE INVOCATION IS DATA. `base_invocation` is pure — primitives in, `LaneInvocation` out,
no Command, no process, no I/O. Same shape as `TierPolicy::plan`: return a plan, don't
apply one, so it can be asserted, logged and diffed. `envs` is on the struct because the
invocation genuinely is not args-only (LLAMA_RESIDENT_OVERRIDE, #29); modelling that as
"args plus a side effect someone remembers" is how it gets dropped.

FIVE TESTS THAT COULD NOT PREVIOUSLY EXIST, because asserting them meant launching a real
llama-server on a real GPU with a real model:

  * `-c` == per-lane window x lanes, and `--parallel` is EXPLICIT — the regression where
    inheriting llama.cpp's default of 4 silently served every citizen a QUARTER of the
    planned window. Nothing failed. That is why this is now three lines of pure arithmetic.
  * `--no-context-shift` present on every lane (#139: overflow must 400, never amputate
    the prompt middle and generate from the mutilation).
  * `--cache-reuse 256` still configured (~306s/act when absent, measured).
  * every value-taking flag is followed by a VALUE — the class that broke on 2026-08-20
    when upstream turned `--flash-attn` from a switch into one taking [on|off|auto] and
    the bare form ate `--mmproj`, so the lane failed to spawn and serving sat at 0 lanes.
  * the base invocation needs no environment.

COMMENTS TRAVELLED WITH THEIR FLAGS, verbatim, not paraphrased. Each one is the only
surviving record of the incident that set its value; moving a flag without its comment
destroys the reason and invites the reversion. Added one postscript to --cache-reuse:
the flag was never the defect, WE were mutating our own prefix (fixed in 40075d7) —
so nobody tunes this number looking for the win that already landed elsewhere.

SCOPE, deliberately bounded: the CONDITIONAL flags (KV quant, flash-attn, mmproj, MTP
draft, resident override, CPU placement, jinja, LoRA, MoE -ot) are still assembled by the
caller and are slice 2. This is the unconditional spine, which is also the part carrying
the arithmetic worth pinning.

VERIFIED: cargo check clean (metal,accelerate); 5 new tests pass; llama_server's 38 tests
pass. NOT MINE, flagged not absorbed: `first_free_port_skips_a_taken_port` is FLAKY under
parallel execution — same filter and binary gave FAILED then ok on an immediate re-run,
and it passes in isolation both with and without this diff. It binds a port and races.
Worth its own card; not silently folded in here.

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 21, 2026
…d durability, grade-race fix (#2349)

* feat(activity): ONE adapter seam — material in, verdict out (slice 1 of the judge wiring)

An activity adapts the outside world's form into ours and renders a verdict on what the
citizen produced. Benchmarks, a game level, a life-drawing critique, a robot that either
picked up the block or didn't — one interface, N implementations, declaring none is normal.

WHY NOT `BenchmarkAdapter`, WHICH ALREADY EXISTS: it was the right SHAPE and the wrong
SCOPE. It already carried both directions — `dataset()`/`tasks()` in, `grade()` out — so
this is a generalization, not a rewrite. But the NAME is load-bearing: an interface called
`BenchmarkAdapter` cannot plausibly host a game level, so the second activity gets its own
trait, registry and runner, and the substrate ends up with two of everything. Same failure
as naming a room for a subsystem and making it immortal. Named for the JOB, gameplay is a
sibling implementation instead of a fork.

THE GROWABLE OUTCOME, and why the fixed struct was the real blocker: `TaskOutcome` had
`patch` and `workspace` as bare fields, which means SWE-bench OWNS the outcome type. A game
trajectory or a robot's joint log could only arrive by widening a struct every other
activity compiles against — so in practice it would never arrive there; it would grow its
own parallel outcome and its own parallel judge. `Outcome` now keeps the UNIVERSAL facts as
named fields (she spoke; she worked somewhere; the harness had its own opinion) and puts
modality-specific ones in a typed `channels` carrier, the same growable shape this codebase
already uses for adapter capabilities. Gameplay adds a channel without SWE-bench
recompiling; a judge asks for the channel it grades and gets a typed None when the activity
produced none. Growing the enum stays deliberate — a new variant needs a REAL activity — but
the cost of a wrong guess drops from "a second subsystem" to "one unused variant".

WHAT THIS IS FOR (measured today, 450 runs): 253 of them — 56% — ended with NO GRADE AND NO
ERROR. Not a failure, not a verdict: nothing. In classroom terms the exams were sat and
nobody was assigned to mark them. `benchmark.json` declares `suite/instances/team/budget`
and NO judge; `BenchmarkAdapter` has zero production consumers; grading is hardcoded to
`swe_bench::grade` behind four private call sites. When a run doesn't come through one of
those doors, nothing marks it and nothing says so.

`resolve_all` is the seam that makes that unrepresentable: a declared judge that cannot be
resolved is an error AT STAGING, naming the bad key and the known set — never a run that
ends quietly. An EMPTY declaration resolves to empty and is explicitly NOT an error, because
most activities judge nothing and that is normal, not a missing judge.

Five tests, each pinning a contract that failed in the wild: registry round-trip + named
miss; empty declaration is legal; unknown declaration fails loud and names it; the default
judge defers to the harness (so a task whose EvalTask already encodes done-ness needs no
judge code); an absent channel reads ABSENT, not as empty success.

NOT YET WIRED — deliberately, this is slice 1. Next: the recipe declares its judges in
`params`, dispatch resolves them through this registry, and the hardcoded `swe_bench::grade`
branch is DELETED rather than supplemented (a subtraction, per the design doc's build order).

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

* fix(kv): canonical order inside the STABLE tier — the other half of the #266 prefix defect

The tier-split shipped for #266 (stable framing first, volatile grounding last) did not
deliver reuse, and the comment at this sort said why without noticing: a stable sort
"preserves the salience order WITHIN each tier, so attention ranking is untouched". That
was treated as harmless. It is the remaining half of the defect. Salience is recomputed
EVERY turn, so preserving it as EMIT ORDER re-shuffles the very tier whose only purpose
is to be byte-identical across turns.

MEASURED LIVE 2026-08-21, inside Atlas's `pallets__flask-4045` run, from her own prompt
captures — not inferred:

  turn0→1  common prefix 8,216 / 9,906 chars   diverges into [now …]
  turn1→2  common prefix 7,879                 diverges into [active-work]
  turn2→3  common prefix 8,133                 diverges into [workspace-map]

~82% shared prefix, and the divergence points are stable-tier blocks TRADING PLACES.
Because the system prompt is FIRST, a swap at token ~2,000 invalidates the KV for
everything after it — including a 34,000-token conversation tail. `--cache-reuse 256`
was passed the entire time and every turn reported `cachedTokens: 0`. The cache was
correct; we were destroying the prefix ourselves.

Cost at the measured 111 tok/s prefill: ~306 SECONDS OF RE-PREFILL PER ACT, growing as
her conversation grows (9,847 → 36,242 tokens and climbing as tool results accumulate).
One observed turn was 20 minutes of apparent silence that was a single 36k re-prefill —
the run reporting `active`/`not stalled` the whole time, because the pulse is a timer.

THE FIX: within the stable tier, order CANONICALLY (by faculty name). Attention ranking
is genuinely untouched — salience still decides WHICH contributions are selected, which
happened above against the budget. It simply stops deciding WHERE the survivors sit,
which it never needed to. Same set in, same bytes out, every turn.

The volatile tier deliberately KEEPS salience order: it is re-prefilled by construction,
so canonical ordering would buy no reuse and would cost the "most salient nearest the
write point" placement #205 put there on purpose.

VERIFIED: 181 prompt tests pass, including
`framing_flip_never_perturbs_the_cacheable_prefix` — the #266 invariant is intact, this
extends it to the case it did not cover (a FIXED framing with re-ranked context).

NOT YET LIVE-PROVEN: the running core still holds the flask run, so deploy is correctly
blocked. The proof owed is her next captures — common prefix ~82% → ~100%, and
`cachedTokens` 0 → nonzero from turn 2. A regression test pinning "same set, different
salience → identical bytes" follows immediately.

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

* feat(probe): delib.generate.cache — make the KV fix prove itself instead of me diffing captures by hand

Joel: "hopefully it will prove itself via probes." It could not have. `delib` carried
`turn.demand` and `context.render` — how big the prompt WAS — and nothing about what the
lane DID with it. A prompt whose prefix we were destroying every single turn looked
identical in the probe stream to one served entirely from cache. That absence is why the
prefix defect (fixed in 40075d7) survived from #266 to today, and why the only way to
see it on 2026-08-21 was hand-diffing a citizen's raw prompt captures — exactly the manual
step a probe exists to delete.

The row lands in `metrics_from`, the single funnel every generation already passes
through, so one probe covers every turn of every citizen with no caller change:

  delib.generate.cache  cached_tokens prefill_tokens hit_rate prefill_ms decode_ms
                        input_tokens output_tokens latency_ms

`hit_rate` is `TurnMetrics::cache_hit_rate()` — the ratio that already existed and had no
way out of the process. 1.0 = fully warm prefix. Near 0 with a large `prefill_tokens` =
the prefix is being invalidated upstream, which is the measured pre-fix state: ~306s of
wasted re-prefill per act while `--cache-reuse 256` was set and working correctly.

Emitted ONLY when the lane actually reported timings. Cloud and older endpoints omit
them, and a fabricated 0.0 hit-rate for a provider that never measured one is a lying
receipt of the #151/#357 class — those stay silent rather than report a floor they did
not observe.

So the verification of the ordering fix is now a probe query rather than a capture diff:
hit_rate should climb off the floor from the second act of a task onward.

cargo check green (metal,accelerate). Signature and return value unchanged — purely
additive. The --lib gate in CI is the test proof; live proof still waits on the flask run
clearing the core.

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

* test(kv): pin "same set, different salience → identical bytes" — the guard the #266 half lacked

The sibling test `stable_framing_serializes_before_higher_salience_volatile_grounding`
pinned the TIER SPLIT and passed the whole time the prefix was being destroyed. It could
not catch this: it asserts stable-before-volatile, and says nothing about order WITHIN the
stable tier — which is exactly where salience was re-shuffling blocks every turn.

So this is the assertion that makes 40075d7 hold. Three different salience rankings and
three different arrival orders over the SAME three stable contributions must emit
byte-identical blocks. Revert to a salience-ordered stable tier and this fails while the
sibling still passes — which is the whole point of adding it rather than extending that one.

It also pins the rule POSITIVELY (canonical by faculty name), because byte-equality alone
would be satisfied by an insertion-order block that happened to match across this test's
particular arrival orders. An accidental pass is not a guard.

TWO THINGS THE TEST TAUGHT ME WHILE WRITING IT, both worth the next reader's time:

1. My canonical assertion was backwards from its own message. Alphabetically it is
   room-kanban < room-roster < workspace-map — roster sits BETWEEN, and I asserted
   kanban < map < roster. Caught by the test, on the first run.

2. The volatile-tier assertion FAILED, and it was my probe that was wrong, not the code.
   I reached for `active-work` as a volatile example. It is pinned FIRST by an explicit
   rule ABOVE salience (ctx.sort_by, :888-905) because the ctx_floor reservation for a
   citizen's held card only holds if its claimant also leads the greedy selection walk.
   So I had picked the one faculty in that tier where salience is deliberately not the
   deciding key, and the result read as "salience does nothing here" about a tier where
   it does plenty. Swapped to recall-vs-affect, which are genuinely salience-ranked, and
   left the trap written down in the test so the next person does not re-lay it.

That volatile assertion is deliberately `assert_ne!` — it guards the ASYMMETRY. The
volatile tier must keep following salience (#205, most salient nearest the write point);
it re-prefills by construction, so canonical ordering there would buy no reuse and would
cost that placement. If a future "make it all deterministic" pass reaches into that tier,
this fails and tells it why.

182 prompt tests green (was 181). Disk swept-clean, 128 GB free.

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

* docs(kv): the KV cache economy — and the naive "shared tool head" plan is DOMINATED

Joel asked for this DESIGNED, not patched. Reading the serving layer first was the whole
value: most of the machinery we were about to build already exists in llama.cpp and is
already switched on. Two facts read in-file today reverse the plan I would have written
from memory.

WHAT IS ALREADY TRUE (source-read, not inferred):

  * `slot_prompt_similarity` defaults to 0.1 and we never disable it — LCP-based slot
    selection is ALREADY ACTIVE (common.h:687, server-context.cpp:1543). Cross-persona
    head sharing is not a feature to build; it is a behaviour we already get, unmanaged.
  * `cache_ram_mib` defaults to 8192 — an 8 GiB host-RAM prompt cache ALREADY EXISTS, and
    the server already saves an evicted slot's conversation and restores the incoming one
    (prompt_save / prompt_load, server-context.cpp:1620).
  * We never pin `id_slot`, so affinity is emergent from prefix similarity and never
    declared. That is the actual gap: not mechanism, POLICY.

THE ARITHMETIC THAT KILLS THE OBVIOUS PLAN. With Atlas's measured numbers — ~7,600 tok
shared head vs a 36,242 tok tail:

    sim    = 7,600 / 36,242 ≈ 0.21  > 0.1  →  persona B TAKES persona A's slot
    f_keep = 7,600 / 36,242 ≈ 0.21  < 0.5  →  A's 36k is evicted

The shared head is big enough to WIN slot selection and small enough that winning throws
away 4.7× more than it saves. "Make the tool head identical and first so every persona
shares it" is right about token cost (#333) and is a precondition — but as a KV strategy
it is dominated, and shipped alone it makes slot theft MORE likely and would read as a
regression. Tail retention beats head sharing by the tail:head ratio, which grows every
act. Any design that trades a tail for a head is backwards.

So the order inverts: declared slot affinity (`id_slot` per resident citizen, eviction as
a priced decision behind the same seam as every other cache class) is the KEYSTONE, and
the shared head lands AFTER it. "Docker form" is exactly the right instinct for the head —
a shared prefix only stays shared if it is a function of LANE IDENTITY, not of whichever
citizen is calling: same model, flags, tool manifest, template → one head, with an
identity hash so divergence is LOUD rather than silent.

Reconciles with [[kv-prefix-caching-is-the-only-form...]]: that memory is about
CONVERSATION content, which is genuinely unique per citizen. A tool schema head is not
conversation, so sharing it is prefix reuse, not dedup.

FOUND WHILE WRITING, and it is its own defect: that 8 GiB prompt cache is UN-GOVERNED. We
never pass the flag, never budget it, never told the ResourceGovernor. Same shape as the
2026-07-13 incident — every component healthy, the wiring absent — in RAM instead of disk.
`--cache-ram` becomes a governed lease at spawn, like GGML_MOE_HOST_CACHE_GB (#287).

WHAT I DID NOT MEASURE, and the doc says so rather than guessing: the wall-clock of
prompt_save/prompt_load at ~36k tokens. It decides whether eviction is survivable or is a
second re-prefill in a hat, so step 1 is measuring it and step 3 is gated on the number.

Steps 1 (measure) and 2 (govern the RAM) are independent of the live flask run and can
start now.

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

* docs(kv): policy is an ADAPTER not a rule + decompose the 4,190-line server (Joel's steer)

Joel: "not too hard coded into one paradigm — better add proper adapters and break the
module down into concerns. We could do a ton with plugin ML here, especially RL."

Right, and reading first changed the answer for the THIRD time today: the seam already
exists WITH a learned implementation in it.

  * capacity/expert_tier_policy.rs — `trait TierPolicy { fn plan(...) -> ExpertTierPlan }`,
    decisions returned as a PLAN not applied inline; ClassicTierPolicy is the v1 heuristic.
  * expert-pager-policy LEAF CRATE — policy already extracted into its own crate. The
    plugin boundary is already cut.
  * capacity/bandit_plan_controller.rs — a BANDIT CONTROLLER, re-exported from it. RL is
    not greenfield here (#276/#281).
  * expert_predictor / expert_decay_policy / expert_residency / expert_observer — the
    concerns are already separated on the expert side.

So KV slot residency implements that shape rather than inventing a rival. And the
generalisation is now EARNED rather than speculative: CLAUDE.md says generalize at 2-3
instances, and we have three of "paged resource under scarcity with a learnable value
function" — MoE experts (built), LoRA genome paging (built), KV slots (this doc). KV slots
are the ideal outlier B precisely because they are MAXIMALLY DIFFERENT from experts: unit
is a whole conversation not a tensor, a miss costs seconds of prefill not bytes of fetch,
population is 2-8 not thousands. One seam fitting both ends fits everything between.

  - Outlier A, heuristic: cost_of_loss = tail_tokens / prefill_rate. A quantity with a
    UNIT (seconds), not a magic ratio. Ships first, is the permanent floor.
  - Outlier B, RL: state = per-slot (tail, recency, citizen, phase) + arrival; action =
    which slot; reward = PREFILL SECONDS SAVED.

AND THE REWARD SIGNAL IS ALREADY INSTRUMENTED — I shipped it this morning (faf8c07)
without noticing it was one. `delib.generate.cache` emits cached_tokens / prefill_tokens /
prefill_ms / hit_rate on EVERY generation: a labelled transition per turn, continuously, in
production. So the A-vs-B comparison is measurable from day one instead of argued.

Guardrails so "plugin ML" doesn't become unexplainable serving: policies return PLANS
(loggable, replayable, refusable); the heuristic stays callable forever as the floor and a
learned policy that loses on measured prefill-seconds is switched off by the comparison,
not by argument; the deciding policy's identity rides the receipt so a regression is
attributable; and never learn on a broken substrate — before the deterministic head landed
the reward was ~0 for structural reasons and a bandit trained through that would have
learned nothing helps.

DECOMPOSITION: inference/llama_server.rs is 4,190 lines — 8× the decomposition law, and
where every §3 change would otherwise land. Named the six concerns (spawn/args, readiness,
slots, request, lifecycle, policy-as-leaf-crate). Explicitly a MOVE, not a re-architecture:
no new task, no new watch channel, no second registry — and the flag comments travel with
their flags, since those comments are the only record of the incidents that set each value.

ALSO CORRECTED §4: `--cache-ram` is not new work. capacity/host_cache_lease.rs is already
the governed lease, already runs on the governor tick, and its own module doc already says
why that matters here — "KV grows as slots fill". One more term on an existing lease.

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

* refactor(inference): extract the llama-server flag spine into lane_args — decomposition slice 1

Joel: "I hate this file. Decompose it away from slop." llama_server.rs was 4,190 lines
with every concern in it — flags, readiness, request shaping, lifecycle, orphan reaping —
and it is where every change in the KV design would otherwise land. Slice 1 of
docs/architecture/KV-CACHE-ECONOMY.md §7. Net -28 lines there, and a module that can
actually be tested.

WHY FLAGS FIRST. Answering "how do we use upstream llama.cpp" precisely: we consume it
TWO independent ways, and only one touches this file.

  * as a BINARY — llama-server spawned as a subprocess, spoken to over HTTP. ZERO
    linkage: llama_server.rs imports nothing from llama/ggml. Upstream drift reaches us
    as a changed CLI surface (this module) or a changed JSON shape (request/readiness).
  * as a LIBRARY — the `llama` crate links libllama in-process for forge/conversion.
    That is where our fork's C++ lives (K3 KDA, AttnRes, MoE gather). Never passes here.

So a fork rebase should touch this file and the wire shapes and nothing else. It could
not, while the flags were welded into a Command chain in a 4k-line file.

THE INVOCATION IS DATA. `base_invocation` is pure — primitives in, `LaneInvocation` out,
no Command, no process, no I/O. Same shape as `TierPolicy::plan`: return a plan, don't
apply one, so it can be asserted, logged and diffed. `envs` is on the struct because the
invocation genuinely is not args-only (LLAMA_RESIDENT_OVERRIDE, #29); modelling that as
"args plus a side effect someone remembers" is how it gets dropped.

FIVE TESTS THAT COULD NOT PREVIOUSLY EXIST, because asserting them meant launching a real
llama-server on a real GPU with a real model:

  * `-c` == per-lane window x lanes, and `--parallel` is EXPLICIT — the regression where
    inheriting llama.cpp's default of 4 silently served every citizen a QUARTER of the
    planned window. Nothing failed. That is why this is now three lines of pure arithmetic.
  * `--no-context-shift` present on every lane (#139: overflow must 400, never amputate
    the prompt middle and generate from the mutilation).
  * `--cache-reuse 256` still configured (~306s/act when absent, measured).
  * every value-taking flag is followed by a VALUE — the class that broke on 2026-08-20
    when upstream turned `--flash-attn` from a switch into one taking [on|off|auto] and
    the bare form ate `--mmproj`, so the lane failed to spawn and serving sat at 0 lanes.
  * the base invocation needs no environment.

COMMENTS TRAVELLED WITH THEIR FLAGS, verbatim, not paraphrased. Each one is the only
surviving record of the incident that set its value; moving a flag without its comment
destroys the reason and invites the reversion. Added one postscript to --cache-reuse:
the flag was never the defect, WE were mutating our own prefix (fixed in 40075d7) —
so nobody tunes this number looking for the win that already landed elsewhere.

SCOPE, deliberately bounded: the CONDITIONAL flags (KV quant, flash-attn, mmproj, MTP
draft, resident override, CPU placement, jinja, LoRA, MoE -ot) are still assembled by the
caller and are slice 2. This is the unconditional spine, which is also the part carrying
the arithmetic worth pinning.

VERIFIED: cargo check clean (metal,accelerate); 5 new tests pass; llama_server's 38 tests
pass. NOT MINE, flagged not absorbed: `first_free_port_skips_a_taken_port` is FLAKY under
parallel execution — same filter and binary gave FAILED then ok on an immediate re-run,
and it passes in isolation both with and without this diff. It binds a port and races.
Worth its own card; not silently folded in here.

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

* refactor(inference): conditionals behind LaneOptions + a generic AsArg — slice 2

Joel: "Move concerns to proper adapters" and "templates are underutilized by you in both
cpp and rust… it reduces code size a lot sometimes." Both applied here, not just agreed to.

SLICE 2 — the conditional flag surface moves out of the Command chain:
kv-quant / flash-attn / mmproj / MTP draft / CPU placement / resident-override now ride
`LaneOptions` into a pure `LaneInvocation::with_options`. llama_server.rs 4,190 → 4,079.

THE SPLIT THAT MAKES IT AN ADAPTER RATHER THAN A MOVE: every LaneOptions field is an
ALREADY-RESOLVED value, never a thing to look up. Resolution — reading config_env,
probing the registry for an mmproj or an MTP head, deciding placement, and emitting the
vision-capability RECEIPT — stays with the caller, which owns the I/O. lane_args decides
only what a resolved value MEANS on a command line. Gather inputs, then compute a plan:
the same shape as TierPolicy, and the reason the whole surface is unit-testable with no
GPU, no model, no process.

The vision warn stayed behind deliberately. A Vision-capable row with no projector serves
text-only and silently ignores images — a capability LIE — so it warns loud
([[fallbacks-are-illegal-fail-loud]]). That is a receipt about the world, not a flag, and
receipts belong with resolution.

THE TEMPLATE POINT, applied where it actually pays. Before, every value was hand-converted
at its call site — `total_ctx.to_string()`, `p.to_string_lossy().into_owned()`, a bare
`"256".into()` — three spellings of one idea, and three chances to push a VALUE without
its FLAG. So: one `trait AsArg` (impl for &str/String/&Path/u16/u32) plus `pair(args,
flag, value)`, and a valued flag becomes a single indivisible call. Monomorphised exactly
as a C++ template would be — one definition, zero runtime cost.

That is not cosmetic. Orphaning a value from its flag is precisely the class that took
serving to 0 lanes on 2026-08-20, when upstream turned `--flash-attn` into
`[on|off|auto]` and the bare form ate `--mmproj`. `pair` makes it unrepresentable instead
of merely tested for — and the test stays anyway, because a guard you can delete is not
a guard.

FOUR MORE TESTS (9 total in the module):
  * default options emit NO conditional flags and no env — "present when it should be
    absent" is a real defect; the mmproj case literally decides whether a citizen SEES.
  * --flash-attn keeps its value when sitting next to --mmproj: the 8/20 outage as a
    test rather than an outage.
  * resident override rides the ENVIRONMENT, never the args (#29) — the reason
    LaneInvocation models envs at all rather than returning a bare Vec<String>.
  * KV quant sets BOTH -k and -v; one without the other is a silent cache asymmetry.

STILL SLICE 3, deliberately not half-migrated: --jinja / chat-template sidecar, the LoRA
set, and the MoE `-ot` tensor overrides.

VERIFIED: cargo check clean (metal,accelerate); 9/9 lane_args tests pass.

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

* refactor(inference): slice 3 — jinja/LoRA/-ot move out; the flag CONCERN is now closed

Last of the conditional surface: the chat-template sidecar, the genome LoRA set, and the
K3 `-ot` expert placement. llama_server.rs 4,190 → 4,034 (-156); lane_args.rs is 521 lines
that are entirely about one thing. No flag is now built in two places, which was the
compression violation the half-migration would have left behind.

`--jinja` moved to the BASE spine, not to options, because it is unconditional — and the
comment explaining why is the most expensive one in the file. Gating it was a silent
capability kill: the switch used to require a forge-written sidecar to exist, so every
normally PULLED GGUF ran with tools DISABLED. The gateway ignored the `tools` param and
the persona NARRATED tool calls instead of emitting them. A model with hands, holding
them behind its back, because of a file that was never there. The sidecar now OVERRIDES
when present (forged GGUFs whose mlx→gguf conversion left a thin 208-char tool-less
template) and the embedded tool-capable template stands when absent — tools ON either way.

The LoRA join moved WITH its flag rather than staying at the call site, deliberately: the
join IS the flag's semantics. llama.cpp b8784+ deprecated repeated `--lora` and SILENTLY
keeps only the LAST, which was collapsing every multi-layer genome stack to a single
adapter — glass-boxed 2026-07-23 in the lane's own stderr ("DEPRECATED: --lora specified
multiple times... only last value will be used" x4) while a 4-layer stack was supposedly
serving. The genome's whole premise is layers that STACK; this arg SHAPE is what stacks
them. Split the join from the flag and the next person re-introduces the bug.

Resolution stayed with the caller for all three, same rule as slice 2: the sidecar
`is_file()` probe, the adapter paths, and `expert_ot_value()` are lookups; lane_args only
decides what a resolved value means on a command line.

VERIFIED: 351 inference tests pass; cargo check clean (metal,accelerate).

NEXT, and it is the seam Joel actually asked for: `trait LaneBackend` with llama-server as
impl A, so an mlx / vllm / remote-grid-peer lane is impl B rather than a fork of this file.
lane_args is now shaped to BE that impl rather than to be the only way.

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

* docs(serving): STDERR IS NEVER AN INTERFACE — and we break it twice (Joel's law)

Joel, 2026-08-21: "STDERR/out is never a place for interfacing, just debug."

Checked rather than agreed, and we violate it in two places, both written in good faith
for real incidents and both making llama.cpp's DEBUG TEXT load-bearing in our control
plane:

  * `inference::wedge::WedgeWatch` parses stderr for an impossible slot progress
    (`progress = 1.10`) and raises a flag THE SERVING DAEMON REAPS A LANE ON.
  * `inference::placement_watch::OffloadWatch` parses llama.cpp's LOAD BANNER for layers
    offloaded, then fires `serving.placement.cpu_fallback` — treated as a lease
    violation (#441).

Why it has to change even though it works today: stderr is unstructured, unversioned, and
drifts with upstream's logging taste. The failure mode when it drifts is not an error — it
is SILENCE. The watcher stops matching, the flag stops rising, and the wedge that burned
four hours on 2026-08-05 becomes invisible again with every component still green. Same
shape as every other defect in this document: an absence that looks like normal operation.
It is also, precisely, the class the #441 sentinel was built to catch — so the sentinel is
currently exposed to the failure it exists to detect.

The structured channels already exist: `/slots` carries per-slot state and progress,
`/props` the load configuration, and the per-request `timings` block already reaches us —
it is what `delib.generate.cache` reports. The tok/s sentinel should read
`prefill_tokens`/`prefill_ms` rather than scrape a banner.

THE LINE, since not all stderr reading is a violation: `stderr_log_tail()` on spawn
failure is CORRECT — a human asks "why did it die" and gets llama.cpp's own last words.
Reading stderr to SHOW is debug. Parsing stderr to DECIDE is an interface. The test is
whether a control path branches on it.

STATUS: named, not fixed. Rewriting both watchers onto /slots + /props needs those payloads
verified against our pinned build (b10196-fa7e0d8e9) first — asserting a field exists
because upstream documents it is the same mistake in a different channel.

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

* docs(kv): pin the PRE-FIX baseline from a live run — 0% reuse, 57,005 tokens re-prefilled in 4 acts

Measured 2026-08-21 10:57 off a LIVE run rather than argued: citizen e5f4141d, instance
pallets__flask-4045, pre-fix binary b10196-fa7e0d8e9, read from her own prompt captures.

  act 1: cached 0 / prefill  9,847  hit 0.000
  act 2: cached 0 / prefill 11,172  hit 0.000
  act 3: cached 0 / prefill 19,434  hit 0.000
  act 4: cached 0 / prefill 16,552  hit 0.000

57,005 tokens re-prefilled across four acts, zero reuse on every turn, ~513s at the
measured 111 tok/s — 8.5 minutes of a 4.3h budget spent re-reading, four acts in, cost per
act still climbing. That is the number 40075d7 has to move, now pinned to a specific
citizen on a specific instance so the after-measurement is a COMPARISON and not a claim.

METHOD NOTE, recorded because it nearly went wrong and it is the session's recurring
defect class: `pgrep` for a solve process finds NOTHING while a run is live, because
`agent/solve` executes INSIDE the core rather than as a subprocess. I read that absence as
"the run finished, deploy is unblocked" — and would have rebooted the box out from under a
citizen at act 4. Wrong instrument, absence misread, same shape as every retraction in
this document. The authoritative signal is
~/.continuum/progress/agent-solve-claim-<run>.json (state, acts, mtime): it said
state=running, acts=4, written 60 seconds earlier.

Deploy remains correctly blocked. The after-number is owed and is now cheap to collect —
same read, or just query delib.generate.cache once the fix is live.

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

* feat(serving): per-slot throughput verdict — the sensor missing when the round died today

TDD/VDD on a defect measured LIVE forty minutes ago, encoded while it is fresh rather
than remembered later.

THE INCIDENT. Citizen e5f4141d working pallets__flask-4045 in-room. Run reported
state=running, heartbeat every minute, acts frozen at 4 for twelve minutes. Lane answered
/health {"status":"ok"}, /props 200, /v1/models 200, port bound, process up 3h58m. Every
readiness signal in the system said healthy. Her own lane said:

  slot 1 | task 3   | n_decoded = 1092, tg = 2.65 t/s, tg_3s = 0.96 t/s
  slot 1 | task 3   | n_decoded = 1093, tg = 2.53 t/s, tg_3s = 0.05 t/s
  slot 0 | task 605 | prompt processing, progress 0.52, 105 t/s

Slot 1 decoding at 0.05 TOKENS PER SECOND — one token per twenty seconds — still holding
task 3 after six hundred tasks passed on the neighbouring slot. PREFILL WAS FINE (105 t/s,
the expected rate). Only decode collapsed, on ONE slot, and nothing could see it. That is
#386's per-slot wedge and it is the round-killer: a citizen at 1/600th speed burns her
whole 4.3h deadline producing nothing while the board renders a healthy pulse.

WHY LANE HEALTH CANNOT CATCH IT: /health is lane-scoped and the LANE is fine — the other
slot decodes normally, so every aggregate reads healthy. #363 established that readiness
must verify GENERATION not the socket; this is the layer below: generation must be
verified PER SLOT, because a lane is healthy exactly as long as its best slot is.

DESIGN, per the standing rules:
  * PURE function, transport-agnostic. It takes SlotObservation values, so it works the
    instant they arrive from a structured channel. /slots returns HTTP 000 on our pinned
    build — that is the follow-up, and the verdict logic must not wait on it.
  * expected_tps is a PARAMETER, never a constant here. What counts as collapsed depends
    on model and device; the catalog Model row owns that expectation (#441). A constant
    would be a hardcoded LCD clamp — either missing a real wedge on a fast box or crying
    wolf on a slow one.
  * Reads the 3-SECOND rate, not the lifetime average. The same slot read tg=2.53 (bad)
    while tg_3s=0.05 (dead); averaged over hours, a stopped slot looks merely slow.
  * Degraded REPORTS, only Wedged is actionable. #446 is the counter-example: starvation
    stamped as wedge evidence produced a 2-minute relaunch loop that WAS the outage.
  * A slot under 32 decoded tokens gets no verdict — killing cold generations is
    [[an-absence-is-an-unfinished-measurement]] wired to an actuator.

SIX TESTS, the first two carrying the live numbers verbatim: the incident classifies
Wedged; the lifetime average provably would have MISSED it (that test guards the
leading-indicator argument, not just the constant); merely-slow is reported not reaped;
a cold slot is never wedged; no expectation means no verdict; and the same observation
flips healthy/wedged with the device's own expectation.

INSTRUMENT NOTE, recorded in the module: those numbers were read out of stderr BY HAND,
which is the only way they were visible — and that is the exact defect Joel named today
("STDERR/out is never a place for interfacing, just debug"). Reading a log to DIAGNOSE is
correct. A control path depending on it is not. This module is the honest half; wiring it
to /slots is the other.

NOT YET WIRED — no caller, deliberately. The verdict is the testable unit; the actuator
(who reaps, when, under what lease) is a separate decision and belongs with the daemon,
same doctrine as the wedge flag.

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

* fix(inference): prefill is not decode — stop the 90s watchdog killing live prefills (the round-killer)

MEASURED on the M5, and it is why citizens took ZERO room turns across the probe
ledger's 868 minutes while every dashboard read healthy:

  demand        94,370 tok   against a 58,112-token window (over_window 1.62)
  prefill rate     382 tok/s (timed live: 603 tok → 17.7s; 5,728 tok → 31.1s)
  ⇒ first byte    ~170 s     for a window-sized prompt
  watchdog          90 s     ← fires first, every single time

44 `persona.settle.deliberation_retry` rows carry the verdict the watchdog reached:
"the slot HAD started our work and then stopped mid-stream, so the backend is stuck
or dead". It was neither. Atlas re-sent the byte-identical 94,370-token demand 21
minutes later and died the same way.

The cascade is what made it a round-killer rather than a slow turn: the ambient
permit is held across that wait, so three permits sat occupied ~90s each by turns
that could never finish. Measured +4 yields/min, EXACTLY, for 25 consecutive
minutes, zero successes — the perfect periodicity is the tell, since real
contention is bursty.

ROOT CAUSE, one line and not a missing feature. Both budgets already existed and
both were correctly sized for their own job: STREAM_IDLE_TIMEOUT_SECS (90s) is a
DECODE watchdog by its own doc ("a token every few hundred ms"), and
PRE_STREAM_HEADER_TIMEOUT_SECS (300s) is documented as "sized for a worst-case
full-window prefill queued behind co-tenants (minutes)". The adapter switched from
the second to the first the instant ANY progress arrived — and llama.cpp emits a
prompt_progress frame at 0% ingestion purely "to signal the client that the request
has started processing". So the decode watchdog policed the prefill, and the budget
written for exactly this case was skipped past within seconds.

FIX: `inference::stream_liveness` — a pure, transport-agnostic phase machine
(Queued / Prefilling / Decoding) that names the distinction once so no caller
re-derives it. Bulk work gets the bulk budget; the drip gets the drip budget.

Deliberately preserved:
- #385 keeps its teeth. Liveness is still keyed on the GAP BETWEEN PROGRESS EVENTS,
  never elapsed total, and the stamp still requires `processed` to STRICTLY advance
  — so a slot replaying a frozen counter still fails, just at the prefill budget.
- #446 keeps its diagnosis. `has_started()` still separates never-started
  (dead backend vs oversubscribed queue) from started-then-stopped.
- Decoding is TERMINAL, so a late/stray progress frame cannot re-open the generous
  budget mid-decode. My own test caught that the first implementation could.
- Providers that never report prefill (every cloud adapter) go Queued → Decoding on
  first output, so their budgets are bit-for-bit unchanged. Strict addition, never
  a relaxation.

Phase transitions are detected at ONE site per kind rather than repeated at each of
the four output sites, so a new output kind cannot forget to declare itself.

7 new tests carry the live incident numbers verbatim, incl. the 0%-frame case that
IS the outage and a regression guard for no-prefill providers. 36/36 existing
openai_adapter tests green.

Design + the full measured chain: docs/architecture/ADMISSION-IS-UNOBSERVABLE.md
(also records the admission-snapshot gap and the seven wrong reads it took to get
here — two of them my own instruments lying, not the system).

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

* feat(inference): probe the prefill fix — "no retries" is an ABSENCE and proves nothing

Self-correction. I shipped the phase machine and emitted NOTHING for it, then read
"RETRIES: 0, TURNS: 0" off the ledger and could not say whether prefills now survive
or nothing was running. That is the same unobservable-state defect the design doc in
the previous commit exists to complain about, committed by me one commit later.

Two rows, both at the seam that actually decides:

- `inference.prefill.rescued` — fires ONCE per stream, only when a prefill has
  already outlived the OLD decode budget AND is still advancing. Every row is a turn
  that under the previous flat 90s would have been killed here and retried forever.
  This is a POSITIVE signal for a fix whose symptom is an absence.

- `inference.prefill.complete` — total / cached / fresh / elapsed_ms / tok_per_s /
  would_have_died, at the prefill→decode edge. This is the number the 90s constant
  was implicitly guessing at, and the one the budget should eventually be DERIVED
  from per model+device (#441). It also finally measures the KV cache's REAL
  contribution per stream (`cached` vs `fresh`), which is the instrument the KV
  ordering work has been owed.

Joel, mid-session: "Have to probe better." Correct — a fix I cannot see working is a
fix I have not proven.

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

* fix(inference): split queue-wait from ingest in the prefill receipts — a probe that mixes two regimes measures neither

First cut of `inference.prefill.complete` produced absurdities that were the
conflation talking: a 467-token prompt "prefilling at 1 tok/s for 231s". It was
queued ~230 of those seconds waiting for a slot. llama.cpp's 0% progress frame
marks slot ASSIGNMENT, so the honest split is:

  queued_ms  = stream open → first progress frame   (admission/oversubscription, #234)
  ingest_ms  = first frame → prefill complete        (real ingest work)

`ingest_tok_per_s` is now computed over ingest only — the number a derived
per-model budget must come from (#441). `rescued` rows carry `queued_s` for the
same reason.

Source-read while here (vendor llama.cpp): prefills ARE continuous-batched across
slots (`can_batch_with` + cont_batching), so concurrent prefills share compute by
design. The 230s waits mean all 4 slots were OCCUPIED — by window-scale
re-prefills that zero KV reuse makes ~5 minutes each. Queue wait is downstream of
the KV defect; the split makes that attributable per stream instead of argued.

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

* fix(inference): a loading lane must not latch slot affinity off — the boot race that undid persona pinning every launch

slot_for_persona (2026-07-11) pins each persona's prefix to its own llama-server
slot. It has likely been latched OFF on virtually every boot since: the /props
probe latched SlotAffinity::Unsupported on ANY non-success status, and personas
start deliberating while the lane still answers 503_loading (measured ×93 in this
ledger). One probe racing the load window → pinning dead for the process's life →
prefix-similarity slot theft → cached: 0 mid-conversation, measured today.

Only 404/501 — "no such surface" — may latch. Extracted the verdict as
props_status_proves_endpoint_absent() and pinned it with a regression test carrying
the incident: 503/500/502/429 defer and re-probe; 404/501 latch (without that,
every cloud provider would re-probe per persona request forever). A malformed body
from a live server also defers now — mid-load servers answer partial bodies.

Observability, same lesson as the prefill probes ("no rows" must be distinguishable
from "latched off silently for weeks"):
- inference.slot_affinity.pinned    — once per persona pin, proves affinity is LIVE
- inference.slot_affinity.evicted   — names the victim; cross-persona eviction IS
                                      the KV-clobber event and must be priced
                                      (KV-CACHE-ECONOMY: a decision, not an accident)
- inference.slot_affinity.deferred / .unsupported — the latch decision itself

Measured on the previous build (6dea7c4, 10-min window) with queue/ingest split:
queued=0s on ALL streams — no slot wait; the residual is ingest-share under
continuous batching. First nonzero mid-scale KV reuse ever recorded (cached=2912 of
21002) with affinity still latched off; this fix targets exactly that number. Two
died_old=1 prefills (163s, 192s) completed that the old watchdog would have killed.

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

* fix(persona): 'never thought' is a state, not a 584-million-year idle — the renewal probe stops stamping u64::MAX

idle.unwrap_or(u64::MAX) printed idle_ms=18446744073709551615 into the ledger
(seen live 2026-08-21). The gate logic was right; only the receipt lied.
[[unknown-is-not-a-quantity]]: the unknown gets a word ('never-thought'), never
a sentinel number a reader must recognize by its astronomical size.

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

* docs: resolution log — all four fixes proven live same-day (retries 0, first slot pins ever, 99.7% KV reuse on byte-stable prompt)

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

* docs: citizen act observed post-fix; deaf-kickoff scoped to subscription coverage (cursor layer exonerated)

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

* fix(bench): clone_at serializes per destination — the race that voided sympy-18057's finished artifact at grading

The 2026-08-18 grade loss, root-caused: `clone_at` removes its destination at entry
AND razes/renames it at the commit point, while the protocol legitimately wants the
same instance's tree more than once (her work tree + the pristine score tree; a
lapsed-claim auto-grade racing a re-stage). Concurrent callers deleted each other's
trees mid-use.

The trigger was a Node-era assumption fossilized in a path: staging is
`cloning-{pid}`, unique when every clone was its own process — but in the headless
core every clone shares ONE pid, so two concurrent stages computed the SAME staging
path and the stale-staging sweep deleted a LIVE clone mid-fetch:
"repo.cloning-78289/.git/: No such file or directory" — a finished artifact voided
at scoring.

Fix, constraint-first:
- One live clone_at per DESTINATION: per-repo_dir tokio::Mutex registry (async lock —
  the section awaits git subprocesses throughout; keyed by repo_dir, not instance, so
  a 300-instance sweep does not serialize globally).
- staging_path_for(): pid + per-invocation nonce, extracted pure for testability.
- Dead-staging sweep by `<name>.cloning-` prefix instead of exact-name match — with
  nonced names an exact match can never find a crashed run's leftovers, and unswept
  litter violates the no-cache-dir-without-an-eviction-story rule (2026-07-13).

Two regression tests carry the incident: staging uniqueness + sweepable prefix, and
lock identity per destination.

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

* fix(bench): a round survives the core that opened it — persist in-flight rounds, reload on first touch

Measured twice on 2026-08-21: the ROUNDS map was process-memory, so a reboot
mid-round (1) blanked `benchmark/rounds` while a staged round was live — the
operator re-derived the round from probe archaeology — and (2) silently flipped
driver_for_card back to DetachedSolve for a Citizen round's remaining cards,
quietly rebuilding the parallel runner the round was configured to avoid. With
"restart freely" as standing doctrine, every deploy was round-murder: 8 of the 20
most recent runs on this box carry "killed by a core restart".

The round is now durable state, same family as the airc attach cursor: one JSON
file per in-flight round under ~/.continuum/state/bench-rounds/, written on every
mutation (open / add_card / settle / seal), removed at Done. First touch of ROUNDS
reloads — no boot hook; the first driver_for_card after a reboot already answers
from the reloaded round. bench.round.reloaded announces each recovery.

Eviction story (the 2026-07-13 rule): files self-evict at Done, and a Done file
surviving a crash window is dropped AND deleted on reload, never resurrected as a
round no event can settle. Persist failure degrades to the old amnesia and WARNS —
durability must never fail a live dispatch.

HONEST LIMIT, stated in code: cards that reached terminal state while the core was
down still read as working until the next event. Re-deriving card state from the
board at boot — and consuming the orphan-reap report (`needs_redispatch: true`,
which nothing consumes today) — is the follow-up reconciler, per
ROUND-LIFECYCLE-AS-RECIPE-OWNED-STATE-MACHINE.md. This commit restores the round's
EXISTENCE, which is what every later reconciler needs first.

Two regression tests carry both measured defects.

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

* fix(bench): round tests persist to a temp dir, never the operator's real state

Caught within the hour: the persistence layer resolved $HOME unconditionally, so
the EXISTING tests — which exercise the public open_round/add_card — minted four
phantom rounds into ~/.continuum/state/bench-rounds across two cargo test runs,
and the next live core faithfully reloaded them (in_flight: 5 with one real
round). A durable layer's tests must be durable somewhere disposable: cfg(test)
resolves to a per-process temp dir. Verified: full bench_round suite leaves the
real state dir untouched.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Sep 15, 2026
…ee lane classes, work first among the non-directed (#4058)

Measured 2026-09-15 04:20–05:00Z on the M5 (16 minds, 4 Ornith lanes @58k): 33 lane
holds at 302 s p50 / 617 s p90, 14 acts, 0 writes, only 5 message-turn starts — the
lanes went to self-cycle turns, and a mind musing with no card ("let me take stock")
queued for the same non-directed budget, in arrival order, as a mind holding a card
mid-edit. The health receipt read READING for the hour. A lane is the scarce thing;
it goes to the mind that will write first.

`LanePriority { Directed, Work, Ambient }` replaces the `directed: bool` at
`acquire_serving_lane`:
- Directed — unchanged: the full pool, one lane always reserved (#139).
- Work — the caller holds a card in progress (`holds_live_work`, the faculty's own
  predicate): queues in the non-directed semaphore and is COUNTED while it waits.
- Ambient — no card in hand (musing, wandering, a dream): takes a non-directed permit
  only when one is free AND no Work caller is counted; otherwise parks on the gate's
  release signal (1 s tick as a missed-wake guard) and never enters the queue ahead of
  work. Parked, not starved: once no work waits it takes the next free lane.

Receipts: `admission.lane.granted/released` carry `priority`; a new
`admission.lane.ambient_yielded_to_work` fires once per park. Test: with one
non-directed lane held, a Work and an Ambient caller both arrive; the freed lane goes
to Work, Ambient stays parked until Work releases, then takes it.


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

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Nov 16, 2026
…gine that declared them, bound to its pid and deduped; --minds is the seated minds plus one learner; the pool geometry counts parked ids

- The pool's geometry check required sequence_capacity == slots: an engine keeping resident minds reports lanes +
  parked ids, so the pin would have made the core reject its pool. ContextGeometry reads resident_minds
  {lanes, parked_ids} (declared on /props) and the check is slots + parked ids.
- Discovery records resident_minds per engine from the same /props body (resident_minds_by_root); the prefetch is
  sent only to an engine that declared it (never a 404 guess), carries the slot pool's engine pid (the engine refuses
  a stream meant for a replaced process, fork #139), and is deduplicated per (engine, mind) until its reply returns.
- ServingTarget.minds = the seated minds + 1 side sequence for learning at the resident launch (launch.rs); 0 on
  every single-purpose lane (eval, vision sidecar, fixtures). --minds takes it, only for an engine that lists it.

Compiled by CI (no build beside the M5's serving lanes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 16, 2026
…th the pool, the prefetch is the waiting turn's, and the engine's own token binds it

- Discovery race: the resident-minds declaration now lives on the slot pool, set on the candidate before it is
  published and checked against an installed pool (MindsMismatch), after the superseded-generation check. The
  root-keyed map is gone.
- Identity: the engine draws an incarnation token (fork #139, resident_minds.incarnation); the prefetch carries it
  and a replaced engine refuses it. No OS pid.
- Ownership: the prefetch is a future the turn awaits inside its own lane wait (biased select: admission first, so
  a turn admitted at once never streams); admitted or cancelled, it is dropped with the wait. No detached task.
- --minds: the resident controller holds it (LlamaServerControl::seat_minds, default no-op; set by the serving
  daemon to the seated minds + 1 learner); ephemeral lanes never set it, so ServingTarget is unchanged.
- ContextGeometry decodes /props.context_geometry once into a typed struct; page_key builds the fork id without
  slicing; prepare drops a redundant cfg!(windows) (the install receipt exists only on Windows already).

Compiled by CI (no build beside the M5's serving lanes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 17, 2026
…duler only picks who decodes (Joel: "Very unreliable logic. It just gives up and breaks.")

The M5 read after #6093: rotation fixed, but one mind seated at a time (grants 158-207k = untrimmed view x 1.25 vs a
300,850 pool; real sequences 50-93k), so four residents never batched. Admission summing view ceilings is the defect;
the owed queue / BehindActs / reclaim handoffs / armed yields exist only to cope with it. Replacement: residency via
#139, one memory owner admitting by engine-reported live cells with paging and typed deferral, grants only as view
ceilings, scheduler picks who decodes and batches every ready mind. Gate: four resident, batched decode, aggregate
tok/s vs 80.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 17, 2026
…nd park the coldest instead of the KV-full ladder

The BigMama chain (unified-pool overcommit -> halve-and-retry to 2/1 tokens -> MTP verify straddles sub-batches ->
#24840 throw -> slot error -> core relaunch) replaced by: reserve each frame's cells before decode (ladder deleted),
park the coldest unpinned resident not in the frame to RAM (#139) with prefetch on return, typed deferral when none
can move, refusal at admission for a request that can never fit, frames never split so speculation stays whole. Prior
art cited: unslothai/llama.cpp#184.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 17, 2026
…il-all deleted, preempt the coldest legal processing slot via remove_slot + #139 flash_out into a bounded store, blocked with wake sources, resume with aging, draft failure reconciled to verified tokens; done and remaining pieces named

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 17, 2026
…ore, custody and resource charge (no second store or ledger); a preempted/blocked slot keeps its placed prefix, sampler, RNG, checkpoints and verified output under the same completion owner, never reseeded or duplicated on wake

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 17, 2026
…inds side runs against the engine that switches minds, so CI tests the pair, not two halves apart

#139 is the shipping line (f39cf25fb) plus resident minds: a mind switch is a sequence move in milliseconds through
the pool and flash, prefetch from flash while others decode, typed receipts, incarnation, learn pins. Re-pinned to
the shipping line's merge commit once #139 lands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 17, 2026
…ms into native blocks, the previous retires after the fenced switch; the blocks are llama.cpp's own per-sequence KV streams (one contiguous slice per layer for K and V when unified KV is off), so a switch is a descriptor bind and a tier move is raw slice copies, never a cell walk or serialization

Builds on 4.9 (the model) and 4.1b (the numbers) instead of restating them; replaces #139's mechanism (held). Open
questions and the prototype evidence (copy time vs bandwidth, layer-ordered first-token latency, byte-identical
round trip, scaling at 4/8/16) come before code.

Co-Authored-By: Claude Opus 5.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: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants