Amendments to the 2026-12-02 (run 2970) case file — PR #681 helios/scheduler: use active cohort mean in coalescing horizon
Only deltas are listed. Everything in the prior report not restated here stands as written.
Key findings
- The event is two things: the head moved, and the first review landed. Head
e15b836→975f825(975f82578a7b2a59c28fc34647769cd9ce22ab0c), now +331/−27 in the same 5 files, a single squashed commit whose parent ismain1fbcc3c9— i.e. the reviewed revisione15b836no longer exists in the branch (search_history;pr_files). Andflare-autobotposted a full review at 2026-12-02 16:34: Changes Requested, 2 blockers / 1 should-fix / 3 subtract-simplify / 1 nit (pr_comments). So the prior report's "no reviews and no comments" / "zero engagement" is no longer true; "no CI on head" and "no human review" are still true. - Most of the review's non-blocking items are already implemented at head — report them as done, not open. All of Subtract/Simplify 1–3 and the Nit landed in
975f825:mean_cappedhelper (policy.rs:599-601, used:630,:639,:671),expected_athoisted out of the per-decoder closure, dead.max(1.0)gone, unreachableif horizon > 0.0deleted (:669-679; onlyper_token.is_finite() && > 0.0at:676), spec reworded to "bounded cohort-mean decode horizon" (docs/scheduling-runtime-design.md:224),n≥3(policy_tests.rs:6915-6927) and KV-clamped (:6929-6943) subcases added,super::rounds::forecast_tokensreused (:7032,:7064-7065). The review's own text is stale on all of these because it was scoped "up toe15b836". - One genuinely new blocker argument, worth adopting: the 84/84 parity sweep is mathematically inert. No workload in
scripts/scheduling_sim/workloads.py:25-55overridesmax_new_tokens, so everyRequesttakes the default4096(model.py:103) andoutput_budget = max_new_tokens - generated(simulator.py:26) stays ≫ 64 for the whole run;continuous_decode(workloads.py:49) is thek=1case where min and mean coincide. The claim is true by construction. - Blocker 1 (standalone regressions + reliance on unmerged #661 + unverified head) is still fully live at head: parent is
main1fbcc3c9, which does not contain#661(3d868f84), and#661is still open (Ready To Merge, updated 15:24). - 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 with hard-coded ceilings, never new-mean vsmain's-min, so a revert tomin_iwould still pass. Only the Rust side has a mean-vs-min discriminator (policy_tests.rs:7054-7059: a case where the oldmin_iclamp "would erroneously report a positive bonus"). - New finding — the spec now documents a horizon the qualified simulator cannot compute. Rust's
remincludes a KV-headroom clamp (policy.rs:548-549) that the simulator'soutput_budgetlacks (simulator.py:26); the PR's own new test comment admits it (policy_tests.rs:6931-6932). A second undeclared Rust/sim divergence, the same classdocs/design-review.md:195-206forbids. - The PR body is now stale against its own head: it still claims "
+11/-10,+1net production LOC" (pr_filessayspolicy.rs +16/−18, net −2) and still describesmean_outas "averagesexpected_at(width).min(rem).max(1.0)", a clamp that no longer exists.
Amendment A — state of the PR (corrects the prior header, File-map and "The change / Size")
- Head
975f825, one squash commit onmain1fbcc3c9; +331/−27 in 5 files:docs/scheduling-runtime-design.md+6/−3,helios/src/scheduler/policy.rs+16/−18,helios/src/scheduler/policy_tests.rs+217/−0,scripts/scheduling_sim/utility.py+2/−6,tests/test_scheduling_utility.py+90/−0 (pr_files). - Previous:
e15b836, +236/−18, withpolicy.rs +11/−10andtests/test_scheduling_utility.py+23. - Labels now
area:scheduling, performance, triage:review(triage label added with the case file at 16:15); PR last updated 18:06 (pr_comments). - Still true: draft, no CI checks on the head, no human review, no human comment, no reaction.
Amendment B — the review landed (corrects "zero engagement / no review / Process")
flare-autobot, 2026-12-02 16:34, full review posted on #681: Changes Requested, Merge Risk Medium "up to e15b836", blockers 2 / should-fix 1 / subtract-simplify 3 / nit 1. Pre-merge checks: security ✅; charter & value fit ⚠️; related/duplicate ⚠️; tests & verification ⚠️ (pr_comments). A case-file comment at 16:15 precedes it.
Amendment C — the review corroborates the case file (confirmation, so downstream can rely on it)
Independently restated: the cohort mean is >= main's minimum so queued-prefill credit only rises; Solo regresses 2 of 3 scenarios (cold-heavy-mix output 541.8→521.8 = −3.7%, SLO 88.1→79.1%, TTFT p50 1,763→1,834 ms; agentic_multiturn TTFT p99 3,323→5,144 ms = +54.8%; mixed-c32 SLO 93.0→91.1%, stalls 11.29→11.49%); the served A/B trees df9a8ebd/dbbf65df/38130855 and the archive hash 40596880cc64 are not the head; the positive On #661/Stack rows depend on unmerged #661/#660/#665.
Citation additions to adopt: Charter #210, docs/design-review.md:106-115 (honest-evidence / speedup-over-main rule), docs/design-review.md:195-206 (cohort-algorithm gate; "Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog"), docs/design-review.md:234-251, scripts/scheduling_sim/model.py:103, scripts/scheduling_sim/simulator.py:26, scripts/scheduling_sim/workloads.py:25-55.
Amendment D — inert simulator sweep (add to prior Key finding 4, and it is blocker 2)
Verified at head: workloads.py:25-55 sets no max_new_tokens; the default is 4096 (model.py:103); output_budget = r.max_new_tokens - self.generated (simulator.py:26). Therefore every multi-decoder workload keeps output_budget ≥ 3840 >> 64, and continuous_decode (workloads.py:49) is the single-decoder case where min and mean coincide. "84/84 matched 1fbcc3c9" cannot discriminate the change.
Amendment E — two blockers, restated
- Standalone
mainregressions + dependency on unmerged#661+ unverified head (policy.rs:630,639,671;docs/design-review.md:109-115; Charter#210) — live, sincemain1fbcc3c9lacks#661(3d868f84) and#661is still open. - Inert 84-run sweep — live in substance, though see Amendment F for the partial remedy at head.
Amendment F — evidence gap partly, not fully closed (corrects prior findings 4 and 7)
New at head (tests/test_scheduling_utility.py):
test_coalescing_horizon_averages_active_decoder_budgets(:506-526) asserts the exact32.5-token horizon and the single-decoder10.0, mirroring the Rust assertions.test_coalescing_heterogeneous_budget_end_to_end_balanced(:529-593): a non-speculative cohort with amax_new_tokens=8decoder + 3 long decoders + 4×4096-token queued prefills atage_price=0.1, comparingcoalescing_horizon_tokens=0.0(off) against the default (on), with makespan / mean / max TTFT /max_output_gap_msceilings of 7740 / 330 / 190 ms (:558-562), plus a speculative twin with ceilings 1885 / 440 / 220 ms (:564-593).- Why this is not enough: every assertion is coalescing-ON vs OFF plus absolute bounds; none contrasts
mean_i min(rem_i, ph)withmain'smin_i min(rem_i, ph), so a revert to the minimum would very likely still pass. The hard-coded ceilings are brittle againstworkloads.py:9-22. The PR body does not mention this test. - Rust, by contrast, does discriminate (
policy_tests.rs:7054-7059).
Amendment G — review items already applied (do not report as open)
| Review item | Status at 975f825 |
|---|---|
S/S 1: extract mean_capped, hoist expected_at, delete dead .max(1.0) |
Done — policy.rs:599-601; used :630, :639, :671; expected_at evaluated once per shape |
S/S 2: delete unreachable if horizon > 0.0 |
Done — :669-679, only per_token.is_finite() && > 0.0 at :676 |
S/S 3: reuse super::rounds::forecast_tokens in the speculative test |
Done — policy_tests.rs:7032, :7064-7065 |
Nit: KV-clamped and n≥3 subcases, note the clamp is Rust-specific |
Done — policy_tests.rs:6915-6927, :6929-6943, comment :6931-6932 |
Should-fix (a): reword :224 to "bounded cohort-mean decode horizon" |
Done — docs/scheduling-runtime-design.md:224 |
Should-fix (b): separate the mean_out parity repair from the new horizon rule; attribute #660/#661/#665 and the On #661 long-context-mixed SLO 89.3→82.1% (−7.2 pp) drop |
Still live — the body still attributes neither |
Blocker 1 (rebase after #661, green CI on head, A/B tree == head) |
Still live |
Blocker 2 (heterogeneous output_budget < 64 end-to-end coverage) |
Partly met by tests/test_scheduling_utility.py:529-593, but not as a mean-vs-min delta (Amendment F) |
"check.py has no coverage of policy.rs" (review's unverified aside) |
Verified true, and it strengthens rather than softens the finding — see Amendment I |
Amendment H — spec/simulator gap and user-facing docs (extends prior finding on docs)
- The spec now describes a horizon the simulator cannot compute.
docs/scheduling-runtime-design.md:224-229documents the per-decoder clamp, but Rust'srem = min(max_new_tokens - generated, max_sequence_tokens - scheduled_consumed)(policy.rs:548-549) is strictly tighter than the simulator'soutput_budget = max_new_tokens - generated(simulator.py:26). The PR's own test comment states the clamp "is Rust-specific" (policy_tests.rs:6931-6932). The spec's formula and the qualified simulator policy (utility.py:232-235) therefore agree only when KV headroom is not binding — and neither the spec nor the body says so. This is the second undeclared Rust/sim divergence of the classdocs/design-review.md:195-206forbids, alongside themean_outrepair. - Two simulator behaviours Rust lacks, unchanged and now amplified by the cohort mean:
utility.py:205excludes prefillers withoutput_budget <= 1, and:234usesoutput_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 at0. - User-facing docs still describe the pre-PR minimum:
helios/README.md:482-483says "a 64-token decode-batch coalescing horizon"; the config-table rowdocs/scheduling-runtime-design.md:713is still generic ("Output-token horizon for decode-batch coalescing bonus on queued prefills"). No operator-visible statement of the new semantics, and still no off-switch.
Amendment I — two prior hedges resolved by direct check
verification/helios-lifecycle/check.pymutations never targetpolicy.rs(verified): targets arescheduler.rs(not opened) (:417,:527,:665),execution/threaded/protocol.rs(not opened) (:427),execution/threaded.rs(not opened) (:441),cache.rs(not opened) (:511,:515),scheduler/checkpoints.rs(not opened) (:521,:672),offload/transfer.rs(not opened) (:649),server/runtime.rs(not opened) (:653). So the "26/26 Rust mutations" pass cannot detect a regression incoalescing_prefill_log_bonus. Drop the prior "arguably N/A" hedge: the mutation and formal layers are genuinely N/A, which makes the unrun 64-seedlearning.py(not opened) gate underdocs/design-review.md:195-206the sole applicable gate — and it is the one missing.- No off-switch, confirmed at head:
helios/src/server/config.rsaccepts onlyscheduler_policy(:305-309),scheduler_terminal_valueandscheduler_terminal_age_price(:312, mirrored:728,:744-750); nocoalescing_horizon_tokenskey in the server config orflare-cli, andPolicyConfig::throughput()(policy.rs:50-52) still does not zero it.
Amendment J — monotonicity re-derived at head (prior Key finding 2 stands, with a new base)
With .max(1.0) deleted, the monotonicity argument now rests on: expected_at >= 1.0 (policy.rs:586-598) because powered_curve values are clamped to [0.0, 1.0] (helios/src/scheduler/rounds.rs:505), and rem >= 1 from the if rem > 0 filter (poliics→policy.rs:550). Hence mean_i min(rem_i, cap) >= min_i min(rem_i, cap) pointwise for both mean_out (:630, :639) and horizon (:671). This is also the review's blocker-1 premise.
One unmentioned min→mean consequence (low importance, parity-neutral, shared with the simulator): mean_capped always 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:622, :638). Under the old min_i clamp an unserved long decoder could not inflate anything. The simulator has the same shape (utility.py:215-219, :235), so this is a shared approximation, not a new divergence — worth one line so a reviewer does not read it as a bug introduced here.
Also verified sound (no finding): mean_capped cannot divide by zero due to the early return at policy.rs:567, and decoder_rems is a fixed [usize; REQUEST_LANES] filled in slot order, so iteration stays deterministic and allocation-free.
Amendment K — orientation leads closed (no event newer than the 16:34 review)
#661(updated 15:24, Ready To Merge): its review now says it is "cleanly sequenced ahead of stacked draft #681", i.e. the maintainer-side bot already treats #681 as blocked behind it. Its reviewer also notes two of its additions (preserves_first_output_wait, reconciled interior-cutfirst_output_value) are not modeled inscripts/scheduling_sim— the same evidence pattern. Its own SLO dips (mixed-c3291.1→89.4,long-context-mixed94.8→89.3,cold-heavy-mix89.0→81.6) are the base of #681's "On #661" rows.- New human voice:
lukealonso(author of#645, dominanthelios/srccommitter) reviewed#661at 2026-12-02 17:10 — after #681's bot review — demanding green.github/workflows/native-serving.yml(not opened) CI before merging default-onbalancedbehaviour, and is silent on #681. Independent, human confirmation that CI on head is the merge bar in this area. #676re-read: a measured GB10 report (GLM-5.3-Flash-FP4 TP2,prefill_chunk=4096,decode_overlapp99 ITL 1,430 ms / max 2,576 ms; a decoder-active prefill cap reaches 587 ms at 512 tokens). It offers GB10 validation of#661, never mentions#681, and asks for utility-model pricing or an explicit operator cap flag--scheduler-mixed-prefill-max-tokens— the tracker's operator-facing demand is a cap/off-switch, the opposite lever from raising queued-prefill credit. The "same symptom class, opposite direction" characterisation is strengthened, not weakened.#645,#663,#660,#665,#655: no new comments in this window and none mentions #681.related_items 681unchanged (only#661→#681); no new overlapping PRs touchingcoalescing_prefill_log_bonus.- Not relevant / keyword collisions only, dropped: #496, #497, #674, #664, #554, #651, #613.
Open questions and what could not be found
- Whether the head has been pushed through CI: no checks on
975f825at read time, and no statement from the author. Blocker 1 and the review's ask remain unmet. - Whether the A/B was re-run on
975f825: no. All numbers still come fromdf9a8ebd/dbbf65df/38130855/ hash40596880cc64. - The 64-seed
scripts/scheduling_sim/learning.py(not opened) catalog result: not present in the PR, andlearning.py(not opened) was not opened, so the magnitude of the risk under that gate is unknown — only that the gate is unrun and now the sole applicable one (Amendment I). - How large the cohort-mean credit increase is in the worst case: the prior report's "up to 64× for the same prompt" is an upper bound on the horizon ratio, not a measured effect; no experiment isolates it from #661.
- Whether #681 will be rebased once #661 lands: no comment from the author since opening; the branch is a single squash commit on a
mainthat predates #661, so a rebase is still required and will re-touch the same 4 overlapping files.