Skip to content

feat(system-resources): NvmeServingTierPool — genome-models gets its decided eviction owner (#302, my half) - #2117

Merged
joelteply merged 2 commits into
canaryfrom
feat/302-nvme-serving-tier-pool
Aug 2, 2026
Merged

feat(system-resources): NvmeServingTierPool — genome-models gets its decided eviction owner (#302, my half)#2117
joelteply merged 2 commits into
canaryfrom
feat/302-nvme-serving-tier-pool

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The serving tier's hot set (served GGUFs, expert containers, device-fit overrides) now has a governed eviction owner on the existing ResourcePool contract, closing the genome-models deferred entry in every_cache_class_has_a_decided_eviction_story with exactly the owner it demanded: reference-aware, never blind-delete a served model.

What

  • Capacity DERIVED (Genomic user widgets: live adapter data, auto-forwarding, dead code cleanup #287-style): volume total − governed reserve (10% floored at 32 GiB), never a hand-tuned budget. Volume smaller than the reserve ⇒ capacity 0 (tier degrades, never underflows).
  • Relief = MIGRATE, coldest-first, to the detected COLD drive: copy → fsync → byte-verify → delete source. A verified twin already frozen on cold = pure drop. Verify failure removes the partial COPY, never the source. Cold-side name collisions are never clobbered.
  • ActiveArtifactSet (process singleton, same shape as install_tracked_dirs): serving's ensure_hot_resident (BigMama's half) registers resident paths; eviction skips anything protected, prefix-aware both directions; a poisoned lock fails SAFE (everything protected).
  • No cold drive ⇒ free 0 LOUDLY — pressure stays visible to the broker/operator instead of being 'relieved' by destroying re-fetch-hours artifacts. Composes with device-fit one tier down (Unfittable → grid route, LOUD), per STORAGE-SERVING-TIER-GOVERNOR.md; DriveRole::Cold stays FROZEN-never-streaming (docs(capacity): DriveRole::Cold is FROZEN storage, never the per-token streaming tier (#302 slice 0) #2115).
  • Boot wiring beside CargoTargetPool in ipc/mod.rs: volume = longest mount-prefix match over detect_drives() (now pub), cold_root = <cold-mount>/continuum-cold/models.

Safety invariants (each pinned by a test)

  1. NEVER the actively-paged artifact — even at unlimited eviction demand.
  2. Migrate never blind-delete — the artifact exists byte-verified on cold before the hot copy dies.
  3. No cold tier ⇒ refuse loudly, free nothing.

Tests

5 new tests in the existing #[cfg(test)] mod tests (nested serving_tier theme, per the one-test-mod rule), each with // what this catches:. The decided-story guard test is STRENGTHENED (owned += genome-models), not weakened. cargo test disk_eviction: 11/11 green; cargo check clean.

Her half (serving ensure_hot_resident + duplicate detection) composes against serving_active_artifacts() — the seam is live in this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 2 commits August 2, 2026 14:29
…decided eviction owner (#302, my half)

The serving tier's hot set (served GGUFs, expert containers, device-fit
overrides) now has a governed eviction owner on the existing ResourcePool
contract, closing the 'genome-models' deferred entry in
every_cache_class_has_a_decided_eviction_story with exactly the owner it
demanded: reference-aware, never blind-delete a served model.

- Capacity DERIVED (#287-style): volume total − governed reserve
  (10% floored at 32 GiB), never a hand-tuned budget.
- Relief = MIGRATE coldest-first to the detected COLD drive: copy →
  fsync → byte-verify → delete source; a verified twin already frozen on
  cold is a pure drop; verify failure removes the partial COPY, never the
  source; cold-side name collisions are never clobbered.
- ActiveArtifactSet (process singleton, same shape as tracked dirs):
  serving's ensure_hot_resident (BigMama's half) registers resident
  paths; eviction skips anything protected, prefix-aware both directions.
  Poisoned lock fails SAFE (everything protected).
- No cold drive ⇒ free 0 LOUDLY — pressure stays visible instead of
  being 'relieved' by destroying re-fetch-hours artifacts. Composes with
  device-fit one tier down (Unfittable → grid route), per
  STORAGE-SERVING-TIER-GOVERNOR.md; Cold stays FROZEN-never-streaming.
- Boot wiring beside CargoTargetPool: volume = longest mount-prefix
  match over detect_drives() (now pub), cold_root = <cold>/continuum-cold/models.

5 new tests in the existing mod (nested serving_tier theme), each pinning
a named invariant; the decided-story test STRENGTHENED (owned +=
genome-models), not weakened. cargo test disk_eviction: 11/11.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…et (#302 invariant 1, live end-to-end)

The reconcile marks the resolved model's GGUF ACTIVE before any spawn
touches it (a mid-load migration is the worst case), swaps the
registration on model change (old released exactly once), and clears it
on both nothing-servable paths. With this, the NvmeServingTierPool's
never-migrate-the-served-model invariant is enforced by the LIVE serving
path, not just by tests — no dependency on the cross-node half.

serving_daemon + disk_eviction suites: 37/37.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the feat/302-nvme-serving-tier-pool branch from f59dd66 to 9cda39b Compare August 2, 2026 19:29
@joelteply
joelteply merged commit c8bdf17 into canary Aug 2, 2026
4 checks passed
@joelteply
joelteply deleted the feat/302-nvme-serving-tier-pool branch August 2, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant