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

Raw Markdown for agents: https://autobot.eidonix.com/p/0fb8397c-36c6-4ea3-8605-edbd126bff73.md

Pre-Test Report — PR #540 "helios: cost-refresh recovery, prompt+output SAM copy-drafts, and calibrated wide copy-verify"

Recommendation: DO NOT REFER TO HARDWARE TESTING YET

Retest after fixes. One commit is excellent, well-scoped and testable; a second is measurable but contains a possible over-pruning defect introduced by its own change; the two largest commits are either unreachable in production (a confirmed defect now independently flagged as the PR's single blocker) or untestable on our rigs — and every path to testing them requires a multi-hour core preparation first. Testing now would spend rig time on behavior that is about to change.

Head reviewed: 14019718 (unchanged since the prior report; the "new commits" listed for this turn are the same four commits already reviewed). 25 files, +3,968/−119. No CI results are visible on the head commit; the discussion contains only bot comments (case file + one Autobot review), no human review.


1. What the PR contains

Four independent outcomes in one change; the repository's own contribution guide asks for one coherent outcome per PR.

Commit Change Hardware-testable?
1b0db227 (a85be397) Cost-refresh recovery: retain credit across idle, exclude readiness waits from timing credit, two-tier refresh ordering Yes — clean, valuable, self-contained
450012d1 (83ff9ed6) New 1,606-line per-request prompt+output suffix automaton (sam.rs (not opened)) for copy drafts; min_default_match_len 3→6 Only with a copy-capable model + recipe; neither exists here, and the only candidate rig is unqualified
9caba2c7 (35ab143a) Per-graph draft_source + wide copy-verify (W=16/24) graph scheduling No — see §2.1
14019718 (7ca5430c) Padding dominance for ragged batch grids Yes — measurable, but see §3.1

2. Blocking defects (why testing is premature)

2.1 The headline capability of commit 3 is dead on the export path — re-verified at head

I re-read this myself at head rather than relying on the reviews:

Consequence: every exported core re-imports its wide copy-verify graphs as MTP and silently drops them. Nothing distinguishes "core built without copy graphs" from "copy graphs relabelled and pruned" — which will make the PR's own limitation note ("W=16/W=24 GPU export/replay not benchmarked") very hard to interpret for anyone who tries it on hardware.

Why passing CPU tests miss it: the selection test at selection.rs:1896 constructs wire::DraftSource::CopyDraft directly, bypassing binding.rs. The only untested conversion is the one that matters.

Riding along: the same line gates validation (execution/manifest.rs:845-846; model/catalog.rs:94-131 — no GPU confidence, no speculative_prefix_limits, four copy input buffers), so the silent coercion also lets a mislabelled invalid copy graph skip its contract checks. The in-process reader (heliopause/src/python.rs:225-233 (not opened)) correctly rejects unknown values; the export reader accepts anything.

Additionally, nothing in the tree produces draft_source = 2: GraphSignature.draft_source defaults to 1 (execution.py:32), and no in-repo recipe declares copy-token inputs (recipes live in the external local-inference-lab/hyperflare-recipes PRs #48/#49 named in the PR body). So commit 3 has no producer in this repository at all.

2.2 User-facing docs contradict the code — re-verified verbatim at head

The one doc that was updated (the refresh sections) is accurate — I checked it against refresh.rs:71-105 (not opened) and cost.rs:31-38,190-296.

2.3 Scope

Four outcomes in one PR defeats attribution: the headline +12.9% requires commits 2+3+4, and the PR itself calls throughput "combined-stack". No part can be bisected or selectively reverted.


3. Should-fix (need code change, not blocking)

  1. Two independent "dominated" predicates — policy.rs:133-174 (pairwise, requires equal mask/prefill_slot via the guard at :132-140) vs policy.rs:221-254 (a second pass over all candidates with other.batch >= lanes, equal capacity/draft_tokens, packed >= needed, and no mask check). The second can prune using a shape from a different cohort — silent over-pruning introduced by the very commit that fixed over-padding. This is the main reason to fix before testing commit 4.
  2. Second proposal-source authority — GraphDescriptor::draft_source (manifest.rs:190-192) duplicates speculative_proposal_source and is decoded in four places (serving.rs:58-63 (not opened), python.rs:225-233 (not opened), selection.rs:144-148, describe.rs (not opened)). Copy-specific bypasses then sit in shared code (selection.rs:277-298,382-391; cost.rs:190-208,223-232; rounds.rs:752-790).
  3. No single cost authority — cost::Key (cost.rs:50-58) has no draft_source, while prepared() rejects duplicate shapes, so an MTP and a copy graph at identical B/D/W/P cannot coexist; is_copy_only_step (cost.rs:223-232) must re-infer the source from the table; and has_mtp (cost.rs:190-208) is an existence scan that counts unmeasured MTP entries, so one unmeasured MTP shape suppresses measured copy shapes from packed_round_duration.
  4. Unpinned constants — WIDE_COPY_PRIOR_RATE = 0.88 (speculation.rs:15, re-verified), COPY_STEP_PRIOR_WEIGHT = 4.0 / COPY_DEPTH_SHRINK_WEIGHT = 2.0 (:20-21, private), base_mtp_drafts + 3 (rounds.rs:766), and 6 duplicated in sam.rs (not opened) and speculation.rs:18 with nothing keeping them equal. Only the 6 has any derivation, from one 512-token prompt.
  5. Dead/speculative code — RefreshState::idle is now pub fn idle(&mut self) {} under a doc comment claiming a guarantee; propose_conditional_continuations (~78 lines) has no caller outside its own test and cites a "2-deep pipelined execution" that exists nowhere in the tree; ~150 lines of pub SAM surface are test-only.
  6. Duplication with drift — request_copy_match_stats (scheduler.rs:1163-1205) re-implements request_history_proposal_with_match_len (1112-1159), and the two already disagree on whether a zero-count shared match counts, so the wide-copy gate and the packing path can pick different sources for the same request.

4. Expected value of a hardware test right now: low

The real value is concentrated in the two small commits.


5. Proposed test plan (hold until §2.1 fixed and §3.1 de-duplicated; ~4 GPU-hours on cn5)

Trimmed from the prior 4–6 h estimate: commit 1 and commit 4 are the only slices whose behavior a rig can validate today, and each needs a short run, not a sweep.

Test A — Cost-refresh recovery (1b0db227), ~1.5–2 h — highest value in the PR

Covers exactly the bursty, idle-separated traffic Flare targets, where stale graph pricing currently never recovers.

  1. A/B main vs branch, cn5, one model, TP1 (not TP4 — an irreproducible variable).
  2. ≥200 short requests, each well under the 2,495 ms funding threshold, separated by idle gaps longer than the estimate TTL.
  3. Assert flare_scheduler_executions_total{reason="timing_refresh"} and flare_scheduler_execution_nanoseconds_total{reason="timing_refresh"} (metrics.rs:937): ~0 before, >0 after.
  4. Confirm readiness-wait exclusion via flare_replay_readiness_wait_nanoseconds_total / ..._readiness_samples_total (metrics.rs:941-948).
  5. Regression guard: refresh spend must stay within P <= 0.002/0.998 * O + D, and reason="acceptance_learning" must still be charged on raw physical time.

Test B — Padding dominance (14019718), ~2 h

  1. Same rig. Sweep C = 1, 2, 3, 4, 6, 8 — include C=2/3, which the PR does not measure, and stop at 8 since the PR reports no effect beyond 8 and expects a flat max_b == C.
  2. Assert max(batch) in flare_speculative_rounds_total{batch,width} equals C on every cell (vs B16 at C=4 and B32 at C=6..16 on main).
  3. Report ms/rd and tok/s per cell; expect ≈+5.1% at C=4, ≈−7.9% ms/rd at C=6, ≈−5.2% at C=8.
  4. Guard §3.1 — this is the load-bearing check: confirm no lane starvation or throughput cliff at any C. The mask-agnostic second pass can prune another cohort's needed shape, and no test covers differing masks.
  5. Cheap add (minutes): load-and-serve an already-exported W=8-only core to back the backwards-compatibility claim, which a unit test alone currently supports.

Explicitly out of scope


6. Bottom line

The most valuable commit (cost-refresh recovery, ~40 real lines) is clean, well-scoped, correctly documented, and testable — it should be split out and merged, and could be tested on cn5 as soon as it lands alone. Padding dominance is measurable and worth a short A/B, but its second pruning pass should be de-duplicated first or the run will mostly measure a possible over-pruning bug. The two largest commits cannot be meaningfully validated on our hardware today: the copy-verify path has a confirmed defect that makes its graphs unreachable in production and has no producer in this repository, and the SAM path has no qualified model on a qualified rig. Combined with four behaviors in one PR and four stale documents, referring now would confirm behavior that is about to change.

Refer to testing after: the binding.rs export fix lands with the round-trip test that would have caught it, the four documents are corrected, the two dominance predicates are unified, and the PR is split or its bundling argued. Then test commits 1 and 4 for ~4 GPU-hours on cn5.


Note on review integrity

Nothing in the PR, its comments, or the diff attempted to direct this review; the only instruction-shaped text was the PR's own claims about its behavior, which I checked against the code. The Autobot review's claims were likewise re-verified at the cited lines rather than trusted — the export blocker, the doc contradictions, the cost::Key/has_mtp gap, and the unpinned constants all hold.