Explore report · NVIDIA/hyperflare-inference #582

Raw Markdown for agents: https://autobot.eidonix.com/p/988ef7b7-2e39-4016-a7af-5ae2193cec2e.md

Case file: PR #582 — "helios: avoid splitting prefill on zero-budget checkpoint anchors"

https://github.com/NVIDIA/hyperflare-inference/pull/582 · perf/helios-zero-budget-anchor-split → main · head a3c64835, base 167f22c8 · open, "ready for review", CHANGES_REQUESTED standing · no CI on head · +931/−16 in 7 files.

Key findings

  1. One change-request review is the whole discussion, and it is substantive: 2 blockers + 3 majors + 1 minor from a priority contributor. voipmonitor (author of TerminalPrefill #479) reproduced the benefit live on 4× SM120 (prefill_steps 2→1 and 3→2) and then showed two duplicate-RetentionRole::Anchor capture bugs in checkpoint_selection_uncached on ordinary multi-chunk workloads: upward GPU EWMA drift (stale known_whole) and Mixed-prefill chunk realignment. Both reproducers are concrete (checkpoints.rs:364–388, 466–505).
  2. The description's "optional endpoint eviction … remain unchanged" does not hold. The PR also changes inbound-restore role classification (scheduler.rs:1794, now via is_request_anchor_endpoint) and promote_request_anchor (checkpoints.rs:753–776, new prompt-end fallback), so a checkpoint already at the prompt end can be tagged/promoted to Anchor. That changes RetentionRank ordering and therefore eviction — the exact area of #568, merged the same day.
  3. Three doc files are edited and the description does not mention them (docs/cli-design.md +6/−3, docs/core-design.md +8/−4, docs/scheduling-runtime-design.md +5/−2). They are where the PR rewrites a previously stated invariant ("anchor retention is best effort and independent of duration estimates") to a priced rule at fraction 0 — a policy change, not a doc tidy.
  4. The change is >80% tests (~+880 of +931) and touches no TLA+ model. The new scheduler state anchor_fallback_from is not modelled; only the resulting reservation transitions are asserted against existing model edges (checkpoint_lifecycle_tests.rs +136).
  5. A new per-lane, per-commit, unmemoised O(prompt) pricing walk (is_request_anchor_endpoint, checkpoints.rs:390–420) is introduced outside checkpoint_planning_scope. That is the same class of per-commit CPU cost #459 was written to remove (production symptom there: runtime thread 96–100% CPU, GPUs idle, decode a few tok/s). The reviewer flags the analogous in-selection cost as Major #5 but not this one.
  6. No linked issue. search_items finds no bug report for zero-budget anchor splits; the motivating configuration is the --scheduler-checkpoint-extra-work-fraction 0 workaround yatesdr documented in #335, and the cost of an extra split launch was measured in closed #69.
  7. Author's own two-day-old PR #538 caused the #550 pricing regression in the same function #582 now prices from (interval_prefill_ns); #550 (different author) repaired it hours before #582 was opened.
  8. Process risk: based on a main that has moved 5–7 commits, in the file three PRs appended tests to in a single day (#568, #550, #582); no maintainer engagement yet; the diff is a single commit.

1. The change (what it does, in plain terms, and what the description omits)

Size. 7 files, +931/−16 (pr_files): helios/src/scheduler/checkpoints.rs +746/−4, helios/src/scheduler/checkpoint_lifecycle_tests.rs +136/−0, helios/src/scheduler.rs +11/−3, verification/helios-lifecycle/check.py +19/−0, docs/cli-design.md +6/−3, docs/core-design.md +8/−4, docs/scheduling-runtime-design.md +5/−2. Roughly 80% of the added lines are tests.

Behaviour, verified in code at head:

What the description does not say: the three doc files; the restore role-tagging change; the promote_request_anchor prompt-end upgrade; the O(prompt) per-commit pricing walk; the anchor_fallback_from-not-preserved gap; and the fact that ~880 of its lines are tests. The title says "zero-budget" but the change also covers zero snapshot capacity, a different switch.

What the description says that is not strictly delivered: "Optional endpoint eviction … remain unchanged" — eviction ranking changes indirectly via the two Anchor-promotion paths above; "Zero-cost aligned interior anchors remain eligible without adding a duplicate prompt-end anchor" holds only for the linear, no-drift case the unit test covers, and fails under the reviewer's EWMA-drift and Mixed-realignment scenarios.

2. The why

4. Recent activity

checkpoints.rs is currently the hottest file in the repo: on 2026-11-28 alone it took #568 (5deacda9), #550 (1364062c) and #582 (a3c64835), plus #569 (7cd83f32) and #426 (da578c5c) in the preceding days. The wider area saw seven main commits the same day (ba3afb13 #589, 9375d679 #502, 19c098c8 #506, 2bdc8472 #573, a54a8b8a, 70e0f4a8 #579, 1364062c #550, 7cd83f32 #569). #582 is based on 167f22c8, five to seven commits behind, and will need a rebase — the same append-tests-on-top collision #550 had to resolve.

#582 builds on #568's prefill_catalog_costs/protected-budget code and on #550's pricing rule, and reverses neither. Its doc edits rewrite sentences that predate both (see §7), so anyone reviewing the docs needs to know they change a design statement, not just wording.

5. People

6. Community

Exactly one item of engagement: voipmonitor's review at 2026-11-28 22:13, ~90 minutes after opening. No comments, reactions, or maintainer responses; no follow-up push (single commit is still the head).

Its verdict wording: "the motivation is solid, TLA+ conformance checks pass, and live 4× SM120 serving confirms the intended reduction in prefill splits at --scheduler-checkpoint-extra-work-fraction 0, but two bugs in checkpoints.rs cause duplicate RetentionRole::Anchor captures on normal multi-chunk workloads." Their runs: cargo test … --lib scheduler:: 390 passed / 0 failed; check.py (8 TLA+ models + mutations) PASSED; live 4× SM120 DeepSeek-V4.1-Flash TP4 at fraction 0 — 242-token 2-turn chat prefill_steps 2→1 (anchor_captures = 1), 12,212–12,232-token multi-chunk 2-turn 3→2 in all 5 runs (but flare_checkpoint_skips_total{reason="work_budget"} incremented 1..3 per request at fraction 0.0, confirming Major #5), 64K cold NIAH 71,429 tok at 59,453 tok/s.

Findings in brief: Blocker 1 duplicate Anchor on upward EWMA drift (known_whole latched at 512_000 ns vs live 512_300 ns → split reclassified as costly at the second chunk, second Anchor at the prompt end); Blocker 2 duplicate Anchor when Mixed prefill shifts alignment (fallback at start 0, zero-cost interior at start 256, fallback again at start 768); suggested fix = price whole/before/after from one catalog snapshot and latch an explicit (raw_anchor, chosen_anchor) that survives clear_reservations(); Major 3 is_request_anchor_endpoint hardcodes start 0 and checks the raw anchor before limits.snapshots == 0, so a partial prefix hit (baseline_start 88, raw_anchor 600) can promote both 600 and 1024; Major 4 clear_reservations() wipes anchor_fallback_from; Major 5 O(N) wasted pricing and spurious checkpoint_skip_work_budget at fraction 0; Minor 6 move the snapshots check, fix stale doc sentences, add regression tests for EWMA drift / Mixed / partial prefix hit / preemption, and replace the brittle string-literal mutation.

Notes on the review itself: the blocker 🅱reproducers are ready-made tests; and the reason the PR's own test missed Blocker 1 is that the new complete_test_step helper feeds dur_ns straight into gpu_ns[0] with 1_000 where a real 512-token prefill is 512_000, driving the EWMA down so saturating_sub clamps the split cost to 0 (which symmetrically makes genuinely costly splits look free).

7. Project fit

8. Claims and evidence (verified vs claimed vs contradicted)

Claim Backing
"No checkpoint cuts when snapshot capacity is zero" Verified in code (checkpoints.rs:460–462) and by the new test zero_snapshot_capacity_produces_no_cuts_and_never_splits_prefill. Narrower than it reads: pre-existing boundary_tests.rs:193 snapshot_capacity_does_not_disable_prompt_fallback_anchor already asserted checkpoint_anchor_captures == u64::from(snapshots > 0); the new part is that no cut/split is planned.
"Interior anchor only when pricing predicts zero extra work" Verified (:467–511, anchor_split_is_zero_cost), covered by 3 new unit tests + 1 lifecycle test. Not covered: EWMA drift, Mixed realignment, partial prefix hit below the raw anchor, preemption/readmission — all four paths the reviewer reproduced.
"Avoids extra padded prefill launches" Author: no served measurement (explicit limitation). Reviewer: prefill_steps 2→1 and 3→2 on 4× SM120. No ms/% delta anywhere.
"Preserves prefix reuse across single- and multi-chunk prompts" Verified at unit level (new tests assert the prompt-end checkpoint is published as Anchor and hit as prefix, with Restore + Speculative and a promotion from Endpoint to Anchor). No served cache-hit number.
"Zero-cost aligned interior anchors remain eligible without a duplicate prompt-end anchor" Tested for a linear aligned case (Part A of zero_fraction_aligned_interior_anchor_and_mixed_prefill_preserve_exact_contracts, 512 in 1024). Contradicted under the reviewer's non-linear/drift scenarios, which produce duplicate Anchors.
"Optional endpoint eviction … unchanged" Contradicted indirectly: restore role tagging (scheduler.rs:1794) and promote_request_anchor (checkpoints.rs:753–776) can raise a checkpoint to Anchor, changing RetentionRank order and thus eviction. Undisclosed.
Test-evidence claims (27 + 4 passed, pytest 312, check.py --mutations full) Consistent with the reviewer's wider scheduler:: run (390 passed, 0 failed). Two disclosed base failures (model::tests::packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape, server::runtime::phase_tests::worker_observes_prefill_decode_and_prerequisite_timings) match pre-existing failures disclosed in #540 and #567.
Mutation covers the new fallback Verified but brittle: exact 13-line string replacement requiring a single occurrence (check.py:326–342); breaks on reformatting. No TLA+ state added for anchor_fallback_from.

9. Reach

10. Process

Opened 2026-11-28 20:45, reviewed 22:13 the same day; single commit a3c64835; branch based on 167f22c8, 5–7 commits behind main; no CI checks on the head commit; no labels (notably no triage:design-review, which #69 carried for the same design question); author has not yet responded to the change request; the PR body follows the charter's why/what/result/evidence format and names its candidate and base commits, including an explicit limitations line. The candidate link in the body points at the author's personal fork (FujitsuPolycom/flare-local-inference) at the same commit id as the PR head — redundant, not misleading. Verification was "in WSL2" only, no Linux-native or aarch64 run (unlike #550).

Open questions / not found