#1 [high] Change: PR #681 cohort-mean coalescing horizon - what it does, size, files
PR #681 "helios/scheduler: use active cohort mean in coalescing horizon" by FujitsuPolycom, opened+updated 2026-12-02, draft, base main, head e15b836. 5 files +236/-18. Labels: area:scheduling, performance. No reviews, no CI checks on head.
Verified diff (pr_diff):
- helios/src/scheduler/policy.rs (policy.rs:525-684
coalescing_prefill_log_bonus):- Removes
peer_budgetscalar (let mut peer_budget = usize::MAX;+peer_budget = peer_budget.min(rem)) and addsdecoder_rems = [0usize; REQUEST_LANES]parallel todecoder_slots, filled at policy.rs:550-554. - Guard changes from
decoder_count == 0 || prefiller_count == 0 || peer_budget == usize::MAXtodecoder_count == 0 || prefiller_count == 0(policy.rs:567) - peer_budget==MAX was unreachable anyway since rem>0 required. - Two
mean_outsites (policy.rs:627 packed speculative shapes; policy.rs:636 speculative catalog) now:decoder_rems[..decoder_count].iter().map(|&rem| expected_at(w).min(rem as f64).max(1.0)).sum::<f64>() / decoder_count as f64. - Horizon site (policy.rs:667-672):
let ph = coalescing_horizon_tokens.min(post_prefill as f64); horizon = mean over decoders of (rem as f64).min(ph).
- Removes
- helios/src/scheduler/policy_tests.rs +201: new helper
coalescing_bonus()(diffs lane_values with horizon 0.0 vs default) andadd_active_decoder(); two tests:coalescing_horizon_averages_active_decoder_budgets_across_cohort(policy_tests.rs:6880+) andcoalescing_speculative_mean_output_averages_per_decoder_budgets(policy_tests.rs:6957+). The [1,100] pair -> 32.5 horizon is asserted exactly. - scripts/scheduling_sim/utility.py:230-236: same change;
peer_budget = min(...)removed,horizon = sum(min(float(v.output_budget), ph) for v in decoders) / k. NOTE: the simulator'smean_out(utility.py:215-219) already averaged per-decoder budgets before this PR - only horizon changed there. - tests/test_scheduling_utility.py +23:
test_coalescing_horizon_averages_active_decoder_budgets. - docs/scheduling-runtime-design.md:222-231 spec paragraph reworded to describe per-decoder clamp-then-average for both horizon and expected output. Config table row docs/scheduling-runtime-design.md:713 unchanged (default 64).
Net production Rust LOC = +1 (as claimed): +11/-10 in policy.rs; the rest is tests.
#2 [high] Related work: #661 stack parent, changes nearby policy.rs coalescing code
#661 "helios/scheduler: explore smaller prefill chunks under active age-priced streams" by FujitsuPolycom (same author), open 2026-12-01, updated 2026-12-02 15:24, head 3d868f84, +2778/-186 across 15 files (incl. helios/src/scheduler/policy.rs +195/-129 and policy_tests.rs +1762/-2; docs/scheduling-runtime-design.md +52/-20). Labels area:scheduling, enhancement, performance, triage:validation.
Key relevance to #681: #681 is stacked on #661 and the two PR bodies' measurements are cited as a pair. #661 unlocks smaller non-terminal prefill chunks and draining; #681's cohort-averaged horizon then packs queued prefills without all decoders being blocked. #681 description: "#661 rushes... cutting SM120 mixed-c32 >250 ms stalls -74.9% vs main, from 538 to 135."
#661 last Autobot review (2026-12-02 15:24) = "Recommendation: Ready To Merge", 0 blockers/0 should-fix, "Confirm GitHub Actions CI is green on 3d868f8 before merging." Earlier rounds were Changes Requested (blocker: unrun 64-seed simulator gate; service_rates mispricing under measured TerminalPrefill).
#661 itself builds on merged #645 (which introduced coalescing_prefill_log_bonus). #661's A/B numbers: mixed-c32 >250ms stalls 538 -> 365 (-32.2%); long-context-mixed 863 -> 503; cold-heavy-mix 2,988 -> 2,732 with 4 -> 7 client-side 45 s drain cutoffs. Note #681's body cites different #661-inclusive numbers (135 stalls after the stack), so the stall counts are from different tree combinations (df9a8ebd / dbbf65df / 38130855 - not equal to #661's 3d868f84 head).
Also #661 has a known regression in cold-heavy-mix: SLO 89.0% -> 81.6%, and 4 -> 7 45s drain cutoffs; #681's body inherits/reports similar cold-heavy-mix SLO regression on solo (88.1 -> 79.1) and on #661 (81.6 -> 79.8).
#4 [high] Related work: #663 (merged) introduced age pricing and weakened coalescing test bounds
#663 "helios/scheduler: price first-output waiting age on incumbent decode rounds" by yatesdr (COLLABORATOR), merged 2026-12-01 23:28, head 5bf9085, +1154/-87, 12 files incl. helios/src/scheduler/policy.rs (+127/-14) and scripts/scheduling_sim/utility.py (+29/-1). Merged into main as 8489d504 — i.e. the commit immediately before #681's base main state used by the PR (base 1fbcc3c9, head e15b836; policy.rs history shows 8489d504 then e15b836 as the newest two commits touching policy.rs and policy_tests.rs).
Built on by #681? #681 is stacked on #661 which is the follow-on to #663's age pricing; #681 tests use interactive_engine and coalescing bonus math independent of #663.
Relevance to #681:
- #663 is default-ON under
--scheduler-policy balanced(decode_age_price = 0.1), the same policy #681's benchmarks use. - #663's Autobot review recorded a Should-Fix that "Existing
balancedburst-coalescing regression guarantees were dropped (test_scheduling_utility.py:363-402,policy_tests.rs:6840-6860)". Verified at head: tests/test_scheduling_utility.py:403,405 now assertcoal_ttft <= bal_base_ttft and coal_ttft <= 600.0andcoal_sub <= bal_base_sub and coal_sub <= 2— i.e. absolute ceilings instead of the earlier relative guarantees. policy_tests.rs:6855-6863 still compares coalescing ON vs OFF on simultaneous arrivals (sim_coal_sub <= sim_base_sub,sim_coal_ns <= sim_base_ns), so the Rust side retained a comparison. - #663 also documents in docs/scheduling-utility.md:287-320 the first-output waiting age credit which reuses "coalescing's fixed-denominator amortization"; #681 changes the horizon term feeding that amortization, so the two interact numerically (
first_output_credit ... frac = work / initial_prefillvsper_token = (surplus * horizon) / initial_prefill). - #663 is one of the PRs #681 says merges cleanly (only #660/#661/#665 are named in the stacking paragraph).
#5 [high] Why: the min-over-decoders collapse and where the demand comes from
Problem the PR addresses (claimed): coalescing_prefill_log_bonus (helios/src/scheduler/policy.rs:525-684) prices the K -> K+m decode-batch surplus when queued prefills join active decoders, over coalescing_horizon_tokens (default 64.0, policy.rs:42) clamped by the prefiller's post-prefill budget and the active decoders' MINIMUM remaining budget (peer_budget). Verified on main (policy.rs:667-671 at main):
let horizon = self.policy.coalescing_horizon_tokens.min(post_prefill as f64).min(peer_budget as f64);
With one active decoder at rem=1, horizon collapses to 1 = 98.4% loss of the 64-token horizon, and mean_out (policy.rs:627,636 on main) also clamps to 1.
How long/widely wanted: not from an issue. Searching items for "coalescing horizon single decoder remaining collapse" returns only #681 itself; no issue or comment asks for this. The mechanism was introduced by merged #645 (2026-11-30, "Decode-batch coalescing continuation value") — #681's description says the peer_budget min was there "previously", i.e. since #645's introduction. So this is a ~2-day-old formula being refined, not a long-standing user request. Sibling defect reports in the same area: #676 (open, Reederey87, 2026-12-02) on large prefill chunks causing >1.4 s decode p99 ITL under balanced — it is about chunk size/cap, not the coalescing horizon, and cross-references #661 only.
#6 [high] Claims and evidence: served A/B numbers; solo regressions; stack attribution
Reproduced from the PR body (all numbers are the author's claims, not re-verified here). 4x RTX PRO 6000 (SM120) and 4x GB10 (SM121), DeepSeek-V4.1-Flash TP4, --scheduler-policy balanced --max-concurrency 32 --mtp-draft-tokens 7 --mtp-adaptive-verification ... --prefix-cache-memory 0. Workloads from FujitsuPolycom/tokbench v0.4.0, seed 42, temp 0.0.
| Arm || Scenario | Out tok/s | Stalled >250 ms | TTFT p50 | SLO | | Solo mixed-c32 (2) | 1,281.7 -> 1,276.8 | 11.29 -> 11.49% | 1,425 -> 1,390 | 93.0 -> 91.1% | | Solo long-context-mixed (1) | 655.4 -> 667.3 (+1.8%) | 28.1 -> 26.3% | 1,510 -> 1,449 | 89.8 -> 92.6% | | Solo cold-heavy-mix (1) | 541.8 -> 521.8 (-3.7%) | 62.5 -> 62.2% | 1,763 -> 1,834 | 88.1 -> 79.1% | | On #661 mixed-c32 (2) | 1,254 -> 1,261 med | 6.65 -> 5.95% med | 1,479 -> 1,439 | 89.4 -> 90.5% med | | On #661 long-context-mixed (1) | 670.5 -> 667.6 | 16.4 -> 9.8% | 1,503 -> 1,473 | 89.3 -> 82.1% | | On #661 cold-heavy-mix (1) | 545.6 -> 547.8 | 56.3 -> 55.7% | 1,713 -> 1,786 | 81.6 -> 79.8% | | Stack (660+661+665) mixed-c32 (2) | 1,374.6 -> 1,394.2 | 4.82 -> 4.34% | 1,001 -> 922 | 96.5 -> 97.1% | | GB10 Stack mixed-c8 (2) | 128.4 -> 129.4 | 41.8 -> 38.0% | 1,181 -> 1,118 | 79.0 -> 81.7% | | GB10 Stack agentic-coding C=8 (1) | 137.1 -> 135.0 | 45.4 -> 34.5% | 1,024 -> 877 | 81.8 -> 85.7% |
Reading: 2 of 3 SOLO scenarios get worse on output throughput and SLO (mixed-c32 SLO -1.9 pp; cold-heavy-mix SLO -9.0 pp, output -3.7%, TTFT +4.0%). On #661 long-context-mixed SLO drops 89.3 -> 82.1% while stalls improve. The Stack rows cannot be attributed to #681 alone (three other PRs). Disclosed trade-off: "on solo cold-heavy-mix, keeping coalescing active near EOS pulls 150K–250K cold prefills ahead of decoders without chunk shrinking, raising agentic_multiturn TTFT p99 3,323 -> 5,144 ms" — i.e. the change's own mechanism (not clamping to the near-EOS decoder) delays other requests' first token by up to 1.8 s p99.
Claimed stack deltas (from #661-first ordering): SM120 mixed-c32 >250 ms stalls 538 -> 135 (-74.9% vs main), burst gap p99 254.7 -> 234.9 ms, prefix-cache hit rate 48.6% -> 52.5%; long-context-mixed stalls 503 -> 244; cold-heavy-mix 2,732 -> 2,452 with 7 client-side 45 s drain cutoffs, 0 server errors; cold-burst probe peak gap 433.7 -> 224.1 ms.
#7 [high] Claims and evidence: archive checks, 84-run parity, CI and knobs
PR body "Evidence" section (claims):
- "Archive checks (40596880cc64)": cargo check/test --locked --release across 6 crates (helios 1,283 / 1,795, flare 246, flare-cli 245); pytest 853; verification/helios-lifecycle/check.py 10/10 TLC, 8/8 trace models / 594,065 transitions + negative model, 12/12 auxiliary, 13/13 TLA+ mutations, 26/26 Rust mutations; scripts/scheduling_sim 84 runs matched 1fbcc3c9 84/84 with 3/3 reachable
.min()mutations killed; git merge-tree clean vs main, #660, #661, #665. - Tested trees: df9a8ebd, dbbf65df, 38130855 (none equals the PR head e15b836, and none equals #661's 3d868f84). The served numbers therefore come from trees not identical to the pushed head. The archive hash 40596880cc64 is also not the head.
- 84 simulator runs:
scripts/scheduling_sim/workloads.py:33-55defines 21 workloads;__main__.py:42runs one Value per--decode-valuesentry, so 21 x 4 values = 84. Byte-identical traces vs main are expected because no workload mixes a near-EOS decoder with a long prefill (verified by reading workloads.py: alldecodehelpers takeoutput/max_new_tokensuniformly;prefill_decode_*use output=128). So the 84-run parity result does NOT exercise the changed code path — the new pytesttest_coalescing_horizon_averages_active_decoder_budgets(tests/test_scheduling_utility.py:506-528) is the only Python coverage of the new formula. - "3/3 reachable .min() mutations killed" — check.py's Rust mutation list does not target policy.rs's coalescing horizon (verification/helios-lifecycle/check.py mutation targets: scheduler.rs, execution/threaded, cache.rs, checkpoints.rs, offload/transfer.rs, server/runtime.rs) so the 3 killed min() mutations must come from the simulator side (pytest), not check.py.
- Compatibility claim: no CLI flags, no config changes, no ABI/core changes;
coalescing_horizon_tokensremains an internal PolicyConfig field not settable from config (verified: helios/src/server/config.rs:305-330 only exposes scheduler_policy preset, scheduler_terminal_value, scheduler_terminal_age_price, scheduler_checkpoint_extra_work_fraction, mtp_adaptive_verification_alpha; no coalescing key). So the change has no operator knob and no doc'd config row change (docs/scheduling-runtime-design.md:713 row still says 64). - Limits disclosed: standalone GB10/other GPUs or recipes untested; long-context-mixed and cold-heavy-mix single repeats.
- No CI checks ran on head e15b836 (orientation packet: "CI on the head commit: no checks"), and the PR has zero reviews and one conversation item (none).
#8 [high] People: author series + area owners + zero engagement
FujitsuPolycom (Discord "Dooner"), repository association CONTRIBUTOR. Last 180 days: 15 merged, 11 closed, 4 open. Open now: #665 (prefix-cache scan resistance), #661 (prefill chunk exploration), #660 (budgeted interior anchor splits), #649 (RoCE prefill proxy opcodes). Merged in the touched area: #538 (Restrict cold pure-prefill discovery to natural-fit graph capacities), #496 (Selene ancestor read coalescing), #497 (disk offload restore latency), #586/#587 (Engram plane assembly / export spans).
Author is a prolific contributor in helios/src + docs but is not one of the charter's priority contributors (@voipmonitor, @original-el8, @lukealonso). All three of #660/#661/#665 have Autobot "Ready To Merge" as of 2026-12-02 and none is merged yet; #681 is the fourth in the same series, opened the day after, still a draft with no CI and no human review.
Who usually works in this area (default-branch commits, last 180 days): helios/src — Luke Alonso 237, Martin Vit 52, yatesdr 49; scripts/scheduling_sim — Luke Alonso 6, PCCessna 1, yatesdr 1; docs — Luke Alonso 391, Martin Vit 55, yatesdr 49. The coalescing code itself came from Luke Alonso's #645. yatesdr's #663 (merged 2026-12-01) is the most recent change to the same function's neighbours (first-output age pricing) and to utility.py.
Engagement so far on #681: none — 0 comments, 0 reviews, no reactions visible in pr_comments (returned "No comments"). No one has cross-referenced it in the other open PRs/issues I read (#661, #660, #665, #663, #655, #676 all omit it; #661 and #665 were last updated 2026-12-02 before #681 opened at 2026-12-02).
#9 [high] Project fit: charter + design-review gate mapping
Charter (read_charter) facts that bear on #681:
- "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)." #681 reports served A/B on 4x RTX PRO 6000 and 4x GB10 - it does claim benchmarks over main, though the "main" baseline for the stack rows is a stack, and 2 of 3 solo scenarios are neutral-to-worse on SLO/throughput. - "Keep the runtime small and model-agnostic" (#267, #334): change is inside Helios shared scheduler, no per-model branch. Aligned.
- "Be explicit and pin everything. No magic defaults":
coalescing_horizon_tokensstays a hidden PolicyConfig default (policy.rs:42 = 64.0) with no config key (helios/src/server/config.rs:305-330) and no CLI flag; the same was already true before #681, so the PR neither adds nor removes a knob. - "PR descriptions: Expect four parts: why, what changed, claimed result, evidence" — #681 has all four, plus a stacking/merge-order section.
- Code Review Standards "Supported matrix & compatibility: Check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target named in the docs." #681 discloses that standalone GB10 and other recipes were untested; SM120 TP4 + GB10 TP4 only.
docs/design-review.md mandatory gates (verified text):
- docs/design-review.md:195-208: changes to "cohort algorithms" and service pricing "must be evaluated against the Python simulator and reference solvers in scripts/scheduling_sim/" and (for timing estimation) "the screening and 64-seed validation catalog in scripts/scheduling_sim/learning.py". Also: "Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog." The coalescing horizon IS a cohort algorithm, and
learning_scenarios.py:45-46,63-67includesprefill-N-decodersscenarios with a prompt + decoders — but every decode there uses output=128 and uniform acceptance, no near-EOS decoder, so the changed formula is inert there. The PR does not claim a learning.py 64-seed run (only an 84-runworkloads()parity sweep), which is the sim gate #661 and #663 were both asked for. - docs/design-review.md:234-251: "Never touch covered code without running and updating its simulator and formal checks ... a blocking design failure"; "Disclosure does not excuse skipping runnable CPU checks. All three layers run without a GPU or model checkpoint. Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance."
- docs/design-review.md:260-261: pure docs edits are exempt; this is not a docs-only PR.
- No formal lifecycle model covers policy pricing selection (check.py mutation targets are scheduler.rs / checkpoints.rs / cache.rs / execution / runtime.rs), so the TLA+/Kani layer is arguably N/A; the PR reports check.py passing anyway.
#10 [high] Reach: no opt-out, default-on, docs, dependency on #661
Reach analysis (verified from code/docs):
- No operator surface:
coalescing_horizon_tokensis not exposed in helios/src/server/config.rs (only scheduler_policy preset + terminal_value/terminal_age_price/checkpoint fraction/mtp alpha) and has no CLI flag (no matches in flare-cli/src). The only off-switch is--scheduler-policy throughput(policy.rs:50-53 sets delivery_fairness 0 and decode_age_price 0, but NOT coalescing_horizon_tokens; the horizon stays 64.0 under throughput, so the coalescing bonus remains active under throughput too — the docs/README describe it as part of the default policy). #661's body says "Opt-out: --scheduler-policy throughput" for its own change, not for #681's. - Default-on: PolicyConfig::default() is what both
scheduler_policy: balancedand a missing key produce (config.rs:305-310), so the cohort mean applies to every prefill-capable core on every deployment. - Affected requests: any prefilling request with max_new_tokens > 1 while at least one decoder is active; requests with prompt_logprobs or max_new_tokens == 1 are excluded (policy.rs:556-564).
- Documented behavior change: docs/scheduling-runtime-design.md:222-231 now specifies per-decoder clamp-then-average for both horizon and speculative expected output; docs/scheduling-runtime-design.md:713 config table unchanged. No doc or README mentions the near-EOS case or the new cold-prefill-priority trade-off that the PR body itself discloses (agentic_multiturn TTFT p99 3,323 -> 5,144 ms).
- Interaction with chunk sizing: the horizon feeds
per_token = (best_surplus_per_horizon * horizon) / initial_prefill(policy.rs:677), so raising the horizon by up to 64x (1 -> 64) raises queued prefills' per-token price for the SAME prompt size — that is exactly the mechanism that lets 150K-250K cold prefills outbid decoders, which #661 was needed to compensate for by shrinking chunks. #681 depends on #661 for that compensation, and #661 is unmerged. - Metrics/observability: no new metric; the effect is visible only in dispatch/ITL/TTFT behavior. #663's
first_output_wait_nsand #681's coalescing term both amortize overinitial_prefill(docs/scheduling-utility.md:306-309 uses "matching coalescing's fixed-denominator amortization"), so their relative weight shifts when the horizon grows. - Compatibility: no Protobuf, core-format, or CUDA-graph ABI change; prepared/exported cores unaffected (the change is pure scheduler arithmetic). No dependency changes.
#11 [high] Change detail: monotone credit increase, undeclared sim divergence fix, tests
Verified by reading policy.rs at main vs PR head:
- Monotonicity. Old horizon = min(H, post_prefill, min_i rem_i). New horizon = mean_i min(rem_i, min(H, post_prefill)). Since min(rem_i, ph) >= min(min_i rem_i, ph) for every i, the mean is >= the old value. Same for mean_out: old = max(min(expected_at(w), min_i rem_i), 1.0); new = mean_i max(min(expected_at(w), rem_i), 1.0) >= old. Net: #681 can only RAISE queued-prefill coalescing credit, never lower it, for any state. No state loses credit. That is why the only measured regressions are ones where more prefill credit is harmful (solo cold-heavy-mix: SLO 88.1 -> 79.1%, output -3.7%, agentic_multiturn TTFT p99 3,323 -> 5,144 ms).
- Undeclared removal of a Rust/simulator divergence. In
scripts/scheduling_sim/utility.py:215-219(pre-existing, unchanged by this PR)mean_outwas ALREADY a cohort mean over decoders, while the Rust usedpeer_budget= min over decoders. #681 makes Rust match the simulator's existing mean for mean_out; the PR body presents both as one formula change and does not say that the mean_out half is a pre-existing Rust/sim divergence repaired. Verified: utility.py diff touches only the horizon block (lines 232-236), mean_out at 215-219 is untouched. - Dead-guard removal.
peer_budget == usize::MAXin the early return could never be true because decoder_count > 0 implies a rem > 0 was stored; the PR drops it (policy.rs:567). Behaviour-neutral, undeclared but harmless. - Rust-only surface change in utility.py's shape: the Python
decoderslist comes fromView.output_budgetwhich ismin(output_tokens, max_new_tokens) - generated(simulator.py:26) whereas Rustremalso clamps bymax_sequence_tokens - scheduled_consumed(policy.rs:548-549). Simulator has no max_sequence_tokens, so the clamped coordinate is Rust-only; the new averaging makes that clamp apply per-decoder rather than to the whole cohort, i.e. one KV-exhausted decoder now only drags down its own term (1/n) rather than collapsing everyone's horizon. - Tests: policy_tests.rs adds a
coalescing_bonus()helper that re-derives the bonus by re-runninglane_valueswith the horizon toggled to 0.0 (policy_tests.rs:6866-6877) and anadd_active_decoder()that forces phase=Decode/consumed=prompt/generated=1 (6879-6887). Both new tests assert exact closed-form bonuses (1e-9 tolerance), the [1,100] pair gives 32.5, a single decoder matches min(H, post_prefill, rem), zero decoders and max_new_tokens == 1 give exactly 0.0. Plus a speculative test with 3 sub-cases (packed eff_width 6->4, saturation, slow B=4). No test asserts monotonicity vs the old formula, and no test covers the KV-exhaustion clamp difference. - Docs change (docs/scheduling-runtime-design.md:224-229) is a single reworded clause; docs/scheduling-utility.md (which describes the first-output credit that shares the amortization, lines 287-320) was NOT updated, and neither the
coalescing_horizon_tokensrow (line 713) nor helios/README.md:482 changed.
#12 [high] Related work: #645 origin, stack state, #663, #676, nothing supersedes
Overlapping / adjacent PRs and issues around #681, with state as of 2026-12-02:
- #645 (merged 2026-11-30, Luke Alonso, Closes #485): introduced
coalescing_prefill_log_bonus,PolicyConfig::coalescing_horizon_tokensand thepeer_budgetmin that #681 replaces, in both policy.rs and utility.py, plus the burst workloads (workloads.py:50-54) andtest_simultaneous_burst_coalesces_prefills_into_full_decode_batches. #681 is a refinement of #645's parameterization, not a competitor. #645's own Autobot review said the coalescing bonus is "enabled by default ... affecting prefill durations, admission ordering, and checkpoint pricing for every prefill-capable core". - #661 (open, same author, head 3d868f84, +2778/-186): declared stack parent. Its own Autobot review (2026-12-02 15:24) = Ready To Merge. It contains the
test_scheduling_utility.py+24/-1 and policy_tests.rs +1762 changes that #681's test block sits after; a merge-order conflict in those files is likely, not a semantic one. #681 saysgit merge-treeis clean against #661 at 3d868f84. - #660 (open, same author, Ready To Merge): checkpoint anchor splits, stack member, different files.
- #665 (open, same author, Ready To Merge, head c5b3923): scan-resistant prefix-cache eviction, stack member, different files (cache.rs/scheduler.rs). Its measured wins (hit rate 1.74-1.89x, TTFT -86.3%) make the Stack row's prefix-cache hit-rate claim (48.6 -> 52.5%) attributable to #665 rather than #681.
- #663 (merged 2026-12-01, yatesdr): first-output waiting-age pricing, default-on under balanced, touched policy.rs/utility.py/tests the day before #681. Not overlapping in the coalescing term itself, but both feed per-prefill-token credit and share the
initial_prefilldenominator. - #654 (closed, logprobz) and #662 (closed, flare-autobot): competing/duplicate first-output age-pricing designs that #663 superseded. Not about coalescing; only context for why the balanced-preset scheduler is churning this week.
- #655 (open, yatesdr, Ready To Merge): Snapshot cost retention; different files (cost.rs/checkpoints.rs), listed in the related set but not in #681's clean-merge claim.
- #676 (open issue, Reederey87, 2026-12-02): large prefill chunks cause >1.4 s decode p99 ITL under balanced on GLM-5.3-Flash TP2 GB10; asks maintainers to choose utility-model pricing vs an explicit cap; cross-references #661 only. It is the same user-visible symptom class #661/#681 address, and #681's mechanism (raising prefill credit near EOS) works against it unless #661's chunk shrinking is present.
- #571 (open, malventano) and #334 (open, javieratomic) also touch policy.rs (wide-round forcing; Engram row prefetch) with no overlap in the coalescing function.
Nothing found: no PR or issue proposes superseding or reverting the coalescing horizon; no Closes #/Fixes # reference in #681; no related test or doc names it yet.
#13 [high] Research summary
Case file for PR #681 ("helios/scheduler: use active cohort mean in coalescing horizon", draft, head e15b836, +236/−18 across 5 files, no reviews, no CI) is complete; twelve scratchpad entries cover every angle.
What I verified in the code: the PR replaces the scalar peer_budget (min over active decoders' remaining output budget) with a per-decoder decoder_rems array in coalescing_prefill_log_bonus (helios/src/scheduler/policy.rs:525-684), and averages min(rem, min(horizon, post_prefill)) for the horizon and max(min(expected_at(w), rem), 1.0) for speculative mean output. The change is provably monotone: it can only raise queued-prefill credit, never lower it, which is why the two measured regressions (solo mixed-c32 SLO 93.0→91.1%, solo cold-heavy-mix out −3.7% / SLO 88.1→79.1% / TTFT +4%) are cases where more prefill credit is harmful — the PR body itself discloses pulling 150K–250K cold prefills ahead of decoders and raising agentic_multiturn TTFT p99 3,323→5,144 ms.
Findings a reader could not get from the description: (1) the simulator's mean_out at scripts/scheduling_sim/utility.py:215-219 was already a cohort mean before this PR, so half the change is a silent Rust/sim divergence repair, not a new formula; (2) the "84 simulator runs matched 84/84" evidence cannot exercise the changed path — no workload in workloads.py:33-55 pairs a near-EOS decoder with a long prefill, so parity is expected by construction; (3) the served A/B trees (df9a8ebd, dbbf65df, 38130855) and the archive hash (40596880cc64) are not the PR head; (4) there is no operator knob or opt-out — coalescing_horizon_tokens is not in helios/src/server/config.rs:305-330 nor a CLI flag, and --scheduler-policy throughput does not clear it; (5) docs/design-review.md:195-208 requires the scripts/scheduling_sim/learning.py (not opened) catalog for cohort-algorithm changes and the PR reports no such run; (6) the change depends on #661's chunk shrinking to be safe, and #661 (plus #660 and #665, all "Ready To Merge") is still unmerged.
Related-work map: introduced by merged #645 two days earlier; stacked on #661/#660/#665; neighbours merged #663 the day before (which weakened the balanced burst-coalescing test bounds and shares the initial_prefill amortization); symptom-class issue #676 (open) argues the opposite direction (cap prefill chunks) and names only #661. Author FujitsuPolycom has three other Ready-To-Merge PRs in this series and no priority-contributor standing; nobody has commented, reviewed or cross-referenced #681.
#18 [high] AMENDMENT 1: head moved to 975f825; review's Simplify/Nit items already applied
AMENDMENT to notes #1/#11/#17. New head since the 2026-12-02 report: 975f82578a7b2a59c28fc34647769cd9ce22ab0c (975f825), PR now +331/−27 in 5 files (was +236/−18 at e15b836). search_history shows 975f825's parent is main 1fbcc3c9 — the branch is a single squashed commit, i.e. the reviewed revision e15b836 no longer exists in the branch.
production change now reads (verified at head):
helios/src/scheduler/policy.rs:530-554—decoder_rems: [usize; REQUEST_LANES]replaces scalarpeer_budget; early return at:567no longer checkspeer_budget == usize::MAX.policy.rs:599-601— new localfn mean_capped(rems: &[usize], cap: f64) -> f64=sum(min(rem, cap)) / len.policy.rs:630and:639—mean_out = mean_capped(&decoder_rems[..decoder_count], expected_at(...)); the old.min(peer_budget).max(1.0)is gone, andexpected_at(...)is now evaluated once per shape instead of inside the per-decoder map closure.policy.rs:669-679—ph = min(coalescing_horizon_tokens, post_prefill),horizon = mean_capped(..., ph), and the oldif horizon > 0.0guard is deleted (safe:horizon > 0because:527,:550,:561,:567all guarantee positive factors;per_token.is_finite() && > 0.0still checked at:676).helios/src/scheduler/policy_tests.rs:6866-6963— first test now also covers ann=3[1,20,100]cohort (:6915-6927) and a KV-headroom-clamped decoder (:6929-6943), with a comment at:6931-6932that the KV clamp is Rust-only vsscripts/scheduling_sim/simulator.py:26.policy_tests.rs:6966-7081speculative test now callssuper::rounds::forecast_tokens(&curve, w)rather than a hand-copied interpolator.
Consequence for the report: the Autobot review at 2026-12-02 16:34 (result 1/3) says "up to e15b836" and flags (a) hoisting expected_at + .max(1.0) deadness, (b) the unreachable if horizon > 0.0 guard, (c) hand-copied expected_at in the speculative test, and (d) as a Nit the missing KV-clamped / n>=3 subcase. All four are already fixed at 975f825, so those four review items should be reported as applied, not open.
Stale-description mismatch at head: the PR body still describes mean_out as "averages expected_at(width).min(rem).max(1.0)" (the clamp no longer exists) and still claims "+11/-10, +1 net production LOC" — pr_files now reports policy.rs +16 -18 (net −2), so the size claim is stale.
#19 [high] AMENDMENT 2: head adds an end-to-end heterogeneous-budget sim test, but it compares coalescing ON vs OFF, not mean vs min
AMENDMENT to notes #7/#11. tests/test_scheduling_utility.py was 0-added at e15b836 and is now +90 lines at head 975f825:
test_coalescing_horizon_averages_active_decoder_budgets(tests/test_scheduling_utility.py:506-526):View("d0", 0, 1, ())+View("d1", 0, 100, ())+View("p0", 512, 128, ())on graphs prefill-512=10 ms, decode-b1=15, decode-b2=20, decode-b4=24; asserts_coalesce_token["p0"]*exp(log_scale) == 64*3*(1-(2/20)/(3/24))*32.5/512to1e-9(:518) and the single-decoder case10.0(:525). Mirrors the Rust assertions.test_coalescing_heterogeneous_budget_end_to_end_balanced(:529-593): non-speculative cohortshort0(max_new_tokens=8) + 3 long decoders (256) + 4 queued 4096-token prefills,age_price=0.1, comparingUtilityConfig(..., coalescing_horizon_tokens=0.0)(off) against the default (on) — makespan, mean and max prefill TTFT, andmax_output_gap_ms, with absolute ceilings 7740 ms / 330 ms / 190 ms (:558-562); a speculative twin at:564-593withmax_new_tokens=32, 5 prefills, ceilings 1885 ms / 440 ms / 220 ms.
Why it only partly closes blocker 2 of the Autobot review:
- It does exercise
output_budget < 64heterogeneous cohorts throughUtilityScheduler.prepare— the exact coverage gap reported before. - But every assertion is coalescing-on vs coalescing-off, plus absolute bounds. None of them contrasts
mean_i min(rem_i, ph)against main'smin_i min(rem_i, ph); a revert to the old minimum formula would still leave coalescing net-positive in these cohorts, so this test would very likely pass onmaintoo. It therefore guards the feature, not this PR's delta. - The absolute thresholds (
7740,330,190,1885,440,220) are hard-coded from the graphs inscripts/scheduling_sim/workloads.py:9-22, so they are brittle to any catalog/timing edit, and they encode no before/after delta as the review asked for. - The PR body's Evidence section still cites only "unit tests including a
[1, 100]heterogeneous decoder pair" and the84-run sweep; the end-to-end test is not mentioned, andworkloads.py:25-55still has nomax_new_tokensoverride (default4096atmodel.py:103,output_budget = max_new_tokens - generatedatsimulator.py:26), so the "84/84 matched1fbcc3c9" parity claim remains inert for this change.
#20 [high] AMENDMENT 3: first bot review landed — Changes Requested (2 blockers); most non-blocking items already fixed at head
AMENDMENT to notes #7/#15/#17. New event at 2026-12-02 16:34 (after my 2970 report, which said "no review and no comment on the head"): flare-autobot posted a full review on #681 — Recommendation: Changes Requested, Merge Risk Medium "up to e15b836", 2 blockers / 1 should-fix / 3 subtract-simplify / 1 nit. Pre-merge checks: security ✅; charter & value fit ⚠️; related/duplicate ⚠️; tests & verification ⚠️. PR updated 18:06, labels now area:scheduling, performance, triage:review (triage label added with the case file). Still no human review, no comment, no reaction.
Where the review agrees with my report (independent confirmation, so downstream can rely on it): the cohort mean is >= main's minimum so prefill credit only rises; the standalone Solo arm regresses 2 of 3 scenarios (cold-heavy-mix output 541.8→521.8, SLO 88.1→79.1%, TTFT p50 1,763→1,834; agentic_multiturn TTFT p99 3,323→5,144 = +54.8%; mixed-c32 SLO 93.0→91.1%); the served A/B and archive checks ran on trees df9a8ebd/dbbf65df/38130855 and hash 40596880cc64, not the head; no CI on the reviewed head; benefit depends on unmerged #661, with #660/#665 supplying the Stack rows. It adds citations I had not pinned: docs/design-review.md:109-115 (speedup-over-main gate) and Charter #210 for blocker 1, and for blocker 2 docs/design-review.md:195-200,234-251, scripts/scheduling_sim/model.py:103 (default max_new_tokens = 4096), scripts/scheduling_sim/simulator.py:26 (output_budget = max_new_tokens - generated) and workloads.py:25-55 — I verified all three of the last ones at head: workloads.py:25-55 has no max_new_tokens override, model.py:103 is the 4096 default, simulator.py:26 is the output_budget line, and workloads.py:49 continuous_decode is the single-decoder case where min and mean coincide. Only ONE of the two blockers is new information relative to my report (the "84-run sweep is inert" argument); blocker 1 restates my finding 7/8.
Review statements that are stale at the new head 975f825 (do not act on them):
- Should-fix 1 (a): "
docs/scheduling-runtime-design.md:224-229still says over a bounded per-stream decode horizon ... averaged across active decoders; reword to bounded cohort-mean decode horizon" — already done:docs/scheduling-runtime-design.md:224reads "over a bounded cohort-mean decode horizon" and:225-229spells out the per-decoder clamp + averaging, with a clause for speculative per-round expected output. Remaining valid parts of that should-fix: distinguish themean_outsim-parity repair from the new horizon rule, and attribute#660/#661/#665stack effects plus theOn #661long-context-mixedSLO drop (89.3→82.1%, −7.2 pp, in the table but not the prose). - Walkthrough lists only
tests/test_scheduling_utility.py:506-526; the head also has:529-593test_coalescing_heterogeneous_budget_end_to_end_balanced(added in 975f825, i.e. after the review), which is exactly blocker 2's requested artifact. - Subtract/Simplify 1–3 and the Nit (KV-clamped +
n >= 3subcase) are all implemented at head — see note #18. - Claim "
verification/helios-lifecycle/check.py(not opened) has no coverage ofpolicy.rs" — unverified; my own reading of the PR body is thatcheck.pymutation targets arescheduler.rs/checkpoints.rs/cache.rs/execution/, so the formal layer is arguably N/A, not failing.
Blocker 1 remains fully live at head: parent of 975f825 is main 1fbcc3c9, which does not contain #661 (3d868f84); #661 is still open (Ready To Merge as of 2026-12-02 15:24), so the "rebase after #661, green CI on the reviewed head" ask is unmet.
#22 [high] AMENDMENT 5: verified anchors for each amendment at head 975f825
Verification pass at head 975f825 for the amendment items (citations any reviewer can re-check):
helios/src/scheduler/policy.rs:599-601fn mean_capped(rems: &[usize], cap: f64); used at:630(packed shapes),:639(speculative catalog),:671(horizon). All three.min(peer_budget)/.max(1.0)chains are gone (pr_diffonpolicy.rs, two hunks at:627/:636).- Dead guard gone:
policy.rs:669-679has noif horizon > 0.0; the only remaining positivity check isper_token.is_finite() && per_token > 0.0at:676. - Spec wording fixed:
docs/scheduling-runtime-design.md:224"bounded cohort-mean decode horizon";:225-229per-decoder clamp + averaging + speculative clause. Config table rowdocs/scheduling-runtime-design.md:713still generic ("Output-token horizon for decode-batch coalescing bonus on queued prefills");helios/README.md:482-483still "a 64-token decode-batch coalescing horizon" — both pre-PR semantics. - New Rust coverage:
policy_tests.rs:6888-6963([1,100]→32.5 at:6904-6913,[1,20,100]→85/3 at:6915-6927, KV-clamped(2+64+64)/3at:6929-6943, single-decoder10at:6945-6956, zero-bonus at:6958-6962); speculative test:6966-7081usessuper::rounds::forecast_tokensat:7032,:7064-7065and asserts a case where the oldmin_iclamp "would erroneously report a positive bonus" (:7054-7059) — i.e. the Rust side does have a mean-vs-min discriminator; only the Python side lacks one. - Python coverage:
tests/test_scheduling_utility.py:506-526exact formula;:529-593heterogeneous end-to-end ON-vs-OFF (ceilings 7740/330/190 and 1885/440/220 ms at:558-562,:588-593). - Gate citations confirmed at head:
docs/design-review.md:106-115(honest-evidence rule),:195-206("cohort algorithms must be evaluated against the Python simulator … Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog").docs/design-review.md:195-206is therefore also the citation for the KV-clamp divergence in note #21. #661still open (read_item 661, updated 2026-12-02 15:24, Ready To Merge) and975f825's parent ismain1fbcc3c9, so blocker 1 (rebase after#661) is unmet.
#25 [high] AMENDMENT 8: orientation leads closed — review is the only new event; #661/#676 gain detail that bears on #681's blockers
Orientation-packet leads, re-checked at head 975f825 (nothing new appeared for #681 between 16:34 and 18:06):
- Bot review at 2026-12-02 16:34 — fully read; amendments in notes #20 (what is live vs already fixed), #22 (verified anchors), #23 (check.py / config claims). This is the "new event"; there is no newer human comment, review, or CI on the head.
#661(declared stack parent) — re-read at its latest state (updated 2026-12-02 15:24, Ready To Merge). New detail relevant to #681: review 3 says#661is "cleanly sequenced ahead of stacked draft #681" and expects "only minor rebase overlap with open #655/#660" — i.e. the maintainer-side bot already treats #681 as blocked behind #661, which matches my blocker read. Also relevant: #661's own review notes two of its additions (preserves_first_output_wait, reconciled interior-cutfirst_output_valuecredit) are not modeled inscripts/scheduling_sim, so #661's 64-seed result does not carry to them either — the same evidence pattern #681 shows.#661'smixed-c32/long-context-mixed/cold-heavy-mixSLO dips (91.1→89.4, 94.8→89.3, 89.0→81.6) are the base of #681's "On #661" rows.- New human voice, lukealonso's review comment on
#661at 2026-12-02 17:10 — the coalescing/#645author and dominanthelios/srccommitter is active in this area after #681's bot review but has not engaged with #681. Substantively it raises two things that bear on #681: (a)GraphKind::Resumecontaminatingdecode_floorincost.rsmakes cold discovery too optimistic (a #661 bug, not #681's), and (b) the maintainer asks for green CI on.github/workflows/native-serving.ymlbefore merging default-onbalancedbehaviour. Point (b) is an independent, human-stated confirmation of my "no CI on the head" finding as a general merge bar for this area. #676(issue, open) — re-read in full. New facts: it is a measured GB10 report (2× DGX Spark, GLM-5.3-Flash-FP4 TP2,prefill_chunk=4096) withdecode_overlapp99 ITL 1,430 ms and max 2,576 ms; the reporter prototyped a decoder-active prefill cap and measured p99 ITL 1,430→587 ms at 512 tokens. It explicitly offers to test#661on GB10 (comment 2026-12-02 12:16) and has not referenced #681. Direction: it asks for either utility-model pricing of smaller prefill shapes (which is #661's route) or an explicit operator cap flag--scheduler-mixed-prefill-max-tokens— i.e. the field is asking for an off-switch/cap, the exact thing #681 lacks (docs/...,config.rshave no coalescing key). My "same symptom class, opposite direction" characterisation stands and is strengthened: the operator-facing demand in the tracker is a cap, while #681 raises queued-prefill credit.#645(merged origin),#663(merged, next commit down),#660/#665(stack members),#655(Ready To Merge,cost.rs+checkpoints.rs, not in #681's clean-merge claim) — unchanged since the report; no new comments on any of them in this window that mention #681.related_items 681shows no new cross-reference in either direction (still only#661→#681).- Last 180-day similar-file PRs (
related_items 681): unchanged set;#663,#654(closed, superseded),#645,#644,#661,#662(closed),#656,#620,#619remain the only 5-file overlaps. Nothing new since the report touchescoalescing_prefill_log_bonus. - Not relevant / no new lead:
#496,#497(FujitsuPolycom's Selene/disk-PR unrelated "coalescing"),#674,#664,#554,#651,#613— keyword collisions only, dropped.
#26 [high] Research summary
The new event is a head change (e15b836 → 975f825, PR now +331/−27, single commit on main 1fbcc3c9) plus the first flare-autobot review (2026-12-02 16:34, Changes Requested, 2 blockers). Amendments, one per scratchpad note:
-
#20/#22 — the review mostly confirms my report (monotone credit, 2-of-3 Solo regressions, A/B trees
df9a8ebd/dbbf65df/38130855, no CI on head, dependency on unmerged#661), adds citations to adopt (Charter#210,docs/design-review.md:106-115,:195-206,model.py:103,simulator.py:26), and contributes one genuinely new blocker: the 84-run sweep is inert because no workload setsmax_new_tokens. Its non-blocking items (mean_capped helper, dead.max(1.0), deletedif horizon > 0.0,forecast_tokensreuse,n≥3/KV subcases, spec reword to "cohort-mean") are already applied at head — report them as done, not open. Blocker 1 is still live:mainlacks#661. -
#19 — evidence gap only half-closed.
tests/test_scheduling_utility.pyis +90, not +23, and now containstest_coalescing_heterogeneous_budget_end_to_end_balanced(:529-593), which does exerciseoutput_budget < 64cohorts end-to-end — but every assertion is coalescing-ON vs OFF, never new-mean vs main's-min, so it cannot catch a reversion; ceilings are hard-coded. Only the Rust side has a mean-vs-min discriminator (policy_tests.rs:7054-7059). -
#21 — new finding: the spec now documents a horizon the qualified simulator cannot compute, because Rust's
remincludes a KV-headroom clamp (policy.rs:548-549) the simulator'soutput_budgetlacks (simulator.py:26) — a second undeclared Rust/sim divergence, admitted in the PR's own test comment (policy_tests.rs:6931-6932);README.md:482-483and the config row:713still describe the pre-PR minimum. -
#23/#24 — verified side points:
check.pymutations never targetpolicy.rs(so the mutation layer is N/A and the unrun 64-seed gate is the only applicable one); no coalescing key inconfig.rs/flare-cli(still no off-switch); monotonicity claim survives the clamp removal (cap ≥ 1 fromrounds.rs:505), with one new parity-neutral consequence —mean_cappedaverages over all decoders while the numerator uses onlyservedstreams. -
#25 — orientation leads closed: nothing newer than the 16:34 review;
#661is now explicitly "cleanly sequenced ahead of stacked draft #681";lukealonsois active in#661(17:10 review demanding greennative-serving.yml(not opened) CI) but silent on#681;#676is a measured GB10 report asking for a prefill cap / operator flag, the opposite of raising queued-prefill credit.
#27 [high] AMENDMENT 9: consolidated amendment list for the report writer (ordered, with anchors)
Report writer: this note is the authoritative amendment deltas against report entry #17. Only these items change; everything else in #17 stands as written.
A. State of the PR changed. Head e15b836 → 975f825 (975f82578a7b2a59c28fc34647769cd9ce22ab0c), one squashed commit whose parent is main 1fbcc3c9; PR now +331/−27 in the same 5 files (docs/scheduling-runtime-design.md +6/−3, helios/src/scheduler/policy.rs +16/−18, policy_tests.rs +217, scripts/scheduling_sim/utility.py +2/−6, tests/test_scheduling_utility.py +90). PR body is stale: it still claims "+11/-10, +1 net production LOC" and still describes mean_out as "averages expected_at(width).min(rem).max(1.0)" — the clamp no longer exists. Corrects #17's header, its File-map numbers (tests/test_scheduling_utility.py +23 → +90) and its "The change / Size" line ("policy.rs +11/−10 net +1" is now net −2).
B. First review landed (the event). flare-autobot, 2026-12-02 16:34: Changes Requested, Merge Risk Medium "up to e15b836", blockers 2 / should-fix 1 / subtract-simplify 3 / nit 1; pre-merge checks: security ✅, charter-fit ⚠️, related/duplicate ⚠️, tests-evidence ⚠️. Case file opened 16:15; label triage:review added; PR updated 18:06. Corrects #17's "zero engagement / no review / no comment" and its Process section, and note #15. Still true: no human review, no comment from a person, no CI on the head.
C. Review corroborates the case file — treat as confirmation, not news: mean ≥ old min so credit only rises; Solo regresses 2 of 3 (cold-heavy-mix 541.8→521.8, SLO 88.1→79.1%, TTFT p50 1,763→1,834; agentic_multiturn TTFT p99 3,323→5,144 = +54.8%; mixed-c32 SLO 93.0→91.1%); A/B trees df9a8ebd/dbbf65df/38130855 and hash 40596880cc64 ≠ head; Stack rows depend on #660+#661+#665. Cite-it additions: Charter #210, docs/design-review.md:106-115 (honest-evidence rule), docs/design-review.md:195-206 (cohort-algorithm gate + "Do not diverge Helios from the simulator's qualified policy"), scripts/scheduling_sim/model.py:103, simulator.py:26, workloads.py:25-55.
D. One genuinely new blocker argument (add to #17 Key finding 4): the reported 84/84 parity sweep is mathematically inert for this change — no workload in workloads.py:25-55 overrides max_new_tokens, so every Request takes the 4096 default (model.py:103) and output_budget = max_new_tokens - generated (simulator.py:26) stays ≫ 64; continuous_decode (workloads.py:49) is the k = 1 case where min and mean coincide. All three lines verified at head.
E. Two blockers, restated for the report: (1) standalone-main regressions + reliance on unmerged #661 + unverified head — still live, since main 1fbcc3c9 does not contain #661 (3d868f84), #661 is still open (Ready To Merge 15:24). (2) inert simulator sweep — still live, though see F.
F. Evidence gap partly, not fully, closed (corrects #17 Key finding 4/7 optimism and #19): tests/test_scheduling_utility.py:529-593 test_coalescing_heterogeneous_budget_end_to_end_balanced is new at head and does exercise output_budget < 64 heterogeneous cohorts end-to-end (non-spec max_new_tokens=8 decoder + 3 long decoders + 4×4K prefills; speculative twin :564-593), with makespan/mean+max TTFT/max_output_gap_ms ceilings (7740/330/190 and 1885/440/220 ms at :558-562, :588-593). But every assertion is coalescing-ON vs coalescing-OFF, never new-mean vs main's-min, so a revert to min_i would still pass: it guards the feature, not this PR's delta, and the absolute ceilings are brittle against workloads.py:9-22. The PR body does not mention this test. Rust does have a mean-vs-min discriminator (policy_tests.rs:7054-7059: a case where the old min_i clamp "would erroneously report a positive bonus"); Python does not.
G. Review's non-blocking items are already fixed at head — report as applied, not open (#20, #22): mean_capped helper (policy.rs:599-601, used :630, :639, :671), expected_at hoisted out of the per-decoder closure, dead .max(1.0) gone, unreachable if horizon > 0.0 deleted (:669-679, only per_token.is_finite() && > 0.0 at :676), spec reworded to "bounded cohort-mean decode horizon" (docs/scheduling-runtime-design.md:224-229), n≥3 (policy_tests.rs:6915-6927) and KV-clamped (:6929-6943) subcases, super::rounds::forecast_tokens reused (:7032, :7064-7065). Only the attribution half of the review's should-fix survives: separate the mean_out sim-parity repair from the new horizon rule, and give the #660/#661/#665 stack attribution plus the On #661 long-context-mixed SLO 89.3→82.1% (−7.2 pp) drop that sits in the table but not the prose.
H. New finding — spec now documents a horizon the qualified simulator cannot compute (#21): Rust rem = min(max_new_tokens - generated, max_sequence_tokens - scheduled_consumed) (policy.rs:548-549) vs sim output_budget = max_new_tokens - generated (simulator.py:26); the KV clamp is Rust-only by the PR's own admission (policy_tests.rs:6931-6932). Second undeclared Rust/sim divergence of the class docs/design-review.md:195-206 forbids, alongside the mean_out repair. Also unchanged at head: utility.py:205 (output_budget > 1 filter) and :234 (output_budget - 1 prefiller cap) vs Rust post_prefill (policy.rs:558-560).
I. Verified corrections to two prior hedges (#23): (a) verification/helios-lifecycle/check.py mutations target only scheduler.rs (:417, :527, :665), execution/threaded/protocol.rs (:427), execution/threaded.rs (:441), cache.rs (:511, :515), scheduler/checkpoints.rs (:521, :672), offload/transfer.rs (:649), server/runtime.rs (:653) — never policy.rs, so the "26/26 Rust mutations" pass cannot detect a regression in coalescing_prefill_log_bonus; the mutation/formal layers are N/A and docs/design-review.md:195-206 is the only applicable gate — drop the "arguably N/A" hedge in #17's Project-fit subsection. (b) No off-switch confirmed in code: helios/src/server/config.rs accepts only scheduler_policy (:305-309), scheduler_terminal_value/scheduler_terminal_age_price (:312, :728, :744-750); no coalescing_horizon_tokens key in server config or flare-cli.
J. Monotonicity re-derived without the clamps (#24): expected_at >= 1.0 (policy.rs:586-598) with powered_curve clamped to [0,1] (rounds.rs:505), and rem >= 1 from :550, so mean_i min(rem_i, cap) >= min_i min(rem_i, cap) pointwise for both mean_out (:630, :639) and horizon (:671) — #17 Key finding 2 stands. New (shared with the sim, parity-neutral, low importance): mean_capped averages over all decoders while the numerator uses only served = min(n_streams, batch) (:624, :638), so unserved decoders raise mean_out; under the old min an unserved long decoder could not inflate anything.
K. Orientation leads closed (#25): no event newer than the 16:34 review. #661 (updated 15:24) now explicitly "cleanly sequenced ahead of stacked draft #681"; its reviewer notes two of its additions (preserves_first_output_wait, reconciled interior-cut first_output_value) are not modeled in scripts/scheduling_sim — same evidence pattern. New human voice: lukealonso (author of #645, dominant helios/src committer) reviewed #661 at 2026-12-02 17:10 — after #681's bot review — demanding green .github/workflows/native-serving.yml CI before merging default-on balanced behaviour, and is silent on #681; an independent confirmation that CI on head is a merge bar here. #676 re-read: measured GB10 report (decode_overlap p99 ITL 1,430 ms, max 2,576 ms; a decoder-active prefill cap reaches 587 ms at 512 tokens), offers GB10 validation of #661, never mentions #681, and asks for utility-model pricing or an explicit cap flag --scheduler-mixed-prefill-max-tokens — i.e. the tracker's operator-facing ask is a cap/off-switch, the opposite lever from raising queued-prefill credit. related_items 681 unchanged (only #661 → #681); no new overlapping PRs.
#3 [medium] Related work: #660 stack member (checkpoint anchor splits)
#660 "helios/scheduler: budget interior conversation-anchor splits against checkpoint_extra_work_fraction" by FujitsuPolycom, open 2026-12-01 19:02, updated 2026-12-02 00:23, head 9709d496, +900/-162 across 12 files. Labels area:scheduling, bug, performance, triage:review. Autobot review 2026-12-01 23:49 = "Ready To Merge" (0 blockers), still open as of 2026-12-02.
Relevance to #681: part of the declared 4-PR stack (#660 + #661 + #665 + #681) whose "Stack" measurements #681 cites. Does NOT touch policy.rs coalescing code (files: checkpoints.rs, tests, docs/{cli,core,scheduling-runtime}-design.md, helios/README.md, phase_tests.rs, check.py). Its mixed-c32 numbers (SLO 9.1% -> 80.3%) are the base the stack builds on. #681's body says it merges cleanly with #660.
Trade-off in #660 relevant to stack interpretation: mixed-c32 per-user p50 93.9 -> 71.0, >250 ms gaps 215 -> 434; also <think>-stripping clients skip Turn-1->2 reuse on single-chunk 4.5K–13.7K prompts unless --scheduler-checkpoint-extra-work-fraction 0.15.
Conflict noted in its review: overlaps open #655 in checkpoints.rs and docs.
#14 [medium] Recent activity: policy.rs/utility.py churn in the 3 days before #681
Commit history of helios/src/scheduler/policy.rs up to the PR head (search_history, newest first):
- e15b836a 2026-12-01 FujitsuPolycom: "helios/scheduler: use active cohort mean in coalescing horizon" (this PR's own commit)
- 8489d504 2026-12-01 yatesdr: "price first-output waiting age on incumbent decode rounds (#663)" — merged into main; base
mainfor #681 is 1fbcc3c9 (also 2026-12-01), which contains 8489d504. - e8a3a7c7 2026-12-01 Luke Alonso: #656 conditional speculative acceptance / acceptance-probe charging
- e85019b9 2026-11-30 Luke Alonso: #645 — introduced
coalescing_prefill_log_bonus,coalescing_horizon_tokens,peer_budget, the burst workloads and the burst test - 3e57bdc8 2026-11-30 Luke Alonso: #644 per-step speculative calibration and excluded-only waiting/delivery fairness
- c146d7be #620, 6cb7e3b7 #619, 0c25e88f #613, c9693765 #555, ba35da3f (FujitsuPolycom) #538, fd6c0f3b #510 …
So the function #681 edits is 2 days old and has had three authors' changes in three days (#645 -> #656/#644 -> #663). policy_tests.rs history is the same set plus 7cd83f32 #569 and 5deacda9 #568. scripts/scheduling_sim/utility.py was touched only by #645, #644 and #663 before this PR (items_touching). Default-branch committers in helios/src over 180 days: Luke Alonso 237, Martin Vit 52, yatesdr 49.
#681 neither reverses nor conflicts with #663's first-output pricing semantically (different term), but both add per-prefill-token credit amortized over initial_prefill, so their relative weight moves together with the horizon; docs/scheduling-utility.md:306-309 explicitly says #663's frac = work / initial_prefill matches "coalescing's fixed-denominator amortization".
#15 [medium] Process: draft, no CI on head, no review, same-day open, merge-order claim
Process facts (orientation packet + tools):
- PR #681 is a draft, opened and last updated 2026-12-02 (same day as the case file), base
main, head e15b836, 5 files +236/-18, labelsarea:scheduling,performance. - "CI on the head commit: no checks" — GitHub Actions has not run on e15b836. Every other PR in this series (#660, #661, #665) had CI plus three Autobot review rounds; #681 has neither.
- pr_comments returned "No comments": zero human reviews, zero bot review, zero reactions. No
Closes #NNNreference, so the PR closes no issue. - The body's stacking paragraph claims: "+1 net Rust production LOC change merges cleanly onto main (1fbcc3c9, zero merge conflicts with #660, #661, or #665)" and that
git merge-treeis clean; merge #661 (3d868f84) first for the largest gains. Verified that the head tree is not among the trees the served A/B was run on (df9a8ebd, dbbf65df, 38130855) and that the archive check hash is 40596880cc64. - The declared merge order puts three unmerged PRs (#660, #661, #665, each "Ready To Merge" per Autobot but not merged as of 2026-12-02) ahead of #681, and #681's own numbers are only meaningful in the stacked configuration; the solo rows are where the regressions appear.
#16 [medium] File map: exactly what each of the 5 changed files does
Files in #681 (verified against pr_diff and the head tree):
- helios/src/scheduler/policy.rs, +11/−10 (the only production change):
decoder_rems = [0usize; REQUEST_LANES]added at :531 and filled at :552;peer_budgetdeclaration and itspeer_budget.min(rem)removed (:530-554); early-return guard drops the unreachablepeer_budget == usize::MAX(:567); packed-shapemean_outat :627 and speculative-catalogmean_outat :636 become per-decoder means; horizon at :667-672 becomesph = H.min(post_prefill)then mean over decoders ofmin(rem, ph). - helios/src/scheduler/policy_tests.rs, +201:
coalescing_bonus()helper (:6866) that re-runslane_valueswith the horizon zeroed to isolate the bonus,add_active_decoder()(:6879) that forces phase=Decode/generated=1/scheduled=prompt,coalescing_horizon_averages_active_decoder_budgets_across_cohort(:6888) andcoalescing_speculative_mean_output_averages_per_decoder_budgets(:6936) with three speculative sub-cases (packed eff_width 6→4, saturated B=4, slow B=4). - scripts/scheduling_sim/utility.py, +2/−6: only the horizon block at :232-236;
mean_outat :215-219 untouched (it was already a mean). - tests/test_scheduling_utility.py, +23:
test_coalescing_horizon_averages_active_decoder_budgetsat :506-528 with the 32.5 mixed-cohort and single-decoder cases. - docs/scheduling-runtime-design.md, +5/−2: one clause at :224-229 describing clamp-per-decoder-then-average for horizon and speculative expected output. Untouched: the config row at :713, helios/README.md:482, docs/scheduling-utility.md (whose :287-320 describes the first-output credit sharing the same amortization).
Claim consistency: the PR body says "+1 net production LOC" and "+11/-10"; that matches policy.rs. The body also calls out scripts/scheduling_sim/utility.py +2/-6 and the two test files, all present. Nothing in the body describes an unlisted change; the only undeclared effects are behavioural (monotone credit increase, mean_out sim parity, KV-clamp now per-decoder) recorded in entry 11.
#21 [medium] AMENDMENT 4: doc/sim gap — spec and simulator disagree on the KV-headroom clamp; README/config table still describe the old minimum
AMENDMENT to notes #10/#11. Two documentation/consistency points that survive the new head 975f825:
- The design spec now describes a horizon the simulator cannot compute.
docs/scheduling-runtime-design.md:224-229says the horizon averages each decoder's remaining output budget "clamped ... to the prefiller's post-prefill output budget and the configured horizon" — but the Rustremismin(max_new_tokens - generated, max_sequence_tokens - scheduled_consumed)(helios/src/scheduler/policy.rs:548-549) while the simulator'sView.output_budgetis onlymax_new_tokens - generated(scripts/scheduling_sim/simulator.py:26). The PR's own new test comment states this explicitly: "KV-headroom clamping is Rust-specific (scripts/scheduling_sim/simulator.pytracksmax_new_tokens - generatedonly)" (helios/src/scheduler/policy_tests.rs:6931-6932). So after this PR the spec's formula and the qualified simulator policy (scripts/scheduling_sim/utility.py:232-235) agree only when KV headroom is not binding, and neither the spec nor the PR body says so.docs/design-review.md:195-208requires the qualified simulator policy to track Helios — this is a second, still-undocumented Rust/sim divergence, the same class as themean_outrepair the PR also leaves undeclared. - The simulator keeps two behaviours the Rust does not, unchanged by this PR and now amplified by the cohort mean:
scripts/scheduling_sim/utility.py:205excludes prefillers withoutput_budget <= 1and:234usesview.output_budget - 1as the prefiller cap, whereas Rust computespost_prefill = min(max_new_tokens, max_seq - prompt_tokens) - 1(policy.rs:558-560) and skips only when it is0. Cosmetic today, but a reviewer diffing the two formulas line by line will hit both.
Also unchanged at head and worth keeping in the report: coalescing_horizon_tokens is still absent from helios/src/server/config.rs and from flare-cli, PolicyConfig::throughput() (helios/src/scheduler/policy.rs:50-52) still does not zero it, the config row docs/scheduling-runtime-design.md:713 still reads "Output-token horizon for decode-batch coalescing bonus on queued prefills" (no cohort-mean wording), and helios/README.md:482 still says "a 64-token decode-batch coalescing" horizon — i.e. the user-facing docs still describe the pre-PR minimum semantics. So there is still no operator-visible statement of the new behaviour and still no off-switch.
#23 [medium] AMENDMENT 6: check.py mutations never touch policy.rs (verified); no coalescing key in config.rs
Two remaining claims from the 2026-12-02 16:34 review, resolved by direct check at head 975f825:
- "
verification/helios-lifecycle/check.pyhas no coverage ofpolicy.rs" — verified TRUE.check_mutations(...)inverification/helios-lifecycle/check.pytargets onlyhelios/src/scheduler.rs(:417,:527,:665),helios/src/execution/threaded/protocol.rs(:427),helios/src/execution/threaded.rs(:441),helios/src/cache.rs(:511,:515),helios/src/scheduler/checkpoints.rs(:521,:672),helios/src/offload/transfer.rs(:649) andhelios/src/server/runtime.rs(:653); the mutation runner is:245-248, driver:345-346,:400,:413. There is nopolicy.rsmutation, so the PR's "26/26 Rust mutations" pass cannot detect a regression incoalescing_prefill_log_bonus. Both the formal layer AND the mutation layer are outside this change's signature:docs/design-review.md:195-206(simulator/64-seed) is the only applicable gate, and it is the one that is unrun. This strengthens the report's "unrun CPU gate" finding — the claim should not be softened to "arguably N/A": the mutation suite is N/A, and that makes the missing 64-seedlearning.pyrun the sole remaining gate. - No off-switch confirmed at head.
helios/src/server/config.rsaccepts onlyscheduler_policy(:305-309),scheduler_terminal_valueandscheduler_terminal_age_price(:312, mirrored at:728,:744-750); there is nocoalescing_horizon_tokenskey in the server config or inflare-cli, so the only way to disable the term is a rebuild. Unchanged by975f825.
#24 [medium] AMENDMENT 7: monotonicity still holds at head without the clamps; cohort mean includes unserved decoders (shared with sim)
Re-derivation at head 975f825 (the .max(1.0) clamps are gone, so the monotonicity argument needs re-checking):
expected_at(policy.rs:586-598) returns1.0 + Σ mean_curve[...] >= 1.0, andmean_curveentries come frompowered_curvevalues clamped to[0.0, 1.0](helios/src/scheduler/rounds.rs:505), so the cap is always>= 1.rem >= 1is guaranteed byif rem > 0atpolicy.rs:550, somean_capped(rem, cap) = mean_i min(rem_i, cap) >= 1.- Therefore new
mean_i min(rem_i, cap) >= min_i min(rem_i, cap) = old min(expected_at, peer_budget)pointwise, for bothmean_out(:630,:639) andhorizon(:671). The "strictly monotone, credit can only rise" claim in note #11/#17 stands at head, and it now rests onrounds.rs:505rather than on the dead clamp. That is exactly the review's blocker-1 premise ("cohort mean is>=the old minimum").
One modelling consequence of min→mean that neither the PR, its tests, nor the bot review mention (low importance, shared with the simulator and pre-existing there for mean_out):
mean_cappedalways averages over all active decoders (&decoder_rems[..decoder_count]), while the numerator uses only the streams a shape can serve (served = n_streams.min(shape.batch),policy.rs:624,:638). Whendecoder_count > shape.batch, unserved decoders' budgets still raisemean_outfor that shape. Under the oldmin_iclamp an unserved long decoder could not inflate anything (the min was set by the shortest), so this asymmetry is new in degree. The same shape applies inscripts/scheduling_sim/utility.py:215-219(pre-PR) and:235(post-PR), so Rust is still in parity with the sim — it is a shared approximation, not a new divergence.- The PR's own test encodes this semantics: with cohorts of 2-3 decoders on
decode-b1/b2/b4graphs (policy_tests.rs:6889-6894),best_decode_ratemixesserved = min(n_streams, batch)with a cohort-wide mean, e.g. the[1,100]case at:6904-6913expects32.5regardless of which shape is scored. Worth one line so a reviewer does not mistake it for a bug introduced here.
Also verified sound (no finding): mean_capped divides by rems.len(), which cannot be 0 because of the early return at policy.rs:567; decoder_rems is a fixed [usize; REQUEST_LANES] filled in slot order, so iteration stays deterministic and allocation-free.