#1 [high] Changed code: exact before/after of coalescing horizon + mean_out
helios/src/scheduler/policy.rs:666-672 (new):
for &(slot, initial_prefill, post_prefill) in &prefillers[..prefiller_count] {
let ph = self.policy.coalescing_horizon_tokens.min(post_prefill as f64);
let horizon = decoder_rems[..decoder_count]
.iter()
.map(|&rem| (rem as f64).min(ph))
.sum::<f64>()
/ decoder_count as f64;
main/#661 equivalent (policy.rs:719-724 at pr/661; identical on main per diff):
let horizon = self.policy.coalescing_horizon_tokens
.min(post_prefill as f64)
.min(peer_budget as f64);
mean_out changed at policy.rs:627 (packed shapes) and :636 (speculative catalog):
old expected_at(eff_width).min(peer_budget as f64).max(1.0)
new decoder_rems[..decoder_count].iter().map(|&rem| expected_at(eff_width).min(rem as f64).max(1.0)).sum::<f64>() / decoder_count as f64
decoder_rems filled at :548-553 (rem = (max_new_tokens - generated).min(max_sequence_tokens - scheduled_consumed), guarded rem > 0 so rem >= 1). Guard simplified at :567 (removed unreachable peer_budget == usize::MAX).
Amortization unchanged: :677 per_token = (best_surplus_per_horizon * horizon) / initial_prefill.
Horizon feeds LaneValue::prefill_token at :797-798: unit + exp(token_log-scale) + exp(coalesce_log-scale).
#2 [high] Finding A: cohort-mean horizon breaks the realisable-horizon invariant
Finding A (Major) — horizon is now bounded by neither the prefiller's post-prefill budget nor any single decoder's remaining budget; it is a mean, so it can exceed what is realisable.
Verified arithmetic: for reachable state, new horizon = mean_i min(rem_i, ph) where ph = min(H, post_prefill).
- Old:
min(H, post_prefill, min_i rem_i)→ horizon ≤ min(post_prefill, every rem). - New: horizon ≤ ph ≤ post_prefill, but can exceed
min_i rem_iunboundedly: withrem = [1, 100], H=64, post_prefill=128 the horizon is 32.5 even though the only decoder that will actually still be decoding after 1 token is the rem=100 one and the rem=1 decoder retires after 1 token. The term multipliesper_tokenlinearly (policy.rs:677), so credit rises ~32x over the old value for this reachable state. Impact: the credit prices a K→K+m surplus over a horizon during which the cohort composition changes (the near-EOS decoder leaves). The surrogate "mean remaining horizon across a cohort that will disband" overstates the case where most decoders are near EOS. This is the mechanism behind the PR's own disclosed solo regression; no bounded check exists anywhere that credit is realisable. Concrete fix: bound the mean by the horizon over which the cohort is actually under-batched, e.g. use a survival-weighted meanΣ_i Σ_{t<ph} 1[rem_i > t] / Σ_i 1[rem_i > 0](i.e. expected number of remaining under-batched steps) instead ofmin(rem_i, ph), or clamp the cohort mean to the largest singleremused. At minimum add a test proving the credit does not grow when the extra decoder retires on the first step. Citations: helios/src/scheduler/policy.rs:666-672, :677, :548-553; policy_tests.rs:6888-6913; PR body table solocold-heavy-mix541.8→521.8 tok/s, SLO 88.1→79.1%, TTFT p50 1,763→1,834 ms, and its disclosed trade-off "agentic_multiturnTTFT p993,323 -> 5,144 ms".
#3 [high] Finding B: undisclosed sim-parity repair + remaining Rust-only KV clamp
Finding B (Major) — the mean_out half of the change is a Rust↔simulator divergence repair presented as a new formula, and it changes a different quantity from the horizon.
Verified: at main, scripts/scheduling_sim/utility.py:215-219 already computed a per-decoder mean:
mean_out = sum(
min(v.output_budget, expected_output(v.acceptance, graph.width))
for v in decoders
) / k
That block is NOT in the diff (pr_diff shows only the horizon hunk at utility.py:232-236 changed). Rust on main used the cohort-wide peer_budget min for mean_out (policy.rs old :627/:636). So the PR moves Rust onto the simulator's existing rule for mean_out.
Second, smaller and wrong-direction divergence introduced at utility.py:215-219 vs Rust :627/:636: sim min(output_budget, expected_output(...)) has no floor, Rust has .max(1.0) per decoder — a decoder with budget 1 gives mean_out exactly 1.0 in Rust but possibly <1.0 in Python when expected_output < 1 is impossible... more concretely sim min(1, expected) = 1 when expected>=1 so equal; not a divergence. Real remaining divergence: Rust clamps rem by max_sequence_tokens - scheduled_consumed (policy.rs:548-549); the simulator's output_budget has no such clamp (simulator.py:26). Nothing lists this.
Impact: reviewers comparing "what changed" get an incomplete picture; docs/design-review.md:205 says "Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog", so the repair is welcome but must be disclosed and gated.
Concrete fix: state explicitly in the PR body that mean_out moves Rust toward the simulator's existing rule and that the horizon is the new rule; add the KV-exhaustion clamp to the simulator's view so both sides model output_budget the same way.
Citations: scripts/scheduling_sim/utility.py:215-219 (main), :234-235 (new); helios/src/scheduler/policy.rs:548-553, :627, :636; scripts/scheduling_sim/simulator.py:24-27; docs/design-review.md:195-208.
#4 [high] Finding C: 84-run parity sweep is vacuous for this rule; cohort gate unrun
Finding C (Major) — the reported simulator evidence cannot distinguish old from new behaviour; the mandatory cohort-algorithm gate is unrun.
Verified: scripts/scheduling_sim/workloads.py:25-55 lists 21 workloads; every decode() helper uses output=128 (:29-31) and the prefill* mixes use output=128 (:26-27). There is no workload with a near-EOS decoder next to a long prefill, which is the only state where min_i rem_i and mean_i min(rem_i, ph) differ. __main__.py:42 runs --decode-values × those workloads = the claimed 84 runs, so 84/84 parity is expected by construction.
learning_scenarios.py:33-34 _decode(... output=128) and :45-46 prefill-{count}-decoders use uniform 128 output budgets, so the 64-seed catalog is also blind to the change.
Real coverage is only the new unit tests: tests/test_scheduling_utility.py:506-526 and helios/src/scheduler/policy_tests.rs:6888-6932.
Gate text: docs/design-review.md:195-206 "Changes to ... cohort algorithms must be evaluated against the Python simulator and reference solvers ... Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog", and :247-251 "Leaving an applicable ... simulator sweep ... unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."
Concrete fix: add a workloads()/learning_scenarios.py case with output_tokens of 1 and 128 alongside a long prefill, run the 64-seed catalog, and report the retained-refresh/delta outcome as #661 did.
#5 [high] Findings D & E: claim accuracy, no opt-out, and verified-sound list
Finding D (Major) — claim accuracy: the "Stack" rows cannot be attributed to #681, and solo #681-only rows regress. No CI on head.
Verified from PR body vs diff:
- Stack rows include #660 + #661 + #665 + #681. The prefix-cache hit-rate gain quoted in
[1]/[2](48.6% -> 52.5%) is #665's mechanism, not this diff: #681 touches onlycoalescing_prefill_log_bonus+scripts/scheduling_sim/utility.py+ docs + tests (pr_diff confirms 5 files). - The only #681-only arm is "Solo":
cold-heavy-mix541.8 -> 521.8 tok/s (-3.7%), SLO 88.1 -> 79.1%, TTFT p50 1,763 -> 1,834;mixed-c32SLO 93.0 -> 91.1%. 2 of 3 solo rows regress. On #661 long-context-mixedimproves stalls 16.4 -> 9.8% but loses SLO 89.3 -> 82.1%.- Tested trees are
df9a8ebd,dbbf65df,38130855(and archive40596880cc64); head ise15b836. No GitHub Actions checks on the head. Gate text: docs/design-review.md:100-101 "Never attribute a combined result to one PR"; :96-99 "Distinguish component measurements from whole-model or service results, and isolated changes from combined-stack results." Charter (#210) requires benchmark evidence overmainon a served workload — satisfied only in the stacked configuration, i.e. it depends on three unmerged PRs (#660, #661, #665). #661's head is3d868f84and itspeer_budgetcode is still present at pr/661 policy.rs:585/606/620/680/689/722-724, confirming #681's edit is disjoint but ordered after it.
Finding E (Minor) — no operator control / default-on everywhere. coalescing_horizon_tokens stays 64.0 (policy.rs:42) and is NOT settable: helios/src/server/config.rs:305-320 accepts only scheduler_policy, scheduler_terminal_value, scheduler_terminal_age_price, scheduler_checkpoint_extra_work_fraction, mtp_adaptive_verification_alpha; flare-cli/src/cli.rs:699-706 exposes only the two terminal flags; PolicyConfig::throughput() (policy.rs:50-52) zeroes delivery_fairness and decode_age_price but NOT the horizon, so --scheduler-policy throughput cannot disable the term either. The PR makes the term's magnitude matter up to 64x more with no way to pin or disable it, against design-review "Be explicit and pin everything". Docs table row docs/scheduling-runtime-design.md:713 still says "64" and was not updated (only :225-229 prose changed).
Verified SOUND (state plainly, no issue):
- No new allocation in the hot path:
decoder_remsis a fixed[usize; REQUEST_LANES]on the stack (policy.rs:531); REQUEST_LANES = 64 (execution/manifest.rs:18) andlimits.max_active <= limits.request_slots <= REQUEST_LANES(scheduler.rs:707-709), sodecoder_rems[decoder_count]at :552 cannot overflow. select_plan -> lane_values -> coalescing_prefill_log_bonus (policy.rs:1650, :697) is on the plan hot path but adds O(decoder_count) work per call, not an allocation. - Guard simplification at :567 correctly drops the previously unreachable
peer_budget == usize::MAXarm:rem > 0at :550 means peer_budget was never MAX once decoder_count > 0. - Numeric safety preserved:
horizon > 0.0guard at :673 andper_token.is_finite()at :678 still protect theln()at :679;remis usize and the only divisor isdecoder_count >= 1, so no NaN/inf/fdiv-by-zero path. - Determinism preserved: iteration follows slot index order (policy.rs:535, :668), no hashing, so plan selection stays reproducible.
- No wire/proto/captured-graph/ABI change, no new dependency, no per-model branch; exported cores and multi-host layouts unaffected. No TLA+/Kani scope change is warranted (verification/helios-lifecycle/check.py has no policy.rs mutation target — grep returned no matches).
- Reported
check.pyresult is therefore arguably N/A for this diff rather than satisfied; the "3/3 reachable.min()mutations killed" claim comes from the Python side, not check.py. - Metric/rate/admission-pricing span check: this changes a pricing weight, not the span of any rate sample, so no shrink in measured scope to flag. However no metric or dashboard field surfaces the term (grep of helios/src/server/metrics.rs, metrics/scheduler.rs, server/dashboard/ shows no
coalescreference), so operators cannot observe when it activates — worth noting as a gap, not a defect.