#1 [high] Change: what PR #496 actually does in selene/src/disk_store.rs
PR #496 "Coalesce shared ancestor reads across concurrent Selene disk fetches", author FujitsuPolycom, head f9c9191, base main, 2 files: selene/src/disk_store.rs +2803/−913 and docs/prefix-cache-offload.md +5/−1. No comments, no reviews, no CI checks at head.
What it does (verified by reading the diff and file at pr/496):
- The old single
InboundRecord(+Destination::{Device,Host}enum) is split into two pipelines:HostInbound/HostWindow(fieldspages: Vec<usize>,row: Option<Vec<usize>>) = caller-owned host reads, used byStaged::read_into(composite / host_inbound). Unchanged behaviour, stillplan_windows(disk_store.rs:672).DeviceInbound/DeviceActiveWindow/DeviceSegmentRef= GPU restores viaStaged::fetch(disk_store.rs:1117-1159, 2387-2433), which use the newplan_aligned_windows(:700) and shared structures.
- New shared-state machinery in
Staged:shared_segments: HashMap<SharedSegmentId, SharedSegment>,shared_windows: HashMap<SharedWindowId, SharedWindow>,next_shared_segment,next_shared_window(struct at :1161-1177).Owner::Inbound(JobId,usize)becameOwner::HostInbound(JobId,usize)+Owner::SharedSegment(SharedSegmentId)(:255-262). SharedSegment(:1021-1058): one disk-thread open file per exact(path, Header)pair, with a 5-state machineUnopened/Opening/Opened/Closing/Closed,disk_outstanding,next_disk_window,pending_page_reads: HashMap<u32,SharedWindowId>,pending_row_reads: VecDeque(becausedisk::Job::ReadRowcarries no window id, FIFO),open_error,users: HashSet<JobId>.acquire_shared_segment(:1362) attaches a new fetch to the lowest-id reusable segment for the same (path, header).SharedWindow(:1070-1100): one staged staging window (SlabPool buffers) per (path, expected Header, first, count, row), withphase: Reading/Read/Failed,disk_referenced,upload_referenced,followers: Vec<WindowFollower{record, plan_index}>,read_bytescredited per follower.plan_aligned_windows(:700-744): splits each fetch segment on absoluteWINDOW_PAGES(64-page) file boundaries instead of packing from the restore's own first uncached page, so branches with different GPU-resident prefix lengths produce identical suffix windows. Row is only placed on the chunk that ends the segment (row: row && chunk_end == end).pump_device_inbound(:1811-2266) is a new 5-pass (1, 2, 3, 4, 5a-5e) scheduler replacing the old per-record pump: reap uploads/detach; attach followers to in-flight windows within theWINDOWS_IN_FLIGHT(=2) credit; sweep unreferenced windows; start new windows (opening the shared file lazily, allocating staging slots, submitting ReadPages/ReadRow); submit per-follower GPU uploads from the shared staged buffers; detach/sweep; close segments that no longer need reads; complete fetches (last user of a shared segment waits for it to settle, i.e. Close reply, before emittingFetched).build_pending_demand(:1647) +pick_next_pending_plan(:1684): per-pump index of pending window demand across all healthy fetches (keyed by path, first, count, row -> Vec<(Header,count)>), so an arriving fetch prefers windows that siblings also need.debug_assertonly in dev.- Failure isolation:
fail_window(:1475) fails only attached followers;fail_segment_users(:1449) fails all users of a shared segment on shared Open failure, tagging witherror.with_record_read()(:1494-1520). Private child/upload errors are recorded per-record and only thatFetchedgets Err. Staged::in_flight()now returns(outbound, host_inbound + device_inbound);Staged::closeabandonedcount includes both maps (:2485-2489).- Test-support-only counters added:
disk_opens,disk_window_reads,coalesced_windowsinResources(:189-200) and accessorsStaged::disk_opens(),disk_window_reads(),coalesced_windows()behind#[cfg(any(test, feature = "test-support"))](:1213-1235), asserted by the new tests. These are the only public API additions; no re-exports or on-disk format change. - New tests (module
testsat :3897):aligned_windows_align_to_window_boundaries_for_device_coalescing(:8192),concurrent_burst_coalesces_shared_ancestor_opens_and_window_reads(:8252),staggered_arrival_attaches_out_of_order_to_in_flight_windows(:8345),different_skip_pages_coalesce_aligned_windows_to_exact_gpu_pages(:8468),private_failure_isolation_preserves_sibling_sharing_ancestor(:8580),shared_ancestor_failure_propagates_to_all_followers_without_leaks(:8692),staged_close_drains_active_coalesced_fetches_cleanly(:8789). Helperswrite_shared_ancestor_tree(:8136),poll_all_fetches(:8172). 7 coalescing tests, matching the description. plan_windowsdoc comment narrowed to "caller-owned host reads" (:677-679); the module doc (:14-25) gained the sharing paragraph.
#3 [high] Claims and evidence: #496's benchmarks, test suites, and what it does not cover
From PR #496 description (unverified against reviewers, no reviews yet):
- Benchmark: single-pass
flare runon NVIDIA GB10 (SM121),--prefix-cache-memory 0 --prefix-cache-disk /tmp/selene-disk, main425ab2d4vs this change; 8 concurrent /v1/chat/completions after restart with one ~61K warm shared prefix + 8 branches. - Physical NVMe read: 27B TP1 18,026.4 -> 4,285.8 MB (-76.2%, 4.21x); +25 ms stagger 18,093.5 -> 4,562.6 MB (-74.8%); Flash-Next TP1 7,943.7 -> 1,981.1 MB (-75.1%); Flash-Next TP1 stagger -71.7%; Flash-Next 2-host RoCE TP2 -75.2% / -71.0%; DeepSeek TP4 1,877.5 -> 1,875.2 MB (1.00x, described as reads finishing (~15 ms/rank at 47.1K) faster than tokenization so no overlap).
- Burst median TTFT: 27B simultaneous 8,483.8 -> 7,112.4 ms (-16.2%); 27B stagger -20.3%; Flash-Next TP1 3,333.5 -> 3,337.1 (no change); Flash-Next TP1 stagger -2.5%; Flash-Next TP2 -4.5% / -6.9%; DeepSeek TP4 +1.1% slower (2,456.9 -> 2,483.6).
- Author's own caveat: "measured before the linear demand-index and close-count edits covered by the unit tests below"; single-pass runs not repeated after the demand-index edit or rebase.
- Tests:
cargo test --locked --release --manifest-path selene/Cargo.toml --features test-support= 474 passed on x86_64 Linux (O_DIRECT + io_uring) atc0c4f798; all 7 coalescing tests on Windows IOCP;heliosoffload 121 passed / 8 GPU ignored;flare-cli --features roce,rdma. - Not covered:
helios FLARE_RUN_CUDA_TESTS=1, discrete PCIe GPUs, Windows serving, live CompositeStore/PooledStore GPU serving, repeated post-edit benchmarks. - Live checks: 9-fact numerical retrieval at temperature 0 — DeepSeek TP4 9/9 at 23.1K and 47.1K; Qwen3.8-27B TP1 9/9 at 30.1K but 61.3K: 8/9 on main vs 7/9 on this PR (a regression on one fact vs main, disclosed); four concurrent unique-prefix decode streams 30–45 s: 0 errors, 59.4->58.2, 96.6->96.7, 109.2->122.4 vs 118.4 no-offload, 73.6->74.1 tok/s.
- The PR description mentions "Adds
test-supportcounters" — verified:Staged::disk_opens/disk_window_reads/coalesced_windows(), cfg(any(test, feature="test-support")). - Description's companion note: merge this PR first, then rebase #497 so
Staged::pump_allruns host_inbound + pump_device_inbound ahead of writes and maintenance. - Process: opened 2026-11-24 (same day as read), 0 comments, 0 reviews, no CI checks on head f9c9191, single commit f9c91915 "Coalesce shared ancestor reads across concurrent Selene disk fetches" (2026-11-23), +2808/−914 over 2 files. Marked ready for review (state open, ready for review per orientation), no labels, no milestone.
#4 [high] Related work: stacked with #497, same-file overlap with #477/#486
- #497 (open, same author, opened same day 2026-11-24): "Reduce disk offload restore latency and integrated-memory intake overhead" — selene-spark-pipeline branch, +1163/−67 across 16 files including selene/src/disk_store.rs (+151/−10) and docs/prefix-cache-offload.md. Explicitly stacked with #496: each PR's description names the other as companion; #496 must merge first, then #497 rebases so
Staged::pump_allruns inbound queues ahead of writes/maintenance. Both base onmain425ab2d4and share the same benchmark baseline run. Overlap: both touchStaged::pump_all(in #496 it was rewritten tooutbound -> host_inbound -> pump_device_inbound; #497 wants inbound-first ordering) and both touch docs/prefix-cache-offload.md (section 2.4 area). #497 also changes disk-only intake sizing tointake_slots(layout, 1)=2*row_slots + 2*WINDOW_PAGES— i.e. staging for only two windows regardless of concurrency; #496's burst test deliberately sizes its pool the same way (crate::offload::intake_slots(&layout, 1)at disk_store.rs:8271) to show six concurrent restores share the two ancestor windows, so the two changes are complementary in intent. - #477 (open, draft, yatesdr) and #486 (open) both rewrite record files / add codecs at rest: they touch selene/src/disk_store.rs but in Store/DiskStore paths (recovery, packed windows). #477 changes
selene/src/disk.rs(record file header/checksum read) anddisk_store.rsrecovery (:1525-1541 per the autobot review on #477); no overlap with the inbound transport, but a textual conflict in the same file is likely if both land. #477 also carries an autobot "Changes Requested" review. - Historical work this builds on: #141 (host-tier eviction), #142 (hash records once, direct-I/O row reads, prompt window credits — introduced
WINDOW_CREDITS), #168 (store only what a request may resume), #413/#415/#429 (Selene pool puts, rows by role, link under any ancestor), #455 (single-process prefix checkpoints for the pool), #416 (refresh host prefix-cache recency,425ab2d4— the benchmark baseline), #92 (Selene pool across instances), #80 (move host tiers into the CUDA-free selene crate). All merged, all yatesdr. None of them coalesced concurrent disk reads; the per-restore private read path being replaced dates from #142/#168. - No issue, PR, or doc in the local copy asks for coalescing concurrent disk restores. Searches for "coalesce", "shared ancestor coalesce window", "disk restore concurrent branches duplicate reads", "prefix cache disk restore latency" returned #496, #497, #477, #486, #455, #168, #92, #429, #80 and #439 — nothing that predates #496 and requests this. The motivation appears to be the author's own benchmark observation.
- #439 (open issue, default labels area:caching/area:selene/bug): prefix-index
expiredsweep stops early — unrelated code path (index eviction), only adjacent thematically.
#6 [high] Amendment 2026-11-24 run 236: new sibling PRs and what they change about #496's merge order
Event since the 2026-11-24 run-235 report: no new comments and no new commits on #496 (pr_comments = "No comments"; single commit f9c91915 still the head; files still docs/prefix-cache-offload.md +5/−1 and selene/src/disk_store.rs +2803/−913). The change is that the surrounding PR set moved. New items:
NEW SIBLING PRs, none of which touch #496's files (so no new same-file competitor):
- #498 (FujitsuPolycom, draft, opened 2026-11-24 20:09, head 08f5c8a, +259/−16, 1 file heliopause/src/export/capture.rs): "Flush PCIe D2H tails before completion in Heliopause export downloader". Adds
Downloader::fence+flush_d2h_tail(same-stream HtoD read of ≤64 trailing bytes) before sync/event on all four D2H paths. Claims 63/400,000 corruptions without fence vs 0/400,000 with it, 51.1 vs 51.6 GB/s. Limitations: lib +--ignoredCUDA tests not yet run at 08f5c8a; noNVreg_EnablePCIERelaxedOrderingMode=0control; unrelated to the disk restore path. - #499 (FujitsuPolycom, draft, opened 20:10, head 2dab6ba, +1546/−191, 18 files ignition/helios/docs):
--row-shard-prefillplanning,RebuildManifest.row_shard_prefill = 28, PreparedReduceScatter/GatherShards and auxiliary-stream overlap wrappers in ignition/components/collectives.py. Touches docs/TODO.txt and docs/cli-design.md — not docs/prefix-cache-offload.md, not selene/. - #500 (voipmonitor, opened 20:22, head 974db22, +193/−209): ERNIE 5.5 XML tool/think parsers +
flare::pcie_all_reduce_addend_dep. Unrelated to #496. => Net effect on #496's review: same author now has four open PRs in flight (#496, #497, #498, #499), two of them drafts started ~2h after #496. Context for review load, not a correctness issue for #496.
CONCRETE AMENDMENT to the merge-order claim in the previous report (verified by reading pr/497 and pr/477, pr/486, pr/492):
- #497 does NOT contain #496's refactor. At pr/497, selene/src/disk_store.rs still has
fn pump_inbound(:1673),fn pump_all(:1691) and the textDestination::HostPacked(:1112); searching pr/497's disk_store.rs forSharedSegment|plan_aligned_windows|DeviceInboundreturns nothing. So the two PRs are independent edits of the same region, not stacked commits. - Therefore the "merge #496 first, then rebase #497" instruction costs more than a text conflict: #497 carries
staged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance(pr/497 disk_store.rs:6978, callsstaged.pump_all()at :7061/:7072/:7081) which asserts the pre-#496 singlepump_allorder. After rebasing onto #496 it must be rewritten against the newoutbound -> host_inbound -> pump_device_inboundsplit, i.e. it has to assert host_inbound and device_inbound both run ahead of writes/maintenance. Worth naming as a review item on #496: the inbound-first ordering #497 wants is now two queues in #496, so #496's own pump order is the thing that has to be right. - #477 and #486 still have the old
InboundRecordat selene/src/disk_store.rs:710 and #492 hasInboundRecordat :975 withDestination::HostPacked(:893, :1112, :1206) plusread_into_packed/write_packed. #496 deletedDestinationentirely and rewrote every inbound path, so any of the three compression PRs that merges after #496 must re-target v4 packed restores ontoDeviceInbound/SharedWindow— the packed path has no shared-window equivalent in #496 (noHostPacked, nocompleted_packedin pr/496). That is the concrete conflict risk to state; my earlier note only said "textual conflict in the same file is likely".
AUTOBOT REVIEWS now on the neighbourhood (for consistency of the process picture): #477 has a Changes Requested review (2026-11-24 17:53) with three blockers (containers stop building because selene/native/ is not shipped, multi-host ranks cannot start with compression on because the single-use decoder is bound twice, recovery deletes intact raw records); #486 and #492 were halted by Auto-Review as "low value or does not align with the project charter". #496 still has no review, no CI checks and no labels, so it remains the only Selene disk PR with no automated assessment at all.
#7 [high] Research summary
Amendments only (PR #496 itself is unchanged: still head f9c9191, single commit, no comments, no reviews, no CI).
-
What the new event actually is: nothing moved on #496; the neighbourhood did. Three new PRs opened on 2026-11-24 evening (#498 Heliopause PCIe D2H tail fence, #499 row-shard prefill planning + collectives, #500 ERNIE 5.5 parsers). #498 and #499 are both FujitsuPolycom drafts opened ~2h after #496, and neither touches selene/ or docs/prefix-cache-offload.md, so no new same-file competitor and no new charter evidence for #496 — but it is now one of four open PRs from the same author, two of them drafts.
-
Correction to my earlier merge-order claim, verified by reading the heads: #497 does NOT contain #496's refactor. At pr/497, selene/src/disk_store.rs still has
fn pump_inbound(:1673),fn pump_all(:1691) andDestination::HostPacked; a search forSharedSegment|plan_aligned_windows|DeviceInboundreturns nothing. So they are independent edits of the same region, not stacked commits, and "merge #496 first, then rebase #497" costs more than a text conflict: #497's teststaged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance(pr/497 disk_store.rs:6978, pump_all at :7061/:7072/:7081) asserts the old single-queue order and must be rewritten against #496'soutbound -> host_inbound -> pump_device_inboundsplit. This makes #496's own pump ordering a review item, not just #497's. -
Sharper conflict statement with the compression PRs. #477/#486 keep the old
InboundRecord(disk_store.rs:710) and #492 hasInboundRecord(:975) withDestination::HostPacked(:893, :1112, :1206) plusread_into_packed/write_packed. #496 deletesDestinationand every inbound path, and has no packed-host or shared-window equivalent (no HostPacked, no completed_packed at pr/496). So whichever of the three compression PRs lands after #496 must re-target v4 packed restores onto DeviceInbound/SharedWindow — a semantic port, not a textual conflict. -
Process picture: #477 now has an autobot Changes Requested review (2026-11-24 17:53) with three blockers; #486 and #492 were halted by Auto-Review as low value / off-charter. #496 remains the only Selene disk PR with no automated review, no labels and no CI checks at head.
Everything above is saved in scratchpad entry #6; the earlier report's findings (change description, benchmarks, disclosed 7/9-vs-8/9 at 61.3K, test counts, related work) stand unamended.
#8 [high] Amendments to issue in the final report (2026-11-24, run 236)
The next report must be presented as amendments only (the operator asked: "Output only the amendments, do not re-iterate your entire previous report"). Use these four items verbatim in substance; they replace nothing in entry #5, which stands unamended.
-
What the new event actually is: nothing moved on #496 itself (still head f9c9191, single commit f9c91915, 0 comments, 0 reviews, no CI checks, 2 files / +2808−914). The neighbourhood moved. Three PRs opened on 2026-11-24 evening: #498 "Flush PCIe D2H tails before completion in Heliopause export downloader" (FujitsuPolycom, draft, 20:09, +259/−16, heliopause/src/export/capture.rs only), #499 "recipe-declared row-sharded prefill planning and PCIe DMA / RoCE row-shard collectives" (FujitsuPolycom, draft, 20:10, +1546/−191, 18 files, docs/TODO.txt + docs/cli-design.md, no selene/), #500 ERNIE 5.5 XML tool/think parsers +
flare::pcie_all_reduce_addend_dep(voipmonitor, 20:22, +193/−209). None touches selene/ or docs/prefix-cache-offload.md, so no new same-file competitor and no new charter evidence for #496; but #496 is now one of four open PRs from FujitsuPolycom, two of them drafts started ~2h after it. -
Correction to the merge-order claim. #497 does NOT contain #496's refactor — verified at pr/497: selene/src/disk_store.rs still has
fn pump_inbound(:1673),fn pump_all(:1691) andDestination::HostPacked(:1112); a search forSharedSegment|plan_aligned_windows|DeviceInboundreturns nothing. They are independent edits of the same region, not stacked commits. So "merge #496 first, then rebase #497" costs more than a textual conflict: #497's teststaged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance(pr/497 disk_store.rs:6978;staged.pump_all()at :7061/:7072/:7081) asserts the old single-queue order and must be rewritten against #496'soutbound -> host_inbound -> pump_device_inboundsplit. Consequence: #496's own pump ordering is a review item in its own right, not just a rebase chore for #497 — the inbound-first ordering #497 wants is two queues after #496. -
Sharper conflict statement with the compression PRs. #477 and #486 keep the old
InboundRecord(selene/src/disk_store.rs:710); #492 hasInboundRecord(:975) plusDestination::HostPacked(:893, :1112, :1206) andread_into_packed/write_packed. #496 deletesDestinationoutright, rewrites every inbound path, and has no packed-host or shared-window equivalent (no HostPacked, no completed_packed at pr/496). Whichever compression PR lands after #496 must therefore re-target v4 packed restores onto DeviceInbound/SharedWindow — a semantic port, not a textual conflict. This supersedes the softer "a textual conflict in the same file is likely" wording in entry #4. -
Process picture around it: #477 now has an autobot Changes Requested review (2026-11-24 17:53) with three blockers (container images stop building because selene/native/ is not shipped; multi-host ranks cannot start with compression on because the single-use decoder is bound twice; recovery deletes intact raw records). #486 and #492 were halted by Auto-Review as "low value or does not align with the project charter". #496 remains the only Selene disk PR with no automated review, no labels and no CI at head — so the review gap is now conspicuous rather than merely early.
#11 [high] Amendment 2026-11-25 run 238: #496 head moved to 0c04b1e2, autobot review landed, blocker answered
Event since run 237: PR #496 moved. This is the first real movement on #496 itself.
New state (read_item 496, updated 2026-11-25 02:41):
- head 0c04b1e2 (branch selene-disk-ancestor-coalescing), was f9c91915. Rebased onto main c0c4f798 and force-pushed as one commit (same subject "Coalesce shared ancestor reads across concurrent Selene disk fetches").
- Files: now 3, +3358/−933 — docs/prefix-cache-offload.md (+35/−2), selene/src/disk_store.rs (+3313/−931), selene/src/shard.rs (+10/−0, NEW). Previously 2 files, +2808/−914.
- 3 comments now (0 before): autobot case-file notice (20:34), autobot review (21:23, Changes Requested), author's response (02:41).
- Review verdict: recommendation Changes Requested; approach endorsed ("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. This closes the previous report's "review gap is conspicuous" finding — #496 is now reviewed on the same footing as #477/#486/#492/#497.
Blocker B1 (61.3K retrieval): the 8/9-vs-7/9 disclosure is gone from the description and replaced by a 5-repeat seed-controlled parity check: one shared 60,534-token disk checkpoint, seeds 1234..1238, top_logprobs=5, main c0c4f798 vs 0c04b1e2 → identical FP32 top-5 logprobs and token IDs, per-seed retrieval scores 6/9==6/9, 8/9==8/9, 7/9==7/9, 9/9==9/9, 4/9==4/9. Mechanism claimed and independently verified by me in main: helios/src/model.rs:230-234 rejects temperature == 0 ("unsupported because greedy decoding incorrectly collapses..."), and helios/src/server/request.rs:643-666 (sampling_number) clamps request values into the declared SamplingRange; helios/src/server/config.rs:789 asserts temperature 0 → 0.5 for a 0.5..1.5 range. So the original "temperature=0" check was never greedy — it ran at the clamped positive temperature, i.e. the 8/9 vs 7/9 gap was sampling noise plus differing prompt nonces, not a coalescing bug. Also added unit test misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore (selene/src/disk_store.rs:8909-9105) which is exactly the site the review named: leader skip_pages=0 vs follower skip_pages=13, partial <64-page ancestor tail + partial leaf chunk with row=true, compared byte-for-byte against a private single-restore baseline store; asserts disk_opens()==3 (parent reopened for B's unaligned head), coalesced_windows()==2.
Residual on B1: the review asked to "report variance and the differing fact"; the response reports per-seed variance and re-explains the mismatch as nonces+sampling but never names which fact differed; the parity result is 1 model / 1 checkpoint / 1 prompt / TP1 / 5 seeds, i.e. a per-seed match, not a statistical claim.
#12 [high] Amendment run 238: how 0c04b1e2 answers the autobot should-fix items (and what it only half-fixes)
Verified at head 0c04b1e2 (selene/src/disk_store.rs line numbers at head):
Met:
- S4:
plan_aligned_windowsis gone; singlefn plan_windows(segments, align_to_window: bool)with doc comment (:679-727), device fetch usestrue,read_intousesfalse(:1349).WindowKey/SegmentKey/HeaderIdentity(Arc<Header>)+window_index: HashMap<WindowKey, SharedWindowId>(:1052-1060, :1229) andbuild_pending_demand -> HashMap<WindowKey, usize>(:1758+). Autobot's five hand-written key sites collapsed to one type. - S5:
has_window_credit(:1683) andattach_pending(:1711) extracted; Pass 2 / Pass 4 both call them (:1917-1930, :1946-1957). - S2 rustdoc: module doc rewritten (:14-27) — no longer says "Nothing here waits"/"at most WINDOWS_IN_FLIGHT windows of one record", now describes per-fetch credits, out-of-order plans, shared handle + aligned windows, and the close-before-Fetched invariant.
free_slotshas its own doc andallocate's rustdoc is back onallocate(:236-243). - S2 docs: docs/prefix-cache-offload.md §2.4 now carries the real signatures (
write_from(id, header, temporary, path, pages, row, sums)/read_into(id, path, expected, first_page, pages, row)— both match code at :1308/:1334), WINDOW_PAGES file-boundary alignment, immutable+pinned+close-before-Fetched, the two limits, failure-isolation scope and physical-rate/logical-bytes (docs:337-366); plus a duplicate 5-line restatement in §4 (docs:1528-1532). - S3: benchmark table re-measured at head vs main
c0c4f798; 27B rows are means over 2 interleaved repeats; the "existing users pay per-pump demand indexing" claim is now stated as an expected bound with thedevice_inbound.len() <= 1fast path; the 2-host RoCE and DeepSeek TP4 rows were dropped and moved to "Not covered". - Nits partly:
PlanStatereplaced bystarted: Vec<bool>; counters gated#[cfg(any(test, feature = "test-support"))](:200-208, :1283-1295); duplicatepath/expectedremoved fromSharedWindow/DeviceSegmentRef;settled()remains strict and now also requires shared_segments/shared_windows/window_index empty (:6350-6360).
Only half-met / still open:
- Close accounting (autobot nit):
fn close(:2503-2545) still formats "{abandoned} disk transport jobs did not complete" butabandoned = store_jobs.max(internal)where internal = max(owners.len, maintenance.len, shared_segments.len, shared_windows.len). Mixing heterogeneous things under one max means the number can be too high or too low and cannot be used to diagnose; the misleading message survives unchanged. GatedCopier::wrapstill returns a positional 4-tuple (type GatedCopierParts = (SharedCopier, Arc<Mutex<bool>>, Arc<Mutex<VecDeque<Reply>>>, Arc<Mutex<Option<JobId>>>)) — nit not taken.- Docs readability got worse, not better: §2.4 now holds one ~30-line paragraph mixing mechanism, invariants, scheduling policy, failure isolation and metering (docs:337-366), and §4 repeats the bytes_in/inbound_rate sentence. The review asked for these facts to be documented; it did not ask for a single unbroken block.
- Naming-axis point of the module doc/§2.4 ("host_inbound" vs "device_inbound" vs "caller-owned"/"GPU") persists.
#13 [high] Amendment run 238: neighbourhood moved — #498/#499 merged, #504 is a new same-file competitor carrying the packed path
Corrections to the run-237 related-work picture:
-
#498 and #499 are no longer open — they merged.
search_itemswith state=merged returns "#498 pull request (merged) Flush PCIe D2H tails before completion in Heliopause export downloader" and "#499 pull request (merged) feat(ignition): add recipe-declared row-sharded prefill planning and PCIe DMA / RoCE row-shard collectives", both by FujitsuPolycom.search_history mainconfirms the merge commits040f39ff(#498) andd0adb958(#499) are in main, and main's tip is now84ac035c("Remove --collective-tuning..." Luke Alonso). So the run-237 statement "#496 is now one of four open PRs from the same author" is out of date: #496 and #497 are the author's only open Selene items, and #496's rebase basec0c4f798is already behind main again (three main-side commits since: 040f39ff, d3aa/3aa74200 #491, 6426cfc0, 84ac035c — none in selene/ or docs/prefix-cache-offload.md, so still no semantic conflict, only a stale base and a stale benchmark reference). -
NEW same-file competitor: #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).
items_touching selene/src/disk_store.rsanditems_touching docs/prefix-cache-offload.mdboth list it. This overturns the run-237 finding "no new same-file competitor". At pr/504selene/src/disk_store.rsstill has the pre-#496 shape:enum Destination(:881) withDestination::HostPacked(:1112, :1206),struct InboundRecord(:975),fn pump_inbound(:1673),fn pump_all(:1691),pub fn read_into_packed(:1502),pub fn read_into(:1551) — and NOSharedSegment/DeviceInbound/WindowKey. It also grewHeader.packed: Option<Arc<packed::Layout>>(selene/src/shared/record.rs:126) and includespackedinHeader'sPartialEq(:145). That last point is a concrete, new #496-specific defect risk: #496'sHeaderIdentity::hash(selene/src/disk_store.rs:1014-1049) destructuresHeaderfield-by-field and hashes exactly the fieldsHeader::eqcompares as of main today. Once any compression PR lands,Headergainspacked,eqcompares it, and #496's hand-writtenHashsilently omits it — two headers differing only inpackedcollide into oneSegmentKey, i.e. a packed and a raw record of the same path/chain could be treated as the same shared segment. #496 also has noread_into_packed/HostPackedequivalent, so #504's packed disk restores have nowhere to live onDeviceInbound/SharedWindow. This is the sharpened version of the run-236/#496 finding 3 claim, now with a named PR and a named failure mode. #504 itself got an autobot Changes Requested review (2026-11-25 03:28) with 3 blockers, 5+ should-fix and 10 nits, including "stop pruning readable records" and a wrong GKV1 protocol spec — i.e. it is nowhere near merge, but it is the largest open consumer of the code #496 rewrites. -
#497 also moved and is now reviewed: force-pushed to
cd5a366b(+1400/−119), autobot Changes Requested (2026-11-24 21:36), author response at 02:41. Two points that change what the next report should say about merge order:- #497's
pump_allis no longer a plain reorder: it keeps maintenance first but bounded —MAINTENANCE_DEFER_LIMIT = 8(:66),maintenance_deferredfield (:1019), andpump_all(:1212-1243) submits maintenance only when the counter reaches the limit, then inbound (sortedJobIds), then outbound, then drains maintenance while queue space remains, resetting the counter whenever it submitted. So the reconciliation with #496'spump_all(selene/src/disk_store.rs:2291-2312 at #496 head: maintenance unbounded → outbound → host_inbound → device_inbound) is a three-way merge of policy, not just moving two calls ahead. - #497 still has the un-unified planner:
fn plan_windows(segments: impl IntoIterator<Item = (u32, usize, bool)>)+WindowPlanat pr/497:671, called at :1101/:1369/:5178/:5201/:5204/:5207/:5208. After #496'splan_windows(segments, align_to_window), every one of those 7 call sites needs the new argument — so the "whichever merges second reconciles pump_all" sentence in both descriptions understates the rebase: it is pump policy plus the planner signature plusstaged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance(pr/497:7003, still written against the single-queue shape).
- #497's
#14 [high] FINAL amendment text for run 238 report (output = amendments only)
Report must be amendments only (operator instruction). Carry these, superseding the corresponding run-237 findings (#10) and run-236 (#8).
A1. #496 itself moved for the first time. head f9c91915 → 0c04b1e2 (rebased onto main c0c4f798, force-pushed, same commit subject "Coalesce shared ancestor reads across concurrent Selene disk fetches"). Files 2 → 3, +2808/−914 → +3358/−933: docs/prefix-cache-offload.md (+35/−2), selene/src/disk_store.rs (+3313/−931), and NEW selene/src/shard.rs (+10/−0). Comments 0 → 3. The "0 comments / 0 reviews / no CI / review gap conspicuous" findings (#10 finding 5, #8 item 4) are RETIRED: #496 now has an autobot review (2026-11-24 21:23, Changes Requested) that explicitly endorses 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"), plus an author response (2026-11-25 02:41). Review structure: 1 blocker, 5 should-fix, 4 nits.
A2. The blocker (61.3K retrieval) is answered, and the answer holds up. The disclosed 8/9-vs-7/9 dip 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, main (c0c4f798) vs 0c04b1e2 → identical FP32 top-5 logprobs and token IDs, per-seed scores 6/9, 8/9, 7/9, 9/9, 4/9 matching on both builds. Premise independently verified by me: helios/src/model.rs:230-234 rejects temperature == 0 ("unsupported because greedy decoding incorrectly collapses...") and helios/src/server/request.rs:643-666 (sampling_number) clamps into the declared SamplingRange (helios/src/server/config.rs:789 asserts 0 → 0.5 for a 0.5..1.5 range). So the original "temperature=0" check was never greedy — the old gap was sampling noise plus differing per-build prompt nonces, not a coalescing bug. The review's named suspect site got a dedicated unit test: misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore (selene/src/disk_store.rs:8909-9105) — leader skip_pages=0 vs follower skip_pages=13, partial <64-page ancestor tail plus partial leaf chunk with row=true, byte-compared against a private single-restore baseline store; asserts disk_opens()==3 (parent reopened for the follower's unaligned head) and coalesced_windows()==2. Residual: parity is 1 model / 1 checkpoint / 1 prompt / TP1 / 5 seeds, and the "differing fact" the review asked to name is never named.
A3. Should-fix items: 4 of 5 met at head, 2 items only half-met. Met: plan_aligned_windows folded back into one plan_windows(segments, align_to_window) (:679-727, device fetch true at :1349 region / read_into false at :1349); WindowKey/SegmentKey/HeaderIdentity(Arc<Header>) + O(1) window_index: HashMap<WindowKey, SharedWindowId> (:1001-1060, :1229) and HashMap<WindowKey, usize> demand counts; has_window_credit (:1683) and attach_pending (:1711) extracted, Pass 2/Pass 4 both call them; module doc rewritten (:14-27 — no longer "at most WINDOWS_IN_FLIGHT windows" / "Nothing here waits") and Resources::allocate's rustdoc restored above allocate with a separate doc line on free_slots (:236-243); plan_aligned_windows/PlanState/allow(dead_code) are gone from the file. Docs §2.4 now carries the real signatures (matching code at :1308 write_from / :1334 read_into), WINDOW_PAGES file-boundary alignment, immutable+pinned+close-before-Fetched, both coalescing limits, failure-isolation scope and physical-rate/logical-bytes (docs:337-366), repeated again at docs:1528-1532 (§4). Benchmarks re-measured at head, 27B rows means over 2 interleaved repeats, and the single-restore cost restated as an expected bound naming build_pending_demand's device_inbound.len() <= 1 fast path.
Half-met: (i) Staged::close still reports "{abandoned} disk transport jobs did not complete" where abandoned = store_jobs.max(internal) and internal = max(owners.len, maintenance.len, shared_segments.len, shared_windows.len) (selene/src/disk_store.rs:2513-2544) — message unchanged, and a max over heterogeneous quantities cannot be used to diagnose; (ii) the §2.4 rewrite is one ~30-line unbroken paragraph plus a §4 duplicate, so completeness improved while readability regressed. Nits not taken: GatedCopier::wrap still returns a positional 4-tuple (type GatedCopierParts = (SharedCopier, Arc<Mutex<bool>>, Arc<Mutex<VecDeque<Reply>>>, Arc<Mutex<Option<JobId>>>)).
A4. New same-file competitor, and a concrete hazard it exposes. items_touching selene/src/disk_store.rs now lists #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) — retracting #10's "no new same-file competitor". 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. Worse than a textual conflict: #504 adds Header.packed: Option<Arc<packed::Layout>> (selene/src/shared/record.rs:126) and compares it in Header::eq (:145), while #496's hand-written HeaderIdentity::hash (selene/src/disk_store.rs:1014-1049) destructures Header field-by-field and hashes exactly the fields eq compares today. After any compression PR lands, Hash silently omits packed, so two headers differing only in packed collide into one SegmentKey/WindowKey — a packed and a raw record could share one staging segment. And #496 has no packed-host equivalent, so #504's packed disk restores have nowhere to live on DeviceInbound/SharedWindow. (#504 is far from merge: autobot Changes Requested 2026-11-25 03:28, 3 blockers including "stop pruning readable records".)
A5. Merge order with #497 is a policy three-way merge, not a call move. #497 was force-pushed to cd5a366b (+1400/−119) and now keeps maintenance first but bounded: MAINTENANCE_DEFER_LIMIT = 8 (pr/497:66), maintenance_deferred (:1019), pump_all (:1212-1243) = deferred maintenance → sorted inbound → outbound → drain maintenance while queue space remains. #496's pump_all (selene/src/disk_store.rs:2291-2312) = unbounded maintenance → outbound → host_inbound → device_inbound. So "whichever merges second reconciles pump_all" (both descriptions) is understated three ways: the bounded-deferral policy must be reconciled; staged_pump_all_prioritizes_inbound_ahead_of_outbound_and_maintenance (pr/497:7003) still asserts the single-queue shape; and #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 new align_to_window argument. Also #496's rebase base c0c4f798 is stale again: main is at 84ac035c, with 040f39ff (#498), 3aa74200 (#491), 6426cfc0 and 84ac035c since — none touching selene/ or docs/prefix-cache-offload.md, so no semantic conflict, but the base and the benchmark's "main" reference are both behind.
A6. Neighbourhood correction. #498 and #499 are MERGED (search_items merged; merge commits 040f39ff and d0adb958 in search_history main), so #496 and #497 are now the author's only open Selene PRs — retracting #10's "one of four open PRs from the same author, two of them drafts". #500 (voipmonitor) remains open and unrelated (ERNIE XML/think parsers + flare::pcie_all_reduce_addend_dep). No charter evidence has appeared for #496 in any of these. Against the charter: "bring real evidence … benchmarks showing an actual speedup over main on a served workload (#210)" is now satisfied better than before (head-commit, repeated, served-workload TTFT), and the sign-off-requiring non-goals (broad production coverage, rack-scale/disaggregation) are not engaged. #496 remains the only one of the five Selene disk PRs whose autobot verdict starts from "the approach belongs in the repo".
Benchmark numbers to quote (from the refreshed description; I verified internal consistency only): 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, 6.02 GB/s 8-way staggered (27B); bytes_in logical, 8x single. Tests at head: 476 Linux selene, 13 Windows IOCP, 21 single-GPU SM121 helios offload::, test_core_boundary.py. Still not covered: multi-host RoCE serving, 2-GPU split_pools, discrete PCIe GPUs, Windows serving, live CompositeStore/PooledStore GPU serving.
Coverage this run (every orientation lead followed): PR description (changed), comments/reviews (3, changed), commits (new head), 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), and the run-236 #498 lead followed to completion — now merged into main and still not touching the Selene restore path, so still not relevant to #496.
Also worth one line: selene/src/shard.rs became a changed file this run (+10/−0, three hunks). I checked all three: Kind::of gets an unreachable! arm for InboundWindowSample (:476-478) and absorb_local re-queues those events instead of forwarding (:722-725), so rank 0 keeps its rate samples and peers drop them (:1148-1150 in Peer::forward). Consistent with the description; no defect found in the new file. Note the unreachable! guard depends on absorb_local/Peer::forward filtering first — any future caller of Kind::of on a raw TransportEvent stream would panic rather than mishandle a sample.
#2 [medium] Change: docs/prefix-cache-offload.md section 2.4 edit
docs/prefix-cache-offload.md, +5/−1, at the paragraph describing Staged in section 2.4 (the Disk transport). Added text: "Concurrent fetch jobs reading the same record file share one open file handle and coalesce aligned 64-page windows while staged so one disk read fans out to each attached fetch's GPU upload before its staging slots are released; caller-owned read_into reads run independently." Previous sentence about read_into moving records between files and caller-owned registered slots kept. This matches the description's claim that section 2.4 is updated. No other doc touched (AGENTS.md, design-review docs untouched).
#9 [medium] Coverage this run: every angle re-checked, no other changes found
Angles re-checked for the amendment pass (all confirm the run-235 findings rather than changing them):
- PR body / description: unchanged (read_item 496, updated 2026-11-24 18:13, same benchmark table, same 7/9-vs-8/9 61.3K disclosure, same "measured before the linear demand-index and close-count edits" caveat).
- Comments and reviews:
pr_comments= "No comments"; no inline reviews. - Commits:
search_historyat pr/496 still shows only f9c91915 on top of main; main has since gained c0c4f798 ("Remove redundant RegistryDwords EnableResizableBar check in flare doctor", unrelated file flare-cli/src/doctor.rs) — the only main-side commit after #496's base 425ab2d4 that is not already in the reported history, and it does not touch selene/ or the doc. - Files:
pr_files= docs/prefix-cache-offload.md (+5/−1) and selene/src/disk_store.rs (+2803/−913), unchanged; docs diff still the section-2.4 paragraph only. - Same-file competitors:
items_touching selene/src/disk_store.rsanddocs/prefix-cache-offload.md— #497, #477, #486, #492 still the only open ones; #498/#499/#500 do not appear. - New same-day items scanned: #494 and #495 (scheduler fixes, autobot reviews), #491 (collectives), #498, #499, #500 — none touches Selene disk restore.
- Lead judged not relevant: #498's PCIe D2H tail-fence bug is real corruption in Heliopause export under Relaxed Ordering, but it is the export downloader path, not the Selene staged restore path, and #496 does not change D2H copy semantics; noted so the report can say the lead was followed and dismissed.
- Also not relevant: #492's own text was previously read as a same-file conflict; it is, but only via the packed-host restore path described in entry #6 item 3. Nothing in the charter, the doc, or the tests changed for #496, so the run-235 body (change description, benchmark claims, uncovered areas, related work) needs no rewrite — only the additions in entry #6.