PR #496 — amendments only (run 238, 2026-11-25)
Per the operator's instruction this report is amendments only. The run-237 body (change description, benchmark reading, related-work history, uncovered areas) stands except where superseded below. Everything below is new or a correction since then: #496 itself moved for the first time, got reviewed, and answered; two sibling PRs merged; the merge-order picture with #497 changed shape; and a new same-file competitor (#504) appeared that exposes a concrete defect risk in #496's new key type.
Key findings
-
#496 moved and is now reviewed — the "conspicuous review gap" finding is retired. head
f9c91915→0c04b1e2(rebased onto mainc0c4f798, force-pushed, same single commit "Coalesce shared ancestor reads across concurrent Selene disk fetches"), files 2 → 3 (docs/prefix-cache-offload.md+35/−2,selene/src/disk_store.rs+3313/−931, newselene/src/shard.rs+10/−0; total +3358/−933), comments 0 → 3. The autobot review (2026-11-24 21:23) is Changes Requested but starts from "The approach belongs in the repo — a measured, served-workload win with no new flags, no format change, failure isolation preserved, and the shared-window lifetime work holds up": 1 blocker, 5 should-fix, 4 nits. Author response 2026-11-25 02:41. This supersedes run-237's finding 5 and run-236's item 4. -
The blocker is answered and the answer holds up. The disclosed 8/9-vs-7/9 dip at 61.3K is gone from the description, replaced by a seed-controlled parity run (one shared 60,534-token disk checkpoint, seeds 1234–1238,
top_logprobs=5, mainc0c4f798vs0c04b1e2): identical FP32 top-5 logprobs and token IDs, per-seed6/9 == 6/9, 8/9 == 8/9, 7/9 == 7/9, 9/9 == 9/9, 4/9 == 4/9. I verified the premise independently in main:helios/src/model.rs:230-234(not opened) rejectstemperature == 0,helios/src/server/request.rs:643-666clamps request values into the declaredSamplingRange, andhelios/src/server/config.rs:789(not opened) asserts 0 → 0.5 for a 0.5..1.5 range. So the original "temperature=0" check was never greedy, and the old gap was sampling noise plus differing per-build prompt nonces — not a coalescing bug. The review's named suspect site now has a dedicated test,misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore(selene/src/disk_store.rs:8909-9105). Residual: the review also asked to "report variance and the differing fact"; the response reports per-seed variance but never names which fact differed, and the evidence is 1 model / 1 checkpoint / 1 prompt / TP1 / 5 seeds. -
Still unresolved after the rewrite:
pump_allordering. At head,fn pump_all(selene/src/disk_store.rs:2291-2312) is: drain maintenance (unbounded, while disk space) → sortedoutbound→ sortedhost_inbound→pump_device_inbound. Maintenance remains first, exactly as run-237 finding 2 said. The description's companion-PR sentence ("whichever merges second reconcilesStaged::pump_allsohost_inboundandpump_device_inboundrun ahead of writes and maintenance") still describes post-rebase #497, not what #496 ships, and nothing in #496's tests asserts any ordering. -
NEW defect risk with compression PRs:
HeaderIdentity's hand-writtenHashwill silently drop newHeaderfields. #496 replaced the hand-written sharing key withHeaderIdentity(Arc<Header>)(selene/src/disk_store.rs:1006-1012) whoseHashimpl (:1014-1049) destructuresHeaderfield-by-field and hashes exactly the fieldsHeader::eqcompares today (:1006-1009compares the innerHeaders). #504 addsHeader.packed: Option<Arc<packed::Layout>>(selene/src/shared/record.rs:126) and includes it inHeader'sPartialEq(:145). After any compression PR lands,HashomitspackedwhileEqcompares it — a packed and a raw record differing only inpackedcollide into oneSegmentKey/WindowKeyand can share one staging segment. This is the sharpened form of run-237 key finding 3. -
New same-file competitor and a moved sibling. #504 "selene, helios, ignition, heliopause: add pure-CUDA GPU and CPU lossless KV compression" (yatesdr, draft, 2026-11-25 00:00, head
a187bca, +20004/−706, 146 files) now appears initems_touching selene/src/disk_store.rsanddocs/prefix-cache-offload.md— retracting run-237's "no new same-file competitor". #498 and #499 are merged (#498040f39ff, #499d0adb958), retracting run-237's "one of four open PRs from the same author". #497 was force-pushed tocd5a366band is itself reviewed.
A1. What changed on #496 (angle: what moved)
- head
0c04b1e2, branchselene-disk-ancestor-coalescing, one commit, rebased overc0c4f798.pr_filesnow returns 3 files:docs/prefix-cache-offload.md(+35/−2),selene/src/disk_store.rs(+3313/−931),selene/src/shard.rs(+10/−0). - Discussion: autobot case-file notice (2026-11-24 20:34), autobot review (21:23), author response (2026-11-25 02:41).
- Description rewritten: benchmark table re-measured at the head commit (see A3), the "Not covered" list now holds multi-host RoCE serving / 2-GPU
split_pools/ discrete PCIe GPUs / Windows serving / liveCompositeStore/PooledStoreGPU serving, and the 61.3K disclosure is replaced by the parity evidence in Key finding 2. - Still: no labels, no CI checks recorded, single commit.
read_item 496shows it references #497 and is referenced by #497, and nothing else.
A2. Blocker (61.3K retrieval) — answered
Verified as described in Key finding 2. Additional detail from the response, which I checked against the tree:
- The five repeats ran cold-VRAM restarts against one warm 60,534-token disk checkpoint, and first-token top-5 logprobs matched in-VRAM GPU hits (
"9"−0.756374 vs"3"−1.256374), i.e. the disk path reproduced the GPU-hit distribution, not merely the same retrieval score. - New unit test
misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore(selene/src/disk_store.rs:8909) — leaderskip_pages=0vs followerskip_pages=13, a partial <64-page ancestor tail plus a partial leaf chunk withrow = true, byte-compared against a private single-restore baseline store; assertsdisk_opens()==3(the parent is reopened for the follower's unaligned head) andcoalesced_windows()==2. - Also added
coalesced_restores_keep_inbound_rate_physical_and_bytes_in_logical(:9108) for the S1 item. - Caveat to carry forward: parity is one model (
Qwen3.8-27B-NVFP4) at TP1, one checkpoint, one prompt, five seeds. It is a per-seed match, not a statistical claim, and the prompt-level "differing fact" the review asked to be named is not named.
A3. Should-fix items — 3 met, 2 half-met, nits partly taken
Verified at head 0c04b1e2 (selene/src/disk_store.rs line numbers at head):
Met
- S4 one planner, one window key.
plan_aligned_windowsis gone; singlefn plan_windows(segments, align_to_window: bool)with a doc comment (:682), device fetch passestrue,read_intopassesfalse.SegmentKey/WindowKey(:1052-1062) pluswindow_index: HashMap<WindowKey, SharedWindowId>andHashMap<WindowKey, usize>demand counts replace the five hand-written key sites. - S5 de-duplicated attach loop.
has_window_credit(:1683) andattach_pending(:1711) extracted; both Pass 2 and Pass 4 call them. - S2 docs and rustdoc. Module doc rewritten (no longer "at most
WINDOWS_IN_FLIGHTwindows" / "Nothing here waits"),Resources::allocate's rustdoc restored aboveallocatewith a separate line onfree_slots. Docs §2.4 now carries the real signatures —write_from(id, header, temporary, path, pages, row, sums)andread_into(id, path, expected, first_page, pages, row)atdocs/prefix-cache-offload.md:337-338, matching code — plusWINDOW_PAGESfile-boundary alignment, the immutable+pinned+close-before-Fetchedinvariant, the two coalescing limits, failure-isolation scope, and physicalinbound_ratevs logicalbytes_in(docs:339-366), restated in §4 (docs:1528-1532). - S3 benchmarks at head. Re-measured at
0c04b1e2vs mainc0c4f798, 27B rows as means over 2 interleaved repeats; the single-restore cost is now an expected bound namingbuild_pending_demand'sdevice_inbound.len() <= 1fast path; the 2-host RoCE and DeepSeek TP4 rows moved to "Not covered". Numbers: 27B TP1 60.5K simultaneous 18,177.5 → 4,306.7 MB (4.22x), TTFT 7,974.6 → 5,662.8 ms (−29.0%); +25 ms stagger 18,194.2 → 4,843.6 MB (3.76x), 6,883.6 → 5,951.9 ms (−13.5%); Flash-Next TP1 61.0K simultaneous 7,944.9 → 1,981.1 MB (3.99x), 3,327.5 → 3,225.0 ms (−3.1%); stagger 7,958.0 → 2,251.5 MB (3.52x), 3,137.7 → 3,049.9 ms (−2.8%). Rank-0 physical inbound rate 6.07 GB/s single vs 7.71 GB/s 8-way simultaneous and 6.02 GB/s 8-way staggered (27B);bytes_inlogical at 8x single. (I checked internal consistency of these figures, not the measurements.) - Nits mostly:
PlanStatereplaced bystarted: Vec<bool>; test-only counters gated under#[cfg(any(test, feature = "test-support"))](0 warnings without the feature); duplicatepath/expectedfields removed fromSharedWindow/DeviceSegmentRef.
Half-met / still open
- The misleading close message survives.
fn close(:2503-2546) still returns"{abandoned} disk transport jobs did not complete within {:?}"whereabandoned = store_jobs.max(internal)andinternal = max(owners.len, maintenance.len, shared_segments.len, shared_windows.len)(:2518-2528). The author's response saysowners,shared_segmentsandshared_windowswere "included inStaged::close'sabandonedcount" — they are folded into a maximum over heterogeneous quantities, so the number can be too high or too low and cannot be used to diagnose. The review's nit ("counts leaked windows into 'N disk transport jobs did not complete'") is not actually fixed. - Docs got more complete but less readable. §2.4 is one unbroken ~30-line paragraph mixing mechanism, invariants, scheduling policy, failure isolation and metering (
docs:337-366), and §4 repeats thebytes_in/inbound_ratesentence. The review asked for the facts; it did not ask for a single block. - Nit not taken:
GatedCopier::wrapstill returns a positional 4-tuple (GatedCopierParts = (SharedCopier, Arc<Mutex<bool>>, Arc<Mutex<VecDeque<Reply>>>, Arc<Mutex<Option<JobId>>>)).
A4. Merge order with #497 is a policy three-way merge, not a call move
#497 was force-pushed to cd5a366b (+1400/−119) and no longer simply reorders pump_all: it keeps maintenance first but bounded — MAINTENANCE_DEFER_LIMIT = 8 (pr/497:66), a maintenance_deferred counter (:1019), and pump_all (:1212-1243) that defers maintenance until the limit, then runs sorted inbound, then outbound, then drains maintenance while queue space remains. #496's pump_all (selene/src/disk_store.rs:2291-2312) is unbounded maintenance → outbound → host_inbound → device_inbound. So the descriptions' "whichever merges second reconciles Staged::pump_all" understates the work three ways:
- the bounded-deferral policy has to be reconciled, not just two calls moved;
staged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance(pr/497:7003) still asserts the single-queue shape and must be rewritten against the split queues;- #497's un-unified
plan_windows(segments)(pr/497:671) has 7 call sites (:1101, :1369, :5178, :5201, :5204, :5207, :5208) that all need #496's newalign_to_windowargument.
Base staleness: #496 rebased onto c0c4f798, but main is now 84ac035c (search_history main), with 040f39ff (#498), d0adb958 (#499), 3aa74200 (#491), 6426cfc0, 84ac035c since. None touches selene/ or docs/prefix-cache-offload.md, so no semantic conflict — but the base, and the description's "main (c0c4f798)" benchmark reference, are both behind main.
A5. #504: new same-file competitor and the concrete hazard
#504 "selene, helios, ignition, heliopause: add pure-CUDA GPU and CPU lossless KV compression" (yatesdr, COLLABORATOR, draft, opened 2026-11-25 00:00, head a187bca, +20004/−706, 146 files) is now listed by items_touching selene/src/disk_store.rs and items_touching docs/prefix-cache-offload.md. At pr/504 selene/src/disk_store.rs still has the pre-#496 shape — Destination::HostPacked (:1112, :1206), InboundRecord (:975), pump_inbound (:1673), pump_all (:1691), read_into_packed (:1502) — and no SharedSegment/DeviceInbound/WindowKey. Consequences:
- #496 has no packed-host equivalent, so #504's packed disk restores have nowhere to live on
DeviceInbound/SharedWindow; whichever lands second does a semantic port, not a textual merge (confirming run-237 key finding 3, now with a named PR). - The
Header.packed/HeaderIdentity::hashcollision described in Key finding 4 is new this run and is #496's own bug to fix, independent of who merges first: make theHashimpl derive or include every fieldHeader::eqcompares, or acceptHeaderlosingPartialEqin favour of an explicit identity. - #504 is far from merge: autobot Changes Requested 2026-11-25 03:28, 3 blockers (including "stop pruning readable records"), 5+ should-fix, 10 nits, and a wrong GKV1 protocol spec. It is still the largest open consumer of the code #496 rewrites.
items_touching selene/src/disk_store.rs open list is now #504, #497, #496, #477, #492, #486 — five of the six touch the same Staged inbound path.
A6. Neighbourhood and charter
- #498 (D2H tail flush) and #499 (row-sharded prefill) are merged (
search_itemsstate=merged; merge commits040f39ffandd0adb958insearch_history main). #496 and #497 are now the author's only open Selene PRs. #500 (voipmonitor) stays open and unrelated (ERNIE XML/think parsers,flare::pcie_all_reduce_addend_dep). - The run-236 lead is now closed: #498 merged into main and still does not touch the Selene staged restore path, so it remains not relevant to #496.
- Against the charter: "bring real evidence … benchmarks showing an actual speedup over main on a served workload (#210)" is satisfied better than at run 237 — head-commit, repeated, served-workload ingress-to-first-token TTFT. The sign-off-requiring non-goals (broad production coverage, rack-scale/disaggregation) are not engaged. No new charter evidence appeared for #496 in any of the new items.
- #496 remains the only one of the five Selene disk PRs whose autobot verdict starts from "the approach belongs in the repo"; #477, #486, #492, #504 and #497 all carry Changes Requested.
New file: selene/src/shard.rs (+10/−0)
pr_diff shows three hunks, all about the new TransportEvent::InboundWindowSample:
Kind::of(pr_diffhunk at shard.rs:473) gains anInboundWindowSamplearm that isunreachable!("window rate samples stay local to rank zero").absorb_local(hunk at :716) pushes those events straight intoself.eventsand skipsrecord.Peer::forward(hunk at :1138) drops them before encoding to peers.
All three are consistent with the description ("forwarded on rank 0 in Sharded, ignored on peer ranks") and I found no defect. One caveat worth a line: the unreachable! guard is only sound because absorb_local and Peer::forward filter first — any future caller that feeds a raw TransportEvent stream to Kind::of will panic rather than mishandle a sample.
Coverage this run
PR description (changed), comments/reviews (3, changed), commits and head (changed), files (3, changed), same-file competitors (#504 new; #497/#477/#486/#492 still open), history (main tip 84ac035c; #498/#499 merged), charter (re-read, no new non-goal engaged), the new shard.rs hunks (reviewed, no defect), and the run-236 #498 lead followed to completion (merged, still not on the Selene restore path, so still not relevant). The run-235 body (change description, benchmark reading, uncovered areas, history of the code being replaced) needs no rewrite.
Open questions
- Is maintenance-first
pump_allintentional? #496 ships inbound-after-maintenance (selene/src/disk_store.rs:2291-2312) while its description's ordering sentence describes post-rebase #497. No test asserts #496's ordering, so a reviewer cannot tell whether this is a deliberate scope boundary or an oversight. It remains the most reviewable behavioural point the tests do not cover. - Will the
HeaderIdentity::hash/Header.packedcollision be fixed before a compression PR lands? Nothing in the author's response or the review mentions it; it is invisible untilHeadergains a compared field. - Does the 5-seed parity run settle the blocker? It is 1 model / 1 checkpoint / 1 prompt / TP1 / 5 seeds, and the "differing fact" the review asked to be named is not named. Whether that is enough is a reviewer's call, not something the description resolves.
- What is the intended order among #496, #497, #477, #486, #492, #504? No coordination is stated anywhere; the only cross-reference on #496 is #497, and "merge in either order" is true only textually.
- Was the
Staged::closenit actually addressed? The response claims it was; the code showsabandoned = store_jobs.max(internal)over mixed counters with the same message (:2518-2544).
What could not be found
- Any CI check result or label on #496 at
0c04b1e2; the response asserts the suites passed (476 Linux selene, 13 Windows IOCP, 21 single-GPU SM121 heliosoffload::,test_core_boundary.py(not opened)) but no run is recorded on the PR. - Any test in #496 that asserts
pump_allordering (contrast #497'sstaged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance, pr/497:7003). - Any issue, design note or TODO in the repository requesting concurrent-restore coalescing; the motivation remains the author's own benchmark (
search_items "selene disk restore coalesce"returns only #496 and #497). - The prompt-level "differing fact" the review asked for in blocker B1 — only per-seed scores and the nonce/sampling explanation are given.
- A maintainer sign-off for putting a second inbound lifecycle inside
Staged(review should-fix S5's second half); the author supplied theDiskThread-vs-Stagedrationale but no recorded approval. - Any measurement isolating the demand-index and close-count edits beyond the expected-bound argument.