PR #681: helios/scheduler: use active cohort mean in coalescing horizon

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/a168db08-bc8e-4d98-a978-86d93b1e82b9

Opened by a workflow run, Dec 2, 2026 8:21 AM EST.

Classify draft

Selected: performance, area:scheduling

Threshold: 65%

Priority

Type

Area

Model

explore

Author: FujitsuPolycom (CONTRIBUTOR; Discord "Dooner") Motivation: Helios pays queued prefills a "coalescing" bonus for joining an under-batched decode cohort, valued over a bounded output horizon. That horizon was clamped by the least remaining output budget among active decoders, so a single decoder one token from finishing collapsed it from 64 to 1; this PR averages per-decoder budgets instead so the horizon decays smoothly near EOS. Scale: +236 / −18 lines in 5 files (+11/−10 in policy.rs, net +1 production LOC) Proposal:

Full report · Notes

Value Proposition

Value Proposition — PR #681 helios/scheduler: use active cohort mean in coalescing horizon

Charter alignment — right layer, wrong evidence class. The change is pure scheduler arithmetic in Helios (no per-model branch, no ABI/core-format change, no new dependency), which matches the "keep the runtime small and model-agnostic" rule (#267/#334). It also has the right description shape (why/what/result/evidence). But it collides with "be explicit and pin everything. No magic defaults" (#215): coalescing_horizon_tokens stays a hidden PolicyConfig default of 64 with no config key, no CLI flag and no off-switch — not even under --scheduler-policy throughput — while this PR makes that value matter far more (the horizon can rise up to 64× for the same prompt, scaling per_token). It likewise falls short of "bring real evidence": the served A/B was not run on the head (e15b836; tested trees df9a8ebd/dbbf65df/38130855), there is no CI on head, and single-repeat rows carry no repeats or confidence intervals.

Novelty & status — genuinely additive, but unproven and dependent. Nothing supersedes or obsoletes it: no closed competing PR, no Closes # link, no merged fix on main. Merged #645 (two days old) introduced the peer_budget min this refines; no issue, review or comment asks for the cohort mean. The underlying defect is real (a single rem = 1 decoder collapses a 64-token horizon to 1, ~98% loss), and roughly half the diff is an undeclared Rust→simulator divergence repair that docs/design-review.md explicitly wants. However the 84-run workloads() parity sweep it cites cannot exercise the changed path (all workloads use uniform output=128, so old min and new mean coincide), and the mandatory cohort-algorithm gate (64-seed learning.py) — which blocked #661 and #663 — is unreported.

Value vs cost. Maintenance cost is negligible (+1 net production LOC; ~236 lines of tests/docs). The evidence for the benefit is not. The only arm attributable to #681 alone is solo, and 2 of 3 scenarios regress (cold-heavy-mix output 541.8→521.8 = −3.7%, SLO 88.1→79.1%; mixed-c32 SLO 93.0→91.1%). The improvements sit in the On #661/Stack rows, which include #660/#661/#665 (the prefix-cache hit-rate gain belongs to #665) and so are not attributable to this PR. And #681 is only safe with unmerged #661: its own disclosed trade-off — cold 150K–250K prefills jumping ahead of decoders, agentic_multiturn TTFT p99 3,323→5,144 ms — is precisely the configuration without chunk shrinking.

Verdict: Worth it with changes. Conditions: (a) re-land after #661, or fold the cohort-mean into #661, whose policy_tests.rs/utility.py test block this PR overlaps; (b) run the learning.py 64-seed gate required by docs/design-review.md for cohort algorithms; (c) A/B on the actual head a workload that targets the changed path (near-EOS decoder alongside a 150K cold prefill) with repeats; (d) expose, pin or at least document the horizon and its newly amplified sensitivity, plus the disclosed near-EOS/cold-prefill trade-off. Absent those, the standalone evidence does not justify merging; as-is the change is also unreviewed (draft, zero comments, no CI), so it is not yet a merge candidate on process grounds either.

Full report Decide Value: yes (97%): This change is worth reviewing: it provides value to the project in line with its charter.

Subtraction and simplicity

Verdict: PR #681's diff is already lean — it deletes the peer_budget accumulator and an unreachable guard arm, is net −4 lines on the Python side, and adds no flag, config key, wrapper, or fallback (compliant with AGENTS.md:188-193). Four worthwhile local collapses remain, all on lines the PR writes:

A (medium-high) — the same cohort mean Σ f(rem_i)/n is written three times: policy.rs:627, :636, :668-672. Extract one fn cohort_mean(rems: &[usize], f: impl Fn(f64) -> f64) -> f64 beside the existing free helpers; sites become cohort_mean(&decoder_rems[..decoder_count], |rem| expected_at(eff_width).min(rem)). :627/:636 are the only >150-column lines this PR introduces in the 1,969-line file, while :668-672 wraps correctly; the simulator already factors this at utility.py:215-219.

B (medium) — .max(1.0) on :627/:636 can never bind: expected_at (policy.rs:586-598) always returns ≥ 1.0 (1.0 + non-negative powered probabilities, rounds.rs:625-627) and every recorded decoder has rem ≥ 1 (:550). Delete both, don't carry into the helper.

C (medium) — if horizon > 0.0 at policy.rs:673 is unreachable behind the :527, :550, :561, :567 guards; delete and unindent the amortization block (the real degenerate-value defence is the existing per_token.is_finite() && per_token > 0.0 at :678).

D (medium) — policy_tests.rs:7002-7011 hand-copies production expected_at; every width queried is integral (8, 6, 4), so replace with super::rounds::forecast_tokens(&curve, w) (rounds.rs:991-993, already used at policy_tests.rs:7152) and delete 10 lines.

E (low, optional) — parallel decoder_slots/decoder_rems arrays at policy.rs:530-533 where the neighbouring prefill cohort uses a tuple array.

Explicitly not flagged: verbose GraphDescriptor literals (established file style), coalescing_bonus/add_active_decoder test helpers, the net-negative utility.py edit, the one-clause docs rewrite.

Open: whether A is acceptable; whether B/C were meant as defence for a future zero-horizon config path (then test it, don't leave it dead).

Full report · Notes

Correctness and contracts

PR #681 makes the prefill coalescing horizon a cohort mean instead of a cohort minimum. The arithmetic is right and the defect it targets is real, but three things block it.

  1. Blocker — the simulator evidence cannot test the change. scripts/scheduling_sim/workloads.py:26-31 gives every decoder output=128, so mean_i min(rem_i, ph) == min_i min(rem_i, ph) in all 84 runs; "84/84 matched main" is true by construction. docs/design-review.md:195-208 requires cohort algorithms to be evaluated against the simulator and reference solvers, and :247-251 says an unrun applicable sweep "blocks commit and PR acceptance". No 64-seed catalog run is reported.

  2. Major — the mean horizon is not realisable. helios/src/scheduler/policy.rs:666-672 no longer bounds the horizon by the shortest remaining decoder, so a [1, 100] cohort credits 32.5 tokens against a batch that disbands after one step (asserted as desired at policy_tests.rs:6902-6913), a ~32× credit rise over main. Credit is linear in the horizon (policy.rs:677). Both horizon and mean_out (:627, :636) are strictly non-decreasing versus main, so nothing self-corrects, and cold-heavy-mix — where main already hit 88.1% SLO — moves further the wrong way (541.8 → 521.8 tok/s, SLO 79.1%).

  3. Major — half the diff is an undisclosed parity repair. scripts/scheduling_sim/utility.py:215-219 already averaged mean_out per decoder before this PR; only the horizon hunk changed. Also a remaining Rust-only KV clamp (policy.rs:548-549) vs simulator.py:26.

  4. Major — claim accuracy: the "Stack" rows include #660/#661/#665, tested trees (df9a8ebd, dbbf65df, 38130855) are not the head e15b836, there is no CI on the head, and 2 of 3 #681-only Solo rows regress.

  5. Minor — no opt-out: coalescing_horizon_tokens is missing from helios/src/server/config.rs:305-330 and from PolicyConfig::throughput() (policy.rs:50-52); the config table docs/scheduling-runtime-design.md:713 still says "64" while the prose now calls an unbounded mean a "bounded per-stream decode horizon".

Verified sound: no hot-path allocation or lock change, no panic/NaN path, deterministic ordering, no wire/proto/captured-graph/ABI impact, no per-model branch.

Open: whether the head reproduces the measured numbers; whether the author treats mean_out as a repair; whether the cold-prefill head-of-line effect is bounded elsewhere.

Full report · Notes

Final review

Recommendation: Changes Requested

The production Rust and Python arithmetic (helios/src/scheduler/policy.rs +11/−10, scripts/scheduling_sim/utility.py +2/−6) is memory-safe, deterministic, ABI-compatible, and fixes a real rem = 1 cohort-collapse defect introduced in #645. However, this PR should not merge onto main as-is: (1) its only standalone (Solo) served benchmarks against main regress 2 of 3 scenarios (including -3.7% tok/s, -9.0 pp SLO, and +54.8% agentic_multiturn TTFT p99 on cold-heavy-mix) while relying on unmerged #661 to keep cold prefills bounded, and head e15b836 has no CI or commit-matched A/B run; and (2) the reported 84-run scripts/scheduling_sim sweep is mathematically inert for this change because every workload uses max_new_tokens = 4096. Rebase/merge after #661, add an end-to-end heterogeneous-budget simulator workload that actually exercises output_budget < 64, confirm green CI on the reviewed head, and clean up the hot-path expected_at recomputation and doc/description attribution.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Standalone main regressions, dependency on unmerged #661, and unverified head commit (helios/src/scheduler/policy.rs:627,636,667-672, docs/design-review.md:109-115, Charter #210).

    • Verified behavior/impact: Because cohort-mean horizon (mean_i min(rem_i, ph)) is strictly >= main's minimum (min_i min(rem_i, ph)), keeping coalescing active near EOS pulls 150K–250K cold prefills ahead of active decoders when #661's chunk shrinking/draining is absent. In the PR's own Solo A/B against main, 2 of 3 scenarios regress: cold-heavy-mix (n=1) drops output 541.8 -> 521.8 tok/s (-3.7%), SLO 88.1% -> 79.1% (-9.0 pp), TTFT p50 1,763 -> 1,834 ms, and agentic_multiturn TTFT p99 3,323 -> 5,144 ms (+54.8%); mixed-c32 (n=2) drops SLO 93.0% -> 91.1% (-1.9 pp), stalls 11.29% -> 11.49%, and output 1,281.7 -> 1,276.8 tok/s. Meanwhile, the positive On #661 and Stack rows rely on unmerged #661 (and #660/#665), served A/B ran on trees df9a8ebd/dbbf65df/38130855 (archive checks on 40596880cc64), and head e15b836 has no CI checks.
    • Fix: Hold merge until #661 lands (then rebase onto main containing #661), ensure GitHub Actions CI is green on the final head commit, and confirm the A/B-measured tree matches the reviewed head (with repeats on the primary target workloads).
  2. Reported 84-run simulator sweep is mathematically inert for this change (scripts/scheduling_sim/utility.py:234-235, scripts/scheduling_sim/model.py:103, scripts/scheduling_sim/simulator.py:26, scripts/scheduling_sim/workloads.py:25-55, docs/design-review.md:195-200,234-251).

    • Verified behavior/impact: docs/design-review.md:195-200,234-251 requires service-pricing / cohort-algorithm changes to update and run an applicable scripts/scheduling_sim/ evaluation covering the changed behavior. In scripts/scheduling_sim/workloads.py:25-55, no workload overrides max_new_tokens, so every Request uses the default max_new_tokens = 4096 (model.py:103). Because State.view() computes output_budget = r.max_new_tokens - self.generated (simulator.py:26), every active decoder in every multi-decoder workload with prefill has output_budget >= 3840 >> 64.0 throughout the run (and continuous_decode has k = 1, where min and mean are identical). Thus "84/84 matched 1fbcc3c9" is true by construction and never tests a heterogeneous rem < 64 cohort in end-to-end simulation (and verification/helios-lifecycle/check.py (not opened) has no coverage of policy.rs).
    • Fix: Add a heterogeneous-budget workload to scripts/scheduling_sim/workloads.py (or a dedicated end-to-end simulation test in tests/test_scheduling_utility.py) that sets small max_new_tokens on near-EOS decoders alongside long decoders and queued prefills under balanced (age_price = 0.1), and report the before/after simulator delta on makespan, TTFT, and max output gap.

Should Fix

  1. Reconcile PR description attribution and design-spec wording (docs/scheduling-runtime-design.md:224-229, scripts/scheduling_sim/utility.py:215-219, helios/src/scheduler/policy.rs:627,636).
    • Verified behavior/impact: (a) scripts/scheduling_sim/utility.py:215-219 was already computing mean_out as a per-decoder average before this PR (untouched by the diff); only the horizon formula at utility.py:234-235 is new to both implementations, so policy.rs:627,636 is a Rust→simulator parity repair rather than a new rule. (b) In the PR Result section, Stack rows combine #660 + #661 + #665 (e.g., prefix-cache hit-rate gains come from #665 and stall reductions primarily from #661), and the On #661 long-context-mixed SLO drop (89.3% -> 82.1%, -7.2 pp) appears in the table without being mentioned in the summary prose. (c) docs/scheduling-runtime-design.md:224-229 still says "over a bounded per-stream decode horizon ... averaged across active decoders", even though the cohort mean can exceed an individual near-EOS stream's remaining budget.
    • Fix: Update the PR description to distinguish the mean_out parity repair from the new horizon rule and explicitly attribute #660/#661/#665 stack effects plus the Solo / On #661 SLO drops; reword docs/scheduling-runtime-design.md:224 from "bounded per-stream decode horizon" to "bounded cohort-mean decode horizon".

Subtract / Simplify

  1. Extract a 3-line mean_capped helper, hoist expected_at, and delete dead .max(1.0) clamps (helios/src/scheduler/policy.rs:627,636,668-672).
    • Currently :627 and :636 evaluate expected_at(...) inside decoder_rems[..decoder_count].iter().map(|&rem| ...), recomputing the loop-invariant mean_curve sum up to REQUEST_LANES (64) times per shape on the select_plan hot path; both lines also carry a provably dead .max(1.0) (rem >= 1 at :550, and expected_at(...) >= 1.0 at :586-598 because powered_curve / speculative_curve probabilities are clamped to [0.0, 1.0] at helios/src/scheduler/rounds.rs:505), and are the only two >150-column lines in the file (166 and 181 chars).
    • Replace all three cohort-mean sites (:627, :636, :668-672) with:
      fn mean_capped(rems: &[usize], cap: f64) -> f64 {
          rems.iter().map(|&rem| (rem as f64).min(cap)).sum::<f64>() / rems.len() as f64
      }
      
      and call mean_capped(&decoder_rems[..decoder_count], expected_at(eff_width)), mean_capped(&decoder_rems[..decoder_count], expected_at(width as f64)), and mean_capped(&decoder_rems[..decoder_count], ph).
  2. Delete the unreachable if horizon > 0.0 guard (helios/src/scheduler/policy.rs:673).
    • Upstream guards already guarantee coalescing_horizon_tokens > 0.0 (:527), rem > 0 (:550), post_prefill > 0 (:561), and decoder_count > 0 (:567), so every summand is strictly positive and horizon > 0.0 always holds; :678 already validates per_token.is_finite() && per_token > 0.0. Removing the branch deletes 2 lines and unindents the amortization block.
  3. Reuse super::rounds::forecast_tokens in the new speculative test (helios/src/scheduler/policy_tests.rs:7002-7011).
    • The 10-line hand-copied expected_at interpolation closure is only called with integral widths (8.0 at :7012, 6.0 at :7044, 4.0 at :7045). Replace it with super::rounds::forecast_tokens(&curve, w) (helios/src/scheduler/rounds.rs:991-993, matching the existing test precedent at policy_tests.rs:7152).

Nits

Dropped on verification

Full report Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

Applied: +triage:review

Classify intake

Selected: triage:review, performance, area:scheduling

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes decide malicious: all_clear (100%): No malicious content found

explore

Author: FujitsuPolycom (CONTRIBUTOR; Discord "Dooner") Motivation: On main, the coalescing bonus that makes queued prefills wait for an under-batched decode cohort is sized by the smallest remaining output budget among the active decoders, so one nearly-finished decoder collapses the whole 64-token horizon to ~1 token and the prefiller gets almost no credit. This PR replaces that minimum with the average of the per-decoder budgets. Scale: +331 / −27 lines in 5 files (head 975f825; the old +236/−18 at e15b836 no longer exists in the branch) Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, area:scheduling

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Verdict: the production diff is already lean — helios/src/scheduler/policy.rs is +16/−18 (net −2), deletes peer_budget and a dead if horizon > 0.0 wrapper, and adds only a 4-line local helper reused 3×; no new flag, config key, trait or fallback branch, which matters under AGENTS.md:188-193. Five small leftovers, most valuable first:

  1. Dead guard left in the Python twin: scripts/scheduling_sim/utility.py:236 if horizon > 0: is unreachable (enclosing guard :206, filter :205, model.py:54 budget ≥ 1) — the author deleted the identical guard in Rust (policy.rs:669-679) but not here.
  2. Python never got the helper Rust added: the cohort mean is spelled inline twice (utility.py:215-219, :235) where Rust uses mean_capped (policy.rs:599-601).
  3. Unused binding let _d1 = ... (policy_tests.rs:7023), plus the same surplus expression typed out five times in one test (:6908, :6921-6922, :6950-6951).
  4. Three ~24-line GraphDescriptor literals (policy_tests.rs:6971-7018) where the repo's own tests use a builder closure (cost.rs:907-921); the Python twin (tests/test_scheduling_utility.py:529-593) has the same four-way duplication that pytest.mark.parametrize already used elsewhere in the file would collapse.
  5. docs/scheduling-runtime-design.md:224-229 is one 9-line sentence whose trailing clause restates the previous one; the same doc already uses text formula blocks (:214-218).

Also: the PR body's "+11/−10, +1 net production LOC" is stale against the head. Verified non-findings: mean_capped cannot divide by zero, arrays stay allocation-free, and merging decoder_slots/decoder_rems would be churn. Open: whether the divergences the tests now merely document (Rust-only KV clamp, policy_tests.rs:6931-6932) should be deleted instead of annotated — correctness lens owns the bug, but the subtraction answer is delete.

Full report · Notes

Correctness and contracts

Two blockers and two majors in PR #681 at head 975f825.

  1. BLOCKER — the cohort mean is provably >= main's minimum, so queued-prefill credit rises for every state and workload, default-on with no operator off-switch (policy.rs:599-601, :630, :639, :670-671, :50-52; server/config.rs:305-325). The PR's own standalone rows regress 2 of 3 scenarios: cold-heavy-mix SLO 88.1→79.1%, output −3.7%, agentic_multiturn TTFT p99 3,323 → 5,144 ms (+54.8%).
  2. BLOCKER — no evidence covers the head: A/B trees are df9a8ebd/dbbf65df/38130855, and the "84/84 matched" simulator sweep is inert because workloads.py:25-55 never sets max_new_tokens (default 4096, model.py:103), leaving output_budget >= 3840 >> 64, so mean == min by construction (simulator.py:26).
  3. MAJOR — the horizon multiplies every queued prefiller's total credit (policy.rs:675 amortization over initial_prefill), and one scalar surplus is shared by all prefillers (:653-665, :669), so near EOS aggregate prefill priority can rise up to 64× — the head-of-line blocking the PR measures but does not bound.
  4. MAJOR — head unrun; the new Python end-to-end test compares coalescing ON vs OFF with absolute ceilings only (tests/test_scheduling_utility.py:557-562), so a revert to min_i would still pass; the body still quotes +11/-10 and a .max(1.0) clamp that no longer exists (head +16/-18).
  5. MINOR — mean_capped averages all decoder_count rows while the rate multiplies by served (policy.rs:622, :630, :638-639); shared with utility.py:214-218, so an approximation, not a new divergence.

Open: whether head passed CI (no checks), whether A/B was re-run on head (no), and the magnitude of the unrun 64-seed learning.py (not opened) catalog.

Full report · Notes

Re-review

Recommendation: Changes Requested

Head 975f825 cleanly resolves all Round 1 Subtract / Simplify items (mean_capped, hoisted expected_at, removed dead .max(1.0) and if horizon > 0.0, reused forecast_tokens), the Round 1 nit (n=3 and KV-headroom-clamped subcases), the design-spec wording at docs/scheduling-runtime-design.md:224, and the code side of Round 1 Blocker 2 by adding an end-to-end heterogeneous-budget simulator test (tests/test_scheduling_utility.py:529-593). The core Rust and Python arithmetic is memory-safe, allocation-free, deterministic, and fixes a real rem = 1 horizon-collapse defect from #645. However, Round 1 Blocker 1 remains open: the branch is still based on main (1fbcc3c9, without open #661), its standalone Solo benchmarks regress 2 of 3 workloads (cold-heavy-mix -3.7% tok/s, -9.0 pp SLO, +54.8% TTFT p99; mixed-c32 -1.9 pp SLO), no CI checks have run on 975f825, and the PR description is now stale against 975f825.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Standalone main regressions, dependency on unmerged #661, and unverified head 975f825 (helios/src/scheduler/policy.rs:599-601, 630, 639, 671, docs/design-review.md:109-115, 247-251, Charter #210)
    • Head 975f825 is still parented on main (1fbcc3c9), which does not contain open #661. Because mean_capped is strictly >= main's minimum, merging onto main standalone increases queued-prefill coalescing credit near EOS without #661's chunk shrinking/draining.
    • In the PR's own attributable Solo A/B against main, 2 of 3 workloads regress: cold-heavy-mix (n=1) drops output 541.8 -> 521.8 tok/s (-3.7%), SLO 88.1% -> 79.1% (-9.0 pp), TTFT p50 1,763 -> 1,834 ms, and agentic_multiturn TTFT p99 3,323 -> 5,144 ms (+54.8%); mixed-c32 (n=2) drops SLO 93.0% -> 91.1% (-1.9 pp), stalls 11.29% -> 11.49%, and output 1,281.7 -> 1,276.8 tok/s.
    • All reported served A/B runs (df9a8ebd, dbbf65df, 38130855) and archive checks (40596880cc64) predate 975f825, and no GitHub Actions CI run is reported on 975f825.
    • Fix: Hold merge until #661 lands, rebase onto a main containing #661, run green GitHub Actions CI (including .github/workflows/native-serving.yml (not opened) and pytest) on the final head, and confirm served A/B results match the reviewed head (with repeats on the primary target workloads).

Should Fix

  1. Refresh the stale PR description, attribution, and simulator evidence (helios/src/scheduler/policy.rs:630, 639, scripts/scheduling_sim/utility.py:215-218, 234-235, tests/test_scheduling_utility.py:529-593, docs/design-review.md:147-160)
    • The PR body is stale against 975f825: it still claims policy.rs is +11/-10 (+1 net production LOC) when head is +16/-18 (-2 net LOC), and still describes mean_out as expected_at(width).min(rem).max(1.0) after .max(1.0) was deleted at policy.rs:599-601, 630, 639.
    • Round 1's attribution ask remains open: distinguish that policy.rs:630, 639 is a Rust→simulator parity repair (utility.py:215-218 was already cohort-averaged pre-PR) while horizon (policy.rs:670-671, utility.py:234-235) is the new rule; clearly attribute #660/#661/#665 contributions in the On #661 / Stack prose (e.g., #661 stall reduction, #665 prefix-cache hit rate); and note the On #661 long-context-mixed SLO drop (89.3% -> 82.1%, -7.2 pp) in the summary prose.
    • Replace the inert 84-run scripts/scheduling_sim parity claim (scripts/scheduling_sim/workloads.py:25-55 uses default max_new_tokens = 4096 from model.py:103, so output_budget = max_new_tokens - generated at simulator.py:26 stays >> 64 for every multi-decoder workload and min == mean by construction) with the actual min_i -> mean_i makespan/TTFT/max-output-gap delta from the new test_coalescing_heterogeneous_budget_end_to_end_balanced scenario (and consider adding a direct mean_i vs min_i check in that test or its description so the delta is self-documenting).

Subtract / Simplify

  1. Delete the unreachable if horizon > 0: guard in the Python twin (scripts/scheduling_sim/utility.py:236)
    • Upstream invariants already guarantee coalescing_horizon_tokens > 0 (utility.py:206), view.output_budget > 1 (:205, so ph > 0), len(decoders) >= 1 (:206), and v.output_budget >= 1 (scripts/scheduling_sim/model.py:54), so horizon > 0 is always true (and :247 already guards log(value) with if value > 0). Deleting :236 and dedenting :237-244 mirrors the dead guard just deleted in policy.rs:669-679.

Nits

None.

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.