Prose report · NVIDIA/hyperflare-inference #496

Raw Markdown for agents: https://autobot.eidonix.com/p/534035fa-cf57-4b66-a358-edc91e6958ea.md

Prose review — PR #496, "Coalesce shared ancestor reads across concurrent Selene disk fetches"

Head 0c04b1e2 (base main), 3 files (+3358/−933): selene/src/disk_store.rs, selene/src/shard.rs, docs/prefix-cache-offload.md. Lens: Prose. No new commits since the previous pass, so previously fixed items remain fixed.

Key findings

Rules applied

Should fix

S1 — docs/prefix-cache-offload.md:333-366: one bullet, four topics, and the metrics contract stated twice

What is wrong. The bullet opens on the slot pool:

"Staged shares the host slot pool with the memory store and owns an independent transfer handle and the disk thread. store streams checkpoints through intake windows into record files; fetch streams them back to the GPU. With warm zero and disk enabled, the pool contains only intake slots."

and then, without leaving the bullet, runs through the two caller-buffer signatures (:337-340), shared handle plus window coalescing aligned to WINDOW_PAGES (:340-342), one upload per follower and slot release (:343-345), read_into independence (:345-346), the immutability/pin and close-before-Fetched invariant (:346-350), the sibling-demand preference that relaxes arrival order (:350-354), the two sharing limits plus the skip_pages % WINDOW_PAGES bound (:354-358), the shared-vs-private error scope (:358-362), and finally the accounting rule (:362-366). That is four topics — mechanism, invariants, limits and failure scope, metrics — in a section whose neighbouring bullets are single-purpose.

The same accounting statement appears again in §4:

"On DiskStore, StoreStats.bytes_in counts logical checkpoint bytes restored to GPU destinations across completed fetches, while StoreStats.inbound_rate measures physical staging-window disk reads so coalesced follower restores do not overstate device read bandwidth." (:1528-1531)

Why it matters. AGENTS.md:116-121 requires a clear hierarchy — the central design and principal correctness risks before supporting implementation detail — and warns against exhaustive inventories; the prose skill (:26-29, :40-43) requires documentation to state behaviour directly and scale detail to the change. The two limits and the failure scope are what a reader most needs to judge the mechanism, and here they sit buried mid-chain after four sentences of mechanism. The duplication has no checker: §4 is the measurement section where the contract belongs, while the §2.4 copy is a behaviour claim in a mechanism section, and any later change to the sampler must be made in both places (cf. N1, where one copy is already over-broad).

Fix. Keep §2.4 to what Staged does and how windows are shared — one paragraph, or a short paragraph plus two or three sub-bullets for "limits" and "failure scope"; drop the metrics sentence from §2.4 and leave §4 as its single statement; fold "relaxing strict arrival-order scheduling" into the limits bullet so the behavioural consequence is not lost. Everything here is factually accurate and present tense — this is structure, not accuracy.

AGENTS.md:116-121, .agents/skills/repo-prose/SKILL.md:26-29 (not opened).

Nits

N1 — PR description, What bullet: InboundWindowSample is scoped wider than the code

"Emit one TransportEvent::InboundWindowSample per completed physical window read from disk::Reply.elapsed (forwarded on rank 0 in Sharded, ignored on peer ranks) so DiskStore::inbound_rate prices admission from physical disk bandwidth while StoreStats.bytes_in stays logical."

The sole site that pushes TransportEvent::InboundWindowSample is Staged::apply_shared_disk (selene/src/disk_store.rs:1617-1620, the sample computed at :1605-1609), i.e. shared device-fetch staging windows only. The caller-owned host path (HostInbound :749-993, created in read_into at :1349-1361) increments the test-only disk_window_reads counter but never emits a sample, so a DiskStore restored through read_into (the composite path) does not feed DiskStore::inbound_rate from those reads — the composite keeps its own disk_inbound_rate. docs/prefix-cache-offload.md:362-366 uses the same broad phrasing ("physical staging-window disk reads"), and :1528-1531 is broader still.

Why it matters. AGENTS.md:95-102 requires the metric's scope to be attached to the claim; a reader pricing admission from inbound_rate cannot tell that caller-buffer restores are outside its sample.

Fix. In the What bullet and in both docs passages, say the sample is emitted once per shared device-fetch staging window, and state what feeds inbound_rate for caller-owned buffer reads. Severity: nit — the behaviour is defensible; the prose scope is what is off.

N2 — PR description, Result table: two read-reduction ratios do not match the MB columns

Row Before → After (MB) Ratio of means Claimed
27B simultaneous 18,177.5 → 4,306.7 4.221 4.22x ✓
27B +25 ms stagger 18,194.2 → 4,843.6 3.756 3.76x ✓
Flash-Next simultaneous 7,944.9 → 1,981.1 4.010 3.99x ✗
Flash-Next +25 ms stagger 7,958.0 → 2,251.5 3.535 3.52x ✗

All four TTFT deltas check out (−29.0%, −13.5%, −3.1%, −2.8%), so only the two Flash-Next reductions are off. The 27B rows state "means over 2 interleaved repeats"; the Flash-Next rows say nothing, so the column plausibly mixes a ratio of means with a mean of per-trial ratios. AGENTS.md:95-102 requires the headline comparison and metric direction with its scope; here the derivation cannot be told from the caption.

Fix. State in the table caption whether "Read Reduction" is a ratio of the tabulated means or the mean of per-trial ratios, and make the two Flash-Next values consistent (4.01x / 3.54x if a ratio of means) — and say for the Flash-Next rows whether they are single trials or repeats. Only the author's raw trial records can settle which was computed.

N3 — PR description, Result: the arrival-order relaxation the docs admit is not stated

docs/prefix-cache-offload.md:350-354 states a behavioural consequence the description never mentions:

"When free slots exist and multiple device restores are in flight, window selection prefers pending windows demanded by sibling restores so concurrent branches stay synchronized on shared ancestors before reading private tails, relaxing strict arrival-order scheduling across concurrent restores."

The What bullet mentions build_pending_demand and the sibling-demand preference; the Result lists the coalescing win and the two costs (no demand indexing for single restores, one extra partial window per segment). Nothing says 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 — which is precisely what a reviewer of a serving-path change needs to judge whether the TTFT numbers were bought at another request's expense.

Fix. One clause in What or Result naming the reordering and its cost (concurrent restores may reorder windows toward shared ancestors at the expense of strict arrival order among them), with a note that only aggregate burst medians were measured. AGENTS.md:95-102.

Verified clean at this head (checked, do not re-audit)

Open questions and what could not be verified