Prose review — PR #496, "Coalesce shared ancestor reads across concurrent Selene disk fetches" (lens E)
Head f9c9191, base main, 2 files (+2808/−914): selene/src/disk_store.rs and docs/prefix-cache-offload.md.
Rules applied: AGENTS.md §"Required prose review" (lines 43-70) and §"Required PR descriptions" (lines 72-140), docs/design-review.md principle 16 ("Write without hidden context"), and .agents/skills/repo-prose/SKILL.md (not opened) (present-state specification; separate measurements from hypotheses). Nothing in this lens is blocking; three items should be fixed before merge.
Key findings
- A doc comment for the wrong function was published. The rustdoc that belongs to
Resources::allocatenow sits above the newly insertedResources::free_slots(selene/src/disk_store.rs:228-234). This is the one prose defect that ships in the code, not just in the PR body. - The description records a deterministic score drop and draws no conclusion.
8/9(main) vs7/9(this PR) on Qwen3.8-27B TP1 at61.3Kattemperature = 0is reported without saying whether it is a defect, a consequence of the recipe's context clamp, or unreproduced.AGENTS.md:106-108explicitly requires explaining differences between runs and keeping material failures visible. - Expected costs are stated as results. "Existing users pay per-pump demand indexing when free slots exist and at most one extra window split when
skip_pages % 64 != 0" appears at the end of Result with no measurement, whichAGENTS.md:95-96forbids. - The benchmark table predates the head commit and the only notice is a parenthetical; the docs addition is otherwise correct and present-tense, but "aligned 64-page windows" does not say what they are aligned to.
Angle 1 — PR description (four-part scheme)
The four parts are present and in order (Why / What / Result / Evidence), with a Discord line ("Discord: Dooner"), which AGENTS.md requires. The argument is causal rather than a vocabulary dump: Why explains the endpoint-key dedup in Helios that makes each branch submit its own restore, and why immutable pinned records make sharing valid (AGENTS.md:82-87). What makes before/after explicit across four bullets and names the numerical change (64-page WINDOW_PAGES boundary alignment), the lifetime change (reference-counted windows, host slots pinned until uploads complete), and the compatibility statement (no core re-export or format change) — AGENTS.md:88-94. Good.
Should fix — unexplained correctness difference (AGENTS.md:106-108)
"recipe-clamped
Qwen3.8-27BTP1 matched9/9at30.1Kand8/9(main) vs7/9(this PR) at61.3K."
The change lowers a temperature = 0 numerical-retrieval score on the baseline it is compared against, and the description does not say whether the missing fact is a regression, an artefact of the recipe clamping the context, or noise. AGENTS.md:106-108: "Explain differences between runs when passed and skipped cases would otherwise appear contradictory. Keep material failures … visible." A reviewer cannot tell whether this PR broke an answer.
Fix: name the differing answer and the conclusion drawn (reproduced or not; attributable to the clamped recipe context rather than to the transport), or move the check under "Not covered" as inconclusive. Note the same paragraph shows DeepSeek TP4 clean at 9/9 for 23.1K and 47.1K, which makes the Qwen row a visible outlier rather than background noise.
Should fix — expected costs presented as results (AGENTS.md:95-96)
"Existing users pay per-pump demand indexing when free slots exist and at most one extra window split when
skip_pages % 64 != 0."
These are unmeasured predictions about CPU cost and window splitting, placed directly after the measured table in Result. AGENTS.md:95-96 requires "distinguishing an expectation from a measured result"; the prose skill requires separating measurements from hypotheses.
Fix: label the sentence as an expected, unmeasured regression bound, or cite the measurement that bounds it.
Nit — benchmark provenance is a parenthesis
"Benchmark setup: … comparing
main(425ab2d4) against this change (measured before the linear demand-index and close-count edits covered by the unit tests below)."
The table describes a tree that is not the head commit; the parenthesis is the only statement of that, and it is not echoed where a reader looks for results. It also conflicts in emphasis with the "Not covered" bullet ("Single-pass SM121 runs were not repeated after the demand-index edit"). AGENTS.md:103-112 requires connecting each claim to the artifact actually tested and keeping measurement limitations visible; docs/design-review.md principle 16 forbids hidden context.
Fix: state plainly in the benchmark paragraph that the numbers come from an earlier commit of this branch and that head f9c9191 differs only by demand-index bookkeeping and close accounting — or repeat one run at head — and keep a single consistent limitation statement.
Considerations recorded but not counted as findings
- Stacked-PR logistics are handled per
AGENTS.md:126-128: the Companion PR paragraph says what #497 contributes, that both base on the same425ab2d4baseline, and the merge order ("Merge this PR first, then rebase #497"). This is the right shape, though it sits after the technical explanation asAGENTS.md:120-121asks. - "Not covered" is a genuine disclosure section and names what was not run (helios
FLARE_RUN_CUDA_TESTS=1, discrete PCIe GPUs, Windows serving, liveCompositeStore/PooledStoreGPU serving).
Angle 2 — Commit messages
Single commit, Coalesce shared ancestor reads across concurrent Selene disk fetches. Imperative mood, matches neighbouring selene subjects ("Keep checkpoint cache counts instead of scanning for stats (#460)", "Link host-cache records under any offered ancestor, not only the nearest (#429)"), and its body reproduces the four-part argument. Nothing to fix.
Angle 3 — Docs changed (docs/prefix-cache-offload.md, section 2.4)
The addition (docs/prefix-cache-offload.md:338-342, diff +5/−1) is a present-state statement, present tense, and resolves fetch/read_into from the same bullet and section 2.2 — it passes the prose skill's hidden-context test.
Nit — "aligned" is not resolved (docs/prefix-cache-offload.md:339-341)
"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"
The alignment is to absolute file page boundaries, which is exactly what lets restores with different skip_pages share a window (plan_aligned_windows, selene/src/disk_store.rs:697-738; WINDOW_PAGES = 64 is defined at docs/prefix-cache-offload.md:85, not in this section). As written, a reader can take "aligned" to mean aligned to the fetch.
Fix: "coalesce the 64-page WINDOW_PAGES windows that begin on the same file page boundary".
Nit (optional) — error scope is only in the PR body
Shared open or read errors fail every attached restore after in-flight I/O drains; a private child or GPU upload error fails only that restore. That is a material behavioural invariant stated in the PR body but not in section 2.4 or the section 2.12 invariant list (docs/prefix-cache-offload.md:853), even though the failure-isolation bullet in What promises it as behaviour. One clause in 2.4 or 2.12 would keep the design document self-contained; AGENTS.md:52-58 treats design documents as the specification of record.
Angle 4 — Code comments in the diff
Should fix — misplaced rustdoc (selene/src/disk_store.rs:228-234)
/// Slots for `pages` page records and, when `row`, all row pieces;
/// `None` leaves the pool unchanged when it cannot supply all of them.
fn free_slots(&self) -> usize {
self.pool.as_ref().map_or(0, SlabPool::free_slots)
}
fn allocate(&mut self, pages: usize, row: bool) -> Option<Buffers> {
free_slots was inserted after the comment instead of after allocate, so the published docs describe free_slots as taking pages/row and returning None, none of which is true, and allocate — the function whose contract (allocate all page and row slots or leave the pool untouched) is the subtle one — is undocumented. On main the comment sits directly above allocate (main, selene/src/disk_store.rs:216-218). This is a present-state accuracy defect against AGENTS.md:43-50 / the prose skill.
Fix: move the two-line comment back onto allocate; document free_slots in one line, e.g. "Free slots in the shared pool; zero when this transport has no pool."
Verified clean
- Module doc,
selene/src/disk_store.rs:14-24: the added sentences ("Concurrent device fetches that read the same record file share one open file handle and reuse aligned in-flight staging windows across followers, submitting one GPU upload per follower from the shared staging slots.") describe present behaviour and reuse the existing[WINDOW_PAGES]/[WINDOWS_IN_FLIGHT]links. Nit only: the following sentence ("It also moves records between files and caller-owned registered buffers retained by the composite's memory tier") is now a long way from its subject after the insertion, but remains accurate. - New type and state comments read correctly against the code:
SharedFileState(1005-1017),SharedSegment/reusable/settled(1019-1050),SharedWindow(1065-1091— its stated release conditionfollowers.is_empty() && disk_referenced == 0 && upload_referenced == 0matchessweep_shared_windowsat1755),DeviceSegmentRef(1108-1113),DeviceInbound(1115-1117),plan_aligned_windows(697-699, and the body at717-734really does split on((cursor / WINDOW_PAGES) + 1) * WINDOW_PAGES). disk_opens/disk_window_reads/coalesced_windowsaccessors (1213-1233) and theirResourcesfields (192-200) are documented, and thecfg_attr(not(any(test, feature = "test-support")), allow(dead_code))gating is explained rather than silently silencing dead-code warnings.- The pass comments in
pump_device_inbound("Pass 1", "Pass 2", … "Pass 5a"–"Pass 5e", including "Pass 4: start new shared windows (or attach to one started by an earlier record in this pass) as slots and disk queue depth allow.") are invariant/intent comments, not journey narration; acceptable under the prose skill. - Test names and comments state the property under test rather than the chronology:
different_skip_pages_coalesce_aligned_windows_to_exact_gpu_pages,staggered_arrival_attaches_out_of_order_to_in_flight_windows,shared_ancestor_failure_propagates_to_all_followers_without_leaks. Their assertions are self-describing (8321-8322,8444-8445,8549-8550,8844), so a reader can map test to claim in the description.
Open questions / not verifiable from prose alone
- Whether the
7/9Qwen result is a real regression can only be settled by a repeat run atf9c9191on SM121 (or by naming the missed fact) — prose review cannot decide it, only note that the description leaves it undecided. - The "at most one extra window split when
skip_pages % 64 != 0" bound is asserted, not measured. A unit assertion countingdisk_window_readsagainstplan_aligned_windowsoutput would make it checkable;8444-8445(disk_window_reads() + coalesced_windows() == 10) is close but does not state the bound. - No prose issue found with the removal of the old per-restore path's comments: the diff deletes narration rather than facts, and the surviving module doc still explains the disk-thread model.