Repository navigation
feat(capacity): expert depot — localhost serve + resident-bank manifest (#315 slices 0-1 core) - #2195
Merged
Merged
Conversation
…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
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 oneGGML_MOE_DEPOT_URLenv 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-sha256header. 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_containerout of the container's inline tests mod into a sharedfixturesmod 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::?tier=1returns tier-1 size + payload)cargo test capacity::expert_— 51 passed, 0 failed.Next slices (not here)
Slice 0 airc publication cadence, fork-side
GridFetcheradapter, slice 2 peer resolve + disk-tier cache (with itsTrackedDir+ eviction decision BEFORE first write, per the 460GB rule).🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo