Pre test report report · NVIDIA/hyperflare-inference #496

Raw Markdown for agents: https://autobot.eidonix.com/p/c11705d8-9779-4bdf-9dbd-5b7e97b433e9.md

Pre-test report — PR #496 "Coalesce shared ancestor reads across concurrent Selene disk fetches" (round 4, head cb3db468)

Decision: REFER to hardware testing, on cn7 only, with a small plan (≈2.5–3 h of GPU time) behind a desk gate that must first confirm a prepared core exists. Last round I said do not test yet, because merged #504 had added a v4 packed disk path inside exactly the structures this PR deletes. That blocker is gone at this head and I verified it in code, not from the author's reply. All five lenses now return no blocking finding (Correctness clean, Conventions clean, Prose clean, Simplicity one cosmetic should-fix, Architecture one process-only should-fix). What remains is: a load-bearing benchmark measured on a different commit, one admission-pricing change that only a run can size, and a maintainer sign-off that is a merge gate but is not expected to change behaviour.

Head cb3db468 (rebased onto main 6d74db3a), 5 files, +8682/−5630: selene/src/disk_store.rs, selene/src/shard.rs (not opened), selene/src/shared/packed.rs (not opened), selene/src/shared/record.rs, docs/prefix-cache-offload.md. Author FujitsuPolycom (CONTRIBUTOR, Discord: Dooner). No CI at head; no human review. Security screen: all clear.


What changed since round 3, verified at this head

  1. The #504 collision is resolved — the packed path is ported, not deleted. write_packed (disk_store.rs:1766), read_into_packed (:1787), take_packed_read (:1830), HostDestination::Packed (:979, used :1303) and Source::HostPacked (:297) all exist again, and disk.rs:988 (not opened) still has the packed write. The packed path was then extended to coalesce: one shared disk::Job::ReadPacked per aligned window (:2674-2679) with the byte span computed from packed::Layout (:2650-2667), and win.packed_buf = reply.payload retained on the shared window (:2123-2124) until every follower's decode and upload finishes. Covered by concurrent_packed_fetches_coalesce_opens_and_read_packed_windows (:10545). Round 3's "semantic rewrite, not a rebase" verdict no longer applies.
  2. The rate sample is out of the cross-rank event enum. TransportEvent::InboundWindowSample is gone, along with both unreachable!() arms. Staged buffers (bytes, elapsed) in inbound_samples (:1663, pushed once per physical window at :2149 from :2136-2141) and the trait drains it out of band (drain_inbound_samples, default no-op :150, Staged impl :3165-3167, forwarded on rank 0 and discarded on peers in shard.rs:1005-1012 (not opened)/:1214). DiskStore::apply does an unconditional stats.progress += 1 (:4410) and the Fetched Ok arm now only adds logical stats.bytes_in (:4442) — so CompositeStore progress is no longer inflated once per physical window.
  3. The admission guard uses the allocator's own arithmetic: layout.record_slots(plan.count, plan.row) under a single hoisted transfers lock (:2306-2320), with packed segments correctly exempted (:2314-2319).
  4. Staged::close separates abandoned jobs (:3192-3194) from leaked shared staging (:3195) with distinct messages (:3214-3225).
  5. Hashing is now exhaustive: Hash for Header sits beside PartialEq with an exhaustive destructure omitting only the non-semantic version (shared/record.rs:165-202), so adding a Header field is a compile error rather than a silent coalescing failure; header_eq_implies_same_hash (record.rs:2229) pins agreement.
  6. Docs §2.4 is three nested bullets (docs:424-448) with the metrics contract stated once in §4 (:1612-1617). The round-2 docs finding is resolved.

What still stands, and why none of it blocks the run

Expected value of the hardware test — high but sharply bounded

The mechanism is real and in the right layer: host-side Rust I/O bookkeeping, no CUDA, no record-format change, no new flag, no per-model branch, sharing keyed on (path, expected Header) identity. Failure isolation is preserved (a private child or follower-upload error fails one restore; a shared open/read/packed-content error fails the cohort and drops only the corrupt endpoint's row, :4449-4455). Unit tests assert real properties — byte-exact SimulatedGpu pages and rows, pool.free_slots() == pool.slot_count(), no pinned index nodes.

Three things only a run settles, and they are precisely why this is worth referring:

  1. The load-bearing number is stale. The whole table (18,177.5 → 4,306.7 MB, 4.22×, TTFT 7,974.6 → 5,662.8 ms) was measured at 0c04b1e2 against pre-#504 main (c0c4f798). The head is a +8,470/−5,627 rebase that also added a new v4 packed window path. The "identical raw path when compression is off" argument is plausible and mostly borne out by inspection, but a hardware test cannot validate a number attributable to another tree. This is the first thing the run buys.
  2. Admission pricing changed silently (see above) — single-stream restore TTFT and physical bytes at parity with main is the check that makes it harmless.
  3. The ported packed interface boundary can be checked cheaply: requesting --lossless-kv-compression cpu|gpu against a core exported without a codec layout must fail at startup with a clear message (helios/src/runtime_core/memory.rs:638-646). One command, no GPU time, validates that the port did not regress the #504 surface.

Feasibility gates — check these before booking anything

These are the ways this run silently wastes an afternoon. I verified each against the repository.

Do not spend hardware time on

Minimal test plan — cn7, ≈2.5–3 h GPU (≈4–5 h wall clock)

Target: cn7, nvidia/Qwen3.8-27B-NVFP4, TP1 — the same GPU class and model as the author's evidence. 10 CPUs / 60 GiB RAM / 16 GiB scratch.

Step 0 — desk, no GPU (~30 min). Stop if red.

  1. Confirm a prepared TP1 Qwen3.8-27B core exists (flare models list) and the checkpoint weights are cached. If not, stop.
  2. cargo test -p selene --features test-support at cb3db468. Watch specifically: concurrent_packed_fetches_coalesce_opens_and_read_packed_windows, coalesced_restores_keep_inbound_rate_physical_and_bytes_in_logical, misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore, packed_disk_round_trip_restart_mixed_profiles_and_compaction, header_eq_implies_same_hash. Note the result of staggered_arrival_attaches_out_of_order_to_in_flight_windows — if it flakes that is a test bug, not a product bug, and does not justify GPU time.
  3. Build main (6d74db3a) once for the A/B arm — the current main, not c0c4f798, since the baseline must include #504.
  4. One startup check: flare run with --lossless-kv-compression cpu against a non-codec core must fail with a clear message.

Step 1 — the burst, A/B, simultaneous (~75 min GPU). The point of the test. flare run --prefix-cache-memory 0 --prefix-cache-disk <scratch> --prefix-cache-disk-limit 8G. Warm one ~61K-token shared prefix plus 4 distinct child branches to disk; restart so VRAM is cold; send 4 concurrent /v1/chat/completions follow-ups. Same script on current main. Three trials per arm, interleaved (head, main, head, main…) to cancel drift. Measure:

Three trials is enough; a 25–30% effect needs no tighter bound to be actionable.

Step 2 — correctness of the coalesced path (~20 min, folded into Step 1's runs).

Step 3 — the regressions this PR can plausibly break (~30 min).

Stop conditions. No read reduction in Step 1 → mechanism failure, stop and report. A consistent logprob divergence in Step 2 → data-path defect, stop and report with the diverging configuration. Single-stream regression beyond noise in Step 3 → report it as the under-stated cost of the PR.

Bottom line

Right problem, right layer, real and large bandwidth win, and tests that assert byte-exact behaviour rather than mocks. Round 3's blocker is genuinely cleared: the v4 packed path is ported and now coalesces, the physical rate sample is out of the wire-event enum, the admission guard uses the allocator's own arithmetic, and hashing can no longer drift silently. The three substantive items are one recorded maintainer decision that is not expected to change behaviour, one cosmetic triplication, and one metering bias whose direction is known and whose magnitude the plan measures. Refer it, run the plan once on cn7, and rest the merge decision on Step 1's physical-read delta and Step 3's single-stream parity — nothing more.