Code review summary scratchpad · NVIDIA/hyperflare-inference #496

Raw Markdown for agents: https://autobot.eidonix.com/p/45764556-facc-424b-99f5-12fe66778524.md

#1 [high] PR #496 overview: coalesced Selene disk reads — evidence and architecture

PR #496 "Coalesce shared ancestor reads across concurrent Selene disk fetches" by FujitsuPolycom, head f9c9191, base main, 2 files +2808/-914 (selene/src/disk_store.rs +2803/-913; docs/prefix-cache-offload.md +5/-1). Only comment is the autobot case-file notice; no human review yet.

What: splits Staged's read path — caller-owned host reads (read_into, host_inbound) stay private/unchanged; GPU restores (fetch, pump_device_inbound) share one disk-thread file handle per (path, expected Header) and one staged window per (path, header, first, count, row); segments are sliced on 64-page WINDOW_PAGES file boundaries (plan_aligned_windows) so restores with different skip_pages produce identical suffix windows; windows are ref-counted (disk_referenced/upload_referenced/followers); last user waits for close (settled) before Fetched.

Evidence: benchmark table on GB10 SM121 single-pass flare run vs main 425ab2d4, physical NVMe bytes 18,026->4,286 MB (4.21x), 18,093->4,563 (3.97x), Flash-Next 7,944->1,981 (4.01x), 3.54x, 2-host RoCE 4.04x/3.45x, DeepSeek TP4 1.00x; TTFT medians reported. Unit suites at c0c4f798 (474 tests), 7 coalescing tests also on Windows IOCP. Live SM121 checks include the Qwen3.8-27B TP1 61.3K regression 8/9 -> 7/9. Description discloses: benchmark measured BEFORE the linear demand-index and close-count edits; single-pass SM121 runs not repeated after edits.

Scope verdict (architecture lens): belongs — charter "What gets merged" allows a measured performance issue; AGENTS.md:165-166; goal "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene". No new flags/env/knobs, no format/Header change, no per-model branch, failure isolation preserved (private errors fail one restore; shared record_read errors fail all attached after drain, TransportEvent::Fetched still routes record_read to index.drop_row).

#2 [high] Finding: logical vs physical bytes conflated -> inbound_rate inflation

selene/src/disk_store.rs: SharedWindow.read_bytes accumulates physical reply bytes once per window (:1530 win.read_bytes += reply.bytes, init :1979); every follower completing an upload adds the WHOLE window to its own record (:1829 record.bytes += win.read_bytes). Per-record bytes become the Ok payload of TransportEvent::Fetched (:2235 None => Ok(record.bytes)), consumed in DiskStore::apply as self.stats.bytes_in += bytes (:3626) and self.inbound_rate.observe(*bytes, job.started.elapsed()) (:3628).

Why it matters: inbound_rate is an input to admission, not just a stat. DiskStore::hit uses bytes as f64 / self.inbound_rate.get().max(1.0) for estimated_seconds (:3587); selene/src/store.rs:423-438 worth_fetching/worth_transfer compares it to prefill cost; consumers helios/src/server/runtime.rs:2772 and helios/src/server/metrics.rs:532. Under a coalesced burst the rate sample divides ~logical bytes by ~4x shorter physical elapsed time, inflating inbound_rate by roughly the fan-out (PR's own table: 4.21x, 3.97x, 4.01x). A later lone restore that will NOT be coalesced is then under-priced and may be fetched when prefill was cheaper. Also stats.bytes_in shows no reduction at all, so the headline physical-read win is invisible in operator counters; docs/prefix-cache-offload.md:1501-1502 defines "Inbound latency" and "Copy-out bandwidth" as coming from store counters.

Fix direction: observe the rate from physical window bytes (count a window once at window/segment completion), keep bytes_in as logical restored bytes and document the distinction; add a test comparing StoreStats.inbound_rate for 1 vs 8 concurrent restores of the same prefix against measured device bytes.

#3 [high] Finding: unexplained accuracy regression 8/9 -> 7/9 at 61.3K

PR #496 description "Live SM121 checks": Qwen3.8-27B-NVFP4 TP1, 9-fact numerical retrieval, temperature=0, cold-VRAM restart: main 9/9 at 30.1K, and at 61.3K main 8/9 (or 8/9->7/9 on the retrieval prompt) vs THIS PR 7/9. Everything else claimed byte-exact (DeepSeek TP4 9/9 at 23.1K/47.1K). No conclusion offered ("recipe-clamped").

Why it matters: it is the only end-to-end check exercising the shared-window fan-out on a real model, and it is the one that got worse. Deterministic temperature=0 means it is a real answer change unless the harness is noisy. AGENTS.md:106-108 requires explaining differences between runs and keeping material failures visible.

Possible defect sites if real: plan_aligned_windows offset/count mapping for a follower whose first page is not 64-aligned (selene/src/disk_store.rs:700-738), and the trailing partial chunk / row flag (row && chunk_end == end, :730). Suggested test: follower attaches to an already-created shared window with non-64-multiple skip_pages plus a shared final partial chunk, asserting byte-exact device pages/row vs the private path.

Fix requested: re-run the 61.3K prompt N times on both revisions and report variance/name the differing fact and the conclusion, or move the check under "Not covered" as inconclusive. Severity: should fix (may collapse to a description fix).

#4 [high] Findings: docs §2.4 overstates mechanism, stale signatures, misplaced rustdoc

  1. docs/prefix-cache-offload.md:337-342 (+5/-1). New sentence: "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." Missing: (a) the two material limits the PR description itself discloses — a window already released before a later arrival attaches is read again, and skip_pages % WINDOW_PAGES != 0 splits up to one extra partial window (AGENTS.md:194-199 material limitations); (b) the invariant that licenses sharing (records immutable + pinned in DiskStore for the life of every restore) — design-review principle 16 "no hidden context"; it exists only in the PR conversation. (c) "aligned 64-page" doesn't say aligned to what: absolute file page boundaries (they're WINDOW_PAGES, defined at docs:85 / referenced at docs:398 "windows of at most 64 pages plus the multi-slot row"). (d) Same paragraph keeps stale signatures write_from(key, metadata, buffers) / read_into(key, buffers); actual signatures are write_from(id, header, temporary, path, pages, row, sums) at selene/src/disk_store.rs:1242-1251 and read_into(id, path, expected, first_page, pages, row) at :1268-1276 (pre-existing, but the sentence is being edited). (e) One 60-word sentence carries three behaviours; repo doc style elsewhere is one behaviour per sentence (compare docs:328-336). Also failure-scope (shared open/read error fails all attached; private child/upload error fails one) is in the PR body but not in §2.4 or the §2.12 invariants list (docs:853).

  2. Module doc selene/src/disk_store.rs:14-24: says "at most [WINDOWS_IN_FLIGHT] windows of one record staged at a time" and "Nothing here waits", but device restores now hold shared windows past their own completion until followers finish and can be complete-but-not-reported while waiting for seg.settled() (:2221-2232). Header should state the two-window credit, follower sharing, and settle-before-Fetched.

  3. Misplaced rustdoc selene/src/disk_store.rs:228-234: the comment for Resources::allocate ("Slots for pages page records and, when row, all row pieces; None leaves the pool unchanged...") now sits above free_slots, which takes no arguments — published docs are wrong and allocate (the subtle all-or-nothing contract) is undocumented. On main the comment is above allocate (main selene/src/disk_store.rs:216-218). Fix: move it back; give free_slots a one-liner.

#5 [high] Findings: duplication, unnamed window key, per-pump cost, redundant state, counters

A) plan_aligned_windows (selene/src/disk_store.rs:700-738) duplicates plan_windows (:670-695): same signature impl IntoIterator<Item=(u32,usize,bool)> -> Vec<WindowPlan>, same WindowPlan fields, same row-on-last-window and pages==0/row-only rules; only difference is chunk end clamped to ((cursor / WINDOW_PAGES) + 1) * WINDOW_PAGES (:721-722). Identical output when first is aligned — i.e. the divergence is exactly the misaligned-skip_pages case the new tests cover. selene/src/memory.rs:1333-1367 windows() is a third expression of the same splitter policy. Charter line: "look for the smallest footprint in shared code". Fix: give plan_windows an alignment parameter and delete the copy (or use plan_aligned_windows for read_into too — the only test asserting host split points is windows_split_segments_at_the_window_size_and_carry_the_row_last at :6221-6253).

B) Shared-window identity re-expressed five times, never named: acquire_shared_segment lookup (:1368-1373), find_reusable_window field compare (:1578-1583), demand map key (PathBuf,u32,usize,bool) + inner Vec<(Header,usize)> linear scan in build_pending_demand (:1647-1679), same key rebuilt in pick_next_pending_plan (:1705-1718), and twice in the decrement blocks (:1890-1899, :1996-2006). Header derives PartialEq/Eq only, no Hash (selene/src/shared/record.rs:136-154). Fix: one WindowKey { path: Arc<Path>, expected/digest, first, count, row } next to SharedWindowId/SharedSegmentId (:1000-1003).

C) Per-pump alloc + quadratic scan in the attach path: PathBuf clone per pending plan (:1668), per candidate in pick_next_pending_plan (:1710), again in both decrement blocks; find_reusable_window scans every shared_windows value per pending plan (:1576-1599) and is called from find_best_existing_window_for (:1602-1624) inside the attach loops. The PR itself adds the indexed precedent (pending_page_reads, :1030). Fix: HashMap<WindowKey, SharedWindowId> beside shared_windows, and store shared segment id / Arc in DeviceSegmentRef (:1108-1113) instead of PathBuf.

D) attach loop written twice + credit check three times: Pass 2 (:1845-1861) and Pass 4 (:1874-1903) duplicate the same needs_credit closure (record.error.is_none() && record.active.len() < WINDOWS_IN_FLIGHT, :1847-1852 and :1876-1881, again inline at :2122-2124) and the find_best_existing_window_for+attach_existing_window loop; Pass 4 only adds the demand decrement. Fix: fn has_window_credit(&self, id) -> bool and fn attach_pending(&mut self, id, demand: Option<&mut Demand>) -> bool.

E) Smaller-than-needed state: host inbound modelled as Vec with always-zero index (Owner::HostInbound(id, usize) :258, read_into inserts Owner::HostInbound(id,0) :1285, single-element vec :1293-1294, apply_disk tolerates missing segment :799-801, pump loops :875/892/978) → single Segment + Owner::HostInbound(JobId) removes Segment::reads_left (:649, decremented :832, compared :877 where self.done == self.plans.len() at :892 already covers it). PlanState::Done (:1093-1098) is never branched on — every read is != Pending (:1606, :1660, :1698) or == Pending (:1796); Done is only assigned (:1833) — a started: Vec would do. SharedWindow duplicates segment identity: path/expected (:1073-1074) repeat SharedSegment.path/expected (:1024-1025) and are compared at :1582-1583 plus cloned per window at :1966-1967; comparing win.segment == seg_id would drop both fields. Also SharedWindow.id/SharedSegment.id duplicate their HashMap keys (:1071 vs :1961).

F) Test-only counters: disk_opens/disk_window_reads/coalesced_windows fields on always-compiled Resources with #[cfg_attr(not(any(test, feature="test-support")), allow(dead_code))] (:192-200; the only three uses of that attribute in selene/src — verified by search). Crate convention is to compile the whole member out: selene/src/disk.rs:104-116 Faults under #[cfg(any(test, feature="test-support"))]. Accessors already gated (:1213-1236). They also exist outside StoreStats (selene/src/store.rs:185-244), the crate's declared home for counters; StoreStats has disk_records/disk_bytes/inbound_rate/outbound_rate but no physical-open or coalesced-window counters, and docs:1501-1502 gates qualification on store counters. Fix: gate the fields; consider a follow-up adding disk_opens/coalesced_windows to StoreStats.

#9 [high] DELIVERABLE: full report for PR #496

========================================================= FULL REPORT — PR #496 (head f9c9191, base main, +2808/-914)

BLOCKERS

  1. Resolve the 61.3K deterministic retrieval result before merge.

SHOULD FIX

  1. Coalesced reads double-count bytes into the measured inbound rate, which prices future restores.
  1. Docs and rustdoc overstate the mechanism and drop the invariant that licenses it.
  1. Tie the benchmark to the code under review, and stop presenting expected costs as results.
  1. One window planner, one window identity.
  1. Remove the per-pump allocation and quadratic scan in the attach path, and the duplicated attach loop.
  1. Record the design decision for the new shared inbound lifecycle.

NITS

  1. Staged::close under-reports abandoned work (selene/src/disk_store.rs:2485-2489 vs busy() :2344-2351). It sums the four job pipelines then takes .max(usize::from(self.busy())), and busy() is also true for a non-empty shared_segments, shared_windows or owners — a leaked window or segment alone reports "1 disk transport jobs did not complete". The old code counted owners.len() (main selene/src/disk_store.rs:1419). Count owned disk jobs, or reword the message to what is counted.
  2. The three new counters are compiled into release behind #[cfg_attr(not(any(test, feature = "test-support")), allow(dead_code))] on the fields (:192-200) while their accessors are already cfg-gated (:1213-1236); the only three uses of that attribute in selene/src. The crate's convention is to compile the member out (selene/src/disk.rs:104-116 Faults). Gate the fields and increments the same way. Related: disk_opens / disk_window_reads / coalesced_windows live outside StoreStats (selene/src/store.rs:185-244), the declared home for counters that docs:1501-1502 gates qualification on — worth a follow-up adding disk_opens and coalesced_windows there.
  3. GatedCopier returns a positional four-tuple of Arc<Mutex<..>> handles that every call site destructures (:8059-8064, :8364, :8488, :8608), where the crate's fixtures in selene/src/testing.rs (StoppedCopier :178, SimulatedGpu :225) return named two-element pairs; six coalescing tests also repeat the same pool/store construction although write_shared_ancestor_tree (:8136) and poll_all_fetches (:8172) already exist. Use a named struct and one store_for_fixture helper.
  4. Redundant state to drop: PlanState::Done is never branched on — every read is != Pending (:1606, :1660, :1698) or == Pending (:1796) and Done is only assigned (:1833), so a started flag suffices. HostInbound is a Vec<Segment> of length one with an always-zero index (Owner::HostInbound(JobId, usize) :258, :1285, :1293-1294, tolerant lookup :799-801) — a single Segment and Owner::HostInbound(JobId) removes the index and Segment::reads_left (:649, :832, :877). SharedWindow.path/.expected (:1073-1074) duplicate SharedSegment's (:1024-1025) and are cloned per window (:1966-1967); comparing win.segment would drop both. The id fields on SharedWindow/SharedSegment duplicate their map keys (:1071 vs :1961, :1022).
  5. Naming axis mixing and long-sentence prose: records are named by destination (HostInbound :759, DeviceInbound :1117) but windows by sharing discipline (HostWindow :746, SharedWindow :1070), so a reader must check both axes to pair them (PrivateWindow/SharedWindow or Host/Device); and the new §2.4 sentence carries three behaviours where the surrounding section uses one sentence each.

WHAT WAS CHECKED AND FOUND SOUND (no action)

Slot lifetime and release (single release point sweep_shared_windows :1755-1771; segment removal only when no users and settled :2213-2230; per-test assertions pool.free_slots() == pool.slot_count()); failure isolation (record.fail :1563-1565, fail_segment_users :1449-1473, fail_window :1475-1487, with_record_read :1503/:1540, Fetched still routes record_read to index.drop_row :3634-3640); the host path is behaviourally unchanged (plan_windows :1283, HostWindow slicing :914-923, unwind :976-996); keeping read_into off the shared path is the right call for caller-owned buffers; no existing shared-handle/demand mechanism was duplicated; no record-format, Header, on-disk or re-export change, so existing checkpoint files load unchanged; no flags, env vars, config knobs, cfg-gated production paths or per-model branches, so the AGENTS.md rejection criteria (171-187) are not tripped; the tests exercise real paths (SimulatedGpu byte-exact, counters incremented at the real submit sites) per AGENTS.md:194-199; the 8-pass ordering argument is justified per pass; the size is not churn.

#10 [high] DELIVERABLE: summary report / GitHub post for PR #496

========================================================= SUMMARY REPORT — PR #496 (GitHub post, ≤10 bullets)

Reviewed head f9c9191 against main (+2808/−914, selene/src/disk_store.rs + docs/prefix-cache-offload.md). The approach belongs in the repository (measured, served-workload speedup; no flags, no format change, failure isolation preserved) and the lifetime work is sound. One blocker, then mostly accounting, docs and duplication.

Blockers

Should Fix

Nits

#12 [high] DELIVERABLE (final): summary report / GitHub post for PR #496

========================================================= SUMMARY REPORT — PR #496 (GitHub post, 10 bullets max) Case file: https://autobot.eidonix.com/api/v1/cases/774e16ea-5f84-4ff8-9166-74ab6876cc37.html Head f9c9191 vs main, +2808/−914 (selene/src/disk_store.rs, docs/prefix-cache-offload.md).

Opener (1-2 sentences): The approach belongs in the repo — a measured, served-workload speedup with no new flags, no format change, and failure isolation preserved — and the shared-window lifetime work holds up under review. One thing must be resolved before merge; the rest is accounting, docs and duplication.

Blockers

Should Fix

Nits

Closing line: Everything else checked out — slot lifetime and release, failure isolation, the unchanged host path, no format or re-export change, real-path tests. Full detail is in the case file.

#13 [high] DELIVERABLE (final, 10 bullets): summary report / GitHub post for PR #496

========================================================= SUMMARY REPORT — PR #496 (GitHub post; hard cap: 10 bullets = 1 blocker + 5 should-fix + 4 nits) Case file: https://autobot.eidonix.com/api/v1/cases/774e16ea-5f84-4ff8-9166-74ab6876cc37.html Head f9c9191 vs main, +2808/−914 (selene/src/disk_store.rs, docs/prefix-cache-offload.md).

Opener: The approach belongs in the repo — a measured, served-workload speedup with no new flags, no format change and failure isolation preserved — and the shared-window lifetime work holds up under review. One thing must be resolved before merge; the rest is accounting, docs and duplication.

Blockers

  1. Settle the 61.3K retrieval result, or declare it inconclusive. The description reports 8/9 on main vs 7/9 with this change on a temperature=0 retrieval prompt, and draws no conclusion. Re-run it a few times on both revisions and report the variance and the differing fact; fix it if the gap holds, otherwise move the check under "Not covered" as inconclusive (and add a follower-attaches-to-a-partial-aligned-window byte-exactness test, which is the narrow plausible site).

Should Fix

  1. inbound_rate is now measured on logical bytes, and the error does not self-correct. Each follower credits the whole shared window to its own record (:1829), so the rate sample divides coalesced elapsed time into a ~4x byte count; hit() prices restores off that rate and worth_fetching gates on it, and because the median stays above its seed until three more samples arrive it mis-prices subsequent restores. Fix: one rate sample per physical window, bytes_in stays logical and documented, plus a 1-vs-8-restore rate test.
  2. Docs and rustdoc claim more than the mechanism. §2.4 needs the two limits the description already discloses, the immutable+pinned invariant, WINDOW_PAGES file-boundary alignment and the real write_from/read_into signatures; the module doc still says "at most WINDOWS_IN_FLIGHT windows" and "Nothing here waits"; the allocate rustdoc now sits on free_slots (:228-234).
  3. Tie the benchmark to head; do not state expectations as results. The table predates the demand-index/close-count edits — re-run one simultaneous and one staggered TP1 trial at head, or label the table's commit — and mark "existing users pay per-pump demand indexing…" as an expected bound that applies only to multi-fetch pumps (:1651-1653).
  4. One planner, one window key. plan_aligned_windows is plan_windows plus one clamp (fold them); the sharing key (path, header, first, count, row) is hand-written five times (:1368, :1578, :1647, :1710, :1890/:1996) — name it WindowKey and index it, which also removes the per-pump PathBuf clones and the O(windows×plans) find_reusable_window scan.
  5. De-duplicate the attach loop and record the design call. Pass 2 and Pass 4 repeat the same credit predicate and attach loop (:1845-1861, :1874-1903) — extract has_window_credit/attach_pending; and get a recorded maintainer decision for placing a second inbound lifecycle (host vs device) inside Staged rather than in the disk thread that already owns the handle.

Nits

  1. Staged::close counts leaked shared windows/segments into "N disk transport jobs did not complete" (:2485-2489) — count owned jobs or reword the message.
  2. Test hygiene: gate the three new counters like disk.rs's Faults (:192-200) instead of allow(dead_code) and consider surfacing disk_opens/coalesced_windows in StoreStats; GatedCopier returns a positional four-tuple (:8059) where this crate's fixtures return named pairs, and six tests repeat the same fixture construction.
  3. Drop state nothing branches on: PlanState::Done (:1093, :1833), HostInbound's single-element Vec<Segment> with an always-zero index (:1285), SharedWindow.path/.expected duplicating its segment (:1073), and id fields duplicating their map keys.
  4. Naming mixes axes (HostInbound/DeviceInbound vs HostWindow/SharedWindow); split the new 60-word §2.4 sentence into one behaviour per sentence.

Closing: Everything else checked out — slot lifetime and release, failure isolation, the unchanged caller-owned host path, no format or re-export change, and tests that exercise the real path. Full detail and evidence are in the case file.

#14 [high] Research summary

Both deliverables are written to the scratchpad.

Full report (entry 9, with addendum entry 11): Blockers (1) — the PR's own evidence reports 8/9 on main vs 7/9 with this change on a temperature=0 retrieval prompt at 61.3K, undiagnosed; ask for a repeat run and either a fix or an explicit "inconclusive" under Not covered. Should Fix (6) — coalesced logical bytes inflate inbound_rate, which is the divisor DiskStore::hit prices restores with and worth_fetching gates on (Rate keeps the median and only decays below its seed, so the error persists); docs §2.4 and the module doc overstate the mechanism, omit the two limits the description discloses and the immutable+pinned invariant, and keep two non-existent signatures, plus a misplaced allocate rustdoc now on free_slots; the benchmark table predates head and an unmeasured expected cost is stated as a result; plan_aligned_windows duplicates plan_windows and the sharing key is hand-written five times; per-pump PathBuf clones and an O(windows×plans) scan plus a doubled attach loop; and a request for a recorded maintainer decision on placing a second inbound lifecycle inside Staged. Nits (5) — close() under-reports abandoned jobs, test-only counters ungated and outside StoreStats, GatedCopier's positional 4-tuple, dead state (PlanState::Done, single-element Vec<Segment>, duplicated window fields/ids), naming-axis mixing and a 60-word sentence. A "checked and sound" list is included so the author is not asked to change what holds up.

Summary report (entry 13): exactly 10 bullets — 1 blocker, 5 should-fix, 4 nits — each one line of finding plus a tldr request, with a case-file link, an opener acknowledging the change belongs in the repo, and a closing pointer to the case file for evidence. Verdict: not mergeable as is, but close — the design and lifetimes are sound and the remaining work is one unresolved measurement, one accounting fix, docs, and de-duplication.

#15 [high] Limits of this review / open questions the author must answer

Honest scope of the review behind entries 1-13. No compiler, GPU or test run was available: every finding is established from source, not from executing anything. cargo build/test was not run, so the claim that the three allow(dead_code) attributes are unnecessary (nit 2 of the full report) rests on the crate's convention (selene/src/disk.rs:104-116) rather than on a warning-free build; the author can confirm with cargo build --release --manifest-path selene/Cargo.toml.

Not reviewed / not verified:

Three responses the author may give that would close findings cleanly: (a) re-runs showing the 61.3K gap is noise; (b) a maintainer sign-off on the Staged-side lifecycle; (c) confirmation that plan_windows was kept segment-relative for host reads deliberately (a one-line comment would then settle the duplication request).

#18 [high] At head 0c04b1e2: last round's blocker and 5 of 6 should-fixes are resolved

Verified at head 0c04b1e2 (base c0c4f798), 3 files +3358/−933.

RESOLVED — blocker B1 (8/9 vs 7/9 at 61.3K): author re-ran 5 cold-VRAM repeats (seed 1234..1238, 60,534 tokens, top_logprobs=5) against one shared disk checkpoint; main and head produced identical FP32 top-5 logprobs and token IDs on all 5 (6/9, 8/9, 7/9, 9/9, 4/9). Explained: Flare has no greedy temperature=0 (helios clamps into the core's positive sampling range) and the earlier single-pass script used distinct per-build prompt nonces. Added misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore (byte-equal SimulatedGpu pages/row vs private baseline, skip_pages=13, partial <64 tail + partial leaf chunk with row). PR discussion 2026-11-25 02:41.

RESOLVED — S1 inbound_rate: InboundWindowSample { bytes, elapsed } carries only physical window read_bytes/read_elapsed (disk_store.rs:1596-1620, sample pushed :1617-1620); DiskStore::apply early-returns into self.inbound_rate.observe (:3632-3635) before stats.progress += 1; stats.bytes_in stays logical (:3669); the old per-record observe in the Fetched arm is gone. Test coalesced_restores_keep_inbound_rate_physical_and_bytes_in_logical (1 vs 8, simultaneous + staggered). Docs state the split (docs:362-366, :1528-1531).

RESOLVED — S3 benchmark provenance: table now keyed main c0c4f798 vs 0c04b1e2; costs labelled "As an expected bound" with the device_inbound.len() <= 1 fast path noted; un-rerun multi-host RoCE moved to Not covered.

RESOLVED — S4/S5: plan_windows(segments, align_to_window) (:679-727) replaced the twin splitters; HeaderIdentity/SegmentKey/WindowKey (:1001-1064) + window_index HashMap give O(1) find_reusable_window (:1646-1663); has_window_credit (:1683-1687) and attach_pending (:1711-1730) replaced the duplicated attach loops.

RESOLVED — nits: counters now #[cfg(any(test, feature = "test-support"))] (:200-208, accessors :1279-1295); PlanState::Done → started: Vec<bool>; SharedWindow.path/.expected removed (holds segment+key); allocate rustdoc back on allocate (:241-243) and free_slots has its own line (:236-239); module doc rewritten (:7-27) with per-fetch window credits, follower sharing, close-before-Fetched.

RESOLVED — S6 (partly): the Staged-vs-DiskThread rationale is now argued in the PR Why ("DiskThread sees only file offsets and raw host addresses and finishes once direct I/O and xxh3 complete, whereas shared staging slots must stay pinned until every follower's async Copier upload completes"). Remaining ask is only a maintainer record of the decision (AGENTS.md:204-206), not a code change.

Cross-lens verdict: architecture, simplicity and correctness lenses all report NO blocking findings at this head.

#19 [high] New findings created by this revision (head 0c04b1e2)

  1. HeaderIdentity hand-writes Hash (SHOULD FIX). disk_store.rs:1001-1050; impl Hash at :1014-1050 destructures Header with .. (:1030) and hashes 14 fields. The equality contract it must track lives in another module: impl PartialEq for Header at shared/record.rs:136-152 (exhaustive list), impl Eq :154; Header defined :116-134 with private version excluded (:118-119) — correctly excluded here. Adding a Header field → compile error in record.rs but NOT here; the field silently drops out of the hash, two equal headers hash differently, window_index.get misses, coalescing silently stops — perf regression, no test failure, nothing pins hash/eq agreement. Also the ONLY hand-written Hash in selene/src (crate precedent is derive: PrefixKey vocab.rs:30; RankSizes record.rs:89; DiskRecord disk_store.rs:72; SegmentKey/WindowKey :1052/:1058). Simplicity lens: could hash only self.0.key (PrefixKey derives Hash, unique per record); collisions only cost a bucket, PartialEq still compares the whole header.

  2. TransportEvent::InboundWindowSample rides the cross-rank completion enum (SHOULD FIX). Enum doc says "Completion the transport reports to the disk store" (:83); every other variant carries a JobId. Consequences: (a) Kind::of must panic — shard.rs:476-478 unreachable!("window rate samples stay local to rank zero"), whereas the enum's own convention for unrepresentable kinds is Err(invalid(..)) (shard.rs:462); (b) that panic is upheld only by two hand-written guards — absorb_local shard.rs:722-725 pushes and continues, Peer::forward shard.rs:1148-1150 drops; (c) the existing test helper events.sort_by_key(|event| Kind::of(event).1) at shard/tests.rs:339 would panic if a fetch ran in those tests (survives only because they issue stores/unlinks); (d) test helpers must filter it by hand (disk_store.rs:6341) and tests match it out explicitly (:9145). CONCRETE COST: CompositeStore::poll does self.stats.progress += 1 for EVERY transport event before dispatch (composite.rs:1376), and that counter is documented as "Completion and capacity-release events" (store.rs:202) and gates the maintenance pass — maintenance_progress != progress → spill_parked(...) + self.disk.maintain() (composite.rs:1418-1424). Each physical window read now bumps progress and re-runs both, once per window per restore. DiskStore::apply deliberately does NOT bump progress for it (:3632-3636), so the two stores' progress counters diverge. Fix: carry the sample out of band (a Staged drain method, a field on Fetched, or a counter the store reads — precedent Budget::progress() input.rs:146-152), and exclude it from composite.rs:1376.

  3. pick_next_pending_plan restates Layout::record_slots (SHOULD FIX). disk_store.rs:1766-1777: let layout_row_slots = ...layout().row_slots(); let needed = plan.count + if plan.row { layout_row_slots } else { 0 };. record_slots(pages, row) = pages + usize::from(row) * row_slots() exists at geometry.rs:180-182 and is used by Resources::allocate (disk_store.rs:245), memory.rs:468, composite.rs:810/:1167. The admission guard predicts what allocate will do with a different formula, so they can diverge. Secondary: lock(&self.resources.transfers) taken once per candidate record per pump iteration and again right after by allocate (:1987). Fix: let needed = lock(&self.resources.transfers).layout().record_slots(plan.count, plan.row); hoisted next to free.

  4. §2.4 docs (SHOULD FIX, down from wider doc ask). docs/prefix-cache-offload.md:337-366 is now ONE ~30-line/250-word bullet carrying ~12 facts (signatures, shared handle, WINDOW_PAGES alignment, per-follower upload, slot lifetime, read_into isolation, immutability+pin invariant, close-before-Fetched, demand scheduling, live-window limit, extra-partial-window bound, error scope, two metrics). Content is now accurate and complete — the earlier asks are all met (see note on resolutions). What remains: repo-prose (.agents/skills/repo-prose/SKILL.md:71,:84) wants ordinary readable sentences; AGENTS.md:52-60 gives a document one purpose. And the bytes_in/inbound_rate contract is stated TWICE — docs:362-366 and again at :1528-1531 in §4. Keep the behavioural half in §2.4, the measurement statement only in §4, with a pointer.

  5. NIT — inbound_rate now measures pure disk-thread time. disk::Reply.elapsed is set only around worker.execute(job) (disk.rs:448-450) — one O_DIRECT read + xxh3, no wait for a free slot, no copier queue time, no GPU upload. Previously the rate was record bytes over job.started.elapsed() from DiskStore::fetch to Fetched (that field is gone; Fetched now only does stats.bytes_in += bytes, :3669). Since hit() divides by the rate (estimated_seconds: bytes / self.inbound_rate.get().max(1.0), :3625) and worth_fetching/worth_transfer gate on it (store.rs:422-438), restore estimates are now optimistic by the staging/upload share even for a single restore — the opposite direction from the inflation this revision fixed. CompositeStore prices the disk part on its own disk_inbound_rate observed from read_into completions over disk_started.elapsed() (composite.rs:994-1004), so the two stores measure different quantities under the same name.

  6. NIT — Staged::close abandoned no longer matches its message (disk_store.rs:2513-2544). internal = max over owners.len(), maintenance.len(), shared_segments.len(), shared_windows.len() (:2522-2527); abandoned = store_jobs.max(internal) (:2528) reported as "{abandoned} disk transport jobs did not complete" (:2541-2543). Map sizes are not jobs; maintenance_jobs is derived from owners (:2513-2517) and owners.len() is folded into internal, so maintenance is double-counted. Previously it was owners.len(), one entry per owned disk job — what the message says. Correctness lens still rates this resolved (no under-report); simplicity/conventions lens rate it a message-vs-count nit.

  7. Other nits: dead guard if demand.is_empty() { 0 } else { ... } at :1781-1787 (map_or(0) already yields 0); memory.rs::windows() (:1333-1367) is now the last surviving third copy of the WINDOW_PAGES splitter vs plan_windows (:679-727); two different settled() predicates in one file — Segment::settled (:661-664, file-handle terminal state) vs SharedSegment::settled (:1106-1109, disk jobs drained); three verbatim "unindex iff the index still points at it" blocks (:1525-1527, :1543-1545, :1837-1839); two identical follower-detach retain closures (:1813-1816, :1900-1904) matching on the (record, plan_index) pair that is WindowFollower's identity (:1119-1123); SharedSegment.id/SharedWindow.id duplicate their HashMap keys (:1083, :1131); disk_read_counted flags exist only to make a test counter count windows not jobs (:743, :1140, six cfg blocks); HostInbound is a one-element Vec<Segment> with an always-zero index plus a redundant Segment::reads_left; GatedCopier::wrap returns a positional 4-tuple (:8092-8122) vs the crate's named pairs in testing.rs.

  8. Description nits (prose lens): (a) "Emit one InboundWindowSample per completed physical window read" — the sole emitter is the shared device-fetch path; caller-owned read_into emits none, so scope the sentence; (b) Flash-Next Read Reduction values 3.99x/3.52x do not match the MB columns (ratio of tabulated means is 4.010/3.535) and the caption does not say whether the column is a ratio of means or a mean of per-trial ratios; (c) "No core re-export or format change is required" is true for re-exports, but TransportEvent is a public enum in a public module and gained a variant — say so. All four TTFT percentage deltas check out; the 27B rows' 4.22x/3.76x check out.

#20 [high] DELIVERABLE (final): full report for PR #496 at 0c04b1e2

========================================================= FULL REPORT — PR #496 "Coalesce shared ancestor reads across concurrent Selene disk fetches" Head 0c04b1e2, base main c0c4f798 · 3 files, +3358/−933 (selene/src/disk_store.rs, selene/src/shard.rs, docs/prefix-cache-offload.md) Case file: https://autobot.eidonix.com/api/v1/cases/774e16ea-5f84-4ff8-9166-74ab6876cc37.html

VERDICT

No blockers. The change belongs in the repository, is in the right layer, and its evidence is the kind the charter demands. Every blocker and should-fix from the previous round is either fixed at this head or has been narrowed to a small follow-up. What remains are four code/doc improvements worth making before merge (or in a fast follow) and six nits.

RESOLVED SINCE THE PREVIOUS ROUND (do not re-raise)

BLOCKERS

None.

SHOULD FIX

1. A rank-local rate sample was added to the cross-rank completion enum, and it amplifies the composite's maintenance cadence

Finding. TransportEvent::InboundWindowSample { bytes, elapsed } (disk_store.rs:97-101) was added to the enum whose own doc reads "Completion the transport reports to the disk store" (:83), where every other variant is a job completion carrying a JobId. This one carries no id — it is a per-window bandwidth sample for Staged's own rate. Consequences:

Request. Carry the sample out of band instead of as a completion variant: a Staged drain method for a pair of window byte/elapsed accumulators (the store already reads Staged state directly for in_flight() and pool()), a field on the existing Fetched event for the coalesced case, or the crate's existing precedent for a rate signal that is not an event (Budget::progress(), selene/src/input.rs:146-152). Whichever shape, exclude it from CompositeStore's stats.progress so that counter means "completions". A test asserting Kind::of is total over every TransportEvent (or a property test over the enum) would settle the panic path permanently; today only reading the two guards shows it.

Why. This is "solve the right problem in the right place" and "reject unsupported abstractions" (charter line 9; AGENTS.md:188-193). A variant with no job id is not a transport completion, and adding it makes the cross-rank protocol mapper responsible for a rank-local statistic: Kind::of goes from total to partially defined over its own input domain, with its totality depending on two guards far away from it. The fix needs no new machinery. Note the mechanism is correct and is not in question — physical-rate observation, the vanished per-record observe, and the two rank guards are all right; this is about where the signal is carried. It is also what the description's "No core re-export or format change is required" overlooks: TransportEvent is a public enum in a public module and gained a variant.

2. HeaderIdentity hand-writes Hash, duplicating an equality contract defined in another module

Finding. HeaderIdentity(Arc<Header>) implements PartialEq by delegation with an Arc::ptr_eq fast path (disk_store.rs:1006-1010), then writes Hash by hand: it destructures Header, hashes fourteen fields one at a time, and the destructure ends in .. (:1014-1050, .. at :1030). The contract it must mirror is exhaustive and lives 1,200 lines away in a different module — impl PartialEq for Header (selene/src/shared/record.rs:136-152), Header defined :116-134, impl Eq :154, private version excluded at :118-119 (correctly excluded here too). Adding a field to Header therefore produces a compile error in record.rs but not here: the new field silently drops out of the hash, two headers that compare equal hash differently, window_index.get(&key) misses, and coalescing silently stops working — a performance regression with no test failure, since nothing in the suite pins hash/eq agreement.

It is also a convention departure: a repository-wide search for impl (std::hash::)?Hash for in selene/src returns exactly this one hit. The crate derives instead: PrefixKey derives PartialEq, Eq, Hash, PartialOrd, Ord (selene/src/vocab.rs:30), RankSizes derives (shared/record.rs:89), DiskRecord derives (disk_store.rs:72), and this PR's own SegmentKey/WindowKey derive (disk_store.rs:1052, :1058). The manual impl exists only because Header does not derive Hash. Separately, HeaderIdentity restates Header identity where the PR already has a per-record unique key: Header.key is a PrefixKey, which derives Hash, and the path is derived from it.

Request. Move the hashing next to the equality it must track: impl Hash for Header in shared/record.rs (same field list, version still excluded), and let SegmentKey/WindowKey derive. Then HeaderIdentity disappears and the two contracts cannot drift. Minimum acceptable alternative if the author prefers the wrapper: impl Hash for HeaderIdentity { fn hash<H: Hasher>(&self, state: &mut H) { self.0.key.hash(state) } } — Hash need only be consistent with Eq, not complete; collisions only cost a bucket because PartialEq still compares the whole header — plus a comment saying why the full field list was chosen. Either way, add the missing a == b ⇒ hash(a) == hash(b) property test.

Why. A Hash that must be hand-kept in step with an equality defined elsewhere, using a non-exhaustive pattern so the compiler cannot help, is exactly the "duplicate representation" docs/design-review.md:74 asks a change to account for — and the failure mode is silent and performance-only, which is the class of bug this PR's own benchmark is designed to catch.

3. pick_next_pending_plan restates Layout::record_slots instead of calling it

Finding. disk_store.rs:1766-1777 computes the slot cost of a candidate window by hand:

let free = self.resources.free_slots();
let layout_row_slots = self.resources.pool.as_ref()
    .map(|_| lock(&self.resources.transfers).layout().row_slots())?;
...
let needed = plan.count + if plan.row { layout_row_slots } else { 0 };

Layout::record_slots(pages, row) already encodes exactly this — pages + usize::from(row) * self.row_slots() (selene/src/geometry.rs:180-182, row_slots :173-178) — and it is the crate's single definition of what a record costs in staging slots: Resources::allocate uses it (disk_store.rs:245), as do memory.rs:468 and composite.rs:810/:1167. This admission guard exists to predict whether allocate will succeed (:1778); expressing the prediction with a different formula means the guard can disagree with the allocator, and it will the moment record_slots learns to account for anything beyond pages + row. Secondary: lock(&self.resources.transfers) is taken once per candidate record per pump iteration here and then immediately again by allocate (:245).

Request. let needed = lock(&self.resources.transfers).layout().record_slots(plan.count, plan.row);, hoisted next to free outside the plan loop; drop if demand.is_empty() { 0 } else { ... } at :1781-1787 (see Nit 3).

Why. A guard that predicts the allocator must use the allocator's own arithmetic; two formulas for one cost is a latent mismatch, and the crate already has the helper.

4. The new §2.4 bullet is one 250-word paragraph and states the metrics contract twice

Finding. docs/prefix-cache-offload.md:337-366 is a single 30-line bullet carrying roughly twelve facts: the write_from/read_into signatures, the shared open handle, WINDOW_PAGES file-boundary alignment, per-follower GPU upload, slot lifetime, read_into independence, the immutability+pin invariant, close-before-Fetched, sibling-demand scheduling, the live-window limit, the extra-partial-window bound, error scope, and the two metrics. Its content is now accurate and complete — every earlier doc ask is met. What remains is shape and duplication: .agents/skills/repo-prose/SKILL.md:71/:84 ask for ordinary readable sentences and no "you had to be there" density, and AGENTS.md:52-60 gives a document one purpose at a time, whereas this mixes mechanism, correctness invariant, scheduling heuristic and metrics. The bytes_in/inbound_rate contract is also stated twice — docs:362-366 and again nearly verbatim at :1528-1531 in §4 — and one contract in two homes is what drifts.

Request. Keep one paragraph of mechanism in §2.4 (shared handle; aligned WINDOW_PAGES fan-out to every attached upload; independent read_into), move failure scope and the two limits to a short bullet list in the style of :333-336, keep the metrics statement only in §4 (:1528-1531) and leave a pointer from §2.4.

Why. This is the paragraph a future reader will trust to learn the transport's contract; a run-on makes three distinct behaviours look like one mechanism, and duplicated prose drifts (AGENTS.md:43-49 prose review; design-review principle 16: write without hidden context).

5. Record the design decision for the new shared inbound lifecycle (process, not code)

Finding. The change replaces Staged's single inbound lifecycle — the invariant behind "Nothing here waits" — with two (host vs device) inside shared cache machinery: a five-state shared-file machine, reference-counted shared windows with separate disk and upload counts, out-of-order plan completion, and a close-only-when-settled rule (disk_store.rs:1066-1160, :1824-2278). The PR Why now argues the choice on technical grounds — DiskThread sees only file offsets and raw host addresses and finishes once direct I/O and xxh3 complete, whereas SlabPool slots must stay pinned until every follower's asynchronous Copier upload completes — which discharges the design-review ask in substance. What remains is that an invariant this central not be settled implicitly by merge (AGENTS.md:204-206).

Request. Get a recorded maintainer sign-off on doing the coalescing inside Staged rather than inside the disk thread that already owns the file handle. No code change is requested.

Why. The technical content held up under review, but a change of this shape to shared cache invariants should rest on a recorded decision rather than on review-time inference.

NITS

1. inbound_rate now measures pure disk-thread time, so estimated_seconds prices restores optimistically

disk::Reply.elapsed is set only around worker.execute(job) (selene/src/disk.rs:448-450) — one O_DIRECT read plus xxh3, with no wait for a free slot, no copier queue time and no GPU upload. Before this revision the rate was observed as record bytes over job.started.elapsed() from DiskStore::fetch to Fetched, spanning queueing and the upload; that field is gone and the Fetched arm now only does stats.bytes_in += bytes (disk_store.rs:3669). Since hit() divides by the rate (estimated_seconds: bytes as f64 / self.inbound_rate.get().max(1.0), :3625) and worth_fetching/worth_transfer gate on it (store.rs:422-438), restore estimates are now optimistic by the staging/upload share even for a single restore — the opposite direction from the inflation this revision fixed. CompositeStore prices its disk part on its own disk_inbound_rate observed from read_into completions over disk_started.elapsed() (composite.rs:994-1004), so the two stores measure different quantities under one name. Request: either document inbound_rate explicitly as device read bandwidth and keep a separate end-to-end restore estimate for estimated_seconds, or include the per-record wait in the sample. A test comparing estimated_seconds against a measured single-restore wall time would settle it.

2. Staged::close's abandoned count no longer matches its message

disk_store.rs:2522-2544: internal is a .max() over owners.len(), maintenance.len(), shared_segments.len() and shared_windows.len(), and abandoned = store_jobs.max(internal) is reported as "{abandoned} disk transport jobs did not complete". shared_segments/shared_windows are map sizes, not jobs — one leaked shared window in an otherwise idle store yields abandoned == 1 and a claim that a disk transport job did not complete — while four abandoned outbound jobs plus six leaked windows reports six. maintenance_jobs is also counted twice: it is derived from owners (:2513-2517) and owners.len() is folded into internal. Previously the number was owners.len(), one entry per owned disk job, which is what the message says. Request: keep the message counting owners.len(), and if leaked staging state is worth catching, report it separately ("{n} shared windows/segments leaked").

3. Repeated blocks, duplicate fields and state nothing branches on

4. memory.rs::windows() is now the last surviving third copy of the splitter, and GatedCopier breaks the fixture convention

5. PR description nits

CHECKED AND SOUND (no action requested)

OPEN QUESTIONS

#21 [high] DELIVERABLE (final): summary report / GitHub post for PR #496 at 0c04b1e2

========================================================= SUMMARY REPORT — PR #496 (GitHub post; 10 bullets = 5 should-fix + 5 nits, no blockers) Head 0c04b1e2 vs main c0c4f798 · 3 files, +3358/−933 Case file: https://autobot.eidonix.com/api/v1/cases/774e16ea-5f84-4ff8-9166-74ab6876cc37.html

Recommendation: Approve with Should-Fix (no blockers)

The last round's blocker and five of six should-fixes are resolved at 0c04b1e2, and the 61.3K parity gap closed cleanly: five cold-VRAM repeats against one shared 60,534-token checkpoint gave identical FP32 top-5 logprobs and token IDs on main and at head, the sampling-mode cause is named, and a byte-exact misaligned-follower test now pins the only plausible defect site. The change belongs in the repo, adds no flags, changes no format, and keeps failure isolation. What is left is small: one layering fix, one maintainability fix, one arithmetic restatement, docs, and a recorded design sign-off.

Should Fix

Nits

Closing: everything else checked out — slot and file lifetimes, failure isolation, the unchanged caller-owned host path, no format or re-export change, and tests that assert byte-exact GPU pages at the real submit sites. Evidence and per-angle detail are in the case file.

#22 [high] Research summary

I reviewed the new head 0c04b1e2 against last round's report and wrote both deliverables to the scratchpad: entry #20 (full report) and entry #21 (summary report / GitHub post), with supporting notes in #18 (resolutions) and #19 (new findings).

Verdict changed from "Changes Requested" to "no blockers". Last round's single blocker — the 8/9 → 7/9 retrieval result at 61.3K — is genuinely closed: five cold-VRAM repeats against one shared 60,534-token checkpoint produced identical FP32 top-5 logprobs and token IDs on main and at head (6/9, 8/9, 7/9, 9/9, 4/9), the sampling-mode cause is named (Flare has no greedy temperature=0; distinct per-build prompt nonces), and the narrow plausible defect site is now pinned by a byte-exact misaligned-follower test. Five of six should-fixes are also fixed in code, which I verified line by line: InboundWindowSample carries only physical window bytes and bytes_in stays logical; plan_windows(.., align_to_window) replaced the twin splitters; WindowKey/window_index and has_window_credit/attach_pending removed the duplication; the benchmark is keyed to the head commit; the counters are cfg-gated; the module doc, allocate rustdoc and module contract are corrected.

Four should-fix findings are new at this head, created by those fixes: (1) InboundWindowSample was added to the cross-rank completion enum, forcing an unreachable!() in Kind::of upheld by two hand-written guards and making CompositeStore::poll bump stats.progress — and so re-run spill_parked + disk.maintain() — once per physical window; (2) HeaderIdentity's 37-line hand-written Hash restates Header's PartialEq from another module through a .. pattern, so a new field silently breaks coalescing with no test failure, and it is the only manual Hash in selene/src; (3) pick_next_pending_plan recomputes pages + row_slots by hand instead of calling Layout::record_slots, which the allocator it predicts does call; (4) the new §2.4 bullet is one 250-word paragraph stating the metrics contract twice. A fifth should-fix is process-only: a maintainer should record the Staged-vs-DiskThread decision (no code change requested). Five nits follow, led by inbound_rate now measuring pure disk-thread time, which makes estimated_seconds optimistic in the opposite direction from the inflation just fixed.

The summary report is 10 bullets — no blocker section, 5 should-fix, 5 nits — with one-line findings plus tldr requests and a case-file link, and it opens by acknowledging the closure of the previous round so the author knows what not to redo.

#23 [high] Evidence inventory at head 0c04b1e2 (PR description numbers the report must cite)

Supersedes the evidence in entry #1, which describes the older head f9c9191. All numbers below are from the PR description at head 0c04b1e2, base main c0c4f798.

BENCHMARK SETUP (as stated): flare run on NVIDIA GB10 (SM121), --prefix-cache-memory 0 --prefix-cache-disk /tmp/selene-disk; --max-concurrency 16 --prefix-cache-disk-limit 40G on Qwen3.8-27B-NVFP4, --max-concurrency 8 --prefix-cache-disk-limit 24G on Qwen3.8-Flash-Next. Each trial warms one ~61K-token shared prefix plus 8 child branches (~256 unique tail tokens each) to disk, restarts flare run so GPU memory starts empty, then sends 8 concurrent /v1/chat/completions follow-ups. Metric is ingress-to-first-token TTFT; 27B rows are means over 2 interleaved repeats.

TABLE (Before main -> After 0c04b1e2):

ARITHMETIC CHECK (done): all four TTFT percentages and the two 27B ratios check out. The two Flash-Next ratios do not match the MB columns — 7,944.9/1,981.1 = 4.010 and 7,958.0/2,251.5 = 3.535 — which is the description nit in entry #19 item 8(b).

RATE/LEDGER EVIDENCE: rank-0 flare_host_cache_inbound_bytes_per_second stays physical across coalesced restores — 6.07 GB/s single vs 7.71 GB/s 8-way simultaneous and 6.02 GB/s 8-way staggered on Qwen3.8-27B-NVFP4; 7.17-9.01 GB/s single on Qwen3.8-Flash-Next. flare_host_cache_bytes_in_total tracks logical restored bytes (8x single). This is the author's live confirmation that the S1 fix behaves as intended and should be acknowledged in the report as resolved.

PARITY EVIDENCE (closes the previous blocker): 5 cold-VRAM restart repeats, seed 1234..1238, 60,534 prompt tokens, top_logprobs=5, one shared disk checkpoint, main (c0c4f798) vs 0c04b1e2 on Qwen3.8-27B-NVFP4 TP1 — identical FP32 top-5 logprobs and token IDs on all 5 repeats (6/9, 8/9, 7/9, 9/9, 4/9 on a 9-fact retrieval prompt); first-token top-5 logprobs match in-VRAM GPU hits ("9" -0.756374 vs "3" -1.256374). Cross-seed score variation attributed to positive-temperature sampling because helios clamps request temperature into the core's positive sampling range and Flare does not support greedy temperature = 0. Also: four concurrent unique-prefix decode streams spilling checkpoints over 30 s on Qwen3.8-Flash-Next TP1 had 0 errors, 100.0 -> 100.6 tok/s.

SUITE COUNTS AT THIS HEAD: 476 selene tests on x86_64 and ARM64 Linux (O_DIRECT + io_uring, 0 warnings without test-support); 13 coalescing tests on Windows IOCP (full Windows selene still gated on /dev/urandom per docs/TODO.txt); 21 single-GPU SM121 helios offload:: tests (FLARE_RUN_CUDA_TESTS=1 --include-ignored; split_pools needs 2 local GPUs); pytest tests/preparation/test_core_boundary.py.

NOT COVERED (author-declared): multi-host RoCE serving, 2-GPU split_pools, discrete PCIe GPUs, Windows serving, live CompositeStore/PooledStore GPU serving.

COMPANION PR: #497, both base directly on main, merge in either order; whoever merges second reconciles Staged::pump_all so host_inbound and pump_device_inbound run ahead of writes and maintenance. Discord: Dooner present.

#24 [high] Report blueprint: structure, verdict and lens grades at 0c04b1e2

POINTERS (write the final report from these):

LENS GRADES AT THIS HEAD (from this round's agent reports):

HOW THE OLD FINDINGS MAP (so the post does not repeat itself): old blocker B1 -> resolved; old S1 bytes/rate -> resolved, replaced by the layering finding; old S2 docs -> narrowed to the paragraph-shape/duplication finding only (all content asks met); old S3 benchmark -> resolved; old S4/S5 -> resolved; old S6 -> narrowed to the maintainer-record ask; old nits 1-5 -> nit 1 is fixed in substance but re-graded to a message-vs-count nit, nit 2 and 4 largely fixed (counters gated, PlanState gone, SharedWindow fields gone), nit 3 GatedCopier remains, nit 5 naming-axis partly remains (two settled() predicates).

HONEST LIMITS to keep in the report: no toolchain, GPU or test run was available to this review — every finding is established from source at the head commit (do not claim a warning-free build was verified). Not reviewed: the ~5,300-line test module past the fixtures that were read, the #497 rebase interaction, and the five author-declared not-covered configurations. No instructions were embedded in the reviewed material.

#6 [medium] Nit findings: close() abandoned count, GatedCopier tuple, naming axis

selene/src/disk_store.rs:2475-2508 Staged::close: let abandoned = (outbound.len() + host_inbound.len() + device_inbound.len() + maintenance.len()).max(usize::from(self.busy())) (:2485-2489), while busy() (:2344-2351) is true when ANY of outbound/host_inbound/device_inbound/shared_segments/shared_windows/owners is non-empty. So a leaked shared window or segment alone reports abandoned == 1 even when the four summed pipelines are empty, and the error says "{abandoned} disk transport jobs did not complete" (:2501-2505). Pre-change code (main selene/src/disk_store.rs:1419) counted self.owners.len() — owned disk jobs. Fix: count owned jobs (owners.len(), or owners.len()+maintenance.len()) or reword the message. Diagnostics only: the error is still returned and the pool still leaked (:2495-2499), no lifetime change. Verdict: nit / minor should-fix — it is the line a shutdown warning or CI failure is read from, and it under-reports exactly in the coalesced case this PR introduces.

Other nits:

#7 [medium] Findings: PR description prose (expected costs, benchmark provenance)

PROSE / DESCRIPTION items (AGENTS.md:72-140, docs/design-review.md principle 16, repo-prose skill "separate measurements from hypotheses"):

#8 [medium] Verified sound: lifetimes, failure isolation, host path, tests

What held up (do not ask the author to change):

#11 [medium] Addendum to Should Fix #1: Level::Rate inflates and does not self-correct

ADDENDUM to Should Fix #1 (rate mechanics). selene/src/levels.rs:36-76: Rate keeps the median of the last three completed samples, and get() applies upward decay ONLY when median < seed (INITIAL_STAGED_DISK_RATE = 3e9, selene/src/store.rs:418). So an inflated median that sits ABOVE the seed does not decay back: it is returned as-is until three more samples arrive to push the median down. A single coalesced burst therefore mis-prices every restore for at least the next three completed restores, which strengthens the "should fix" call: this is not a transient blip in a dashboard. Also Rate::observe ignores zero-byte/zero-elapsed samples (:58-60), so a fix cannot simply skip the coalesced sample without also ensuring the physical sample is submitted — use one sample per window (or per segment) with its own start instant.

Severity rationale for the final report: not a blocker (no data is wrong, no lifetime is broken, and the write-up already discloses no byte-reduction claim for this counter), but it changes a scheduled policy's input; correctness lens A1 and architecture finding 1 both rated it "should fix".

#16 [medium] Verdicts and severity rationale across the five review lenses

Five prior lenses: A correctness, B architecture/scope, C conventions/duplication, D simplicity, E prose.

Where lenses disagreed: D rated the planner duplication and the per-pump cost nits, C rated both should-fix, B rated the design-decision item should-fix and the bytes item should-fix; the full report takes the higher grade where two lenses overlap and keeps D's stack-reduction suggestions as nits so the author is not asked to reshape the 8-pass pump. Only A/B/E together produced the single blocker: nothing in any lens found a memory-safety, lifetime or data-corruption defect in the code as written — the blocker is an unresolved measurement in the PR's own evidence, not a proven bug, which is why the request is "settle it or declare it inconclusive" rather than "fix this defect".