Prose review — PR #496, "Coalesce shared ancestor reads across concurrent Selene disk fetches"
Head: cb3db468 (rebased onto main 6d74db3a, post-#504) · Base: main · Files: 5 (docs/prefix-cache-offload.md +38/−2; selene/src/disk_store.rs, selene/src/shard.rs, selene/src/shared/packed.rs, selene/src/shared/record.rs) · CI on head: no checks.
Key findings
- No blocking and no should-fix prose defects at this head. The PR description answers the four mandated questions in the mandated order (why → what → result → evidence) and ends with
Discord: Dooner; the docs change now has a clear hierarchy and states the metrics contract once; every prose claim I could check against the code is accurate. - One nit remains (description only): the Result/What sections never say that coalescing relaxes strict arrival order across concurrent restores, which
docs/prefix-cache-offload.md:435-438states and whichbuild_pending_demand/pick_next_pending_planimplement. - The substantial earlier findings are resolved at
cb3db468: the misplacedResources::allocaterustdoc, the over-broadInboundWindowSamplescope, the two Flash-Next read-reduction ratios, and the "single 250-word bullet + duplicated metrics" docs structure. - Not verifiable from source: the GB10 live numbers, Windows IOCP test counts, and the post-rebase SM121 A/B. The description's own "Not covered" paragraph names all three, so this is disclosure, not over-claim.
Rules applied: AGENTS.md:72-112 (required PR description: why / what / claimed result / evidence, in order), :114-132 (detail hierarchy, resolve references, no process assurances), :142-151 (mandatory Discord: line), :43-65 (required prose review against the repo-prose skill); docs/design-review.md:137-152 (not opened) (principle 16, "write without hidden context") and :153-159 (principle 17, Discord line); .agents/skills/repo-prose/SKILL.md (not opened) (present-state specification, no chronology, evidence as conditions → measurement → result → conclusion).
Nit
N1 — PR description (What and Result): the arrival-order relaxation is never stated.
- Counterpart in the docs:
docs/prefix-cache-offload.md:435-438— "When multiple device restores run concurrently, window selection prefers windows demanded by sibling restores before reading private tails, relaxing strict arrival-order scheduling." - Counterpart in the code (verified):
Staged::build_pending_demand(selene/src/disk_store.rs:2273-2294) counts, perWindowKey, how many healthy in-flight device restores have the same window unstarted (short-circuiting whenself.device_inbound.len() <= 1), andpick_next_pending_plan(:2299-2331) picks the plan with the highest peer demand (peer_demandat:2323-2325,:2326). So the doc sentence is accurate and the description omits the property. - What is wrong: the What bullet names
build_pending_demandas a mechanism, and the Result section lists the coalescing win plus the two costs (skip_pages % 64 != 0partial window; single-restore callers skipping demand indexing), but neither says that a restore can now let a later-arriving sibling's windows go first, and no per-request tail latency is reported beside the burst medians. - Why it matters:
AGENTS.md:95-102requires the headline comparison "with its scope and material limitations attached". This is a serving-path change whose numbers are burst-median TTFT; a reviewer needs to know whether those medians were bought at another request's expense, and whether the ordering guarantee changed. - Fix: one clause in What or Result, e.g. that concurrent restores may order shared-ancestor windows ahead of their own private tails, relaxing strict arrival order among them, and that only aggregate burst medians were measured.
- Severity: nit, and weak. Every request in the 8-way burst is measured, so nothing is hidden — the scheduling property simply goes unnamed.
Previously raised findings, now resolved at cb3db468
- Misplaced rustdoc (
Resources) — resolved.free_slotsnow owns its comment andallocatekeeps the original sentence with the body beneath it (selene/src/disk_store.rs:236-254). InboundWindowSamplescope — resolved. The description now reads "Record one(bytes, elapsed)sample per completed shared window read inStaged::inbound_samples", which matches the sole push site inapply_shared_disk(selene/src/disk_store.rs:2148-2150).TransportEvent(:84-106) carries no sample variant, so the out-of-band path claim is correct.- Flash-Next read-reduction ratios — resolved.
7944.9 / 1981.1 = 4.0103 → 4.01x;7958.0 / 2251.5 = 3.5345 → 3.53x. The 27B rows were already consistent (18177.5/4306.7 = 4.22,18194.2/4843.6 = 3.76), and all four TTFT deltas (−29.0%, −13.5%, −3.1%, −2.8%) check out. - Docs §2.4 structure and duplicated metrics statement — resolved. §2.4 is now a
Stagedparent bullet (docs/prefix-cache-offload.md:414-423) with three nested sub-bullets: mechanism (:424-431), invariants including the pin /disk_settledordering and the sibling-demand preference (:432-438), and "Limits and failure scope" (:439-448) ending in a pointer, "See section 4 forStoreStats.bytes_inandStoreStats.inbound_rateaccounting under coalesced restores." The metrics contract now appears exactly once, in §4 (docs/prefix-cache-offload.md:1612-1617). This satisfies the hierarchy rule atAGENTS.md:116-121; nesting is valid Markdown (4-space indent under a 2-character parent marker).
Verified accurate against the code (no re-audit needed)
- Docs call signatures (
docs:418-423) match the real signatures:write_from(disk_store.rs:1737-1745),read_into(:1836-1843),write_packed(:1766-1775),read_into_packed(:1787-1793). - §4 metrics statement (
docs:1612-1617) is true in code:StoreStats.bytes_inaccumulates logical bytes onFetchedOk (disk_store.rs:4442),inbound_rateis observed only from the out-of-band samples (:3649-3655, called frompoll_transport:3662,poll:4640,close:4678),progressis not incremented by them, andCompositeStorekeeps its separate end-to-enddisk_inbound_rate(selene/src/composite.rs:957,:1064-1065). - Forwarding claim (description):
Sharded::drain_inbound_samplesforwards onlyself.local(selene/src/shard.rs:1005-1012);Peer::forwarddiscards into a local vec (:1213-1214). Correct. Layout::record_slotsand the packed exemption:if !packed && layout.record_slots(plan.count, plan.row) > free(disk_store.rs:2320);device_inbound.len() <= 1short-circuit (:2275);WINDOWS_IN_FLIGHT = WINDOW_CREDITS = 2(selene/src/shared/limits.rs:18(not opened),disk_store.rs:64).- Last-user ordering and close accounting:
disk_settledbeforeFetched(disk_store.rs:2910-2918,SharedSegment::disk_settled:1512-1515);Staged::closereportsabandoned_jobsandleaked_sharedseparately (:3192-3225). - Hash work:
Hash for Headersits besidePartialEqand omits onlyversion(selene/src/shared/record.rs:144-202);RankSizesderivesHash(:96);packed::LayoutimplementsEq/Hashby exhaustive destructure (selene/src/shared/packed.rs:99-141);HeaderIdentitykeeps theArc::ptr_eqfast path and delegateshash(disk_store.rs:1444-1456); agreement is tested inheader_eq_implies_same_hash(record.rs:2228+). - Failure isolation: shared open/read errors flow through
with_record_read()and fail all attached records (disk_store.rs:2040-2080,:2145), while a follower's upload error fails only that record except whenis_packed_content_error(:2174-2181). This matches the docs "Limits and failure scope" bullet exactly. MAINTENANCE_DEFER_LIMITis absent at this head —Staged::pump_all(disk_store.rs:2957-2978) still drains maintenance unconditionally; the constant exists only on#497(pr/497disk_store.rs:66,:1787-1825). The description says so correctly, framing it as the recommended merge order rather than claiming the behaviour here — consistent withAGENTS.md:126-128(stacked-PR merge order must be explained).- Comments: present-tense, no chronology or journey narration — module doc (
:7-28),SharedFileState(:1472-1484),SharedSegment(:1486-1516),SharedWindow(:1537-1562),DeviceInbound(:1578-1590), pass comments (:2422-2459,:2864-2896). NoTODO/FIXMEor PR-number references in the diff; test-support counters are gated#[cfg(any(test, feature = "test-support"))]as described. - Commit message: single imperative subject scoped to the layer, body carries the same four-part argument; no attempts or pivots (
repo-proseskill). - No instruction-like content in the PR body, comments, or the changed docs; nothing attempted to direct the reviewer, and no material was copied out of the repository.
Open questions and what could not be verified
- Live GB10 numbers, Windows IOCP counts, post-rebase SM121 A/B: cannot be re-derived here (no toolchain, GPU, or NVMe). The description's "Not covered" paragraph names all three, including that the raw SM121 A/B was not rerun after rebasing onto
6d74db3a, so the provenance limitation is disclosed rather than buried; the benchmark table's parenthetical that head0c04b1e2was measured against pre-#504main(c0c4f798) with--lossless-kv-compression off, plus the equivalence argument forcb3db468with compression off, makes the claim checkable by a reviewer with the hardware. - Whether the one nit is worth a fix: it is a description-only omission with no hidden risk; only the author can decide whether to add the clause.
- Out of this lens: the layering of the sample mechanism, the hand-written
HashonHeaderIdentity, andpick_next_pending_planrestatingrecord_slotsare code-level questions for the other lenses, not prose defects.
Verdict: clean apart from the single nit above — no blocking issues, no should-fix issues.