Key findings
- What a reader cannot learn from the description: the numbers in "Measured Results" are not from this head commit. The PR says they were "Measured on combined development commit
09400ad8vs base19ce4a7b", while the PR head isd74e810; the fleet replay is an offline replay against.ckptheaders, not a live run. Two of the three A/B rows show zero gated spills (GLM-5.3 TP2 "TP2 prefill", DeepSeek-V4.1 "self-calibrating"), so only the Qwen3.8 row actually demonstrates the gate firing (per PR body). - The description understates one observable, user-visible change and overstates one: the PR adds a new Prometheus metric family (
flare_host_cache_spill_skipped_unprofitable_total{tier},..._bytes_total{tier}, helios/src/server/metrics.rs:872-885) butdocs/api.mdwas not updated for it — a search of docs/api.md forflare_host_cache_spill_skipped/profitabreturns nothing, while the surrounding host-cache counter table lives at docs/api.md:341-398. The only doc change about the gate is docs/prefix-cache-offload.md:685-696. - The "no
selene-managerserver changes" claim is accurate for the top commit but not for the PR diff againstmain.selene-manager/srcis 5 files, +2961/−159 (store.rs +2728) in the PR-vs-main diff, butselene-manager/src/store.rsis 12,006 lines at bothpr/674and this head, and noprefill_saved_ns/profitab/PoolSpillPolicysymbol exists anywhere inselene-manager/srcat head — those changes are inherited from the stacked parent #674, not new here.selene-manager/tests/client.rshowever gains 6prefill_saved_ns: 0fixture fields (e.g. selene-manager/tests/client.rs:1475) that are absent atpr/674, i.e. top-commit work caused by adding a field toPublishedCheckpoint. - Fail-open design:
prefill_saved_ns == 0means "unpriced" andstandalone_spill_profitablereturnstrue(selene/src/store.rs:526-534), so any path that does not publish a prefill saving keeps today's unconditional spill behavior. This makes the gate a no-op unless helios supplies a value, which matters for non-helios embedders ofselene. - Reviews/community: none.
pr_commentsreturns "No comments"; labels: none; reviews: none. CI on the head commit passed (per orientation packet). - Tooling limits: the local copy is missing git objects (
Could not read c513e46a…, andpr_difffails withfatal: bad revision 'cc0a49d2...d74e810'), so commit-level "recent activity" and a true PR-vs-base diff could not be computed; findings are from file reads atpr/694andpr/674and from symbol searches.
1. The change (what it does, how big, and where description and code diverge)
Size: 52 files, +22770/−3868 (orientation packet; confirmed by pr_files).
- selene/src — 23 files, +15357/−3030:
memory.rs+5271/−2648,composite.rs+3042/−78,disk_store.rs(not opened) +2049/−134,disk.rs(not opened) +1019/−57,pool/cascade.rs(not opened) +2762/−54,shared/index.rs+156,store.rs+170/−10, plus smaller edits inlevels.rs,pool/{local,lookup,store,shared}.rs,shard.rs(not opened),geometry.rs(not opened),offload.rs(not opened). - helios/src — 17 files, +4127/−579:
scheduler/cache_memory.rs(not opened) +1011/−83,runtime_core/cache_memory.rs(not opened) +491/−132,scheduler/checkpoints.rs+462/−68,server/runtime.rs+370/−106,server/metrics.rs+158/−36,cache.rs(not opened) +151/−44,scheduler.rs(not opened) +118/−45,scheduler/sharing.rs+57, tests (server/runtime/phase_tests.rs(not opened) +1012,runtime_core/memory/codec_layout_tests.rs(not opened) +209,scheduler/sharing/tests.rs(not opened) +58). - selene-manager — 5 files +2961/−159 (
store.rs+2728,pool/claims.rs(not opened) +143,arena.rs(not opened) +85,pool/store_bridge.rs(not opened) +4/−3,control.rs(not opened) +1) — inherited from #674 (see Key findings). - docs —
docs/prefix-cache-offload.md+114/−39,docs/runtime-core-design.md+23/−8,docs/api.md+12/−3,selene-manager/docs/operating.md+6/−4. The orientation packet notes docs are not mentioned in the description; the substance is the new write-gate paragraph. - Harness:
verification/helios-lifecycle/check.py(not opened) +10/−2,tests/server/test_conditioned_input_cache.py(not opened) +6/−1.
What the code does, verified at the head:
- New pricing primitives in selene/src/store.rs:
StoreOutcome::Unprofitable(store.rs:275) andStoreStatscountersspill_skipped_unprofitable: [u64; 2]/spill_skipped_unprofitable_bytes: [u64; 2], indexed[local_nvme, pool](store.rs:261-265).PoolSpillPolicy { level, rate_bytes_per_sec }withmaterially_differs_fromhysteresis — rescans only on level change or ≥5% rate change (0.05 * other.rate.max(1.0)) (store.rs:278-293).HostStore::compacted(evicted, heir)for GPU-compaction lineage (store.rs:396-399);TierStore::set_pool_spill_policy/spill_eligible_pool/persisted_in_pool/record_is_packed(store.rs:454-467).standalone_spill_profitable(transfer_seconds, prefill_saved_ns)— gate disabled whenprefill_saved_ns == 0, otherwise reusesworth_restore(transfer < 0.5 * prefill) (store.rs:526-534, withworth_restoreat 496-500).fork_dedup_profitable(pages, child_paths, page_record_bytes, row_record_bytes)—pages>0 && child_paths>=2 && (child_paths-1)*pages*page_bytes > row_bytes(store.rs:538-550). Unit test with geometry-derived break-even counts at store.rs:593-638.
- Local NVMe gate in
CompositeStore(selene/src/composite.rs):standalone_nvme_bytescharges uncompressed logical bytes for both read and DRAM→GPU upload (composite.rs:569-577);spill_eligible_nvmecomputesbytes/disk_inbound_rate + bytes/dram_inbound_rateand falls back to fork dedup with marginal pages above the nearest durable ancestor (composite.rs:579-609); skipped spills still index the record and keep adram_onlywarm copy, incrementingstats.spill_skipped_unprofitable[0]/_bytes[0](composite.rs:986-1035);promote_dram_onlyflips a skipped prefix to parked+outbound to be written (composite.rs:611-656);record_dram_only_descendantcanonicalizes voter branches and promotes onfork_dedup_profitable(composite.rs:851-907);evict_blocking_dram_only_for_diskreclaims blocking shadows of disk budget (composite.rs:535-567). - Pool gate in
MemoryStore(selene/src/memory.rs): cachedPoolCoverage { eligible, covered_pages, has_row_ancestor }populated only when a pool policy is set (memory.rs:341-352, 403-406, 769-775);eval_node_coveragerequires a row ancestor or prior persistence and credits only pages above the nearest covered ancestor, with fork-dedup eligibility at ≥2 children (memory.rs:1137-1171);memory_pool_standalone_profitablemirrors the threshold (memory.rs:422-444); unprofitable announced records are pruned and counted into slot[1](memory.rs:818-853);clean_slotsis O(1) (locally_evictable ? node.location.slots() : 0, memory.rs:1695-1701) with a maintainedreclaimable_clean_slots(1703-1710);backfill_prefill_saved_nsfills the field on records recovered from disk before republishing (memory.rs:3694, composite.rs:810-825). - Batch removal in selene/src/shared/index.rs:
remove_nodes(&[PrefixKey])(index.rs:523) with testsremove_nodes_prunes_closed_batch_and_rejects_invalid_batch_atomically(index.rs:1542) andremove_nodes_prunes_flat_shared_bucket_in_one_pass(index.rs:1587). - Standalone NVMe store —
disk_store.rs(not opened) grows the matching top-down coverage (covered_pages/has_row_ancestorthenfork_dedup_profitable, disk_store.rs:2218-2260 (not opened)), policy storage (2174/2193/2210), and skip counting (3224-3225, 3620-3621). - Cascade/shutdown behavior in selene/src/pool/cascade.rs (not opened) (nearest chain-starting ancestor retained for profitable rowless records; unprofitable interior checkpoints skipped on homogeneous cascades; tests at cascade.rs:3178-3250 (not opened), 3342-3371, 3402-3424, 3622-3785; a test comment shows the pricing idiom
prefill_saved_ns: 5_000, // unprofitable: transfer ~4 us >= 2.5 us, cascade.rs:1220 (not opened)). - Helios publication:
publication.prefill_saved_ns = scheduler.estimate_prefill_delta_ns(c, 0, c, false, &[], &[]).unwrap_or_else(|| ((c / prefill_rate.max(1.0)) * 1e9) as u64)— full-prompt GPU prefill delta with a cold per-token fallback — followed immediately byfor evicted in self.scheduler.compacted_ancestors(publication.id) { store.compacted(evicted, publication.key); }(helios/src/server/runtime.rs:2906-2924).StoreOutcome::Unprofitableunpins without deferring (runtime.rs:2940-2971); phase test at helios/src/server/runtime/phase_tests.rs:7117-7140 (not opened). - Lineage:
estimate_prefill_delta_ns(helios/src/scheduler/checkpoints.rs:438-502) returnsNonewhen capacities are unmeasured;compacted_ancestorswalks up to the nearest offered publication, dedups, sorts descending (helios/src/scheduler/sharing.rs:137-156). - Field plumbing:
prefill_saved_nsis a new pub field onPublishedCheckpoint(selene/src/store.rs:42-45) and on the index nodeNode<L>(selene/src/shared/index.rs:42-44, accessors 76-78, 309-317),0= unpriced. Because it is a shared struct field, downstream fixtures had to change (selene-manager/tests/client.rs 6 sites; helios test files). - Metrics: state
host_spill_skipped_unprofitable[_bytes]: [AtomicU64; 2](helios/src/server/metrics.rs:287-288), populated fromStoreStats(632-635), rendered asflare_host_cache_spill_skipped_unprofitable_total{tier="nvme"|"pool"}and..._bytes_total{tier=...}(872-885), render test at 2050-2065.
Where description and change diverge:
- Description: "zero …
selene-managerserver … changes" — true of the top commit, false of the diff againstmain(selene-manager/src +2961/−159) because the branch is stacked on #674. A reviewer of the whole diff will see them. - Description: "no environment-variable switches and no per-model policy flags" — consistent with the code (policy comes from measured rates and
prefill_saved_ns;PoolSpillPolicyis set byPooledStore), nothing found contradicting it. - Description does not mention the docs edits (docs/prefix-cache-offload.md:685-696 now documents the gate: a passing record reserves a disk-index entry and charges budget, a failing record keeps an uncharged metadata entry "unless later promoted by fork deduplication", and the drain/expiry implications at 698-731), nor that
docs/api.md's host-cache metric table (docs/api.md:341-398) is not updated with the new family. - Description does not mention that the gate fail-opens to today's behavior whenever
prefill_saved_ns == 0(selene/src/store.rs:529-534), i.e. the feature is inert for stores whose publisher does not price prefill.
2. The why
The problem is stated only in #694's own summary: hybrid-attention models carry fixed per-checkpoint recurrent state rows (tens to hundreds of MiB) beside paged KV blocks, so persisting short, unshared prompts burns disk capacity and write bandwidth on restores that admission pricing (worth_restore, transfer < 0.5× prefill) would reject. The restore-side counterpart pricing comes from #674 (estimate_prefill_delta_ns, RowRestoreLatency). No separate issue or PR in the searchable 30-day window asks for a write-side profitability gate, and nothing tracks the "hybrid row makes short prompts unprofitable to persist" problem: searches for "profitability spill unprofitable NVMe", "prefix cache hybrid attention recurrent state rows NVMe", "fork dedup shared prefix promotion" and "worth_restore prefill pricing restore" returned only #694 (and #674 for the last). The only prior art is the stacked parent #674, same author, same day.
3. Related work
- #674 (open, same author, same day) — stacked parent; base of this PR. #694 must be reviewed as the top commit only until #674 lands, then rebased onto
main; every selene-manager/src change in this diff belongs to #674. #674’s own body already flags merge-order coordination with #665 (helios/src/cache.rs(not opened),docs/prefix-cache-offload.md) and #659 (helios/src/runtime_core/cache_memory.rs(not opened)) — both of which #694 also edits (cache.rs (not opened) +151/−44, runtime_core/cache_memory.rs (not opened) +491/−132, prefix-cache-offload.md +114/−39), so that coordination carries over. - #655 (open, same author) "helios: retain measured snapshot cost after expiry and discover unmeasured cost once" — adjacent measurement/pricing territory; #694's fallback path depends on measured prefill capacities.
- #429 (merged) "Link host-cache records under any offered ancestor, not only the nearest" — the ancestor-linkage model that
record_dram_only_descendant's ancestry walk assumes. - #415 (merged) "Keep Selene rows by role and write pool records back on eviction", #413 (merged) "Link Selene pool puts to held ancestors and store each page once" — the row-role and single-page-store semantics that
fork_dedup_profitable's byte accounting builds on. - #497 (merged) disk-offload restore latency, #496 (merged) coalesced shared-ancestor reads, #504 (merged) lossless KV compression — the transfer-rate estimates and packed-vs-uncompressed byte questions the gate prices.
- #665 (merged) helios scan-resistant dual-turnover eviction; #607/#610/#611/#612 (merged) selene/selene-manager hardening on the same files — this PR re-touches the same eviction and pool paths.
- Nothing found that this PR supersedes or undoes; no competing write-gate proposal exists in the local copy.
4. Recent activity
Could not be gathered. Every commit-level tool failed: search_history/items_touching/related_items cannot resolve missing objects (Could not read c513e46a79f3b6ac510235aaf09bcf055b841958), and the orientation packet reports the same failure for all eight areas, with "the two commits share no history in the local copy". What is known instead: the same author merged 82 PRs in the last 180 days, with heavy activity in helios/src (36), docs (35), selene/src (32), selene-manager/src (25); merges in the immediately preceding days include #663 (helios scheduler pricing), #628 (offload copy-engine gating), #612/#611/#610/#609 (selene/selene-manager hardening), #527 (Latent576 codec). This change builds directly on that lineage rather than reversing it — it reuses the worth_restore rule, the packed-record and row-role semantics, and the pool cascade, and the only docs it rewrites are the ones that lineage authored.
5. People
- Author:
yatesdr, GitHub association COLLABORATOR, Discord D-Rock. 82 merged / 11 closed / 5 open items in 180 days; the dominant contributor to every area this PR touches, including all the adjacent merges listed above. Open siblings: #674 (stacked parent), #655, plus issues #347/#348/#349 (GLM-5.3 and multi-GPU production reports) — the same author files the production-fleet evidence that this PR's "Read-Only Production Fleet Replay" table draws on. - Who else works here: the orientation packet reports "no commits in these areas in the last 180 days" for other people — the packet's area-commit query failed (same missing-object error), so this is an absence of data, not evidence of absence.
- Who has engaged so far: nobody. No comments, no reviews, no labels, no reactions.
6. Community
Nothing to report: pr_comments returns "No comments"; no reviews and no labels on the PR. Interest so far is limited to the author's own description, and traffic is likely to be low because the branch is explicitly parked behind #674.
7. Project fit (charter, as facts)
- Goals line 24: "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene" — the area is squarely on a stated goal.
- "Keep the runtime small and model-agnostic… shouldn't accumulate per-model branches (#267, #334)" and "No per-model special cases or flags" — the PR claims model-agnostic behavior with no env switches or per-model flags, and nothing in the diff contradicts that (no protobuf/ignition/model-core files appear in
pr_files). - "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)" — evidence supplied is an A/B table plus an offline replay; caveats in §9 (measurement commit ≠ head; 2 of 3 rows show zero gated spills). - "Supported matrix & compatibility: … verify that existing data, artifacts, and exported cores still load" — the PR asserts no on-disk v4 format change and states the A/B used "pre-existing exported cores without re-export"; that assertion is untested here.
- "PR descriptions: Expect four parts: why the change is needed, what changed, the claimed result, and the evidence backing it" — all four are present.
- "PRs that address … a measured performance/memory issue, or bad docs" get merged — this is framed as a measured disk-capacity/bandwidth issue.
- "Don't silently ignore API fields"/"Be explicit and pin everything" — not implicated; no dependency changes appear in the file list.
- Tension worth recording: the only user-visible interface added is a Prometheus counter family, and the charter's docs expectations plus the surrounding convention (docs/api.md:341-398 documents every other
flare_host_cache_*family) are not met for the two new series.
8. Reach
- Users/operators: anyone running hybrid-attention models with
--prefix-cache-disk/ local NVMe or a Selene pool. Observable effects: fewer NVMe files and bytes, warm DRAM-only prefixes kept instead of spilled, newskipcounters, and possibleUnprofitablestore outcomes (unpin-without-defer). Config/defaults: no new flags or env vars; drain-on-shutdown (docs/prefix-cache-offload.md:698-707) and expiry (709-731) semantics interact withdram_onlyrecords per the new doc paragraph at 685-696. - Compatibility: no protobuf/ignition/model-core/v4 on-disk change per the description and file list;
PublishedCheckpoint/Nodegain a field, which is why selene-manager and helios test fixtures neededprefill_saved_ns: 0(selene-manager/tests/client.rs:1475 and five more). - Deployment: no dependency or build-system files changed.
verification/helios-lifecycle/check.py(not opened) andtests/server/test_conditioned_input_cache.py(not opened) change, so the lifecycle-verification skill and one server test path are affected. - Documentation: prefix-cache-offload.md, runtime-core-design.md and api.md are touched, but api.md not for the new metrics.
9. Claims and evidence
| Claim | Evidence | Gap |
|---|---|---|
| SM120 A/B: NVMe files 66→42, bytes 6.39→4.30 GB, 3.36–4.25× warm speedups, parity clean across 3 models | PR body table; states "measured on combined development commit 09400ad8 vs base 19ce4a7b", workload described (12 short single-turn + 4 growth + 6-way fork + cold restart) |
Not measured on head d74e810; two of three rows report 0 skipped spills, so only Qwen3.8 exercises the gate; the "2 FP4 top-5 tie swaps" in the Qwen3.8 parity column acknowledge non-bit-exactness |
| Fleet replay: 6.13–20.68% NVMe bytes saved, up to 1,262 checkpoints (21.53%) skipped, 0–33 shared forks promoted | PR body table against production .ckpt headers of GLM-5.3 TP4 and DeepSeek-V4.1 TP4 pools |
Offline replay, not a served workload; "Shared Forks Promoted" is computed by the replay, not observed live |
"RUSTFLAGS=\"-D warnings\" cargo check --locked --all-targets: clean" across selene/selene-manager/helios/flare |
PR body | Not reproducible here (no build); orientation packet says CI on head passed |
| Tests: selene 640/640, selene-manager 442/442 (205 lib + 237 integration), helios 1,841/1,841 runnable, flare 254/254 | PR body, with explicit exclusions (root-chmod, FLARE_TEST_TEMPLATE_DIR-gated template tests) |
Counts are self-reported; new unit tests do exist in the diff (e.g. selene/src/store.rs:593-638, selene/src/shared/index.rs:1542/1587, helios/src/server/metrics.rs:2050-2065, helios/src/server/runtime/phase_tests.rs:7117-7140 (not opened)) |
| Zero protobuf/ignition/model-core/graph-contract changes | Consistent with pr_files (no such files) |
— |
| Zero selene-manager server changes | True of the top commit (verified: no profitability symbols in selene-manager/src at head; store.rs identical length at pr/674) |
False of the diff against main; the PR-vs-main view shows selene-manager +2961 |
| Gate is model-agnostic with no flags | PoolSpillPolicy is computed from measured rates; prefill_saved_ns is published per checkpoint; no env/flags found |
Gate is inert (true) whenever prefill_saved_ns == 0 (selene/src/store.rs:529-534) |
10. Process
Open, "ready for review", opened and last updated 2026-12-02, base main, head d74e810, stacked on #674 with instructions to review only the top commit until #674 lands. No reviews, no comments, no labels. CI on the head commit passed. Age: same-day.
Open questions / what could not be found
- No PR-vs-base diff could be produced locally (
gitcannot resolve basec513e46a;fatal: bad revision 'cc0a49d2...d74e810'), so the split between "#674 work" and "#694 work" was reconstructed file-by-file againstpr/674and by symbol search, not from a diff. - No commit-level recent-activity data at all (missing git objects for every area) — the "who changed these files lately" question is answered only from the author's merged-PR history.
- Whether the ORIGINAL A/B numbers survive a rerun on head
d74e810, and whether the gate ever fires on TP2 (GLM-5.3) and DeepSeek-V4.1 as configured, is not shown. - Why docs/api.md:341-398 was not extended with the new
flare_host_cache_spill_skipped_unprofitable_*series, while docs/prefix-cache-offload.md and docs/runtime-core-design.md were updated for the behavior. - No issue, RFC, or maintainer request in the searchable window asks for this gate — the motivation rests entirely on the PR description and the author's own production-fleet data.