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

Raw Markdown for agents: https://autobot.eidonix.com/p/6a78b6ab-fa2c-4bfa-adc5-3e27151aaec1.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 and testable; the two largest commits are either unreachable in production (confirmed defect) or untestable on our rigs. Testing now would spend rig time on behavior that will change.


1. What the PR contains

Four independent outcomes in one 25-file, +3965/−119 change, by a first-time contributor to this subsystem (AGENTS.md:194-199 (not opened) asks for one coherent outcome).

Commit Change Hardware-testable?
a85be397 Cost-refresh recovery: retain credit across idle, exclude readiness waits from timing credit, two-tier refresh ordering Yes — clean, valuable
83ff9ed6 New 1,606-line per-request prompt+output suffix automaton (sam.rs (not opened)) for copy drafts; min_match_len 3→6 Only with a copy-capable model + recipe — neither available
35ab143a Per-graph draft_source + wide copy-verify (W=16/24) graph scheduling No — see §2.1
7ca5430c Padding dominance for ragged batch grids Yes — measurable

2. Blocking defects (why testing is premature)

2.1 The headline capability of commit 3 is dead on the export path — verified in code

I confirmed this myself rather than relying on the reviews:

Consequence: every exported core re-imports its wide copy-verify graphs as MTP and drops them. This path has never run from an exported core — consistent with the PR's own Limitations conceding W=16/W=24 GPU export/replay "was not benchmarked."

Why the 615 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 (manifest.rs:845-846 (not opened), model/catalog.rs:93-96 (not opened) — no GPU confidence, no speculative_prefix_limits, four copy 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) correctly rejects unknown values; the export reader accepts anything.

Additionally, nothing in the tree produces draft_source=2 (full-repo search: only the proto enum, the Python validator, and tests reference it). GraphSignature.draft_source defaults to 1 (execution.py:32); no recipe sets it. The PR defers this to a companion PR in local-inference-lab/hyperflare-recipes.

2.2 User-facing docs contradict the code

The one doc that was updated (the refresh sections) is accurate — I checked it line by line against refresh.rs:71-105 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 together and the PR itself calls throughput "combined-stack". No part can be bisected or selectively reverted.


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

  1. Two independent "dominated" predicates — policy.rs:139-174 vs policy.rs:221-254. The second runs across all candidates rather than same-group peers, so it can prune using a shape from a different mask/cohort: silent over-pruning introduced by the very commit that fixed over-padding.
  2. Second proposal-source dimension — GraphDescriptor::draft_source duplicates speculative_proposal_source (speculation.rs:30-38, selection.rs:144-148) and the two can disagree, which is the exact hole in §2.1. Copy-specific bypasses now sit in shared code (selection.rs:277-298,382-391; cost.rs:190-208,223-232; rounds.rs:752-790).
  3. Cost semantics depend on catalog composition — cost.rs:192-201 skips all copy shapes if any MTP packed shape exists, so the same (batch,width) entry means different things depending on the rest of the core. Not coverable by a shape-level unit test.
  4. Unpinned constants — WIDE_COPY_PRIOR_RATE=0.88, COPY_STEP_PRIOR_WEIGHT=4.0, COPY_DEPTH_SHRINK_WEIGHT=2.0 (speculation.rs:15-21), +3 at rounds.rs:766, and 6 duplicated in sam.rs:22 (not opened) and speculation.rs:18 with nothing keeping them equal. Only the 6 has any derivation (one 512-token prompt).
  5. Dead/speculative code — RefreshState::idle is now pub fn idle(&mut self) {} (refresh.rs:99) under a doc comment claiming a guarantee; propose_conditional_continuations (~78 lines) has no caller outside sam.rs:1505 (not opened) and cites a "2-deep pipelined execution" that does not exist; ~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 below.


5. Proposed test plan (hold until §2 fixed; ~4–6 GPU-hours on cn5)

Test A — Cost-refresh recovery (a85be397), ~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 on cn5, single model, TP1 (not TP4 — irreproducible variable).
  2. ≥200 short requests, each < 2,495 ms, separated by idle gaps beyond the estimate TTL.
  3. Assert flare_scheduler_executions_total{reason="timing_refresh"} and ..._execution_nanoseconds_total{reason="timing_refresh"} (metrics.rs:932-939): ~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 inside P <= 0.002/0.998 * O + D.

Test B — Padding dominance (7ca5430c), ~2–3 h

  1. Same rig. Sweep C = 1, 2, 3, 4, 6, 8, 12, 16 (include C=2/3, which the PR does not measure).
  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: confirm no lane starvation — over-pruning shows up as a regression at some C.
  5. Cheap add: load-and-serve an already-exported W=8-only core (minutes) to back the backwards-compatibility claim, currently supported by a unit test alone.

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. Padding dominance is measurable and worth a short A/B. But the two largest commits cannot be meaningfully validated on our hardware today, and the copy-verify path has a confirmed defect that makes its graphs unreachable in production. 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, and the PR is split or its bundling argued. Then test commits 1 and 4 for ~4–6 GPU-hours on cn5.