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:
heliopause/src/export/binding.rs:196-202unconditionally executesgraph.insert("draft_source".into(), "MTP".into())at line 201 for every speculative (and speculative-mixed) graph. It never reads the incoming value.- That file is absent from this PR's changed-file list (25 files, verified;
heliopause/src/export/binding.rsis not among them). - The producer change is
ignition/preparation/execution.py:32(field, default1),:102-104(validates1/2),:319(emits it). It is overwritten before it reaches the wire. - Export is the live route:
binding.rsexport_capture→capture.rs:3158(not opened)super::binding::execution(execution, &allocations)→ stored as the rank'sexecution. - The wire format already supports it:
helios/proto/runtime_core.proto:854(not opened)DraftSource { NO_DRAFT = 0; MTP = 1; COPY_DRAFT = 2; }. Only the writer is hard-coded. - Load then discards the graphs:
helios/src/runtime_core/selection.rs:277-298treats a shape ascopy_wideonly whengraph.draft_source == 2(line 280); the fallback MTP branch at:291-293requiresdraft_source == sourceanddraft_tokens <= drafts, which wide shapes (depth> draftsby construction, line 283) fail.
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
docs/cli-design.md:199-201— "--history-drafts… it does not change the graphs." After this PR the flag decides whetherdraft_source=2graphs load, and rewritesspeculative_widths(selection.rs:184, 277-298, 382-396). Not touched by the PR.docs/mtp-design.md:22-29— "Both settings use the same captured MTP graphs and buffers";:31-40describes copy drafts solely as the 65,536-token shared ring returning "up to seven" tokens. The PR makes the per-request SAM primary with the ring as strictly-longer fallback (scheduler.rs:1099-1158). Not touched.helios/manifest.md:29-53(not opened) — graph-dictionary spec omitsdraft_source.docs/scheduling-runtime-design.md:7-12(not opened) — module index omitssam.rs(not opened).
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)
- Two independent "dominated" predicates —
policy.rs:133-174(pairwise, requires equalmask/prefill_slotvia the guard at:132-140) vspolicy.rs:221-254(a second pass over all candidates withother.batch >= lanes, equalcapacity/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. - Second proposal-source authority —
GraphDescriptor::draft_source(manifest.rs:190-192) duplicatesspeculative_proposal_sourceand 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). - No single cost authority —
cost::Key(cost.rs:50-58) has nodraft_source, whileprepared()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; andhas_mtp(cost.rs:190-208) is an existence scan that counts unmeasured MTP entries, so one unmeasured MTP shape suppresses measured copy shapes frompacked_round_duration. - 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), and6duplicated insam.rs(not opened) andspeculation.rs:18with nothing keeping them equal. Only the6has any derivation, from one 512-token prompt. - Dead/speculative code —
RefreshState::idleis nowpub 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 ofpubSAM surface are test-only. - Duplication with drift —
request_copy_match_stats(scheduler.rs:1163-1205) re-implementsrequest_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
- Commit 3: untestable end-to-end — unreachable through export (§2.1), no in-tree producer of
draft_source=2, and it needs a freshly prepared core. - Commit 2: requires
--history-draftswith enabled learned speculation (selection.rs:179-180), history enabled before admission (scheduler.rs:1086-1092),decoded_history.is_some()(scheduler.rs:1849-1856), and non-grammar/non-host-stop requests (scheduler.rs:373-375). It also requires a core whose graphs declare copy-token inputs — andmodel/catalog.rs:99-101hard-errors at load whenhistory_draftsis set on a core without them, so the wrong model fails fast rather than silently. Perdocs/mtp-design.md:26, only theqwen3.8-flashMTP graphs do. - Rig reality: cn5 has 4× RTX PRO 6000 (SM120 — the right hardware class) but only GLM-5.3-Flash/dinov2 models, which do not declare copy inputs. cn7 has
Qwen3.8-Flash-Next-FP4-Localbut is 1× GB10, arm64, SM121 — explicitly outside qualified scope (docs/mtp-design.md:580-581, and the PR's own limitations name SM121/GB10 as unbenchmarked). - Every model on both rigs is listed at 0 GiB, so any test begins with a full Ignition prepare/export (hours), not a smoke test.
- The PR's own live numbers come from DeepSeek-V4.1-Flash TP4 on 4× RTX PRO 6000 — a model on neither rig, so no headline figure is reproducible here.
- No CI ran on the head commit, so even the 619/1,710 test counts are unverified.
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.
- A/B
mainvs branch, cn5, one model, TP1 (not TP4 — an irreproducible variable). - ≥200 short requests, each well under the 2,495 ms funding threshold, separated by idle gaps longer than the estimate TTL.
- Assert
flare_scheduler_executions_total{reason="timing_refresh"}andflare_scheduler_execution_nanoseconds_total{reason="timing_refresh"}(metrics.rs:937): ~0 before, >0 after. - Confirm readiness-wait exclusion via
flare_replay_readiness_wait_nanoseconds_total/..._readiness_samples_total(metrics.rs:941-948). - Regression guard: refresh spend must stay within
P <= 0.002/0.998 * O + D, andreason="acceptance_learning"must still be charged on raw physical time.
Test B — Padding dominance (14019718), ~2 h
- Same rig. Sweep
C = 1, 2, 3, 4, 6, 8— includeC=2/3, which the PR does not measure, and stop at 8 since the PR reports no effect beyond 8 and expects a flatmax_b == C. - Assert
max(batch)inflare_speculative_rounds_total{batch,width}equalsCon every cell (vsB16at C=4 andB32at C=6..16 onmain). - 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.
- 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.
- 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
- Wide copy-verify (commit 3) — until §2.1 is fixed with the round-trip test that would have caught it, a
draft_source=2recipe exists, and the new copy-only graph contract is owner-approved. - SAM copy drafts (commit 2) — no qualifying model on cn5; cn7's GB10/SM121 is outside qualified scope and is single-GPU/60 GiB.
- Power-limit transitions — conceded unmeasured; fragile and low-yield on shared rigs.
- Do not re-test SAM matching logic,
refresh_ordertiering, or Protobuf round-trips beyond the single load-and-serve smoke check — CPU tests cover these far more cheaply.
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.