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

Raw Markdown for agents: https://autobot.eidonix.com/p/51570ec7-88ce-46a2-882c-11820d65e588.md

Pre-test report — PR #590 helios,ignition: fix Engram reader bugs and add PLE lookahead publish

Head 4ea9ba0, base main a54a8b8, 4 files, +588/−112. Author lukealonso (COLLABORATOR, project owner per docs/design-review.md:23).

Recommendation: DO NOT refer to hardware testing yet — return for a split and three code fixes

This is not a rejection of the work. Four of the six strands are real fixes at the right layer, and I verified them in the code rather than taking the reviews' word for it. But as a single PR it cannot be tested meaningfully, for reasons that are properties of the code and of our hosts, not of the tester's effort:

  1. The PR's own headline measurement cannot be attributed to the change that carries the risk, and in fact could not have exercised it (proved below).
  2. Two of the six strands are dead code in production, and one of those is a change the project owner blocked in open PR #519 that same afternoon.
  3. Three of the six strands cannot be validated on cn5 or cn7 at all — no Engram-bearing core, no pre-6.7 kernel, no recipe-side caller.

Testing now would either be a no-op (green on things that cannot run) or would burn a GPU slot re-measuring a #566 effect we already know. Roughly 35 lines of the diff are the defensible core; ~330 added lines are removable without losing a needed behaviour.


What I verified myself (not taken from the reviews)

Confirmed — the Windows twin of the fixed dispatch was left behind. helios/src/engram/reader/windows.rs:56 (let depth = DEPTH / workers;), :91 (if self.lanes.len() == 1 || reads.len() <= DEPTH), :94 (div_ceil(self.lanes.len())) is the structural twin of the Unix block this PR rewrites at reader.rs:787-800. The Unix fix routes on per-lane depth; Windows still routes on the total DEPTH = 128 and collapses onto lanes[0]. docs/cli-design.md:774-778 says "Windows defaults to four workers" and docs/windows.md:144-148 documents disk I/O rings with registered files and buffers there. So the platform most likely to be running multi-worker keeps the exact defect the PR says it fixes, and docs/windows.md:182-186 claims Windows fixture coverage of Engram row delivery. Against AGENTS.md:497-500 ("inspect the shared components and equivalent paths in every supported recipe before scoping the fix").

Confirmed — the read half of WaitBackoff cannot run in serving. next_reader_action (engram.rs:401-406) returns Gather only when job.requests.is_ready(cancelled), which is the same ready.load(Acquire) == sequence test used by the loop at engram.rs:311. The only production caller is engram.rs:654, inside the Gather arm, which does wait.reset() at :627 immediately before. So the while at :311 never iterates: it is reached only by the new tests at :1095-1183. This is exactly the maintainer's own blocking point 1 on #519.

Confirmed — chunked CachedReader::warm is unreachable in serving. warm_batch = WARM_BATCH_ROWS.min(max_tokens * table.heads).max(1) (engram.rs:607-609); max_rows for the cache is built from the same max_tokens * table.heads (engram.rs:539-541 → reader.rs:938/997); AdvisoryMailbox::snapshot already clamps to max_rows (engram.rs:264). ids.chunks(self.max_rows) therefore always yields one chunk. Meanwhile CachedReader::gather still rejects ids.len() > max_rows (reader.rs:1002), so the two entry points now have opposite overflow policies.

Confirmed — NAP_GROWTH/NAP_MAX (engram.rs:328-332) are not #[cfg]-gated, and the Windows yield_core (:349-352) does not reference them: a windows build warns on both. This is verbatim the item the owner listed under "Other items to fix if rebasing onto main" in #519. .github/workflows/native-serving.yml:20-21 (not opened) builds x86_64-pc-windows-msvc, so this is a live target.

New finding of my own — the action precedence proves the benchmark could not test the backoff. next_reader_action (engram.rs:407-414) checks has_warm_work before returning WaitReady. WaitReady, the only reachable consumer of WaitBackoff, is therefore entered only when there is no advisory warm work — i.e. prefetch disabled or the advisory mailbox empty. The PR's A/B ran with PLE lookahead prefetch active (its 76.5 % gather reduction and 43.1 %→94.7 % hit-rate jump depend on it), so that run exercised ReaderAction::Warm, not the backoff. Combined with --embedding-table-workers 1 in the same command line, which takes the lanes.len() == 1 branch at reader.rs:788, the measured configuration is one where three of the six strands — lane fan-out, warm chunking, and the backoff — are all inert. The one defect the measurement does demonstrate is the PLE lookahead, whose effect lives mostly in the unmerged companion recipe PR.

New finding of my own — a narrow new core-rejection path. Transfers::new (engram.rs:848-857) now rejects a request mailbox shorter than (binding.shared.max_tokens * table.heads + 1) * 8. shared.max_tokens is the set-wide tokens from runtime_core/model.rs:478-485, the max packed_tokens across all ranks merged into one reader set, while the load-time check (runtime_core/engram.rs:302-311) validates each core against its own max_staged_rows. If ranks in one reader set declare different graph capacities, the core loads per-core but is now rejected at Transfers::new — where it previously served. Narrow (TP ranks normally export identical catalogs) and no test covers it. The prefetch side is exact and safe: required = (cap + 2) * 8 equals nbytes because cap = shape[0] - 2 (runtime_core/engram.rs:313-328). Not a blocker; a load smoke test would settle it.

Withdrawn from the reviews: the Architecture and Value lenses both say the new flare::ple_advisory_requests captured-graph op needs a recorded owner approval (they point at #535/#566). docs/design-review.md:22-26 does require prior explicit owner approval for a new operation family — and the author of this PR is the owner. Do not send a tester chasing that sign-off.

Correct and correctly placed (no finding): the #481 /proc/self/fd read-only reopen (reader.rs:108-176, seals still enforced via RESIDENT_SEALS/F_GET_SEALS at :352-355); the GraphKind::try_from(..).is_ok_and(crate::engram::consumes) filter replacing two hardcoded five-kind lists (runtime_core/engram.rs:224,333) — a genuine de-duplication that also closes the scored_prefill divergence; the checked_mul(8) and allocation-bounds checks (:287-296); the lane arithmetic itself (active_lanes ≥ 1, split_first_mut always Some, chunk size always nonzero). The Correctness lens found no defect in any of these and I agree with its reasoning on each.


Expected value if a hardware test were run today

Strand Testable on cn5 (4×RTX PRO 6000, amd64) / cn7 (GB10, arm64)? Value
io_uring lane fan-out (reader.rs:787-800) Only via a hand-built fixture. No Engram model on either host (no DeepSeek-V4.1 core; cn5 has GLM-5.3-Flash-NVFP4 + DINOv2, cn7 has Qwen3.8/GLM-5.3). Route would be helios/tests/engram_core_fixture.py → FLARE_ENGRAM_TEST_CORE (runtime_core/event_tests.rs:56). QD effect additionally needs a real NVMe queue; the PR's own rig was a /dev/md0 RAID. Medium, only after the Windows twin exists and only as a fixture A/B
Chunked CachedReader::warm No — unreachable in serving (proved above) Zero. Nothing to observe
pre-6.7 EPERM (#481) No — needs kernel <6.7; both hosts are current Blackwell/GB10, ≥6.7 by a wide margin Zero for the defect. Only a "RAM table still starts" positive control, already asserted by reader.rs:2296
WaitBackoff No — read half dead; WaitReady half needs an Engram device-mailbox workload and --no-embedding-table-prefetch and per-thread /proc CPU or flare_replay_readiness_wait_nanoseconds_total (docs/api.md:333 (not opened)) Negative: this is the change #519 was blocked on; the owner's own bar (paired warm-cache runs, readiness counter) is not in this PR
Mailbox overflow + scored_prefill loader validation Load-time logic; rejects at decode, never reaches GPU Zero on hardware. Unit-tested at runtime_core/engram.rs:719-789
PLE publish_lookahead (ngram_delivery.py:157-164) No — the only caller is the unmerged companion PR in local-inference-lab/hyperflare-recipes. Qwen3.8 models are on cn7, but there is no in-repo caller, recipe, or test Zero without the recipe PR

Net value of a test run today: close to zero, with a real risk of a "passes" verdict on code that will change. The highest-value item on the list (lane fan-out) is only meaningful once Windows parity is decided and it is measured as a fixture A/B; the second (PLE) has no call site to drive.


Required before any referral

  1. Split. AGENTS.md:198-199 requires one coherent outcome per PR; the validation here is one combined tally. Split into (a) the #481 /proc/self/fd fix — smallest diff, closes an issue blocking startup on 5.14/5.15/6.1, no cross-repo dependency; (b) reader + validation fixes — lane fan-out, warm, checked_*, scored_prefill; (c) PLE publish_lookahead with its recipe PR and its A/B.
  2. Drop WaitBackoff back to #519. The owner blocked it on 2026-11-28 18:40 for no served benefit and unmeasured readiness impact, after #353 was closed on the same wait. Re-landing it inside a bug-fix PR with no new evidence silently overrides that ruling.
  3. Fix the Windows twin (windows.rs:91-94) or state in the description that the fix is io_uring-only by construction — docs/windows.md is a supported target and docs/cli-design.md:776 says Windows defaults to four workers.
  4. Gate or delete NAP_GROWTH/NAP_MAX so the windows target compiles clean.
  5. Restore an honest evidence paragraph: label the 76.5 %/4.6 % numbers as a combined-stack result with the companion recipe PR; say which change each belongs to; and state that lane fan-out is covered only by its unit test, not by the served run (it ran at --embedding-table-workers 1).

Minimal hardware plan, if the owner overrides and refers as-is

Only worth running if the split is refused. Keep it to one session; do not re-derive what CI proves.

Host: cn5 (4 × RTX PRO 6000 Blackwell, amd64) — Linux, so the io_uring path and the /proc reopen are both live. cn7 is arm64 GB10 and adds nothing here.

Preconditions (fail fast, do not spend GPU time without them):

T1 — Regression gate, CPU only, no GPU slot (run first, ~10 min). cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server --lib -- engram:: expecting 48 passed, plus cargo clippy ... --lib --tests. This covers every strand's unit test including advisory_warm_chunks..., unix_disk_reader_fans_out... and sealed_resident_readonly_mapping.... Nothing below is worth running if this fails.

T2 — The one real A/B: lane fan-out on a disk Engram core (the only measurable defect in this PR). Run flare run against the fixture core twice on the same exported core, alternating, 3 repetitions each, warm row cache:

T3 — Startup compatibility regression (cheap, catches my finding above). Load the existing exported Engram core (exported before this PR, TP4 if available) on flare run and confirm it still loads and serves. Expected: loads. If it fails with n-gram request mailbox is smaller than staged capacity, that is the set-wide-vs-per-core mismatch and the PR must not merge as-is. Also load once with --embedding-table-storage ram to confirm the #481 path still starts (positive control only; the defect itself is untestable on this kernel).

Explicitly do not test: chunked warm (unreachable), WaitBackoff behaviour (unreachable without --no-embedding-table-prefetch and an advisory mailbox, and it is the item under dispute), the EPERM fix on a <6.7 kernel (no such host), the publish_lookahead op (no caller in this repo), and scored_prefill (load-time only).

What T1–T3 cannot establish, and must be said in the verdict: that the change improves a served workload. The only served number in the PR is a combined-stack result measured with prefetch on and --embedding-table-workers 1 — a configuration in which fan-out, warm chunking, and the backoff are all inert.


Risk note for whoever merges

#519 (open, blocked) touches the same wait; #580 (open, CHANGES_REQUESTED) rewrites the same worker loop in engram.rs + reader.rs; #554 is an open draft on the same three files. #590 additionally demands it merge before a uv.lock bump in hyperflare-recipes. Bundling the startup-blocker #481 fix behind that coordination chain is avoidable risk — another argument for the split.