Skip to content

Build(deps-dev): Bump eslint from 8.57.1 to 9.24.0 - #12

Merged
joelteply merged 1 commit into
mainfrom
dependabot/npm_and_yarn/eslint-9.24.0
Apr 9, 2025
Merged

joelteply merged 1 commit into
mainfrom
dependabot/npm_and_yarn/eslint-9.24.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 9, 2025 •

Copy link
Copy Markdown
Contributor

Bumps eslint from 8.57.1 to 9.24.0.

Release notes

Sourced from eslint's releases.

v9.24.0

Features

  • 556c25b feat: support loading TS config files using --experimental-strip-types (#19401) (Arya Emami)
  • 72650ac feat: support TS syntax in init-declarations (#19540) (Nitin Kumar)
  • 03fb0bc feat: normalize patterns to handle "./" prefix in files and ignores (#19568) (Pixel998)
  • 071dcd3 feat: support TS syntax in no-dupe-class-members (#19558) (Nitin Kumar)
  • cd72bcc feat: Introduce a way to suppress violations (#19159) (Iacovos Constantinou)
  • 2a81578 feat: support TS syntax in no-loss-of-precision (#19560) (Nitin Kumar)
  • 30ae4ed feat: add new options to class-methods-use-this (#19527) (sethamus)
  • b79ade6 feat: support TypeScript syntax in no-array-constructor (#19493) (Tanuj Kanti)

Bug Fixes

  • b23d1c5 fix: deduplicate variable names in no-loop-func error messages (#19595) (Nitin Kumar)
  • fb8cdb8 fix: use any[] type for context.options (#19584) (Francesco Trotta)

Documentation

  • f857820 docs: update documentation for --experimental-strip-types (#19594) (Nikolas Schröter)
  • 803e4af docs: simplify gitignore path handling in includeIgnoreFile section (#19596) (Thomas Broyer)
  • 6d979cc docs: Update README (GitHub Actions Bot)
  • 82177e4 docs: Update README (GitHub Actions Bot)
  • e849dc0 docs: replace existing var with const (#19578) (Sweta Tanwar)
  • 0c65c62 docs: don't pass filename when linting rule examples (#19571) (Milos Djermanovic)
  • 6be36c9 docs: Update custom-rules.md code example of fixer (#19555) (Yifan Pan)

Build Related

  • 366e369 build: re-enable Prettier formatting for package.json files (#19569) (Francesco Trotta)

Chores

  • ef67420 chore: upgrade @​eslint/js@​9.24.0 (#19602) (Milos Djermanovic)
  • 4946847 chore: package.json update for @​eslint/js release (Jenkins)
  • a995acb chore: correct 'flter'/'filter' typo in package script (#19587) (Josh Goldberg ✨)
  • b9a5efa test: skip symlink test on Windows (#19503) (fisker Cheung)
  • 46eea6d chore: remove Rule & FormatterFunction from shared/types.js (#19556) (Nitin Kumar)
  • bdcc91d chore: modify .editorconfig to keep parity with prettier config (#19577) (Sweta Tanwar)
  • 7790d83 chore: fix some typos in comment (#19576) (todaymoon)
  • 76064a6 test: ignore package-lock.json for eslint-webpack-plugin (#19572) (Francesco Trotta)

v9.23.0

Features

  • 557a0d2 feat: support TypeScript syntax in no-useless-constructor (#19535) (Josh Goldberg ✨)
  • 8320241 feat: support TypeScript syntax in default-param-last (#19431) (Josh Goldberg ✨)
  • 833c4a3 feat: defineConfig() supports "flat/" config prefix (#19533) (Nicholas C. Zakas)
  • 4a0df16 feat: circular autofix/conflicting rules detection (#19514) (Milos Djermanovic)
  • be56a68 feat: support TypeScript syntax in class-methods-use-this (#19498) (Josh Goldberg ✨)

Bug Fixes

  • 0e20aa7 fix: move deprecated RuleContext methods to subtype (#19531) (Francesco Trotta)
  • cc3bd00 fix: reporting variable used in catch block in no-useless-assignment (#19423) (Tanuj Kanti)
  • d46ff83 fix: no-dupe-keys false positive with proto setter (#19508) (Milos Djermanovic)
  • e732773 fix: navigation of search results on pressing Enter (#19502) (Tanuj Kanti)

... (truncated)

Changelog

Sourced from eslint's changelog.

v9.24.0 - April 4, 2025

  • ef67420 chore: upgrade @​eslint/js@​9.24.0 (#19602) (Milos Djermanovic)
  • 4946847 chore: package.json update for @​eslint/js release (Jenkins)
  • f857820 docs: update documentation for --experimental-strip-types (#19594) (Nikolas Schröter)
  • 803e4af docs: simplify gitignore path handling in includeIgnoreFile section (#19596) (Thomas Broyer)
  • 6d979cc docs: Update README (GitHub Actions Bot)
  • b23d1c5 fix: deduplicate variable names in no-loop-func error messages (#19595) (Nitin Kumar)
  • 556c25b feat: support loading TS config files using --experimental-strip-types (#19401) (Arya Emami)
  • 82177e4 docs: Update README (GitHub Actions Bot)
  • a995acb chore: correct 'flter'/'filter' typo in package script (#19587) (Josh Goldberg ✨)
  • 72650ac feat: support TS syntax in init-declarations (#19540) (Nitin Kumar)
  • 03fb0bc feat: normalize patterns to handle "./" prefix in files and ignores (#19568) (Pixel998)
  • b9a5efa test: skip symlink test on Windows (#19503) (fisker Cheung)
  • 46eea6d chore: remove Rule & FormatterFunction from shared/types.js (#19556) (Nitin Kumar)
  • fb8cdb8 fix: use any[] type for context.options (#19584) (Francesco Trotta)
  • 071dcd3 feat: support TS syntax in no-dupe-class-members (#19558) (Nitin Kumar)
  • e849dc0 docs: replace existing var with const (#19578) (Sweta Tanwar)
  • bdcc91d chore: modify .editorconfig to keep parity with prettier config (#19577) (Sweta Tanwar)
  • 7790d83 chore: fix some typos in comment (#19576) (todaymoon)
  • cd72bcc feat: Introduce a way to suppress violations (#19159) (Iacovos Constantinou)
  • 2a81578 feat: support TS syntax in no-loss-of-precision (#19560) (Nitin Kumar)
  • 366e369 build: re-enable Prettier formatting for package.json files (#19569) (Francesco Trotta)
  • 30ae4ed feat: add new options to class-methods-use-this (#19527) (sethamus)
  • b79ade6 feat: support TypeScript syntax in no-array-constructor (#19493) (Tanuj Kanti)
  • 0c65c62 docs: don't pass filename when linting rule examples (#19571) (Milos Djermanovic)
  • 76064a6 test: ignore package-lock.json for eslint-webpack-plugin (#19572) (Francesco Trotta)
  • 6be36c9 docs: Update custom-rules.md code example of fixer (#19555) (Yifan Pan)

v9.23.0 - March 21, 2025

  • 0ac8ea4 chore: update dependencies for v9.23.0 release (#19554) (Francesco Trotta)
  • 20591c4 chore: package.json update for @​eslint/js release (Jenkins)
  • 901344f chore: update dependency @​eslint/json to ^0.11.0 (#19552) (renovate[bot])
  • 557a0d2 feat: support TypeScript syntax in no-useless-constructor (#19535) (Josh Goldberg ✨)
  • 2357edd build: exclude autogenerated files from Prettier formatting (#19548) (Francesco Trotta)
  • 5405939 docs: show red underlines in TypeScript examples in rules docs (#19547) (Milos Djermanovic)
  • 48b53d6 docs: replace var with const in examples (#19539) (Nitin Kumar)
  • 0e20aa7 fix: move deprecated RuleContext methods to subtype (#19531) (Francesco Trotta)
  • 5228383 chore: fix update-readme formatting (#19544) (Milos Djermanovic)
  • c39d7db docs: Update README (GitHub Actions Bot)
  • a4f8760 docs: revert accidental changes (#19542) (Francesco Trotta)
  • 5439525 chore: format JSON files in Trunk (#19541) (Francesco Trotta)
  • 75adc99 chore: enabled Prettier in Trunk (#19354) (Josh Goldberg ✨)
  • 2395168 chore: added .git-blame-ignore-revs for Prettier via trunk fmt (#19538) (Josh Goldberg ✨)
  • 129882d chore: formatted files with Prettier via trunk fmt (#19355) (Josh Goldberg ✨)
  • 1738dbc chore: temporarily disable prettier in trunk (#19537) (Josh Goldberg ✨)
  • 8320241 feat: support TypeScript syntax in default-param-last (#19431) (Josh Goldberg ✨)
  • 280128f docs: add copy button (#19512) (xbinaryx)
  • 833c4a3 feat: defineConfig() supports "flat/" config prefix (#19533) (Nicholas C. Zakas)

... (truncated)

Commits
  • d49f5b7 9.24.0
  • 9b6ed8a Build: changelog update for 9.24.0
  • ef67420 chore: upgrade @​eslint/js@​9.24.0 (#19602)
  • 4946847 chore: package.json update for @​eslint/js release
  • f857820 docs: update documentation for --experimental-strip-types (#19594)
  • 803e4af docs: simplify gitignore path handling in includeIgnoreFile section (#19596)
  • 6d979cc docs: Update README
  • b23d1c5 fix: deduplicate variable names in no-loop-func error messages (#19595)
  • 556c25b feat: support loading TS config files using --experimental-strip-types (#19...
  • 82177e4 docs: Update README
  • Additional commits viewable in compare view

Dependabot compatibility score

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


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

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

@dependabot
dependabot Bot requested a review from joelteply April 9, 2025 02:26
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 9, 2025
@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@joelteply
joelteply enabled auto-merge April 9, 2025 02:36
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/eslint-9.24.0 branch from cfcec5c to f603468 Compare April 9, 2025 02:36
@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.24.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.57.1...v9.24.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.24.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/eslint-9.24.0 branch from f603468 to bfadaae Compare April 9, 2025 02:37
@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@joelteply
joelteply merged commit 449eace into main Apr 9, 2025
@joelteply
joelteply deleted the dependabot/npm_and_yarn/eslint-9.24.0 branch April 9, 2025 02:41
joelteply added a commit that referenced this pull request Nov 30, 2025
…nt-9.24.0

Build(deps-dev): Bump eslint from 8.57.1 to 9.24.0
joelteply added a commit that referenced this pull request Jun 8, 2026
The recurring slop pattern revealed by the test audit (3,646 test
functions in continuum-core, 34% of LOC, files with 3-6 separate
#[cfg(test)] mod blocks each): the model keeps forgetting that we
already wrote the test infrastructure and reinvents fixtures /
mocks / stress harnesses per-PR.

Add a fourth STOP block to CLAUDE.md as the canonical pointer to
what already exists:

- HeuristicInferenceAdapter (ai/heuristic_adapter.rs) — the canned-
  response inference fixture, gated #[cfg(any(test, feature =
  "test-fixtures"))]
- persona::recorder + vdd::turn_replay — live persona turn capture
  and replay
- RagCaptureSink / JsonlRagCaptureSink / RecordingRagSource /
  ReplayRagSource — RAG context capture and replay (PRs #10, #11, #12)
- TwoAircLoopback (in flight, task #187) — two-airc-peer cross-grid
  integration fixture
- RecordingModule pattern (runtime/runtime.rs) — bus-recording
  subscriber for event assertions
- mod stress { ... } gated behind stress-tests feature — concurrency
  harness (this PR)

Plus the six rules going forward, codified so they survive amnesia:

1. ONE #[cfg(test)] mod tests per file. Nest sub-mods inside, never
   add a peer test mod.
2. Stress tests go in the stress-tests-gated mod. Compile-time
   gating, not #[ignore].
3. Mocks / Stubs / Fakes go behind cfg(any(test, feature =
   "test-fixtures")). Production binaries cannot link them.
4. Battle-harden regressions get one #[test] in the existing mod
   with a // regression for #N link. Not their own file.
5. Reusable fixtures live in one place per concern. Never write a
   parallel MockX in your test file.
6. Every test justifies itself with // what this catches: naming
   the invariant or regression. Trivial getter tests get refused.

Per Joel 2026-06-08: "Yes half the battle is tests and we wrote all
this infra. Need to stop forgetting."

Co-Authored-By: Claude Opus 4.7 <[email protected]>
joelteply added a commit that referenced this pull request Jul 19, 2026
…arte look, change-monitor, governed (#1961)

* feat(perception): wire MediaPerceptionSource into cognition (read path) + single-source SharedCompute

The persona's live-call visual perception now reaches the globally-aware mind.
`MediaPerceptionSource` is lifted into each persona's Workspace grounding set at
supervisor boot (the same task-#12 RagSourceFaculty bridge roster/doctrine use),
so WHO is visible on the call + a description of what they show becomes budgeted,
non-blocking framing — read only from cells resolved this tick, competing for
context through the ONE flexbox allocator so perception never dominates.

Single-source the compute-once cache so the read side and the (coming #192) media
ingest cannot diverge:
- `runtime::shared_compute::global()` — the ONE process-global SharedCompute; a
  frame's derivatives (scaled cells, description) are content-hash keyed so N
  personas viewing one frame describe/scale it ONCE (the multi-persona vision moat).
- `Runtime::new` ADOPTS that instance for its own `compute` handle, so a module
  reaching it via ModuleContext.compute and a persona reaching it via global() see
  the same cache.
- `media::perception_registry()` — the addressable per-persona PerceptionBuffer
  home (one home, two reachers by persona_id: ingest warms, source reads), mirroring
  focus::registry(). AMBIENT_PERCEPTION_SIZE (480x270) is the one ambient-cell policy.

Read side is off the 30fps media plane entirely: deliver() runs per persona TURN
(seconds apart), O(participants) string assembly, no inference, reads only ready
cells. The ingest cadence gate (describe << frame rate, governor-priced) lands with
the video_rx -> observe() wire in #192.

Empty until frames arrive — this wires the READ path into cognition; nothing on
the brain's compose path changed (unified.rs untouched — perception is a NEW source
with no legacy compose consumer, so only the target Workspace path is wired).

Tests: perception_registry idempotent one-buffer-per-persona + singleton; existing
source/buffer/compute suites green.

Refs #187 #106; sets up #192.

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

* perf(perception): gate ingest warm to a sampled cadence — 30fps-safe by construction

MANY personas render at 30fps and humans join at 30fps; the ingest primitive must
survive that BEFORE #192 wires a raw stream to it. `observe()` previously spawned an
LLM describe + scale on EVERY call, and 30fps frames each have a distinct
content-hash so the compute-once cache gives ZERO dedup on the frame rate — a raw
wire would trigger 30 vision inferences/sec/participant/persona.

Separate the two planes:
- COALESCE the latest frame UNCONDITIONALLY (O(1) mutex insert — safe at 30fps; the
  media/display plane). Perception samples the media plane, it does not mirror it.
- GATE the expensive warm (scale + describe) behind a per-participant cadence
  (AMBIENT_WARM_MIN_INTERVAL_MS = 500ms ≈ 2Hz) + an in-flight guard that never stacks
  a warm on an unfinished one. Extracted as a PURE `should_warm(participant, now_ms)`
  decision so the 30fps guarantee is asserted without timing or a runtime.

`observe()` now takes `now_ms` (substrate passes the monotonic clock in — no
Instant::now in the media core). The cadence is a buffer FIELD (default from the
const), so the governor can retune it per persona later as an attention-priced
resolution field (#173) — a focused persona looks more often, an idle one less.

Cross-persona cost stays O(distinct frames), not O(personas): the actual
scale/describe runs on the ONE global SharedCompute keyed by content-hash, so N
personas viewing one participant's frame share ONE describe (the multi-persona
vision moat vs cloud, where N personas = N API calls). The per-persona gate/spawn is
cheap and cache-hits after the first.

Tests: cadence gates within the interval + reopens after; in-flight guard never
stacks. Existing coalesce/read suites updated for the now_ms arg, green.

Refs #187 #173; sets up #192 ingest.

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

* perf(perception): warm cadence is a BAND — slow floor, not off; change escalates

"Slow cadence not NO cadence" (Joel): an idle observer must not be starved of vision —
absent motion it DECAYS to a slow baseline, it does not go to zero. The warm decision is
now a band, not a single throttle:

- MIN ceiling (AMBIENT_WARM_MIN_INTERVAL_MS = 500ms): never describe faster, even under
  constant motion — the 30fps rate cap.
- BASELINE floor (AMBIENT_WARM_BASELINE_INTERVAL_MS = 5s): describe at LEAST this often
  even on a dead-static scene — a still participant still refreshes every few seconds so
  room-as-now stays true, just coarse.
- change signal (in between): a relevant motion/scene-change/YOLO hit escalates to the
  MIN ceiling long before the floor.

should_warm now takes `changed`: `warm if !in_flight && (first || (changed && past_min)
|| past_baseline)`. Both branches are unit-tested (change→fast, static→slow-floor,
never-stack). Both intervals are FIELDS so the governor shrinks them for the
speaking/acting persona and widens them for idle observers later (attention-priced
resolution field, #173) — but never to infinity.

observe() passes `changed = true` as a documented INTERIM: no change detector wired yet,
so every coalesced frame is treated as potentially-changed (cadence rides the MIN ceiling,
behavior-preserving). #192 replaces that `true` with a cheap motion/scene-change/YOLO
detector cell (compute-once/shared on the frame hash), at which point a static scene
decays to the baseline floor and describes are spent only where something changed.

Refs #187 #173 #192.

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

* feat(perception): sliding-window FrameRing store + grouped/windowed reads

The spine of the shared-cache perception design: stop thinking "hand each persona
images," think "one shared pre-warmed ring per source; personas read views."

- PerceptionBuffer's per-participant `latest: MediaFrame` becomes a bounded
  `FrameRing` (VecDeque, AMBIENT_RING_CAPACITY=8, newest at head). The ring IS the
  sliding window AND the pre-warmed cache in one object: frames are Arc handles,
  derivatives dedup by content-hash on the ONE shared compute, so K frames × N
  sources is cheap and never duplicates a derivative across viewers. `push` coalesces
  an identical-content head and evicts the oldest past capacity (room-as-now, bounded).
  ring_capacity is a field so the governor can deepen a source's window later (#173).

- Two serving shapes off the ONE store, both zero-copy over warm cells:
  - GROUPED: `current_percepts` = every ring's HEAD — "everyone at a glance," the
    human-widget gallery (behavior-preserving: head = the old "latest").
  - WINDOWED: `window_percepts(participant, k)` = one source's last-k, newest-first —
    "what changed / what did I miss." Unknown source → empty (never a fabricated look).
  Both go through one `percept_of` projection (compression: a frame becomes a percept
  in exactly one place).

This is the foundation for the pull/contact-sheet read (next), the room warm-loop +
tiled grouped-describe, and the change signal (compare consecutive ring heads → #192).
Design captured in memory (dual-perspective RTOS perception scoring).

Tests: ring windows newest-first + coalesces head + bounds capacity; grouped=all-heads
vs windowed=one-source-history; existing coalesce/read/cadence suites green (10/10).

Refs #187 #192 #173.

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

* feat(perception): à la carte look() — pull a source or group at thumbnail/res/full, ASAP

"Into their vision à la carte": a persona composes its own view — request images of ONE
source or the whole GROUP, at THUMBNAIL / higher-RES / FULL, satisfied ASAP.

PerceptionBuffer::look(scope, fidelity, compute) — the PULL side, distinct from the
ambient PUSH band:
- scope = Source(id) | Everyone (the contact-sheet / gallery).
- fidelity = Thumbnail (ambient) | Res(DestSize) (higher/lower) | Full (raw bytes).
  Higher-res is just a different SIZE key on the same content-hash, so it's
  compute-once/shared exactly like the thumbnail — a res another persona already pulled
  is a cache hit here (proven: repeat pull returns the SAME Arc).
- ASAP: warm hit → instant; cold cell → warmed NOW. It never consults the ambient warm
  gate, so a manual pull implicitly JUMPS the cadence band (an explicit high-priority ask).
- This is the ONE place perception AWAITS (a deliberate request, not the ambient hot path);
  targets are snapshotted under the lock and compute is awaited OUTSIDE it (no lock across
  await). Unknown source → empty (never a fabricated look).

With the FrameRing store, that completes the pull model: grouped gallery, per-source
history (window_percepts), and now on-demand images at any fidelity — all off the ONE
shared, compute-once cache.

Tests: source/group × thumbnail/res/full, prefer-warm sharing (same Arc), full=raw,
unknown→empty. 11/11 perception suite green.

Refs #187 #192.

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

* feat(perception): change-monitor cell — real luma-signature diff drives the warm band

Replaces the interim `changed = true` with an actual per-source change detector — the
universal monitor that gates the expensive describe (any view: call, game, page, movie).

- MediaFrame gains a SIGNATURE cell: a tiny 16x12 luma fingerprint (image_ops::luma_signature),
  compute-once/shared on the content hash like scale/describe — warmed first in the observe
  spawn (it's the cheapest and it gates the rest).
- observe now computes real `changed` via PerceptionBuffer::scene_recently_changed: diff the
  two most recent frames whose signature has WARMED (image_ops::luma_mean_abs_delta >
  CHANGE_THRESHOLD=8/255). Reads only ready cells — never awaits on the ingest path; cold
  start / signatures still warming → true (ride the MIN ceiling until we can tell). So a
  static scene now genuinely decays to the BASELINE floor; real motion/scene/slide change
  escalates.
- Cheap by construction: a bounded ring scan + a ~192-byte diff, fine per ingest. The
  signature is shared, so N watchers of one frame diff ONE fingerprint (compute-once on
  CHANGE, the moat now on the monitor too).

should_warm stays pure + param-driven (band logic unchanged, still fully tested); observe
just feeds it a real signal instead of a placeholder.

NOTE (next commit, per Joel): register perception as a ResourceConsumer with the resource
governor (RAM = ring frame bytes; sibling to Serving/Bevy/Voice consumers) so its footprint
is accounted and it leases — the "register with the GPU resource monitor" ask. Disk consumer
comes with the durable record.

Tests: luma signature + delta detect change; signature cell computes-once/shared;
scene_recently_changed (same scene → not changed, different → changed, unknown → assume).
23/23 media suite green.

Refs #187 #192 #56.

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

* feat(perception): register as a ResourceConsumer with the governor (RAM footprint + reclaim)

Perception takes its seat at the resource-governor table (#56) — a peer consumer beside
Serving (VRAM), Bevy (render VRAM), and Voice (TTS), exactly as Joel asked ("register with
the GPU resource monitor").

- PerceptionConsumer (modules/perception_consumer.rs) implements ResourceConsumer:
  - consumer_id "perception"; footprint() reports Ram = total ring frame bytes read live
    from the process-global PerceptionRegistry (empty when idle, like the siblings).
  - reclaim(Ram) evicts oldest ring frames toward the target but ALWAYS keeps each source's
    head — a live perceiver is never blinded (room-as-now survives a reclaim). Honest
    Released/Partial with real freed bytes; a non-Ram ask is refused by name (never silent).
- Byte accounting + eviction added at each layer: FrameRing::{resident_bytes, evict_oldest},
  PerceptionBuffer::{resident_bytes, evict_at_least}, PerceptionRegistry::{total_resident_bytes,
  evict_at_least} (clones Arcs out — no registry lock held across per-buffer work).
- Registered at the boot seam (ipc/mod.rs) right after Voice + Bevy via
  resource_daemon.add_consumer.

Honest scoping: perception holds RAM (the rings it owns), NOT VRAM — the vision-describe it
triggers runs on the served VL model, whose VRAM is ServingConsumer's footprint; perception
is a demander of that lane, not a holder of its bytes. The shared derivative cache
(thumbnails/descriptions/signatures on SharedCompute) is not double-counted here.

Disk consumer for the durable record follows when that lands (same pattern, ResourceKind::Disk).

Tests: footprint == ring RAM + empty-when-idle; reclaim evicts oldest, keeps head, honest
Partial, refuses wrong kind. Green.

Refs #56 #187 #192.

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 2, 2026
…naged like VRAM/RAM

Joel: 'like vram and memory, this contention has to be managed between cold
storage and nvme.' Design: NVMe is a governed HOT-SERVING tier (a ResourcePool,
same TrackedDir + evict_at_least machinery as CargoTargetPool), whose eviction =
MIGRATE frozen/duplicate artifacts to the Cold drive, not a manual rm. Serving
asks ensure_hot_resident(model); composes with device_fit's Unfittable one tier
down (VRAM). Corrects the DriveRole bug: Cold (HDD) is FROZEN storage, never the
per-token streaming tier (HDD = unservable). Dissolves today's K3 container disk
fight: the C: IQ2 is a verified duplicate of the D: copy -> governor migrates it
off NVMe -> container fits, no human deletes anything.

Refs #12 #36. Design for M5's system_resources lane.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
joelteply added a commit that referenced this pull request Aug 2, 2026
… for the storage tier

The gate the NVMe serving-tier eviction (#302) consults before dropping a frozen
GGUF: is an IDENTICAL twin already on cold storage? is_structural_twin (pure) =
same shard count + per-shard name + size, zero-byte shards never match. scan_shards
+ find_cold_twin are the thin fs layer. Never drop an NVMe artifact without a
VERIFIED cold twin (dropping 662GB on a path guess is the failure this guards).
Standalone-validated 5/5. Composes with device_fit + M5's NvmeServingTierPool.

Refs #12 #36. Design: STORAGE-SERVING-TIER-GOVERNOR.md.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
joelteply added a commit that referenced this pull request Aug 3, 2026
#2109)

* chore(k3): bump llama.cpp submodule to eee635ba2 — K3 serving stack onto canary

Advances the vendored llama.cpp fork 30 commits (clean FF over canary's stale
66594cc3f): container-serve resident-override (LLAMA_RESIDENT_OVERRIDE), the
rung-2 ResidencyCache plan-file consumer, the score-hint/generation-bias
actuator, PagerCaptureEvent emit, fit-device --reserve-gb. Makes canary USE the
K3 misfit-serving stack (measured 0.33 tok/s WASTE-parity on a 32GB card).

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

* docs(pager): RUN-1 K3 trace fixture + tkey->(layer,matrix) table for M5's replay

Live GGML_MOE_TRACE_FILE slice (12B records: u64 tkey + u32 e) + the reverse
table so BanditPlanController recovers (layer,expert): tkey=FNV-1a of
blk.{layer}.ffn_{gate,up,down}_exps.weight, e=within-layer expert idx, expert
identity=(layer,e) deduped across the 3 matrices. RUN-1 static-pin datum input.

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

* docs(pager): reference RL-policy prototypes for M5's TierPolicy port

The actual std-only Rust prototypes written against live K3 traces this
session: trace_replay (recency beats LFU 3-4x), predictor (offline
learned-decay +5pts held-out), online_predictor (bandit 49.8 vs 47.8
best-fixed on non-stationary), self_optimize (joint speed×quality). These
are the faithful-port source for the learned policy behind TierPolicy
(continuum-core expert_tier_policy.rs, #276). Numbers are properties of
these exact constants + reward math — reproduce before improving.

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

* docs(k3): GPU-resident hot experts design (task #23 'trend to full GPU')

The major GPU speedup: promote hot experts to persistent VRAM so decode's hot
path is GPU-native (zero fetch, zero copy). 3 increments (copy-skip -> VRAM hot
cache -> pipeline), the 32GB rate-distortion constraint (imatrix-enabled resident
shrink frees VRAM for the hot set), measured per-increment via k3-bench.

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

* docs(k3): flag the input_cpy-persistence question gating increment 1 vs 2

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

* docs(k3): modular rework-proof impl for #23 — reuse ResidencyCache + DeviceUploadFetcher

Mechanism is the existing (buft,fetcher)-generic ResidencyCache; a VRAM cache =
same class + device buft + host->device fetcher. 3 small parameterized pieces
(DeviceUploadFetcher, instantiate w/ GGML_MOE_VRAM_CACHE_GB, seam hook). Stats
only tune params -> zero mechanism rework.

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

* docs(arch): MoE serving on a governed budget (draft; M5 owns the governor seam)

Diagnoses the hardcoded-cache overcommit that collapsed K3 fetch bandwidth
(40GB pinned + mmap = 95.9GB on 63GB -> pagefile thrash -> 205 MB/s -> 0.027
tok/s) and lays out the clean architecture: governor owns the residency budget
net of the model's mmap footprint, plan-file is the one wire, ResidencyCache is
pure mechanism. Governor-interface sections marked [M5 OWNS] for her to edit.

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

* docs(arch): answer the [M5 OWNS] governor-budget seam in place (net-of-mmap is explicit arithmetic; plan_file.budget_bytes is the lease wire)

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

* docs(arch): measured governed-budget inputs + graduated serving/load path

Records the BigMama measurements feeding M5's #287 derivation (non-cache ~56GB,
per-token working set 5.5GB, governed budget ~6GB, fetch recovers to 2.5GB/s at
fit), the now-complete C++ cache mechanism (enable-from-plan, grow, shrink), and
the three-piece graduated path to serving/load kimi-k3 (catalog row + serving-lane
MoE launch + #287) replacing the rigged .bat.

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

* windows: make continuum-core build + link on windows-msvc (first time)

start-server.sh now provisions the full Windows CUDA build env before the cargo
builds (the cargo/nvcc path had none, unlike the vcvars-wrapped llama cmake):
import MSVC via vswhere->VS2022-14.4x + a .bat env dump (cl.exe for nvcc), pin
CMAKE to the manifest install, force CMAKE_GENERATOR=Ninja (the VS18-2026 auto-
pick is undefined in cmake 3.30), add the Windows SDK bin (mt.exe/rc.exe), select
a complete CUDA toolkit + CUDA_PATH (a provisioning split left cuda-env with 0
import libs vs cuda-13.2's 12), and RUSTFLAGS -L for pocket-tts (which emits no
link-search) while re-carrying +crt-static so the /MT GPU stack still links.

Portability: expert_container.rs + commands/capacity.rs used Unix-only
std::os::unix::fs::FileExt::read_exact_at. Add crate::platform_io::pread_exact
(unix read_exact_at / windows seek_read loop) - one place for positioned reads.

Build validated (npm start exit 0, continuum-core lib clean). A separate runtime
hot-loop on the #2088 core at startup is tracked apart from this build fix.

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

* feat(capacity): device_fit VRAM-partition calc for the governor

Pure calc the governor uses to fit a streaming-MoE's RESIDENT (non-expert)
tier to a device VRAM budget and reconcile it with the expert tier on ONE
budget — fixing the double-count where the expert pager was handed the full
VRAM ceiling while resident silently ate most of it.

Partition (in order): compute reserve -> resident (Native | device-fit
Override | Unfittable) -> sufficient-context KV -> everything left =
hot-expert VRAM budget (maximized: more on-GPU experts, fewer streams).
Context is derived + clamped, never hand-picked. Artifact resolver injected
(no hardcoded paths). Standalone-validated 7/7; M5 wires it into the daemon
spawn path + launch (ServingTarget.resident_override) per the K3 sprint split.

Refs #29 #31 #36. Arch-confirmed on real K3 UD-IQ2 (93 blk/896 exp/top-16).

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

* feat(serving): resident-override plumbing on ServingTarget + launcher

Wire foundation for the governor's device_fit plan: ServingTarget carries
resident_override: Option<PathBuf>, and the launcher exports it as
LLAMA_RESIDENT_OVERRIDE so llama.cpp sources the precision-shrunk RESIDENT
(non-expert) tensors from the device-fit GGUF (all offloaded to GPU) while the
primary streams experts. All builders updated; defaults None (resident serves
as-shipped, no behavior change) until compute_resident_override + the
resolve-or-generate resolver (#35) land next. In-crate validated.

Refs #29 #36.

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

* chore(vendor): bump llama.cpp fork to k3-adopt e3ce51df5

M5's per-layer KV accessors (n_head_kv_il + n_embd_head_{k,v}_il, continuum #238)
+ graph reconciliation. The K3 engine now builds against these — enables the
device_fit resident-override serve + honest per-layer K3 KV sizing.

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

* feat(serving): compute_resident_override — wire device_fit into the plan

The governor now DECIDES the resident source per serve: compute_resident_override
derives resident_bytes (weights - expert_bytes_total) vs the governed VRAM ceiling
via capacity::device_fit, and sets ServingTarget.resident_override. A dense/small
model fits native (None); a >VRAM-resident MoE (K3) resolves a cached device-fit
override that fits, else Unfittable → route to grid / generate (#35), glass-boxed.

resolve_device_fit_override (model_registry::artifacts): looks up a per-user
device-fit cache convention (<storage_root>/device-fit/<id>/) + a resident-bytes
sidecar; returns the override only when its resident fits the usable budget. No
hardcoded paths; generation/HF discovery is #35. The resident-fit decision turns
only on resident_bytes vs budget — per-layer KV (#2107 ModelCapabilities) drives
the context/expert split elsewhere, so KV is not consulted here.

Refs #29 #35 #36. In-crate validated.

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

* docs(arch): storage serving-tier governor — NVMe<->cold contention managed like VRAM/RAM

Joel: 'like vram and memory, this contention has to be managed between cold
storage and nvme.' Design: NVMe is a governed HOT-SERVING tier (a ResourcePool,
same TrackedDir + evict_at_least machinery as CargoTargetPool), whose eviction =
MIGRATE frozen/duplicate artifacts to the Cold drive, not a manual rm. Serving
asks ensure_hot_resident(model); composes with device_fit's Unfittable one tier
down (VRAM). Corrects the DriveRole bug: Cold (HDD) is FROZEN storage, never the
per-token streaming tier (HDD = unservable). Dissolves today's K3 container disk
fight: the C: IQ2 is a verified duplicate of the D: copy -> governor migrates it
off NVMe -> container fits, no human deletes anything.

Refs #12 #36. Design for M5's system_resources lane.

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

* feat(capacity): verified cold-twin detection — safe-to-drop primitive for the storage tier

The gate the NVMe serving-tier eviction (#302) consults before dropping a frozen
GGUF: is an IDENTICAL twin already on cold storage? is_structural_twin (pure) =
same shard count + per-shard name + size, zero-byte shards never match. scan_shards
+ find_cold_twin are the thin fs layer. Never drop an NVMe artifact without a
VERIFIED cold twin (dropping 662GB on a path guess is the failure this guards).
Standalone-validated 5/5. Composes with device_fit + M5's NvmeServingTierPool.

Refs #12 #36. Design: STORAGE-SERVING-TIER-GOVERNOR.md.

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

* chore(vendor): bump llama.cpp fork to k3-adopt c6469d5 — container-serve wired

Both halves of the DirContainerFetcher wire (BigMama fetcher + moe_pick_fetcher
branch 175ac9d6a; M5 caller-side encode + record_bytes reader c6469d5). Serving now
reads the aligned per-layer container (GGML_MOE_CONTAINER) instead of the scattered
raw GGUF — the honest ~2.6GB/s path. Retires the built-not-wired ContainerFetcher.

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

* fix(serving): resident_override on vision_sidecar ServingTarget + K3 coverage measurement

Merge fix: vision_sidecar's ServingTarget was missing resident_override (added by
#29). Plus a measurement test that drains the real K3 routed-access fixture through
the #282 predictive instrument and prints repeat_recall / predicted_delta /
schedulable_coverage — the go/no-go for the LiveUploadPager predictive pipeline
(H2D/token = (1 - coverage) x ~11GB). Prints, never asserts (real routing sample).
NOTE: can't run on windows-msvc (pre-existing cargo-test Unix-socket block, ipc/mod.rs);
runs on M5's Mac.

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

* feat(pager-driver): offline warm-coverage measurement (--synth-layers, --once, --budget-slots)

The moe-pager-driver gains an offline replay mode so any completed
GGML_MOE_TRACE_FILE can be scored on any box (windows-msvc clean by
crate constraint), not just tailed live next to a serve:

- --synth-layers N: synthesize the tkey->layer map from layer count
  alone (TkeyTable::for_layers, the same zero-config seam MoeTraceTail
  owns) instead of requiring an operator tkey-to-layer-matrix.json.
- --once: exit when the trace stops growing (EOF) and print a SUMMARY
  line with mean DECODE-token serving hit = warm schedulable coverage.
- --budget-slots N: override the predictor residency budget (default
  auto = first token x1.5) to measure the coverage-vs-free-VRAM curve
  (the device-fit tradeoff).

Measured on BigMama run2.trace (302 warm decode tokens): bandit
coverage 13.8% @250 slots -> 51.3% @2000 -> 65.7% @4024, beating naive
last-N recency by +7-9pts at matched VRAM.

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

* feat(pager): measure cross-layer prefetch predictor ceiling — DEAD lever for K3

VDD offline measurement (cooccur-ceiling bin) on the real warm serve
trace (run2.trace, 122 held-out decode tokens, 11102 layer-steps):

  cross_layer_cooccur_hit           0.159   (adjacent-layer noisy-OR)
  recency_same_layer_hit            0.403   (last token, same layer)
  structure beyond recency         -0.244
  cooccur_recall_on_recency_misses  0.112   (11824/106058)

Adjacent-layer co-occurrence predicts <half what plain recency does, and
recovers only 11% of the experts recency misses (~base rate). K3 expert
routing has no exploitable cross-layer structure — the CrossLayerExpert-
Predictor prefetch lever is not worth wiring (saves the ggml pass-id
capture slice). Recency-family residency (the bandit EMA curve) is THE
signal; the only lever that lifts K3 is freeing VRAM (device-fit shrink)
so residency coverage can reach the measured 51%.

Caveat: adjacent-layer, one workload trace. Wider-predecessor noisy-OR
would regress toward the frequency baseline (which underperforms recency),
so a large lift is unlikely — but not measured here.

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

* chore(vendor): bump llama.cpp to de29843e0 — device-resident expert cache half (#23)

Pins the fork at the DeviceUploadFetcher wiring (my half of the LiveUpload-
Pager H2D-kill). Off unless GGML_MOE_VRAM_CACHE_GB / plan device_budget_bytes
enables it; host serving path byte-for-byte unchanged. M5's expert-loop D2D
half lands next on the same seam.

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

* chore(vendor): bump llama.cpp to 0fbe4e27a — quantize --resident-only + tier manifest (#40)

Enables the device-fit division: produce a small resident override per
precision tier + a (tier_label, resident_bytes) sidecar the governor reads
to co-optimize the VRAM split.

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

* feat(pager): DivisionPolicy — the governor's VRAM-division RL brain (#2/#3)

The second control rung above the pager's DecayBandit. The pager decides
WHICH experts stay resident (reward=hit-rate, cheap, online). This decides
HOW TO DIVIDE the card — resident (non-expert) weights vs expert cache —
to MAXIMIZE tok/s. That reward (actual tok/s) is EXPENSIVE (a serve), so
naive online RL flails; the fix is SIM-WARM-START: predict tok/s per
division OFFLINE from the measured coverage curve, then a slow bandit
refines each arm from real measured tok/s.

- CoverageModel: piecewise-linear coverage(slots) over MEASURED points
  (k3_measured() = the trace-replay curve); saturates, never extrapolates up.
- predict_tok_s: coverage -> (1-coverage)*experts/token*expert_bytes H2D ->
  t_token -> tok/s. Higher coverage -> less H2D -> faster (the load-bearing
  property, tested).
- feasible_divisions: tier catalog (from --resident-only manifests) x
  HardwareBudget -> cache budget/slots per tier; drops VRAM-overflow tiers.
- DivisionBandit: warm_start from the predictor; observe(tier, measured_tok_s)
  overrides the prior on first serve then EMAs — the expensive reward spent
  only on the arm actually run.

Policy lives here (windows-clean, 4 tests pass); serving_daemon actuates it
(M5's #2: discover manifests, feed catalog+budget+live tok/s, apply the
chosen {resident_tier, device_budget_bytes} to the plan). Fractal control
law: pager (experts<->hit-rate) -> this (VRAM split<->tok/s) -> grid.

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

* chore(vendor): bump llama.cpp to 2a32025dd — device-cache un-crashable (clamp to free VRAM + null-buffer guard, #23)

Testing convicted the segfault as VRAM oversubscription (K3 33GB resident +
env cache on a 32GB card, cudaMalloc lazy-VMM deferred fault). Fix: clamp
device budget to measured free VRAM (mine) + M5's D2D null-buffer guard.
Device cache now disables safely where there's no room (K3) and works
where there is (V4-Flash); can't crash from any budget source.

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

* test(division): bandit learns residency saturation from measured V4-Flash curve

Feeds the real BigMama RTX 5090 --n-cpu-moe sweep (DeepSeek-V4-Flash UD-IQ2_M)
into DivisionBandit: 0 resident=1.39, 8 resident=1.69, 14 resident=1.68 tok/s.
Asserts the bandit converges on the SATURATION KNEE (8 layers), not max residency
— 8->14 layers buys nothing at +11GB VRAM. Encodes the measured finding that the
governor must learn 'minimal static residency + max device cache', the freed VRAM
belonging to the recency cache (#43), not to over-pinned static layers.

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

* test(division): bandit finds non-monotonic device-cache budget optimum

Measured V4-Flash device-cache coverage curve (5090, GGML_MOE_VRAM_CACHE_GB sweep):
6GB/992slots=1.80, 12GB/1985=3.10, 22GB/3630=2.96 tok/s, all 100% hit. tok/s is
NON-MONOTONIC in budget: undersized churns, 12GB is the plateau knee, 22GB is no
better (100% hit but O(slots) reserve_slot eviction scan). predict_tok_s's monotonic
prior would pick 22GB; only the measured reward lands on 12GB — which frees ~20GB of
a 32GB card for co-resident lanes. Pins the invariant that the governor must not
oversize the cache and starve other models.

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

* chore(vendor): bump llama.cpp to fa7e0d8e9 — #43 device-cache fix + async restore + enum fix

Includes the prefetch host_visible guard (THE #43 crash fix, validated 3.05 tok/s
V4-Flash device cache on the 5090), M5's async cpy_tensor_async restore, and the
moe-pack quant-enum fix. A fresh parent build now includes the un-crashable device
cache instead of the pre-fix pin.

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

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Aug 11, 2026
…e not us (#2161)

* chore(k3): bump llama.cpp submodule to eee635ba2 — K3 serving stack onto canary

Advances the vendored llama.cpp fork 30 commits (clean FF over canary's stale
66594cc3f): container-serve resident-override (LLAMA_RESIDENT_OVERRIDE), the
rung-2 ResidencyCache plan-file consumer, the score-hint/generation-bias
actuator, PagerCaptureEvent emit, fit-device --reserve-gb. Makes canary USE the
K3 misfit-serving stack (measured 0.33 tok/s WASTE-parity on a 32GB card).

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

* docs(pager): RUN-1 K3 trace fixture + tkey->(layer,matrix) table for M5's replay

Live GGML_MOE_TRACE_FILE slice (12B records: u64 tkey + u32 e) + the reverse
table so BanditPlanController recovers (layer,expert): tkey=FNV-1a of
blk.{layer}.ffn_{gate,up,down}_exps.weight, e=within-layer expert idx, expert
identity=(layer,e) deduped across the 3 matrices. RUN-1 static-pin datum input.

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

* docs(pager): reference RL-policy prototypes for M5's TierPolicy port

The actual std-only Rust prototypes written against live K3 traces this
session: trace_replay (recency beats LFU 3-4x), predictor (offline
learned-decay +5pts held-out), online_predictor (bandit 49.8 vs 47.8
best-fixed on non-stationary), self_optimize (joint speed×quality). These
are the faithful-port source for the learned policy behind TierPolicy
(continuum-core expert_tier_policy.rs, #276). Numbers are properties of
these exact constants + reward math — reproduce before improving.

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

* docs(k3): GPU-resident hot experts design (task #23 'trend to full GPU')

The major GPU speedup: promote hot experts to persistent VRAM so decode's hot
path is GPU-native (zero fetch, zero copy). 3 increments (copy-skip -> VRAM hot
cache -> pipeline), the 32GB rate-distortion constraint (imatrix-enabled resident
shrink frees VRAM for the hot set), measured per-increment via k3-bench.

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

* docs(k3): flag the input_cpy-persistence question gating increment 1 vs 2

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

* docs(k3): modular rework-proof impl for #23 — reuse ResidencyCache + DeviceUploadFetcher

Mechanism is the existing (buft,fetcher)-generic ResidencyCache; a VRAM cache =
same class + device buft + host->device fetcher. 3 small parameterized pieces
(DeviceUploadFetcher, instantiate w/ GGML_MOE_VRAM_CACHE_GB, seam hook). Stats
only tune params -> zero mechanism rework.

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

* docs(arch): MoE serving on a governed budget (draft; M5 owns the governor seam)

Diagnoses the hardcoded-cache overcommit that collapsed K3 fetch bandwidth
(40GB pinned + mmap = 95.9GB on 63GB -> pagefile thrash -> 205 MB/s -> 0.027
tok/s) and lays out the clean architecture: governor owns the residency budget
net of the model's mmap footprint, plan-file is the one wire, ResidencyCache is
pure mechanism. Governor-interface sections marked [M5 OWNS] for her to edit.

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

* docs(arch): answer the [M5 OWNS] governor-budget seam in place (net-of-mmap is explicit arithmetic; plan_file.budget_bytes is the lease wire)

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

* docs(arch): measured governed-budget inputs + graduated serving/load path

Records the BigMama measurements feeding M5's #287 derivation (non-cache ~56GB,
per-token working set 5.5GB, governed budget ~6GB, fetch recovers to 2.5GB/s at
fit), the now-complete C++ cache mechanism (enable-from-plan, grow, shrink), and
the three-piece graduated path to serving/load kimi-k3 (catalog row + serving-lane
MoE launch + #287) replacing the rigged .bat.

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

* windows: make continuum-core build + link on windows-msvc (first time)

start-server.sh now provisions the full Windows CUDA build env before the cargo
builds (the cargo/nvcc path had none, unlike the vcvars-wrapped llama cmake):
import MSVC via vswhere->VS2022-14.4x + a .bat env dump (cl.exe for nvcc), pin
CMAKE to the manifest install, force CMAKE_GENERATOR=Ninja (the VS18-2026 auto-
pick is undefined in cmake 3.30), add the Windows SDK bin (mt.exe/rc.exe), select
a complete CUDA toolkit + CUDA_PATH (a provisioning split left cuda-env with 0
import libs vs cuda-13.2's 12), and RUSTFLAGS -L for pocket-tts (which emits no
link-search) while re-carrying +crt-static so the /MT GPU stack still links.

Portability: expert_container.rs + commands/capacity.rs used Unix-only
std::os::unix::fs::FileExt::read_exact_at. Add crate::platform_io::pread_exact
(unix read_exact_at / windows seek_read loop) - one place for positioned reads.

Build validated (npm start exit 0, continuum-core lib clean). A separate runtime
hot-loop on the #2088 core at startup is tracked apart from this build fix.

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

* feat(capacity): device_fit VRAM-partition calc for the governor

Pure calc the governor uses to fit a streaming-MoE's RESIDENT (non-expert)
tier to a device VRAM budget and reconcile it with the expert tier on ONE
budget — fixing the double-count where the expert pager was handed the full
VRAM ceiling while resident silently ate most of it.

Partition (in order): compute reserve -> resident (Native | device-fit
Override | Unfittable) -> sufficient-context KV -> everything left =
hot-expert VRAM budget (maximized: more on-GPU experts, fewer streams).
Context is derived + clamped, never hand-picked. Artifact resolver injected
(no hardcoded paths). Standalone-validated 7/7; M5 wires it into the daemon
spawn path + launch (ServingTarget.resident_override) per the K3 sprint split.

Refs #29 #31 #36. Arch-confirmed on real K3 UD-IQ2 (93 blk/896 exp/top-16).

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

* feat(serving): resident-override plumbing on ServingTarget + launcher

Wire foundation for the governor's device_fit plan: ServingTarget carries
resident_override: Option<PathBuf>, and the launcher exports it as
LLAMA_RESIDENT_OVERRIDE so llama.cpp sources the precision-shrunk RESIDENT
(non-expert) tensors from the device-fit GGUF (all offloaded to GPU) while the
primary streams experts. All builders updated; defaults None (resident serves
as-shipped, no behavior change) until compute_resident_override + the
resolve-or-generate resolver (#35) land next. In-crate validated.

Refs #29 #36.

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

* chore(vendor): bump llama.cpp fork to k3-adopt e3ce51df5

M5's per-layer KV accessors (n_head_kv_il + n_embd_head_{k,v}_il, continuum #238)
+ graph reconciliation. The K3 engine now builds against these — enables the
device_fit resident-override serve + honest per-layer K3 KV sizing.

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

* feat(serving): compute_resident_override — wire device_fit into the plan

The governor now DECIDES the resident source per serve: compute_resident_override
derives resident_bytes (weights - expert_bytes_total) vs the governed VRAM ceiling
via capacity::device_fit, and sets ServingTarget.resident_override. A dense/small
model fits native (None); a >VRAM-resident MoE (K3) resolves a cached device-fit
override that fits, else Unfittable → route to grid / generate (#35), glass-boxed.

resolve_device_fit_override (model_registry::artifacts): looks up a per-user
device-fit cache convention (<storage_root>/device-fit/<id>/) + a resident-bytes
sidecar; returns the override only when its resident fits the usable budget. No
hardcoded paths; generation/HF discovery is #35. The resident-fit decision turns
only on resident_bytes vs budget — per-layer KV (#2107 ModelCapabilities) drives
the context/expert split elsewhere, so KV is not consulted here.

Refs #29 #35 #36. In-crate validated.

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

* docs(arch): storage serving-tier governor — NVMe<->cold contention managed like VRAM/RAM

Joel: 'like vram and memory, this contention has to be managed between cold
storage and nvme.' Design: NVMe is a governed HOT-SERVING tier (a ResourcePool,
same TrackedDir + evict_at_least machinery as CargoTargetPool), whose eviction =
MIGRATE frozen/duplicate artifacts to the Cold drive, not a manual rm. Serving
asks ensure_hot_resident(model); composes with device_fit's Unfittable one tier
down (VRAM). Corrects the DriveRole bug: Cold (HDD) is FROZEN storage, never the
per-token streaming tier (HDD = unservable). Dissolves today's K3 container disk
fight: the C: IQ2 is a verified duplicate of the D: copy -> governor migrates it
off NVMe -> container fits, no human deletes anything.

Refs #12 #36. Design for M5's system_resources lane.

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

* feat(capacity): verified cold-twin detection — safe-to-drop primitive for the storage tier

The gate the NVMe serving-tier eviction (#302) consults before dropping a frozen
GGUF: is an IDENTICAL twin already on cold storage? is_structural_twin (pure) =
same shard count + per-shard name + size, zero-byte shards never match. scan_shards
+ find_cold_twin are the thin fs layer. Never drop an NVMe artifact without a
VERIFIED cold twin (dropping 662GB on a path guess is the failure this guards).
Standalone-validated 5/5. Composes with device_fit + M5's NvmeServingTierPool.

Refs #12 #36. Design: STORAGE-SERVING-TIER-GOVERNOR.md.

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

* chore(vendor): bump llama.cpp fork to k3-adopt c6469d5 — container-serve wired

Both halves of the DirContainerFetcher wire (BigMama fetcher + moe_pick_fetcher
branch 175ac9d6a; M5 caller-side encode + record_bytes reader c6469d5). Serving now
reads the aligned per-layer container (GGML_MOE_CONTAINER) instead of the scattered
raw GGUF — the honest ~2.6GB/s path. Retires the built-not-wired ContainerFetcher.

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

* fix(serving): resident_override on vision_sidecar ServingTarget + K3 coverage measurement

Merge fix: vision_sidecar's ServingTarget was missing resident_override (added by
#29). Plus a measurement test that drains the real K3 routed-access fixture through
the #282 predictive instrument and prints repeat_recall / predicted_delta /
schedulable_coverage — the go/no-go for the LiveUploadPager predictive pipeline
(H2D/token = (1 - coverage) x ~11GB). Prints, never asserts (real routing sample).
NOTE: can't run on windows-msvc (pre-existing cargo-test Unix-socket block, ipc/mod.rs);
runs on M5's Mac.

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

* feat(pager-driver): offline warm-coverage measurement (--synth-layers, --once, --budget-slots)

The moe-pager-driver gains an offline replay mode so any completed
GGML_MOE_TRACE_FILE can be scored on any box (windows-msvc clean by
crate constraint), not just tailed live next to a serve:

- --synth-layers N: synthesize the tkey->layer map from layer count
  alone (TkeyTable::for_layers, the same zero-config seam MoeTraceTail
  owns) instead of requiring an operator tkey-to-layer-matrix.json.
- --once: exit when the trace stops growing (EOF) and print a SUMMARY
  line with mean DECODE-token serving hit = warm schedulable coverage.
- --budget-slots N: override the predictor residency budget (default
  auto = first token x1.5) to measure the coverage-vs-free-VRAM curve
  (the device-fit tradeoff).

Measured on BigMama run2.trace (302 warm decode tokens): bandit
coverage 13.8% @250 slots -> 51.3% @2000 -> 65.7% @4024, beating naive
last-N recency by +7-9pts at matched VRAM.

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

* feat(pager): measure cross-layer prefetch predictor ceiling — DEAD lever for K3

VDD offline measurement (cooccur-ceiling bin) on the real warm serve
trace (run2.trace, 122 held-out decode tokens, 11102 layer-steps):

  cross_layer_cooccur_hit           0.159   (adjacent-layer noisy-OR)
  recency_same_layer_hit            0.403   (last token, same layer)
  structure beyond recency         -0.244
  cooccur_recall_on_recency_misses  0.112   (11824/106058)

Adjacent-layer co-occurrence predicts <half what plain recency does, and
recovers only 11% of the experts recency misses (~base rate). K3 expert
routing has no exploitable cross-layer structure — the CrossLayerExpert-
Predictor prefetch lever is not worth wiring (saves the ggml pass-id
capture slice). Recency-family residency (the bandit EMA curve) is THE
signal; the only lever that lifts K3 is freeing VRAM (device-fit shrink)
so residency coverage can reach the measured 51%.

Caveat: adjacent-layer, one workload trace. Wider-predecessor noisy-OR
would regress toward the frequency baseline (which underperforms recency),
so a large lift is unlikely — but not measured here.

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

* chore(vendor): bump llama.cpp to de29843e0 — device-resident expert cache half (#23)

Pins the fork at the DeviceUploadFetcher wiring (my half of the LiveUpload-
Pager H2D-kill). Off unless GGML_MOE_VRAM_CACHE_GB / plan device_budget_bytes
enables it; host serving path byte-for-byte unchanged. M5's expert-loop D2D
half lands next on the same seam.

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

* chore(vendor): bump llama.cpp to 0fbe4e27a — quantize --resident-only + tier manifest (#40)

Enables the device-fit division: produce a small resident override per
precision tier + a (tier_label, resident_bytes) sidecar the governor reads
to co-optimize the VRAM split.

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

* feat(pager): DivisionPolicy — the governor's VRAM-division RL brain (#2/#3)

The second control rung above the pager's DecayBandit. The pager decides
WHICH experts stay resident (reward=hit-rate, cheap, online). This decides
HOW TO DIVIDE the card — resident (non-expert) weights vs expert cache —
to MAXIMIZE tok/s. That reward (actual tok/s) is EXPENSIVE (a serve), so
naive online RL flails; the fix is SIM-WARM-START: predict tok/s per
division OFFLINE from the measured coverage curve, then a slow bandit
refines each arm from real measured tok/s.

- CoverageModel: piecewise-linear coverage(slots) over MEASURED points
  (k3_measured() = the trace-replay curve); saturates, never extrapolates up.
- predict_tok_s: coverage -> (1-coverage)*experts/token*expert_bytes H2D ->
  t_token -> tok/s. Higher coverage -> less H2D -> faster (the load-bearing
  property, tested).
- feasible_divisions: tier catalog (from --resident-only manifests) x
  HardwareBudget -> cache budget/slots per tier; drops VRAM-overflow tiers.
- DivisionBandit: warm_start from the predictor; observe(tier, measured_tok_s)
  overrides the prior on first serve then EMAs — the expensive reward spent
  only on the arm actually run.

Policy lives here (windows-clean, 4 tests pass); serving_daemon actuates it
(M5's #2: discover manifests, feed catalog+budget+live tok/s, apply the
chosen {resident_tier, device_budget_bytes} to the plan). Fractal control
law: pager (experts<->hit-rate) -> this (VRAM split<->tok/s) -> grid.

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

* chore(vendor): bump llama.cpp to 2a32025dd — device-cache un-crashable (clamp to free VRAM + null-buffer guard, #23)

Testing convicted the segfault as VRAM oversubscription (K3 33GB resident +
env cache on a 32GB card, cudaMalloc lazy-VMM deferred fault). Fix: clamp
device budget to measured free VRAM (mine) + M5's D2D null-buffer guard.
Device cache now disables safely where there's no room (K3) and works
where there is (V4-Flash); can't crash from any budget source.

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

* test(division): bandit learns residency saturation from measured V4-Flash curve

Feeds the real BigMama RTX 5090 --n-cpu-moe sweep (DeepSeek-V4-Flash UD-IQ2_M)
into DivisionBandit: 0 resident=1.39, 8 resident=1.69, 14 resident=1.68 tok/s.
Asserts the bandit converges on the SATURATION KNEE (8 layers), not max residency
— 8->14 layers buys nothing at +11GB VRAM. Encodes the measured finding that the
governor must learn 'minimal static residency + max device cache', the freed VRAM
belonging to the recency cache (#43), not to over-pinned static layers.

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

* test(division): bandit finds non-monotonic device-cache budget optimum

Measured V4-Flash device-cache coverage curve (5090, GGML_MOE_VRAM_CACHE_GB sweep):
6GB/992slots=1.80, 12GB/1985=3.10, 22GB/3630=2.96 tok/s, all 100% hit. tok/s is
NON-MONOTONIC in budget: undersized churns, 12GB is the plateau knee, 22GB is no
better (100% hit but O(slots) reserve_slot eviction scan). predict_tok_s's monotonic
prior would pick 22GB; only the measured reward lands on 12GB — which frees ~20GB of
a 32GB card for co-resident lanes. Pins the invariant that the governor must not
oversize the cache and starve other models.

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

* chore(vendor): bump llama.cpp to fa7e0d8e9 — #43 device-cache fix + async restore + enum fix

Includes the prefetch host_visible guard (THE #43 crash fix, validated 3.05 tok/s
V4-Flash device cache on the 5090), M5's async cpy_tensor_async restore, and the
moe-pack quant-enum fix. A fresh parent build now includes the un-crashable device
cache instead of the pre-fix pin.

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

* feat(models/pull): --detach + per-shard progress events (fire-and-poll, #86 shape)

A frontier GGUF is tens of GB and takes an HOUR. models/pull was fully synchronous,
so a big pull HELD THE COMMAND SOCKET for the duration and was invisible until it
finished — the exact failure agent/solve --detach already solved. Composed with that
proven pattern instead of inventing a new one:

- detach + run_id params; the call ACKs immediately (detached: true) and the real
  PullReport lands in ~/.continuum/progress/models-pull-<run_id>.json — the SAME
  ledger convention agent/solve and cognition/eval use, so one poller / Positron tail
  serves every long-running command.
- pull_body extracted ctx-free (catalog arrives as an Arc) so inline and detached run
  the IDENTICAL code path — mirrors AgentSolve::solve_body.
- models:pull:progress published per shard boundary (shard i/N + bytes so far), plus
  models:pull:complete / models:pull:failed. A tens-of-GB pull is otherwise a silent
  hour; now the UI, a persona, or Positron can show real progress and an operator can
  tell 'still going' from 'wedged'. Noop-safe: no bus => no cost.

Idempotency was already right and is now usable: the HF cache is content-addressed, so
re-running the SAME models/pull skips completed shards instantly and resumes an
interrupted pull. Re-run == resume, which is what makes many user-initiated model pulls
survivable.

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

* chore(vendor): bump llama.cpp fork — anti-brittleness pass

Three silent-failure classes from tonight's V4-Flash serving work,
each fixed at the seam rather than the instance:

- tests: configure now FAILS when a tests/test-*.cpp is not registered.
  test-moe-residency.cpp had sat at 54 KB, never built, never run.
- moe-pager: the expert cache divided its budget by the MAX_POOLS cap
  instead of the size-classes a model actually presents, leaving a
  third of the governed VRAM cache unallocated on V4-Flash. Fixed
  without trading under-use for over-commit of the VRAM lease.
- common: llama-server and perplexity now say so on stderr when they
  are a debug build. The marker existed only at trace verbosity.

llama.cpp tests: 109 passed, 0 failed.

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

* tools(dev): graduate the MoE serving harnesses out of untracked scratch

Every measurement behind tonight's V4-Flash conclusions came from six
scratch-*.sh files sitting untracked in the repo root, each with an
absolute path to one machine's scratchpad, model directory and CUDA
install baked in. Nobody else could reproduce a single number, and the
knowledge would have died with the working tree.

Unbounded prototypes are fine while they are still earning their keep.
These stopped being prototypes the moment they started producing numbers
that decided what to build next; not graduating them was the mistake.

Three of the six collapse into arguments rather than files:
  serve.sh          -> device cache on, reports clamp/hit-rate/tok/s
  serve.sh 48 0     -> the streaming baseline (cache off)
  serve.sh 34 0     -> the residency lever (14 expert layers pinned)
and the two sweeps become one sweep.sh with an axis argument, since they
differed only in which knob moved.

common.sh resolves engine, models dir, CUDA and output paths from the
environment and FAILS LOUD on each -- a harness that quietly measures
the wrong engine produces a number that looks real and is not. Verified:
bogus engine, missing models dir, missing GGUF and a bad axis all exit 1
with the reason.

Two behaviours the sweep now refuses:
- a missing decode measurement is recorded as "no_measurement", never as
  0 tok/s, which would read as a real slow point
- an OOM or load failure is recorded as a boundary point rather than
  dropped, because where the card runs out is what the governor needs

README carries the measurement discipline that cost real time to learn:
identical configs varied ~35% run to run, so a single point is not a
measurement and a 20% gap inside a 35% spread is not a result.

ds4-container-build-run.sh moves over as-is (it was already path-clean).

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

* cli: make the governed path reachable — `continuum start` never worked on Windows

Root cause of days of hand-rolled downloads, found by wiring auto-start
and then following what it exposed.

`models/pull` is already reliable: content-addressed, completed shards
skip instantly, an interrupted pull resumes where it stopped, --detach
with a run_id, a progress journal, bus events. None of it is reachable
without a running core. `continuum start` could not start one on this
machine, so the shortest path to a model was always `nohup <downloader>`
— no ledger, no resume, no progress, dies silently leaving an empty
directory. That happened to two multi-hour pulls (K3, then V4-Flash
IQ1_S). The governed path has to be the path of LEAST resistance or it
does not get used.

Four defects, each hiding the next:

1. dispatch() never started a core. core_is_up() and launch_core()
   already existed and simply were not connected. Now any command
   auto-starts one; CONTINUUM_NO_AUTOSTART=1 opts out (CI, probes) and
   fails with the reason instead of doing nothing.

2. launch_core() polled for 300s without ever checking whether the start
   script had DIED. A script that failed in 2s and one still doing a
   multi-minute build were indistinguishable, so every failure cost the
   full 300s and then printed "Last log lines:" followed by nothing.
   Now child.try_wait() reports the exit status within one tick, and an
   empty log is reported AS empty (that the script produced no output at
   all is the strongest clue available, not an absence of one).

3. The socket and start-log paths were the literal "/tmp/..." copied
   into four files. On Windows a leading-slash path is not absolute — it
   resolves against the CURRENT DRIVE — so the CLI wrote a start log the
   operator could not find. One definition now lives in
   ipc/endpoint_paths.rs. Unix keeps the well-known /tmp paths verbatim,
   so running cores, MCP clients and start-server.sh are unaffected.

4. THE root cause: Command::new("bash") resolves on Windows to
   C:\Windows\System32\bash.exe — the WSL launcher, not a POSIX shell.
   It handed the script to a Linux distro that does not exist:
     WSL ERROR: execvpe(/bin/bash) failed: No such file or directory
   locate_bash() now prefers CONTINUUM_BASH, then Git-for-Windows, then
   a PATH scan that skips the System32 WSL shim, and fails loud naming
   the fix. Only visible after (2) and after dropping DETACHED_PROCESS
   for CREATE_NO_WINDOW — DETACHED_PROCESS gives the child no console at
   all, which a console-subsystem bash cannot survive, so it died having
   written nothing.

Also: the 300s ready-wait becomes 30min, safe now that a dead script is
caught in one tick — 300s was not a margin, it was a guaranteed false
failure on any cold checkout that has to build llama-server with CUDA.
Progress lines are echoed while waiting so a long build is not mistaken
for a hang. The "starting core" notice moves to stderr so stdout stays
the dispatched command's JSON.

Verified on Windows, in order: refusal path exits 1 with the reason;
before the fixes auto-start died at 2-4s with an empty log; after, the
start script runs under Git Bash, builds llama-server with CUDA, and
proceeds into the core's cargo build (still running at the old 300s
ceiling — the false failure this raises).

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

* core: the OOM guard was inert on Windows and Linux — two bugs cancelling out

MEASURED on this 63.4 GB Windows host: the core sat at 27.6 GB RSS while
its own reporter printed "RSS=0MB", under a guard that believed the
machine had 8 GB and had armed a FATAL self-exit at 6553 MB.

Two independent defects, each hiding the other:

1. current_rss_mb() was a mach task_info FFI block for macOS and, for
   every other target, `0 // No-op on non-macOS`. On Linux AND Windows
   the per-command leak tracker therefore recorded a 0MB delta for every
   command, and the OOM guard compared a constant zero against its limit
   and could never fire.

2. The guard's limit shelled out to sysctl on macOS, parsed /proc/meminfo
   on Linux, and fell through to a hardcoded 8192 for anything else. Not
   a detection failure on Windows — there was no Windows arm at all.

They cancelled: a limit far too low, against a reading that was always
zero. That is why they move together. Fixing the RSS reading alone would
have been WORSE than fixing neither — a correct 27.6 GB read against the
bogus 6.5 GB limit would have started killing a perfectly healthy core,
since the action on breach is process::exit(1).

Both now go through sysinfo, already a direct dependency of this crate
and already described in Cargo.toml as cross-platform memory monitoring.
One implementation for every platform, rather than one FFI block per OS
plus a stub for whatever is left over — the stub is where the rot lives.

detect_system_ram_mb() is extracted (testable, one definition) and
returns Option. When RAM cannot be determined the guard now DISABLES
itself and says so, instead of arming against an invented number: no
limit is strictly better than a guessed one when the response to breach
is killing the process.

Tests, both discriminating rather than decorative:
- rss_is_actually_measured_on_this_platform — fails against the old
  stub, which is the whole point.
- system_ram_is_detected_not_assumed — catches the 8192 fallback.

ipc:: suite 90 passed / 0 failed; the two new tests pass.

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

* models/pull: a detached failure must not vanish; register V4-Flash as acquirable

MEASURED tonight: `models/pull --model_id deepseek-v4-flash --quant IQ1_S
--detach` returned `detached: true` with a run_id, moved ZERO bytes, and
wrote no ledger. The identical command WITHOUT --detach fails loud and
correctly:

  [invalid] model 'deepseek-v4-flash' has no gguf_hint

Two defects, plus the data fix underneath them.

1. VALIDATION RAN AFTER THE ACK. Every check lived inside pull_body, which
   the detached path spawns only after handing back the ack. So a request
   that could never succeed got a cheerful handle and failed in the
   background. preflight() now runs BEFORE the ack and is the ONE
   definition of "is this pullable", called by both paths — two copies is
   how a detached path ends up accepting what the inline path rejects.

2. ONLY SUCCESS WROTE THE LEDGER. The write sat at the end of pull_body,
   so an early Err returned before reaching it. The detached handler
   logged and published models:pull:failed, but never wrote the file the
   ack had just told the caller to poll — leaving a watcher unable to
   distinguish "failed" from "still downloading", forever. Failure now
   writes a terminal record to that same path, and PullReport carries
   `error: Option<String>` so the type can express a bad ending at all.

3. THE DATA FIX. deepseek-v4-flash had no gguf_hint, so it was not
   acquirable at all — which is why every V4-Flash tier was fetched by
   hand and landed outside the catalog. The 84.68 GiB UD-IQ2_M on this box
   right now was hand-pulled, and the catalog still reports the model
   `not_downloaded`. Serving stays ds4's business (arch/provider untouched)
   — gguf_hint only says where the artifact comes FROM, which is a
   separate question from who runs it.

   Verified against the live repo before registering rather than assuming
   it: unsloth/DeepSeek-V4-Flash-GGUF carries 49 GGUFs spanning UD-IQ1_S
   through UD-Q8_K_XL, so the IQ1_S tier the residency work needs is
   actually satisfiable from that source.

This is the same class as the rest of today: the fire-and-poll contract
was documented, and its failure half had no writer. Confirmed not to be
the network — DNS resolves in 0.23s and the HF API returns 200.

cargo check --lib --tests: 0 errors.

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

* config.env: quote values — bash `source` was destroying every Windows path

MEASURED: a 76 GB model pull landed in D:\continuum-coldhuggingface\ while
every resolver looked under D:\continuum-cold\huggingface\. Two sibling
cache roots, one of them a phantom.

config.env itself was CORRECT (HF_HOME=D:\continuum-cold\huggingface).
start-server.sh:38 sources it with `set -a; source ...; set +a`, and bash
treats a backslash in an unquoted value as an escape character. Reproduced
exactly:

  $ printf 'HF_HOME=D:\continuum-cold\huggingface\n' > t.env
  $ ( set -a; . t.env; set +a; echo "$HF_HOME" )
  D:continuum-coldhuggingface

Windows then resolves that drive-relative string against D:'s current
directory, producing a whole separate tree. Every Windows path in this file
has been corrupted on every core launch since cold storage shipped — the
core log's `D:continuum-cold\genome\models\...` is the same wound.

Both writers now single-quote (bash installer and the PowerShell module),
and config_env::read strips one layer of matched surrounding quotes so
pre-fix installs with bare values keep working.

Two tests, both discriminating:
- windows_paths_read_back_intact_quoted_or_bare — the actual failure, in
  all three forms (single-quoted, bare, double-quoted).
- unquote_only_strips_matched_surrounding_pairs — a lone or embedded quote
  must survive; only a matched pair is a wrapper.

config_env suite: 6 passed, 0 failed.

Same class as the rest of this session: a value written correctly, read
through a layer that silently transformed it, and nothing anywhere
compared the two.

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

* pull: 8 parallel chunks + byte-level progress; probe asserts the model can answer

Three fixes, all "the capability was there and unused".

1. THE DOWNLOAD WAS SINGLE-THREADED. hf-hub's ApiBuilder defaults to
   `max_files: 1` — one 10 MB range request at a time — and pull.rs never
   overrode it, so a 76 GB model came down one chunk at a time on one
   connection, across strictly sequential shards. Now 8 parallel chunks.
   Deliberately a fixed 8 rather than the crate's with_high_parallelism()
   (num_cpus): this box has 32 cores, 32 simultaneous range requests is
   impolite and buys nothing past link saturation, and sizing a NETWORK
   decision off a CPU count is accidental coupling that later reads as a bug.

2. PROGRESS EXISTED AT THE WRONG GRANULARITY, IN THE WRONG PLACE. One bus
   event per SHARD BOUNDARY — for this model that is one event as the 47.66 GB
   middle shard starts, then silence for hours — and nothing in the ledger,
   which only got written on terminal success. hf-hub's download_with_progress
   + Progress trait were right there, unused. PullProgress now reports
   shard_bytes / shard_total / shard_percent / bytes_so_far to the bus AND to
   the exact ledger path the detached ack names, throttled to every 2s or
   256 MB.

   Filesystem metadata cannot substitute, learned the hard way: hf-hub
   PREALLOCATES the blob to full size, so neither file length nor free disk
   moves while it fills. Only mtime advances, and mtime cannot say how far.
   I called the same download "stalled" and then "sparse, nothing written",
   and was wrong both times, from trying to infer progress from metadata that
   structurally cannot express it.

   Care taken: ApiRepo::get() cache-probes before downloading, and that probe
   is what makes a completed shard skip INSTANTLY on re-run. download_with_progress
   has no such probe, so it is done explicitly via hf_hub::Cache first. Losing
   it would have quietly turned every resume into a full 76 GB re-fetch —
   trading the property that matters for the one being added.

3. THE DECODE SMOKE-PROBE COULD NOT TELL A CHAT MODEL FROM AN EMBEDDING ONE.
   It asked "count from 1 to 20" and then checked only
   `completion_tokens >= 5` — volume, not correctness. MEASURED: an embedding
   model (qwen3-embedding-0.6b) bound to the port the persona lane was
   configured for answered with
     "user interface interface user interface UIUUIUUIuiuiuiuiuiui"
   which sails past a count-only gate. Every persona on the node then thought
   through it, producing the token-loop garbage flooding the rooms and scoring
   eval runs as capability zeros when they were infra zeros. The prompt has a
   verifiable answer, so it is now verified (counts_upward): three consecutive
   ascending integers. That catches the class — wrong model on the port,
   embedding endpoint, fluent noise — not just this instance.

Also: running_core_pids() shelled out to `pgrep`, absent on Windows and its
error swallowed by .ok(), so `continuum reboot` believed no core was running,
never swapped the binary, and would have claimed success — only the #194
deploy-provenance check caught it. Replaced with sysinfo enumeration;
running_trainer_pids() keeps COMMAND-LINE matching because mlx_lm is a Python
module (matching on name would find nothing and the reboot guard would kill
live training). pid_alive() also stops matching the pid as a substring of
tasklist's whole output.

Tests, all run green on an unloaded box:
  decode probe 1, config_env 6, endpoint_paths 3, diagnostics 2, models::pull 7

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

* pull: correct the parallelism default to the MEASURED saturation point (8)

Reverts my own unjustified bump to 16 and records the measurements so the
reasoning is not re-derived from scratch.

What the connection sweep actually showed against this repo:
  1 conn    0.4 MB/s
  8 conns   2.1 MB/s
  24 conns  1.8 MB/s   <- WORSE. Nothing to gain past ~8.

And the uncontaminated ceiling came from the adapter counter, not from
foreground probes: TOTAL interface RX was 4.04 MB/s while the pull ran,
meaning the download already owned the entire link. BigMama is on WI-FI —
865 Mbps link rate, ~32 Mbit/s actual. The constraint is the medium. An
ethernet cable is worth more than any value of this constant.

Two of my earlier readings were wrong and are written down as such:

- A single-connection probe measured WHILE the 8-connection pull was
  running reported 0.2 MB/s. That made scaling look linear and argued for
  raising the default to 16. It was measuring contention, not capacity.
- Every foreground throughput probe competes with the download it is
  trying to measure. Only the interface counter is clean. I ran three
  rounds of probes before using the right instrument.

The value stays overridable (CONTINUUM_HF_PARALLEL_CHUNKS) because the
right number is a property of the operator's link, not of this code — and
now that the ledger reports real throughput it can be tuned from evidence.

Verified in flight with the new code: 11,979 MB of 47,660 MB on shard 2,
advancing steadily, ledger polled at 30s intervals.

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

* tools: delete the bash MoE serving harness — models are not run from shell

Removes serve.sh, sweep.sh and common.sh. They invoked llama-server
directly against a filesystem path, which bypasses the entire serving
substrate: MoeServingContext and the pager tick in serving_daemon,
publish_moe_host_cache_lease, and the storage tier in disk_eviction
(serving_tier_reserve_bytes / serving_tier_capacity_bytes,
ActiveArtifactSet, serving_tier_down::CatalogTierDownPolicy).

Cold storage is an ARCHIVE tier and is never a serving tier. That is
designed. A shell script holding a path knows none of it, and the result
was a measurement that was worse than useless:

  UD-IQ2_M from the Samsung NVMe   3.01 tok/s
  UD-IQ1_S from the WDC 16TB HDD   0.37 tok/s

95% fault_wait, fetch 65-99 MB/s. That is an SSD-vs-HDD measurement
wearing a quantization result's clothes, and it was one step from being
reported as "IQ1_S is 8x slower than IQ2_M".

I wrote these scripts as scratch, then graduated them into tools/dev/
last night with a README and a commit — which did not make them
legitimate, it made the bypass respectable and easy to reach for. When
challenged my first instinct was to add a media-type guard to them; that
was polishing the bypass rather than removing it.

The system already knows how to acquire, place and serve a model. The
correct fix is to use it.

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

* disk: the hf-hub cache class tracked a path the artifacts are not at

MEASURED on BigMama: the disk governor watched ~/.cache/huggingface and
reported 0 bytes, while HF_HOME — relocated by the cold-storage installer
— pointed at D:\continuum-cold\huggingface holding 2.48 TB:

  moonshotai--Kimi-K3           1453.79 GB
  unsloth--Kimi-K2.7-Code-GGUF   429.92 GB
  unsloth--GLM-5.2-GGUF          374.71 GB
  ... 2.48 TB total, entirely invisible

standard_tracked_dirs() re-derived the path from `home` instead of asking
the resolver every other consumer uses. A tracked dir pointing at the
wrong place is WORSE than an untracked one: the scanner reports a
reassuring zero, the class looks governed, and the bytes accumulate
unwatched and owned by no eviction pool. That is the 2026-07-13 shape
this very module was written to prevent — monitor at level=high, real
growth it could not NAME — reproduced one level up, in the naming layer.

Now resolved through model_registry::artifacts::huggingface_cache_root(),
the same authority models/pull and the artifact resolver use. That
returns `<root>/hub`; the class tracks the PARENT so it covers blobs,
snapshots, refs and locks — what actually consumes the volume. Falls back
to the old default only when the resolver yields nothing.

hf_hub_class_follows_a_relocated_cache_root pins it: with HF_HOME set
elsewhere, the class must NOT be under home. Reverting the line fails it.

Note what this does NOT fix: hf-hub's eviction owner is still the
deferred "hub LRU" in the class table. Tracking is now truthful; nobody
still owns deleting from it.

disk_reporters: 4 passed, 0 failed.

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

* fix(serving): a readiness claim carries the age of its evidence + stop fabricating numbers for unknowns

Cherry-picked from M5's 8ccf633f4 (docs/gather-measured-verdict) onto
k3-serving-canary, resolving the two conflicts in PR #2152 against her
committed tree rather than guessing at it.

RESOLUTION — decode_smoke_ok now carries BOTH fixes, because they are the
same idea applied to different unknowns:

- HERS removes a fabricated ZERO. `.unwrap_or(0)` turned "the server did
  not report usage.completion_tokens" into "it produced 0 tokens" — a
  schema change would read forever as a dead lane. Now an explicit warn +
  return false, naming it as a missing field rather than a measured zero.

- MINE removes a fabricated PASS. The gate asserted only
  `completion_tokens >= 5`, which measures volume, not correctness — an
  EMBEDDING model (qwen3-embedding-0.6b, bound to the port the persona
  lane was configured for) answered the probe with
    "user interface interface user interface UIUUIUUIuiuiuiuiuiuiuiui"
  and sailed through. Every persona on that node then "thought" through
  it, producing the token-loop garbage that flooded the airc rooms and
  scored eval runs as capability zeros when they were infra zeros.

And I applied her principle to my own code: my first pass read the reply
with `.unwrap_or("")`, which fabricates an empty string for a missing
content field — the exact defect she was removing one line above. Missing
content is now NOT PROVEN and returns false, same as a missing count.

Region 1 (decode-heartbeat helper) is purely additive on her side; taken
whole.

Submodule stays at 98a0f9215 — a strict DESCENDANT of canary's fa7e0d8e9,
adding six commits (MAX_POOLS starvation fix, moe-pack --tier, tiered
container serving wire, test-registration guard, budget-over-observed-
classes, debug-build warning). No divergence to merge.

Also brings her tools/scripts/swallow-audit.py + swallow-baseline.json —
the error-swallow ratchet. We had both independently run that audit; her
breakdown is the better one (1,806 production sites: 693 FABRICATE a
value, 601 DISCARD a failure).

Verified: cargo check clean; decode_probe_content_check_rejects_a_lane_
that_cannot_count passes against the merged code.

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

* disk: don't fabricate an hf-hub path when the real one is unknown

Self-audit against M5's swallow-audit.py taxonomy, applied to code I wrote
four commits ago. The gate said CLEAN and it was still wrong.

The previous commit fixed hf-hub tracking a path the artifacts are not at
(2.48 TB invisible to the governor) — and then wrote the failure branch as

    .unwrap_or_else(|| home.join(".cache/huggingface"))

which is a FABRICATE in exactly the sense the audit means: a plausible
path substituted for an unknown one. If the resolver cannot answer, the
scanner walks a directory that may hold nothing and reports a confident
0 bytes for a class whose real bytes are elsewhere. That is the SAME BUG
the commit was fixing, re-entered as its own fallback.

Now: no root, no row. The class is absent and a warn names why. A missing
hf-hub row is visibly missing; a wrong one looks governed — and "looks
governed" is what let 2.48 TB accumulate unwatched.

Honest scope: `huggingface_cache_root()` only returns None when the home
dir cannot be resolved, so this branch is rare in practice. It is a
correctness fix, not a live bug — but a fabricated default that is rarely
reached is still a fabricated default, and this file is the last place
that should carry one.

disk_reporters: 4 passed, 0 failed. Boy-scout gate clean across all 13
changed files.

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

* fix(windows): the core could never be rebuilt while a core was running — reap orphans, stop before build

Two lifecycle defects, both measured on BIGMAMA, both cross-checked with M5.

1. ORPHANED ENGINES SURVIVE FOREVER, and reboot could not see them.
   `stop`/`reboot` reap the pidfile TREE (taskkill /T, or the process group on
   Unix). An engine whose parent died is REPARENTED — to PID 1 on Unix, away from
   the tree on Windows — so no subsequent tree reap can ever touch it. It holds
   its port and its VRAM through every restart, indefinitely.

   Found live: llama-server pid 37148, started the PREVIOUS DAY, parent long
   dead, still bound to 127.0.0.1:8090 serving Qwen3-Embedding-0.6B. Every
   persona that resolved a chat model through 8090 was talking to an EMBEDDING
   model — the whole degenerate-output mystery, and NOT the stale
   LLAMA_SERVER_BASE_URL pin I had blamed (that was the symptom). Its command
   line also still read `D:continuum-cold\...` with no separator after the drive
   letter: the pre-quoting-fix path corruption, proving that repairing the READER
   never retired the processes the bug had already spawned.

   M5 reproduced it deliberately on macOS — killed the core, both llama-server
   children survived reparented to PID 1, still holding 58057 and 19.4 GB. Two
   machines, two platforms, on demand.

   Fix: `owned_engine_orphans` classifies by OWNERSHIP (exe under
   ~/.continuum/bin) plus an ancestor walk to a live core — deliberately NOT by
   parentage, since parentage is exactly what this bug destroys. Wired into
   `stop` and `reboot`, loud per process (an orphan is evidence of a lifecycle
   bug, never reaped quietly), plus a `continuum orphans` dry-run verb.
   `descends_from` is pure over a pid snapshot and BOUNDED: a cyclic parent chain
   would otherwise hang the exact verb whose job is recovering from unknown
   failures.

2. ON WINDOWS THE CORE COULD NOT BE REBUILT WHILE A CORE WAS RUNNING.
   The build-then-swap ordering is Unix-shaped: only there does unlink leave the
   running inode, letting the old core serve out of memory while cargo writes the
   new file. Windows LOCKS a running image, so the build dies with

       error: failed to remove file `...\continuum-core-server.exe`
       Caused by: Access is denied. (os error 5)

   This is NOT a `reboot` bug. Reproduced from a STANDALONE run of
   start-server.sh, which proves it lives in the shared build path — so
   `npm start` had it too. That is the real scope of "start/reboot/pull never
   worked on Windows".

   There was a second, earlier instance of the same shape: reboot runs
   start-server.sh from INSIDE the running `continuum` binary, and the script
   does `cargo build --bin continuum`. That failed the whole cargo invocation,
   skipping every later build INCLUDING the core, and reboot died after its full
   timeout — measured 772s. Guarded with CONTINUUM_SKIP_SELF_BUILD (loud, never
   silent: a skipped build that reads like a completed one is how stale binaries
   survive a "successful" deploy).

   Fix: on Windows, stop the core BEFORE building it, then launch. Zero downtime
   is an explicit NON-goal here — restarts are commonplace, stop-build-launch is
   the model, the grid absorbs churn. Unix keeps its overlapping build unchanged.
   The stop polls until the image handle is actually RELEASED (a dead pid is not
   a closed handle; building one tick early reproduces the same os error 5) and
   fails loud rather than leaving the operator on the old binary.

   Placed in start-server.sh next to the build it guards, NOT in the CLI: the
   constraint applies to every caller of that script, and one decision belongs in
   one place. The CLI carries a pointer to it, not a copy.

Also: `stop`'s no-pidfile fallback shelled out to `pkill`, which does not exist
on Windows — the spawn failed, `.unwrap_or(false)` swallowed it, and stop printed
"no running core found" while the core was running. Identical bug, identical
shape, to the `pgrep` one documented ~300 lines above it in the same file; that
fix ported the finder to sysinfo and MISSED this sibling call site, leaving a
repaired function directly above an unrepaired twin. Both now share one
`kill_pid_tree`.

VERIFIED END TO END on BIGMAMA, not reasoned about:
  - orphans dry-run correctly EXCLUDED the in-service 21 GB llama-server
    descended from the live core (the dangerous direction — a false positive
    kills a serving lane mid-request) and FLAGGED a deliberately orphaned one
  - reap killed it; port 8090 freed
  - start-server.sh stop-first fired, and the core build that had failed twice at
    that exact point now reports `Finished dev profile in 13.88s`
  - new core launched, and the #194 provenance check passes:
    `✅ deploy verified: core is running build 6e92e97d8 (== git HEAD)`
  - 10/10 bin tests, 4 new, covering in-service descendants, a dead parent, a
    cyclic chain, and pid-0/self-parent sentinels

Throughout every failed attempt the #194 guard behaved correctly: it refused to
claim success and left the running core serving. Nothing was ever left down.

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

* fix(cognition): the anchor told her the board was empty because it never read the board

Joel, glass-boxing the loop: "if you saw it firsthand, from their prompt point of
view, you'd find something structurally wrong. That has always been why they loop."

He was right. Read Benchy's live prompt capture and the turn contradicts itself:

  [action #1705] work/list()
  Result: {"cards":[{"id":"00f2a380",...},{"id":"08ee47a4",...}, ...]}   ← a full board

  [anchor] No open cards are visible on this room's board right now         ← same prompt

She then said, in-room, six times: "there are no open tasks visible on the board
right now." She was quoting the ANCHOR, not her own receipt. The authoritative
perception-side FACT overrode what she had personally just observed.

ROOT CAUSE: `room-kanban` did not deliver that turn at all — zero board blocks
anywhere in the prompt (grounding sits last in the budget queue,
[[grounding-is-last-in-the-budget-queue-so-she-goes-blind-one-turn-in-ten]]).
`work_board_anchor` collected zero cards from an ABSENT source and rendered that
as an assertion about the world.

Its own doc comment claims "an empty or unreadable board is stated honestly" — but
both render as the SAME sentence, so she cannot tell "the board is empty" from
"I never managed to look." Absence of evidence, printed as evidence of absence,
to a mind that then acts on it.

This is the night's third instance of one defect: a signal that cannot distinguish
"nothing there" from "I didn't measure."
  - progress=1.10  → liveness standing in for progress
  - 7 log files    → a bound in COUNT where the failure arrives in BYTES
  - empty anchor   → an unread source speaking as an observed one

FIX: the anchor is SILENT when the board source did not speak. Her own `work/list`
receipt then remains the only board claim in the prompt — the truthful one. A
board that WAS read and is genuinely empty still says so; that fact is real and
worth keeping. One guarded helper (`push_work_board_anchor`) so a future caller
cannot reintroduce this by forgetting to check, and a probe when it withholds.

Note on process: my first hypothesis was case-sensitivity (`"claimed"` vs
`"Claimed"`). Wrong — the board source writes `{:?}`, which is capitalized, and
the lowercase I saw came from the `work/list` command's serde output, a different
renderer. Checked the code instead of shipping the guess.

NOT deployed yet — the flask-4045 benchmark run is in flight and a reboot would
kill it. Deploy + live verification follow the run.

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

* fix(code/shell): a persona's HANDS were exec'ing the WSL launcher, not a shell

M5 glass-boxed this from BigMama's live persona traffic:

    WSL (10 - Relay) ERROR: CreateProcessCommon:800:
    execvpe(/bin/bash) failed: No such file or directory

`code/shell` called `TokioCommand::new("bash")`. On Windows PATH lookup finds
C:\Windows\System32\bash.exe — the WSL LAUNCHER, not a POSIX shell — so it handed
the command to a Linux distro that isn't installed.

Only EXECUTION goes through a shell, so code/read, code/search and code/tree all
kept working. Kimi and Sahar were observed for an evening cycling through
read-and-search and never reaching execution. That reads as an inert or weak
persona. It was a severed limb: they were reaching for their hands and finding
nothing there.

THE PART THAT MATTERS FOR HOW WE WORK. I fixed this identical bug EARLIER THE
SAME DAY for `continuum start` — wrote the doc comment explaining the System32
WSL shim, shipped it — as a PRIVATE fn in bin/continuum.rs. A private fn cannot
be reused, so the twin one directory away stayed broken and kept breaking every
citizen on this node. That is the third instance today of a repaired function
sitting beside an unrepaired one (see also the pgrep/pkill pair in the same
file). Copying the fix would have made a fourth.

So it is EXTRACTED, not copied: `shell_portable::locate_bash()`, a sibling of
`fs_portable`, as the single definition of "which bash do we exec". The CLI's
locate_bash is now a one-line delegate. A portability decision belongs in exactly
one place or it will be made twice, differently.

Also: code/shell now fails with the REASON ("no usable shell: <why>") instead of
letting the spawn die inside a child with an error the caller cannot interpret —
`locate_bash` fails loud and names CONTINUUM_BASH rather than returning a bash
that cannot work.

Tests: the System32 exclusion is pinned case-insensitively (PATH casing is not
normalized on Windows, and `C:\WINDOWS\SYSTEM32` must be excluded exactly like
`C:\Windows\System32`), a real shell location must NOT be excluded, and a bogus
CONTINUUM_BASH override must fail loud naming itself rather than silently falling
back to the shim — silent fallback there would reintroduce the bug under the name
of a fix.

VERIFIED LIVE on the Windows node through the governed path, not by compiling:

  $ continuum code/shell --cmd "echo HANDS-WORK && uname -s && python -c ..."
  { "exit_code": 0, "status": "completed",
    "stdout": "HANDS-WORK\nMINGW64_NT-10.0-26200\npython from a persona hand: ok" }

MINGW64_NT proves it resolved to the real Git-for-Windows bash rather than the
WSL shim — the exact substitution that was failing. The python line is deliberate:
personas write and call their own utility programs, and that path works now too.

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

* fix(vendor): bump llama.cpp — MoeGatherTables missing <memory> broke Linux CI

Points the submodule at CambrianTech/llama.cpp 5b8b45142.

MoeGatherTables declares `std::vector<std::unique_ptr<Entry>>` but ggml-backend.cpp
never included <memory>. MSVC and libc++ pull it in transitively; libstdc++/GCC
does not, so `cargo test -p continuum-core --lib` on Linux CI failed the entire
ggml-base target while the Windows build this was developed on was fully green.

The transitive include is what made it invisible — a real defect masked by the
platform it happened to be written on, which is the same shape as the rest of
today's portability finds.

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

* fix(grid): delete the TypeScript fallback — the engine is Rust, and its justification was stale

Joel, 2026-08-06: "I almost removed node entirely from this project and we did
for a while and yet you assholes made it part of core again?" And: "fallbacks
are cancer."

THE GRID HAD BOTH. Two branches in connection.rs forwarded any command the Rust
registry did not claim to a Node process over a Unix socket, justified in their
own comments as:

    "grid/node-status, grid/job-submit live in TS, not Rust"
    "This handles genome/train, ai/generate, and other TS-only commands"

Every one of those is Rust today: genome/train has 11 references, ai/generate
has 62. The fallthrough served nothing except a standing Node dependency in the
p2p path — the exact path that matters most on the weak, cloud-less hardware
this project targets, where a missing Node runtime is not degraded service, it
is no service.

It was also a FALLBACK in the banned sense. PR #1585 removed the IMPLICIT
version of this from the executor; its regression test still reads "refuse the
implicit fallthrough, surface a typed error". Grid re-introduced it as an
EXPLICIT one, which the guard could not see. That is how the boundary eroded a
second time: not one bad decision, but many individually-defensible ones with
nothing enforcing the line.

Now: an unclaimed command returns a typed error that NAMES it. The `executor`
lock taken solely to hold the bridge handle is gone too — a lock acquired for a
branch that no longer exists is a dead cost and a standing invitation to re-add
the fallback.

ALSO ADDS THE RATCHET (tools/scripts/node-dependency-audit.py), modelled on the
existing swallow-audit: it counts foreign-runtime dependencies in the engine per
subsystem and FAILS if any bucket grows. Removals are welcome; additions are
not. The baseline is a WORK LIST, not an allowance — stated in the file, because
a number in a config becomes a budget.

It also guards Python, which is WORSE than Node here and not for style reasons:
Node can be supervised, Python "CANNOT BE GOVERNED — there is no way for the
governor to lease, cap, or reclaim from it." An ungovernable child is compute
the substrate cannot see or take back under pressure. Python a CITIZEN writes
and runs is explicitly fine (Joel: "no different than AppleScript or opening
Photoshop") and is excluded by path, so the guard cannot cry wolf on a persona's
own tool — a guard that cries wolf gets disabled.

One honest flaw fixed in the ratchet itself: it could not distinguish "we added
dependencies" from "the scanner got better", so widening detection from 8 to 10
was refused as a regression. `--widen-detection` now names that case and prints
"these were ALWAYS here; we simply could not see them before" — an upward move
can never happen quietly.

10 -> 8. Grid is clean. Remaining, with honest categories:
  sentinel x4 — web-research and ai/agent are PREFIX-COLLISION WORKAROUNDS, not
    real gaps. llm.rs says it outright: "MUST use execute_ts_json — the ai/
    prefix is claimed by Rust's ai_provider module, so execute_json would route
    back to Rust and never reach TypeScript." Rust was in the way and the code
    tunnelled around it. Rust also HAS an agent keystone (commands/agent/solve);
    whether it is substitutable for the TS ai/agent is a design call, not a grep.
  executor x2 — the socket const and its error string; these are the bridge
    itself and fall out last, once nothing calls it.
  forge python x2 — grid/handlers.rs and forge_custodian.rs shell to python3 for
    the FORGE pipeline. By Joel's own test these may be legitimate (invoking an
    external artifact tool, not the engine being Python). If so the scanner is
    over-flagging and should narrow rather than these being "fixed".

Verified: compiles, deploys, `✅ deploy verified: core is running build 508c89c3b
(== git HEAD)`, 0 errors.

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

* feat(memory): continuous working-memory consolidation region — BUILT, NOT YET REGISTERED

Joel: "All memory should be getting compressed and consolidated continuously
using intelligence during this slower cadence: NEVER hold back fast inference,
handle memory and many others as separate threaded processes. Latency is
everything."

WHY IT WAS NEEDED. `run_consolidation_pass` was written, documented and
unit-tested, then never called from production — five mentions in the whole
crate: its doc, its definition, two calls in its own cfg(test), one pub use.
Its own doc says why it was left dangling: "Rust WorkingMemory primitive is
still absent." That primitive later landed and nobody reconnected them. A new
variant of the class this repo keeps hitting — not built-and-never-called, but
BUILT, BLOCKED, UNBLOCKED BY SOMEONE ELSE, NEVER REVISITED.

DESIGN, per M5's placement call (she owns cognition; I asked before writing):
SIBLING region, not inside DreamConsolidationRegion. The dream declares
ComputeClass::InferenceHeavy because it runs LLM distillation; this pass does
not — the only production ConsolidationAdapter is RawMemoryAdapter, a pure 1:1
map (synthesis_count 0, embeddings_generated 0). Hosting a pure map in an
inference-heavy region would gate it on VRAM it never consumes, i.e. asleep
exactly when it could run. Continuous compression that only runs when the GPU
is idle is not continuous.

  ComputeClass::Cpu           — a clone-and-map, not even CpuVectorized
  Orientation::SelfDirected   — interiority budget; the governor's floored share
                                means it can NEVER preempt a responding tick.
                                That is Joel's latency rule enforced structurally
                                rather than by convention.
  responds_to: SystemMemHigh, UserActive — memory pressure, not GPU pressure
  in-flight gate per persona; CadenceHint::Sleep when nothing to compress

THREE BUGS CAUGHT WHILE WRITING IT, all mine, all worth recording:

1. LOCK ACROSS AWAIT — `run_consolidation_pass` needs &mut Consolidator across
   an .await, and I held a std MutexGuard over it. Non-Send future; the governor
   cannot spawn it. This is a FORBIDDEN MOVE named in the concurrency style
   guide, which I had read hours earlier. The compiler caught it. In C it ships
   and deadlocks a citizen's memory at 3am. Fixed by taking the value out of an
   Option for the duration and putting it back on EVERY path including the error
   path — dropping it would silently disable consolidation for the rest of the
   process, which is precisely the never-runs-again failure this region ends.

2. RESTART AMNESIA = MEMORY LEAK. `seen` is in-process and restarts are
   commonplace by design, so after one, every thought still in working memory
   would be consolidated AGAIN. With a random id each repeat is a new corpus row
   and the duplicate is invisible to the dedup that died with the process. Fixed
   with a deterministic UUID v5 over (persona, content): re-consolidation
   collapses instead of duplicating. That also sidesteps the hazard M5 flagged …
joelteply added a commit that referenced this pull request Sep 5, 2026
…ale_dropped, never spoken (review, BigMama)

Speech is serialized (speak_in_room awaits synthesis), so twelve citizens answering one question
queue up and citizen #12's fluent answer would arrive minutes late — worse than silence because the
human cannot tell it is stale. Dropped for a STATED reason (live.tts.stale_dropped {age_ms}), unlike
the Lagged skip. Test pins the floor and that clock skew never underflows into 'infinitely fresh'.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Sep 5, 2026
…d at every joint; pump probes summarize; the human's default picture (#3754)

* feat(live): personas SPEAK their room lines in a live call; the STT chain names every silent joint; pump probes summarize; the human's default picture

Joel's live test (2026-09-05): twelve animated heads, hold music, no voices, no captions, and a
probe ledger that read zero for an hour.

- REPLY SPEAKER (modules/voice_reply_speaker.rs): every `chat:posted` in a room with an active
  voice session, from a persona THIS node hosts, is spoken through ONE path —
  `VoiceState::speak_in_room` (extracted from the `voice/speak-in-call` verb; both use it).
  Thought receipts (💭) stay silent, code fences are dropped, a long reply is cut on a sentence
  boundary at 600 chars; voices never overlap (sequential task on the bus receiver). Probes
  live.tts.spoken / failed / bus_lagged. `parse_chat_posted` + `bus_event_body` are now the one
  chat:posted parser (positron_source), shared with the chat projection.
- STT CHAIN: the human's AudioPcm channel WAS bound (ch 8, 09:03:04) and no transcription ever
  ran; the two early returns in `push_remote_human_audio` were silent. Now
  live.stt.audio_dropped {no_native_call | no_mixer_handle} (once per speaker/call, never per
  10 ms chunk), live.stt.speech_ended, live.stt.transcribed {chars, to_minds}, live.stt.refused.
- PUMP PROBES: `media.pump.enqueue`/`write` were one row PER FRAME — 12 pumps × 30 fps ≈ 370
  rows/s into the size-rotated ledger, ~34 s of history, every cognition class read zero for the
  length of the call. `live/transport/pump_tally.rs`: one summary row per second (frames, bytes,
  max write µs).
- DEFAULT PICTURE (persona/operator_avatar_seed.rs): the operator's `~/.continuum/avatars/<id>.png`
  is seeded from the macOS account picture (dscl JPEGPhoto → sips png; Picture path fallback) the
  first time the self-peer comes online — bounded, named outcome (present / seeded / not_found),
  never overwrites a chosen picture. Windows/Linux sources: honest not_found for now.

Tests: pump_tally, voice_reply_speaker, operator_avatar_seed, call_server mod, positron_source
mod — 30/30. Card 6e425299 (a call outlives its last human) and 405d64d0 (picker/capture/stylize)
carry the rest of the arc.

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

* fix(live): a reply older than 20 s at speak time stays text-only — stale_dropped, never spoken (review, BigMama)

Speech is serialized (speak_in_room awaits synthesis), so twelve citizens answering one question
queue up and citizen #12's fluent answer would arrive minutes late — worse than silence because the
human cannot tell it is stale. Dropped for a STATED reason (live.tts.stale_dropped {age_ms}), unlike
the Lagged skip. Test pins the floor and that clock skew never underflows into 'infinitely fresh'.

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

* chore(live): hygiene gates — the utterance cap is exempt by name (a listener's patience, not a window); every new unwrap carries its reason

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

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
joelteply added a commit that referenced this pull request Nov 14, 2026
…states are types, not sentinels or flags (card 8569b03d)

- #3 the prompt cache's availability reading is Option<u64>, matched; the monitor's 0 is read as
  "no reading" once, at the call into the decision.
- #11 window_grant::Turn { InFlight | Settled | Unsettled } replaces Demand's in_flight and settled
  bools (in flight and settled could both be set); the dyno world maps its Phase straight to it.
- #12 the wish lives only in the Measure (Wished { wish, target }, Held { need, wish, target },
  Declared is its own wish); LaneRequirement::wish and Excluded::NoWish are deleted, and the grant
  test returns Result instead of expecting "a wish is a demand".
- #13 plan_serving's smallest-candidate lookup returns None with `?`, no production expect.
- #31 prompt_floor_of takes and returns Tokens.
- #32 plan_serving::LaneFit { Fits(NonZeroU32) | Starved } names a starved host; the lane cap and the
  admission lane count read NonZero types, no `.max(1)` / `.unwrap_or(1)`.
- #33 Growth::of takes recorded Tokens (an unrecorded ring slot is filtered by Tokens::new at the
  reader) and reads its tail at a named P95 quantile.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant