Correctness report · NVIDIA/hyperflare-inference #540

Raw Markdown for agents: https://autobot.eidonix.com/p/8030f28b-e4a9-4604-b7dd-51c22b594dda.md

Review of PR #540 — helios: cost-refresh recovery, prompt+output SAM copy-drafts, and calibrated wide copy-verify

Head e5a69669. Lens: correctness (callers, configurations, state transitions, compatibility with persisted artifacts).

Verdict: no blocking issues; one should-fix and one nit.

Key findings

  1. Should fix — the scheduler capability tables omit draft_source, so an MTP graph and a copy graph at identical B/D/W/P are conflated by gpu_prefix_allocation. This PR deliberately allows such coexistence (cost.rs:170-174, test unmeasured_mtp_and_measured_copy_coexist_at_identical_shape_and_preserve_packed_duration at cost.rs:531-586), so the omission contradicts the design the PR introduces.
  2. Nit — ActionCosts::packed_round_duration returns None where docs/scheduling-runtime-design.md (not opened) promises Some(0), because its fallback arm tests "the MTP table is entirely empty" rather than "no MTP covering shape".
  3. Verified fixed — the prior export-path blocker (heliopause/src/export/binding.rs overwriting draft_source with MTP) is gone; copy cores can now round-trip.
  4. Verified non-defects — preempt/re-admit SAM state, RefreshState::idle removal, refresh_order two-tier ordering, packing source tie-breaks, ProposalSource::from_wire sharing.

Prior blocker verified fixed: exported cores preserve draft_source

heliopause/src/export/binding.rs:201-216 now derives the wire enum from the manifest field — None | 0 | 1 | "MTP" → MTP, 2 | "COPY_DRAFT" → COPY_DRAFT, anything else → Err(invalid("unsupported graph draft_source")) — and rejects COPY_DRAFT on a graph whose kind != "speculative" (including mixed). This matches the producer check at ignition/preparation/execution.py:102-108 (draft_source must be 1/2, 2 only on speculative graphs) and the load-time reader at helios/src/runtime_core/selection.rs:244-247 (![1, 2].contains(&graph.draft_source) for speculative graphs, graph.draft_source != 0 rejected otherwise). The round-trip test execution_preserves_mtp_and_copy_draft_source_and_rejects_unknown (binding.rs:1467-1510) covers 0, 1, 2, unknown integers, unknown strings and mixed+copy.

This is the charter's compatibility standard ("verify that existing data, artifacts, and exported cores still load"): a W=8-only core without copy graphs still exports and loads unchanged, and a core that does carry copy graphs now survives the copy_wide retention at selection.rs:277-298.

Should fix — capability tables omit draft_source, conflating identical-shape MTP and copy graphs

Nit — packed_round_duration returns None where the docs promise Some(0)

helios/src/scheduler/cost.rs:237-252: with copy holding an unmeasured covering shape (Some(0)), MTP holding no covering shape, and the MTP table non-empty at any other batch or width, the arm at :244-249 fails (it requires every MTP row to be all-None) and the match falls through to None. docs/scheduling-runtime-design.md (not opened) describes the combined lookup as returning zero "only when covering shapes exist without a positive measurement". The practical effect is confined to missing normalization evidence, since the consumer filters > 0 (helios/src/scheduler/service.rs:158), but the predicate should be "an MTP covering shape exists", i.e. (None, Some(0)) if mtp_covering.is_none().

Confirmed non-defects (checked in context)

Coverage and limits

Read in context: helios/src/scheduler.rs (admission/SAM, request_history_proposal, record_decoded_token, commit, complete_with_survival, post-completion loop), scheduler/{cost,refresh,policy,rounds,speculation,packing,service}.rs, helios/src/model.rs:320-374, model/{catalog,packing}.rs, runtime_core/selection.rs:130-320, runtime_core/serving.rs (not opened), server/runtime.rs (completion/plan/park paths), heliopause/src/{export/binding,python}.rs, ignition/preparation/execution.py, and the four touched design docs.

Not run: the Rust suites (cargo test with runtime-core,server and default features), the Python preparation tests, the SAM release microbenchmark, and any live GPU path including flare run, power-limit cost-refresh transitions, wide copy-verify export/replay and SM121/GB10. Both findings are from code reading. The capability-key finding needs the load test described above to be closed; the nit is provable from cost.rs:244-249 alone but harmless in current consumers.

Open questions