Recommendation: Changes Requested
The production code change in helios/src/scheduler/rounds.rs (+15/−10) is small, mathematically coherent, and preserves [0.0, 1.0] probability clamping, monotonic non-increasing prefix survival, broken-drafter W=1 fallback, and core/ABI compatibility. However, the PR cannot be merged as-is because CI on head 64c7198 is red and undisclosed while mandatory scheduler verification gates (--release crate tests, TLA+ lifecycle conformance, and Kani) were not run, the performance claim lacks an isolated main-vs-PR served A/B at matched draft_tokens (and at default adaptive_verification_alpha = 1.0), and the new documentation inaccurately describes proposal_confidence as storing cumulative Rényi-2 products rather than per-step conditional confidences multiplied on the host.
Merge Risk
Level: Medium
- Affected subsystem: Changes GPU-confidence verification calibration in
helios/src/scheduler/rounds.rsfor all GPU-confidence speculative cores (any model withPrefixAllocation::Gpushapes); non-GPU-confidence cores do not execute this path, and there are no Protobuf, manifest, CUDA-graph, ABI, lock, or hot-path allocation changes. - Behavioral reach without runtime knob: Because
speculative_curvefeeds packed shape selection (rounds.rs:480, 543), per-requesttoken_ratefairness normalizers (service.rs:209-216), and paired inputs toSurplusHistory(rounds.rs:586-624), loosening the depth>= 2ceiling silently alters round widths on upgrade; the PR's own combined-stack run already notes increased packed verification rows and lower acceptance (49.4%–51.8%vs59.7%–62.2%) on8K C=16/C=32low-acceptance prose atalpha = 0.75. - Verification gap: Head
64c7198has failing CI and no isolated single-PR served A/B againstmain.
Walkthrough
helios/src/scheduler/rounds.rs:15-18: Addscalibration_factor_max(depth)returningCALIBRATION_FACTOR_MAX.powi((depth + 1).min(30))(keepingCALIBRATION_FACTOR_MAX = 2.0as the per-step ceiling).helios/src/scheduler/rounds.rs:47-53, 83-108, 283-297, 334-336: Threadsdepth: usizethroughDepthCalibration::factor,RequestCalibration::factor,RequestCalibration::observe,Forecast::calibration_factor,Forecast::observe_calibration, andForecasts::calibration_factor, updating all callers while leavingspeculative_curveclamping/monotonicity (rounds.rs:412-424) andSURPLUS_FACTOR_MAX = 2.0(rounds.rs:25, 256) unchanged.helios/src/scheduler/policy_tests.rs:6433-6596: Adds two isolated CPU unit tests:gpu_confidence_calibration_ceiling_scales_per_step_across_depth(verifying2.0,16.0, and15.0factors at depths0,3, and4) andgpu_confidence_multi_step_calibration_escapes_packed_three_trap_and_respects_low_depth_two_survival(verifying a single-laneB=1, W=6GPU-packed scheduler moves frompacked_token_capacity = 3to6under high survival and stays at3under low depth-2 survival).docs/scheduling-runtime-design.md:113-145andhelios/README.md:447-453: Updates GPU-confidence calibration documentation from flat[0, 2]to[0, 2^(depth + 1)](exponent capped at30) and adds a Rényi-2 cumulative collision-survival rationale.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure arithmetic bound change in scheduler pricing with no I/O, unsafe code, external input parsing, or credential/network surface.
- [WARN] Charter & value fit: Model-agnostic change in the right layer with the required
Discord: el8line and four-part PR structure, but does not yet satisfy the charter's served-workload speedup evidence rule (#210) againstmain. - [PASS] Related / duplicate / conflict check: Genuinely additive five days downstream of #515/#522 and rebases cleanly over #555/#620 with no conflicting open PR.
- [WARN] Tests & verification evidence: CPU unit tests are isolated and discriminate old vs. new behavior, but CI is red on head
64c7198, mandatory--release/ lifecycle / Kani checks were not run, and served benchmarks are combined-stack only.
Blockers
- Undisclosed failing CI and skipped mandatory scheduler verification gates (
helios/src/scheduler/rounds.rs,docs/design-review.md:180-251).- Verified behavior/impact: CI is failed on head commit
64c7198and not disclosed in the PR description. Underdocs/design-review.md:180-251(Testing Hierarchy Layers 1 and 3, matching.github/workflows/native-serving.yml(not opened) and.github/workflows/helios-lifecycle.yml(not opened)), modifyinghelios/src/scheduler/requires running full--releasecrate tests (cargo test --locked --releaseonhelios --features runtime-core,server,flare,flare-cli, andheliopause— "cargo checkdoes not substitute forcargo test") pluspython3 verification/helios-lifecycle/check.py(not opened) andcargo kani --manifest-path helios/Cargo.toml (not opened) --features runtime-core --lib. The PR currently reports only debug-mode filteredscheduler::tests andcargo checkonflare-cli. - Fix: Diagnose and fix (or explicitly account for, if an external runner issue) the red CI check on
64c7198, run the required--releasecrate test suites andhelios-lifecycle/cargo kaniverification gates, and record the exact results in the PR description.
- Verified behavior/impact: CI is failed on head commit
Should Fix
- Provide an isolated
main-vs-PR served A/B at matcheddraft_tokensand defaultadaptive_verification_alpha = 1.0(docs/design-review.mdPrinciple 12, Charter #210).- Verified behavior/impact: Every GPU serving measurement in the PR is from a combined SM121/RoCE/recipe/scheduler stack (identical block copied to sibling PR #633), and the headline long-form comparison (
87.74vs118.23 tok/s) also changesdraft_tokens(5/W=6vs7/W=8). Moreover, the served run usesadaptive_verification_alpha = 0.75rather than default1.0(docs/scheduling-runtime-design.md:75), and its own8K C=16 / C=32note reports lower acceptance (49.4%–51.8%vs59.7%–62.2%) and extra packed verification rows on low-acceptance prose without reporting the matched baselineC=16 / C=32throughput. - Fix: Run an isolated
main-vs-PRflare runA/B on one GPU-confidence core withdraft_tokensheld fixed, covering both high-acceptance generation (demonstrating the packed-width recovery) and high-concurrency/low-acceptance decode (C=16/C=32) at defaultalpha = 1.0(andalpha = 0.75if retained), with matched baseline numbers for every reported cell.
- Verified behavior/impact: Every GPU serving measurement in the PR is from a combined SM121/RoCE/recipe/scheduler stack (identical block copied to sibling PR #633), and the headline long-form comparison (
- Correct the inaccurate sidecar format description in
docs/scheduling-runtime-design.md:117-123andhelios/README.md:450-452.- Verified behavior/impact:
docs/scheduling-runtime-design.md:117-119states that "the GPU confidence sidecar at 0-baseddepth(d) records the cumulative Rényi-2 collision survivalprod_{j=0..d} sum_i q_{j,i}^2acrossd + 1draft steps" (andhelios/README.md:451-452repeats this). That contradicts both the runtime implementation and contract:proposal_confidence[frame, row, d]carries per-step conditional confidence values, which the host multiplies into cumulative prefix survival (prefix *= confidence[row][depth]) inhelios/src/scheduler/rounds.rs:609-613and the device multiplies in FP64 perhelios/model-contract.md:218-221. Additionally,helios/model-contract.md:218-231is model-agnostic and does not mandate Rényi-2 collision probabilities as the sidecar contract; multiplicativec^(d+1)compounding follows for any per-step conditional confidence multiplied acrossd + 1steps. - Fix: Update
docs/scheduling-runtime-design.md:117-123to state that the host multiplies per-step conditional sidecar confidences into the(depth + 1)-step cumulative prefix survival product (optionally mentioning Rényi-2 collision probability only as a concrete recipe example rather than the wire contract), and updatehelios/README.md:449-452accordingly.
- Verified behavior/impact:
Subtract / Simplify
- Simplify
calibration_factor_maxand move it below theconstblock (helios/src/scheduler/rounds.rs:13-25).calibration_factor_maxsplits the contiguousconstblock between lines13and19, andi32::try_from(depth.saturating_add(1)).unwrap_or(30).min(30)carries redundant overflow/fallback conversions. Move the helper belowSURPLUS_FACTOR_MAX(:25) and simplify toCALIBRATION_FACTOR_MAX.powi(depth.min(29) as i32 + 1)(optionally namingconst CALIBRATION_FACTOR_MAX_STEPS: usize = 30;), which is total, panic-free, and identical for everyusize.
- Deduplicate the ratio-clamp expression shared by
DepthCalibration::factorandRequestCalibration::factor(helios/src/scheduler/rounds.rs:47-53, 83-91).- Both methods contain the identical
if self.predicted > 1e-6 { (self.realized / self.predicted).clamp(0.0, calibration_factor_max(depth)) } else { 1.0 }block edited in both sites by this PR. Extract a singlecalibration_ratio(realized: f64, predicted: f64, depth: usize) -> f64helper so the1e-6epsilon and depth ceiling have one definition.
- Both methods contain the identical
- Trim the 6.5-line parenthetical in
helios/README.md:447-452.- Shorten the README summary clause to
clamped to `[0, 2^(depth + 1)]` with `depth + 1` capped at `30`)and leave the multiplicative compounding derivation indocs/scheduling-runtime-design.md.
- Shorten the README summary clause to
Nits
helios/src/scheduler/policy_tests.rs:6439-6442: The comment states "while extreme 0.99 / 0.01 = 99.0 clamps at 32.0", but line6441feeds(0.99, 0.01)at depth 3 (ceiling2.0^4 = 16.0, asserted at line6445), not depth 4 (32.0). Update the comment to match depth 3 /16.0.helios/src/scheduler/policy_tests.rs:6553:s.refresh.acceptance_credit_ns = 0.0;is redundant with line6547becauses.plan()(helios/src/scheduler.rs:2249) takes&selfand cannot mutates.refresh.
Dropped on verification
- Upstream claim that
calibration_factor_max(depth) = 2^(d+1)renders the upper clamp inoperative at every depth and saturates calibrated survival to1.0: Verified mathematically false.prior (0.5^(d+1)) * ceiling (2^(d+1)) = 1.0already held at depth0onmain(0.5 * 2.0 = 1.0). An observed ratio>= 1.0scales by the observed ratio rather than jumping to2^(d+1), a well-calibrated drafter's ratio converges back to1.0(E[realized] = E[predicted]), and the ceiling still binds wheneverpredicted < 0.5^(d+1)andrealized / predicted > 2^(d+1)(directly exercised atpolicy_tests.rs:6441,6445, where0.99 / 0.01 = 99.0clamps to16.0at depth 3). - Upstream claim that
RequestCalibration::observeseeding (rounds.rs:99) is a blocker requiring amin(global.factor(depth), 2.0)cap: Dropped. Seeding(anchor * global.factor(depth)).clamp(0.0, 1.0)with prior weight2.0is the intended shrinkage toward the global prior (and the1.0clamp bounds the seed ratio from above whenanchor * global.factor > 1.0). Capping the seed at flat2.0would introduce a regression by pulling a new request's depth-4 calibration down from15.0to~6.3after a confirming first observation. - Upstream claims that saturation flattens
service.rstoken_rate, corruptsSurplusHistory, and disables the Hoeffding exploration bonus (rounds.rs:415-422): Dropped because all three relied on the false saturation claim above. Accurate calibration improvestoken_ratepricing,SurplusHistory(rounds.rs:586-624) retains exact heterogeneity invariance and zero-variance neutrality, and the Hoeffding bonus remains active whenever calibrated survival is depressed or moderate (and is unnecessary when calibrated survival is already1.0). - Upstream claim that out-of-range depth fallback (
rounds.rs:284) should useDepthCalibration::new(0.5^(d+1))instead ofDepthCalibration::new(1.0): Dropped as a no-op;DepthCalibration::new(p).factor(depth)computesp / p = 1.0for anyp > 1e-6, and1.0is the intended identity calibration factor. - Upstream subtraction claim that
policy_tests.rs:6466-6503repeats sixGraphDescriptorliterals and should be merged intosingle_lane_packed_engine(:4300-4313): Dropped as inaccurate and low-signal;:6466-6503only contains twoGraphDescriptorliterals (five packed shapes are already looped), andsingle_lane_packed_enginetests a differentW=8/D=7/P=3default-policy geometry.