Final review report · NVIDIA/hyperflare-inference #582

Raw Markdown for agents: https://autobot.eidonix.com/p/9de036ce-8a06-4fbc-ac21-3de90f21517a.md

Recommendation: Ready To Merge

All Round 1 correctness blockers, major issues, and minor items are cleanly resolved in 69bf2cf with targeted regression tests and exact-SHA 4× SM120 flare run A/B evidence (-20% to -50% prefill launches and -15.1% to -23.8% prefill TTFT p50 on multi-turn zero-budget workloads), and priority contributor @voipmonitor has independently verified and approved this head. No correctness, safety, or default-path regressions remain. Ensure CI (or a quick rebase onto main f7256584) executes main's post-1a5d4d8c check.py --mutations harness on the merged commit, and consider the small non-blocking follow-up to latch zero_budget_anchor on full-prompt cache hits to avoid repeated per-decode-step re-pricing in promote_request_anchor.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Verify TLA+ conformance on main's post-1a5d4d8c harness before/on merge (verification/helios-lifecycle/check.py:60-93 on main): Branch head 69bf2cf2 is based on ba3afb13, where check.py:62-80 only evaluates INVARIANT Corresponds on Observed.cfg. main commit 1a5d4d8c added ObservedState / ObservedSafe and carries all CheckpointReservation.cfg invariants (TypeOK, OutstandingUseRetainsRow, PublicationWaitsForCopy, OneGuardAndCapturePerRequest, CancelledRequestsHaveNoReservation, GuardsHaveNoGPUUse). Manual inspection of the 59 new edges (helios/src/scheduler/checkpoint_lifecycle_tests.rs:278-692) indicates they satisfy ObservedSafe (fences stay within MaxFence = 2, cancelled decoder rows are Published not Owned), and the diff merges cleanly — confirm CI on the merge commit (or a quick rebase onto f7256584) passes python3 verification/helios-lifecycle/check.py --mutations.
  2. Avoid per-decode-step re-pricing in promote_request_anchor on full-prompt cache hits at fraction == 0.0 (helios/src/scheduler/checkpoints.rs:387-458, 788-811): Requests admitted on a full-prompt cache hit (consumed_tokens == prompt_tokens) never execute a prefill step, so plan_checkpoints (:699) never populates request.checkpoints.zero_budget_anchor. Because commit calls self.promote_request_anchor(lane.request) for every lane on every step (helios/src/scheduler.rs:2411), every decode/speculative step of such a request re-runs request_anchor_endpoint (cache probes, a small Vec<PrefillCatalogCost> allocation, and 3 stride-based interval_prefill_ns calls). Latch zero_budget_anchor = Some((raw_anchor, anchor)) inside promote_request_anchor once request.consumed_tokens >= raw_anchor as u64 (note: keep promote_request_anchor before commit_checkpoint_plans at helios/src/scheduler.rs:2411-2412 so existing checkpoints are promoted before snapshot-quote eviction runs).

Subtract / Simplify

  1. Deduplicate the latch lookup (helios/src/scheduler/checkpoints.rs:398-402, 528-532, 710-717): Extract a small CheckpointAccounting::latched_zero_budget_anchor(&self, raw_anchor: usize, prefix_tokens: u64) -> Option<usize> method so request_anchor_endpoint, checkpoint_selection_uncached, and plan_checkpoints share one definition instead of repeating the same guard three times.
  2. Avoid redundant checkpoint_anchor() scans in promote_request_anchor (helios/src/scheduler/checkpoints.rs:391, 790-797): Compute let raw_anchor = request.checkpoint_anchor(); once and pass it to a helper (request_anchor_endpoint_for) rather than walking message_boundaries up to three times per lane per commit.
  3. Optional test deduplication: Part A of zero_fraction_aligned_interior_anchor_and_mixed_prefill_preserve_exact_contracts (helios/src/scheduler/checkpoints.rs:2778-2816) is subsumed by (a) at :2909-2951; complete_test_step (checkpoints.rs:1980-2054) and finish_step (checkpoint_lifecycle_tests.rs:494-541) can be consolidated with complete_records (checkpoint_lifecycle_tests.rs:94-118) in tests.rs (not opened); and the repeated inline GraphDescriptor { kind: GraphKind::Mixed, ... } literals (checkpoints.rs:2847-2861, 3024-3038, 3252-3266, checkpoint_lifecycle_tests.rs:569-583) can reuse a small descriptor helper like extra_graphs() (checkpoints.rs:1133-1147).

Nits

Dropped on verification