Skip to content

feat(capacity): expert depot — localhost serve + resident-bank manifest (#315 slices 0-1 core) - #2195

Merged
joelteply merged 1 commit into
canaryfrom
feat/expert-depot-315-slice01
Aug 8, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/expert-depot-315-slice01

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

The continuum-core side of the depot/GridFetcher split from docs/serving/GRID-EXPERT-SHARE.md (#315, converging #180+#300). The fork stays thin — its entire grid surface will be one GGML_MOE_DEPOT_URL env var — and all grid intelligence lives in this module.

  • GET /manifest → DepotManifest: resident banks ONLY. A node holding 2 of 60 layer banks advertises exactly those 2 — advertising shards we don't hold would turn every peer miss into a 404 storm instead of a clean fallback.
  • GET /expert/{layer}/{expert}?tier=N → the record's bytes + x-expert-sha256 header. The per-record verify seam slice 2's remote path needs, part of the contract from the first localhost byte served.

Miss semantics (the load-bearing contract): absent shard / out-of-range key → 404 (the fork fetcher falls back — the depot can DEGRADE serving, never break it); geometry/identity violations → 500 (corrupt artifact, loud, never served as zeros).

Concurrency shape per the style guide: fetches are sync positioned reads on the blocking pool behind a mutex never held across await; the server is its own tokio task. Every event probed: depot.manifest / depot.listen / depot.serve / depot.miss / depot.died.

Also promotes write_container / write_tiered_container out of the container's inline tests mod into a shared fixtures mod gated #[cfg(any(test, feature = "test-fixtures"))] — one fixture per concern; depot tests reuse them.

Tests

4 new (real localhost sockets), each with // what this catches::

  • resident-only manifest when a shard is dropped
  • byte + hash round-trip against the GridFetcher contract
  • tier-axis selection (?tier=1 returns tier-1 size + payload)
  • 404-vs-500 discipline, including truncated-bank corruption

cargo test capacity::expert_ — 51 passed, 0 failed.

Next slices (not here)

Slice 0 airc publication cadence, fork-side GridFetcher adapter, slice 2 peer resolve + disk-tier cache (with its TrackedDir + eviction decision BEFORE first write, per the 460GB rule).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…st (#315 slices 0-1 core)

The continuum-core side of the depot/GridFetcher split (docs/serving/
GRID-EXPERT-SHARE.md): the fork stays thin, all grid intelligence lives
here. This slice serves our own container's expert records over localhost
HTTP and derives the resident-bank manifest that slice 0 publishes to
peers:

- GET /manifest → DepotManifest (resident banks ONLY — advertising shards
  we don't hold would turn peer misses into a 404 storm)
- GET /expert/{layer}/{expert}?tier=N → record bytes + x-expert-sha256
  (the per-record verify seam slice 2's remote path needs, priced in from
  the first localhost byte)

Miss semantics are the load-bearing contract: absent shard / out-of-range
key → 404 (fork falls back — depot can DEGRADE serving, never break it);
geometry/identity violations → 500 (corrupt artifact, loud). Fetches run
on the blocking pool behind a mutex never held across await; every event
probed (depot.manifest / depot.listen / depot.serve / depot.miss /
depot.died).

Also promotes the container fixture writers (write_container,
write_tiered_container) out of the inline tests mod into a shared
fixtures mod gated #[cfg(any(test, feature = "test-fixtures"))] — one
fixture per concern; depot tests reuse them instead of growing a parallel
writer.

Tests (4, real localhost sockets): resident-only manifest on a dropped
shard, byte+hash round-trip vs the GridFetcher contract, tier-axis
selection, and 404-vs-500 discipline incl. truncated-bank corruption.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit dba1c82 into canary Aug 8, 2026
5 checks passed
@joelteply
joelteply deleted the feat/expert-depot-315-slice01 branch August 8, 2026 19:16
joelteply added a commit that referenced this pull request Aug 8, 2026
…de truth (Joel: 'have most of the code and algorithms now') (#2198)

README gains 'Serving big minds on small machines — MoE expert paging' under
The Grid: the honest shipped-and-measured inventory (Kimi-Linear-48B @ ~57
tok/s on Mac Metal via the fork; 4.0× zero-copy gather with bit-identical
CUDA; 4KiB tiered expert container with tier-in-identity; LFRU cache with the
measured cliff law; tier policy + per-prompt demand predictor; expert depot
with resident-bank manifest + clean-miss semantics; governed budgets with
hysteresis), the λ-pricing pointer, and the two next proofs named as NEXT —
never claimed (paper-claim doctrine: single-box live paging, then the
two-machine expert-serve milestone).

GRID-EXPERT-SHARE.md: slices 0-1 status stamped SHIPPED (PR #2195) with the
open tails named (airc publication cadence; fork GridFetcher + parity A/B)
and the advertised_cost pricing addendum cross-linked.

GRID-ECONOMICS: reciprocal link to GRID-MARKET-CLEARING (thesis ↔ mechanism).


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

Co-authored-by: Claude Fable 5 <[email protected]>
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