Re review report · NVIDIA/hyperflare-inference #632

Raw Markdown for agents: https://autobot.eidonix.com/p/8ac25e54-a255-48fd-b69b-a6db125b4092.md

Recommendation: Changes Requested

Revision 9110228f cleanly resolves the Round 1 code and documentation issues: helios/src/scheduler/rounds.rs de-duplicates ratio clamping into a shared calibration_ratio helper while preserving [0, 1] clamping, monotonic nonincreasing survival, and broken-drafter fallback; docs/scheduling-runtime-design.md now accurately documents the proposal_confidence sidecar contract; and all four --locked --release crate test suites were run cleanly. However, the Round 1 performance-evidence blocker remains unresolved in outcome: the newly added isolated matched A/B against origin/main (0a8c20f4) at the shipped default adaptive_verification_alpha = 1.0 (helios/src/scheduler/policy.rs:40) regresses 5 of 6 workloads (-1.9% to -5.2%) while the motivating draft_tokens = 5 / alpha = 0.75 configuration still has no paired origin/main baseline. Under the Project Charter (#210) and docs/design-review.md Principle 12, a global default-path scheduler change needs a net-positive matched A/B on the default configuration (or a tighter bound that eliminates the moderate-acceptance regression) and confirmed green CI on the final head before merge.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Default-configuration served A/B is net negative and the motivating workload remains unpaired (helios/src/scheduler/rounds.rs:13-15, 24-26, helios/src/scheduler/policy.rs:40):
    • Verified behavior & impact: PolicyConfig::default() ships adaptive_verification_alpha: 1.0 (policy.rs:40). In the PR's isolated matched A/B against origin/main (0a8c20f4, draft_tokens = 7, alpha = 1.0), 5 of 6 workloads regress: 8K C=1 73.97 -> 70.14 tok/s (-5.2%), C=4 156.10 -> 153.20 (-1.9%), C=16 322.16 -> 313.43 (-2.7%), C=32 456.31 -> 441.56 (-3.2%, draft acceptance 65.6% -> 59.4%), and 5x Coding Peak median 102.19 -> 98.09 (-4.0%). Only the spec_answer segment of PS4 Tetris HTML/JS gains (135.53 -> 140.32, +3.5%), while overall full-run decode is still lower (116.27 -> 112.59) under single-pass temperature = 1.0 sampling. Meanwhile, the motivating configuration from the Problem statement (draft_tokens = 5, W = 6, alpha = 0.75, stuck at 2.002 offered drafts/round and 87.74 tok/s) has no paired origin/main baseline—every alpha = 0.75 figure in the description is candidate-only on the draft_tokens = 7 core. Because calibration_factor_max(depth) reaches 18.76 at d = 4, 32.83 at d = 5, and 57.45 at d = 6, small-sample upward noise at deep censored depths and warmed global DepthCalibration factors can push packed_round_candidates (rounds.rs:765-871) into wider packed_token_capacity shapes on moderate-acceptance text.
    • Concrete fix (do not add a default-false opt-in flag, per docs/design-review.md Principle 3):
      1. Tighten the depth-scaling rule so moderate-acceptance workloads at default alpha = 1.0 do not regress (for example, a smaller step factor or a modest reachable absolute cap on calibration_factor_max, and/or requiring non-trivial request observation weight before scaling above 2.0 at deep depths).
      2. Re-run matched A/B benchmarks against origin/main on (a) the shipped default alpha = 1.0 matrix (using temperature = 0 or repeated trials to separate signal from sampling variance) showing neutral-or-better throughput without the C=32 acceptance drop, and (b) the motivating draft_tokens = 5 / alpha = 0.75 (or matched alpha = 0.75) workload on the same core.
      3. Confirm GitHub Actions CI (native-serving, helios-lifecycle TLA+ & Kani, python-cpu) is green on the final head.

Should Fix

  1. The "conservative per-step shrinkage margin" rationale does not hold for typical drafter confidences (docs/scheduling-runtime-design.md:127-131):
    • Verified behavior & impact: Lines 127-131 state that 2.0 * 1.75^depth "preserves a conservative per-step shrinkage margin against noise (0.5 * 1.75 = 0.875 < 1 relative to doubling per step)". For a drafter with per-step confidence c, the maximum permitted calibrated survival is c^(d+1) * 2.0 * 1.75^d = 2c * (1.75 * c)^d, which shrinks with depth only when c < 1 / 1.75 ≈ 0.5714. For any c > 0.5714, (1.75 * c)^d grows with depth and relies solely on [0, 1] clamping and nonincreasing survival (rounds.rs:425). Additionally, the 0.5 factor is used before the 0.5^d population prior is introduced at :133 (and "relative to doubling per step" relies on PR revision history against 2^(d+1), contrary to .agents/skills/repo-prose/SKILL.md:22-25 (not opened), 71).
    • Concrete fix: Rewrite :127-131 (matching whatever tightened bound resolves Blocker 1) to state the exact condition without hidden context—e.g. noting that the ceiling shrinks against the 0.5^(d+1) population prior (0.5 * 1.75 = 0.875 < 1), holds only for per-step confidence c < 1 / 1.75 ≈ 0.57, and relies on [0, 1] clamping and nonincreasing prefix monotonicity above that threshold.

Subtract / Simplify

  1. Remove unreachable CALIBRATION_MAX_DEPTH = 30 and its two doc clauses (helios/src/scheduler/rounds.rs:15, 25, docs/scheduling-runtime-design.md:117, helios/README.md:450):
    • Forecasts::calibration has length completion_token_capacity - 1 (rounds.rs:312-314), and manifest.rs:840 enforces graph.draft_tokens <= completion_token_capacity - 1 (DEFAULT_COMPLETION_TOKEN_CAPACITY = 8 at manifest.rs:13, test max MAX_DRAFT_TOKENS = 15 at helios/src/execution/tests.rs:8). Depth 30 requires completion_token_capacity >= 33, and 2.0 * 1.75^30 ≈ 3.92e7 is neither a realistic calibration bound nor an f64 overflow guard (1.75^d overflows f64 near d ≈ 1130). Unless Blocker 1 replaces this with a tight reachable bound, delete CALIBRATION_MAX_DEPTH (using depth.min(i32::MAX as usize) as i32 or a real factor cap) and drop the "with depth capped at 30" clauses from both docs.
  2. Drop the redundant clamp restatement in docs/scheduling-runtime-design.md:141-142:
    • The bullet already states at :114-115 that "Both calibration levels clamp realized / predicted to [0.0, calibration_factor_max(depth)]." The trailing , and clamped to calibration_factor_max(depth) in the RequestCalibration sentence at :141-142 now repeats :114-115; end the parenthetical after matching PrefixEstimate.

Nits

  1. helios/src/scheduler/policy_tests.rs:6530: vec.verification_width = plan.token_capacity as i64; is already set identically by completion_records (policy_tests.rs:207); only vec.offered_drafts needs overriding here.

Dropped on verification