#1 [high] should fix: free_slots carries the allocate doc comment
selene/src/disk_store.rs (PR #496 head f9c9191), impl Resources, lines 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> {
The existing doc comment for allocate was left above the newly inserted free_slots, because free_slots was inserted after the comment rather than after allocate. On main (ref main, lines 216-218) the comment sits directly above allocate. As published, rustdoc documents free_slots as taking pages/row and returning None, which it does not; allocate is undocumented. Violates AGENTS.md "Required prose review" / repo-prose skill (comments must describe the code as it exists; documentation is a present-state specification). Fix: move the comment back onto allocate and give free_slots its own one-line comment (e.g. "Free slots in the shared pool; zero when this transport has no pool.").
#2 [high] should fix: PR description leaves a Qwen 9/9 vs 7/9 difference unexplained and mixes measured with expected cost
PR #496 description (four-part scheme required by AGENTS.md "Required PR descriptions" and docs/design-review.md principle 16; the four parts why/what/result/evidence are present and in order, Discord line present).
Gap 1 - unexplained correctness difference (AGENTS.md item 4: "Explain differences between runs when passed and skipped cases would otherwise appear contradictory. Keep material failures ... visible"). Evidence paragraph:
"recipe-clamped Qwen3.8-27B TP1 matched 9/9 at 30.1K and 8/9 (main) vs 7/9 (this PR) at 61.3K."
The change lowers a deterministic temperature = 0 fact-retrieval score from 8/9 to 7/9 at 61.3K and the description neither says whether this is a defect, a context-limit artefact of the recipe clamp, or measurement noise, nor whether it reproduces. A reviewer cannot tell whether the PR broke an answer. Fix: state what the one differing answer was and the conclusion drawn (e.g. reproduced/unreproduced, attributable to the recipe's clamped context rather than to the transport), or move the check to "Not covered" as inconclusive.
Gap 2 - expected costs presented as results (AGENTS.md item 3: "distinguishing an expectation from a measured result"; prose skill: "separate measurements from hypotheses"). Result section, after the measured table:
"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 and window-split cost. Fix: label them as expected and unmeasured, or cite the measurement.
#6 [high] Research summary
Prose review of PR #496 (head f9c9191) is complete. The description has the four required parts in order (why / what / result / evidence) and a Discord line, the commit message follows the repository's imperative style and carries the same four-part body, and the docs addition to docs/prefix-cache-offload.md section 2.4 is a present-state statement that resolves its own references.
Three things should be fixed before merge: a rustdoc comment for Resources::allocate was left sitting above the newly inserted free_slots in selene/src/disk_store.rs (lines 228–234), so the published doc describes the wrong function; the description records a deterministic 9/9 vs 7/9 result at 61.3K on Qwen3.8-27B without saying whether that difference is a defect, a recipe artefact, or noise, which the four-part rules require it to explain; and the "Existing users pay per-pump demand indexing …" sentence presents unmeasured costs as results. Two smaller notes: the benchmark table was measured on a pre-head tree with that disclosure buried in parentheses, and the docs sentence does not say what the 64-page windows are aligned to. The new type, state-machine, pass and test comments were checked against the code and read correctly, with line numbers recorded in the scratchpad.
#7 [high] Findings index for PR 496 prose review (lens E)
PR #496 prose review (lens E), head f9c9191, base main, 2 files (+2808/−914). Rules applied: AGENTS.md "Required prose review" and "Required PR descriptions" (the four-part scheme and its four bullets), docs/design-review.md principle 16 ("Write without hidden context"), .agents/skills/repo-prose/SKILL.md. Nothing here is blocking; two items should be fixed.
-
SHOULD FIX — selene/src/disk_store.rs:228-236 (impl Resources). The rustdoc for
allocate("Slots forpagespage records and, whenrow, all row pieces;Noneleaves the pool unchanged when it cannot supply all of them.") now sits directly above the newfn free_slots(&self) -> usize, andallocateis left undocumented. On main the comment is at lines 216-218 directly aboveallocate. As published, the docs describefree_slotsas takingpages/rowand returningNone, which is false. Fix: move the comment back ontoallocate; givefree_slotsits own line, e.g. "Free slots in the shared pool; zero when this transport has no pool." -
SHOULD FIX — PR description, Evidence paragraph. "recipe-clamped
Qwen3.8-27BTP1 matched9/9at30.1Kand8/9(main) vs7/9(this PR) at61.3K" reports a deterministic (temperature 0) score drop with no conclusion attached: defect, recipe context clamp, or unreproduced noise is left to the reviewer. AGENTS.md item 4 requires explaining differences between runs and keeping material failures visible. Fix: name the differing fact and the conclusion (reproduced or not, attributable to the clamped recipe context rather than the transport), or move it to "Not covered" as inconclusive. -
SHOULD FIX — PR description, end of "Result". "Existing users pay per-pump demand indexing when free slots exist and at most one extra window split when
skip_pages % 64 != 0" states unmeasured costs next to a measured table. AGENTS.md item 3 and the prose skill require distinguishing expectation from measurement. Fix: label as expected and unmeasured, or cite a measurement. -
NIT — PR description, "Result" -> "Benchmark setup". The parenthetical "(measured before the linear demand-index and close-count edits covered by the unit tests below)" is the only notice that the table predates the head commit, and it conflicts in emphasis with the "Not covered" bullet that says the SM121 runs were not repeated. AGENTS.md item 4 (identify the tested artifact) and docs/design-review.md principle 16 (disclose material limitations). Fix: say in the benchmark paragraph that the numbers are from an earlier commit of this branch and what the head differs by; keep one consistent statement.
-
NIT — docs/prefix-cache-offload.md:338-342. "coalesce aligned 64-page windows" does not say aligned to what; the alignment is to absolute file
WINDOW_PAGESboundaries (plan_aligned_windows, disk_store.rs:697-738), which is exactly what lets restores with differentskip_pagesshare a window, and section 2.4 namesWINDOW_PAGES = 64only at line 85. Fix: "coalesce the 64-pageWINDOW_PAGESwindows that begin on the same file page boundary". Optional second part: the shared open/read failure scope (all attached restores fail) and private-failure isolation are stated in the PR body but not in section 2.4 or the section 2.12 invariants; one clause would keep the document self-contained.
Also worth reporting: item 5's paragraph is otherwise correct and present-tense; the module doc (disk_store.rs:14-24), the new type/state comments (1005-1091, 1115-1117), the five pass comments in pump_device_inbound (1815-1844 and Pass 5a-5e), and the new test names/comments all describe the code as it exists; the commit message and Discord line ("Discord: Dooner") comply. See notes 5 (clean items) for line references.
#3 [medium] should fix: benchmark table measured on a pre-head tree; disclosure buried in parentheses
PR #496 description, "Result" paragraph:
"Benchmark setup: Single-pass flare run runs on NVIDIA GB10 (SM121) with --prefix-cache-memory 0 --prefix-cache-disk /tmp/selene-disk, comparing main (425ab2d4) against this change (measured before the linear demand-index and close-count edits covered by the unit tests below)."
The measured numbers describe a tree state that is not the head commit, and the parenthesis is the only statement of that fact. The description also does not say whether the demand-index edit changes the measured physical read volume or TTFT. AGENTS.md "Required PR descriptions" item 4 requires connecting each claim to the artifact actually tested, and docs/design-review.md principle 16 requires disclosing material limitations. Fix: in the benchmark paragraph, say plainly that the table was measured at an earlier commit of this branch and that the head commit (f9c9191) differs only by X (demand-index bookkeeping, close accounting), or repeat the run. Related: the "Not covered" bullet already concedes the runs were not repeated, so make the two statements consistent in one place.
#4 [medium] docs change is acceptable; two nits on specificity
docs/prefix-cache-offload.md, section 2.4, Staged bullet (lines 333-343), added by PR #496 (diff +5 -1, insertion at 338-342):
"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."
Judged against the repo-prose skill (present-state specification, no hidden context): it is present tense, states the invariant, and resolves fetch/read_into from the surrounding bullet and from section 2.2. Two residual issues:
- "aligned 64-page windows" does not say what they are aligned to. The alignment is to absolute file page boundaries (
WINDOW_PAGESboundaries,plan_aligned_windowsat selene/src/disk_store.rs:697-738), which is exactly what makes two restores with differentskip_pagesshare windows; the section namesWINDOW_PAGES = 64only at line 85. Fix: "coalesce the 64-pageWINDOW_PAGESwindows that start on the same file page boundary". - Not documented in the section (and not a prose defect in the changed lines, but materially part of the new behavior): coalescing is a device-
fetchbehavior only, faults of a shared open/read fail every attached restore, and a private child or upload failure fails one restore. Section 2.12 lists invariants and section 2.5 covers the staged transport; one clause on the shared-error scope belongs there rather than only in the PR body. Optional.
#5 [medium] Clean items: module/type/test comments and commit message pass
Checked and found acceptable in PR #496 (head f9c9191, single commit "Coalesce shared ancestor reads across concurrent Selene disk fetches", body matches the PR description):
- Commit subject follows the repository's imperative style and matches neighbouring selene commits (e.g. "Keep checkpoint cache counts instead of scanning for stats (#460)").
- Module doc comment, 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 behavior and use
[WINDOW_PAGES]/[WINDOWS_IN_FLIGHT]links that already exist. The following sentence is now slightly long-winded ("It also moves records between files and caller-owned registered buffers retained by the composite's memory tier") but was not made inaccurate. - New doc comments read correctly against the code: SharedFileState variants (1005-1017), SharedSegment (1019-1035), SharedWindow (1065-1091: "followers.is_empty() && disk_referenced == 0 && upload_referenced == 0" matches sweep_shared_windows at ~1740), DeviceInbound (1115-1117), plan_aligned_windows (697-699),
disk_opens/disk_window_reads/coalesced_windowsaccessors (1213-1233) and theirResourcesfields (192-200), test-support gating viacfg_attr(not(any(test, feature = "test-support")), allow(dead_code)). - Pass comments in pump_device_inbound (1815-1816 "Pass 1", 1842-1844 "Pass 2", "Pass 3", "Pass 4", "Pass 5a".."Pass 5e") are invariant/intent comments, not journey narration; acceptable under the prose skill.
- "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." describes the loop correctly.
- Test names and comments (e.g.
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) state the property tested. - Discord line present: "Discord: Dooner" (AGENTS.md "Contact on PRs and issues").