Re review report · NVIDIA/hyperflare-inference #681

Raw Markdown for agents: https://autobot.eidonix.com/p/53f05734-e4b5-49b8-bf16-d474f9d4dfca.md

Recommendation: Changes Requested

Head 975f825 cleanly resolves all Round 1 Subtract / Simplify items (mean_capped, hoisted expected_at, removed dead .max(1.0) and if horizon > 0.0, reused forecast_tokens), the Round 1 nit (n=3 and KV-headroom-clamped subcases), the design-spec wording at docs/scheduling-runtime-design.md:224, and the code side of Round 1 Blocker 2 by adding an end-to-end heterogeneous-budget simulator test (tests/test_scheduling_utility.py:529-593). The core Rust and Python arithmetic is memory-safe, allocation-free, deterministic, and fixes a real rem = 1 horizon-collapse defect from #645. However, Round 1 Blocker 1 remains open: the branch is still based on main (1fbcc3c9, without open #661), its standalone Solo benchmarks regress 2 of 3 workloads (cold-heavy-mix -3.7% tok/s, -9.0 pp SLO, +54.8% TTFT p99; mixed-c32 -1.9 pp SLO), no CI checks have run on 975f825, and the PR description is now stale against 975f825.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Standalone main regressions, dependency on unmerged #661, and unverified head 975f825 (helios/src/scheduler/policy.rs:599-601, 630, 639, 671, docs/design-review.md:109-115, 247-251, Charter #210)
    • Head 975f825 is still parented on main (1fbcc3c9), which does not contain open #661. Because mean_capped is strictly >= main's minimum, merging onto main standalone increases queued-prefill coalescing credit near EOS without #661's chunk shrinking/draining.
    • In the PR's own attributable Solo A/B against main, 2 of 3 workloads regress: cold-heavy-mix (n=1) drops output 541.8 -> 521.8 tok/s (-3.7%), SLO 88.1% -> 79.1% (-9.0 pp), TTFT p50 1,763 -> 1,834 ms, and agentic_multiturn TTFT p99 3,323 -> 5,144 ms (+54.8%); mixed-c32 (n=2) drops SLO 93.0% -> 91.1% (-1.9 pp), stalls 11.29% -> 11.49%, and output 1,281.7 -> 1,276.8 tok/s.
    • All reported served A/B runs (df9a8ebd, dbbf65df, 38130855) and archive checks (40596880cc64) predate 975f825, and no GitHub Actions CI run is reported on 975f825.
    • Fix: Hold merge until #661 lands, rebase onto a main containing #661, run green GitHub Actions CI (including .github/workflows/native-serving.yml (not opened) and pytest) on the final head, and confirm served A/B results match the reviewed head (with repeats on the primary target workloads).

Should Fix

  1. Refresh the stale PR description, attribution, and simulator evidence (helios/src/scheduler/policy.rs:630, 639, scripts/scheduling_sim/utility.py:215-218, 234-235, tests/test_scheduling_utility.py:529-593, docs/design-review.md:147-160)
    • The PR body is stale against 975f825: it still claims policy.rs is +11/-10 (+1 net production LOC) when head is +16/-18 (-2 net LOC), and still describes mean_out as expected_at(width).min(rem).max(1.0) after .max(1.0) was deleted at policy.rs:599-601, 630, 639.
    • Round 1's attribution ask remains open: distinguish that policy.rs:630, 639 is a Rust→simulator parity repair (utility.py:215-218 was already cohort-averaged pre-PR) while horizon (policy.rs:670-671, utility.py:234-235) is the new rule; clearly attribute #660/#661/#665 contributions in the On #661 / Stack prose (e.g., #661 stall reduction, #665 prefix-cache hit rate); and note the On #661 long-context-mixed SLO drop (89.3% -> 82.1%, -7.2 pp) in the summary prose.
    • Replace the inert 84-run scripts/scheduling_sim parity claim (scripts/scheduling_sim/workloads.py:25-55 uses default max_new_tokens = 4096 from model.py:103, so output_budget = max_new_tokens - generated at simulator.py:26 stays >> 64 for every multi-decoder workload and min == mean by construction) with the actual min_i -> mean_i makespan/TTFT/max-output-gap delta from the new test_coalescing_heterogeneous_budget_end_to_end_balanced scenario (and consider adding a direct mean_i vs min_i check in that test or its description so the delta is self-documenting).

Subtract / Simplify

  1. Delete the unreachable if horizon > 0: guard in the Python twin (scripts/scheduling_sim/utility.py:236)
    • Upstream invariants already guarantee coalescing_horizon_tokens > 0 (utility.py:206), view.output_budget > 1 (:205, so ph > 0), len(decoders) >= 1 (:206), and v.output_budget >= 1 (scripts/scheduling_sim/model.py:54), so horizon > 0 is always true (and :247 already guards log(value) with if value > 0). Deleting :236 and dedenting :237-244 mirrors the dead guard just deleted in policy.rs:669-679.

Nits

None.

Dropped on verification