Opened by a workflow run, Nov 30, 2026 12:58 PM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: lukealonso (COLLABORATOR, charter-designated priority contributor; dominant author of helios scheduler/docs — 229 of the last 180 days' helios/src commits; Discord: lukealonso)
Motivation: Helios was pricing prefill work as if each chunk stood alone: finished prefills ignored the decode-batch throughput they unlock, short prefill tails dragged down full-chunk timing estimates, and consecutive mid-prompt prefill chunks could not overlap in the two-frame pipeline. This PR adds a completion-time coalescing bonus, a fill/context-stratified prefill cost model, and two-frame pipelining for nonterminal prefill chunks.
Scale: +1417 / −127 lines in 20 files
Proposal:
- Add
PolicyConfig::coalescing_horizon_tokens(default 64.0) andLaneValue::prefill_finish; a finishing prefill chunk is credited the bounded K→K+m decode-batch surplus once, on prompt completion. - Replace the single 9-sample prefill median with
PrefillCostModel: 6 fill/KV-depth strata, three-parameter relative-error-weighted NNLS, and a conservative upward bound in narrow partial-fill regimes. - Widen the non-barrier graph kinds to
Decode | Speculative | Prefillin the scheduler, policy eligibility and all four executor layers, gated by a newprefill_step_requires_feedback. - Add
prefill_cursor/scheduled_consumedplanning cursors and widenmodel.rs's completion-input guard toPrefill. - Fix
learning::optimistic_tokens, Mixed decode/continuation pricing (powered_curve,!prefill) and unmeasured prefill discovery (effective_prefill_catalog). Touches: helios/src/scheduler/cost.rs(+497/−1) — new stratified prefill predictor; changes planned durations for every prefill step.helios/src/scheduler/policy.rs(+380/−33) — coalescing bonus, prefill candidate paths, mixed-branch guard.helios/src/execution/{transport,threaded,threaded/protocol,parallel}.rs+scheduler.rs/model.rs— two-frame pipelining. Related items:- #485 Scheduler ActionCosts aliases short- and long-context prefill timings (open): the issue this closes; it has its own log-KV-band prototype branch and DS4.1 TP4 A/B data, a different design than what is implemented here.
- #644 fix(helios): per-step speculative calibration and excluded-only waiting/delivery fairness (open): same author, same day, 7 overlapping files including
utility.rs/service.rs; not stacked, second merger rebases. - #619 Unlock multi-token speculation and two-frame pipelining for host stops (merged): direct predecessor of the same predicate and doc paragraph, extended here to
Prefill. - #459 Price checkpoint candidates without walking every prefill chunk (merged): created the O(1) stride budget this PR conditions on a constant predictor.
- #42 Final prefill can starve behind a two-frame ordinary-decode pipeline (closed): the starvation rule the new feedback predicate preserves.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/645
Autobot comments: The new always-on
coalescing_horizon_tokenscoefficient is missing from the docs PolicyConfig table (docs/scheduling-runtime-design.md:651-661) andhelios/README.md:478-488, and has no CLI or server-config key, so operators cannot tune or disable it. The checkpoint-pricing O(1) stride path is silently lost once fills are non-constant (checkpoints.rs:225+cost.rs:298-302) — not mentioned. An undeclared mixed-branch guard (consumed_tokens >= prompt_tokens) changes which lanes use mixed pricing. Evidence is thin where it matters: burst gains are simulator-only with a synthetic catalog, the 8×8192 burst workload is not checked in, the #485 fix is verified only with unit-test inputs, and the sole live runs are single-arm with nomainbaseline — against the charter's #210 evidence rule. A test asserting the opposite behaviour was renamed/inverted, and a production estimate expectation moved 600 → 195–210 ns. Zero reviews or comments so far.
Value Proposition
Value Proposition — PR #645 "Overhaul Helios prefill scheduling, cost modeling, and two-frame pipelining" (lukealonso, open, 20 files, +1417/−127, closes #485)
Charter alignment: strong. This is runtime work in the right layer — scheduler policy, cost modeling, and executor frame handling inside helios, with no model names in code, no per-model branches, no Protobuf/core ABI change, and no recipe files (the companion recipe split lives in a separate repo). It closes a filed, labeled issue (#485: flare_graph_launches_total{kind="prefill"} drift, 18 → 29 → 31 across consecutive 128k requests) plus three undiagnosed defects (burst fragmentation, serialized nonterminal chunks, mixed-graph curve bugs). It follows the #619/#538/#459 direction rather than reversing it. It satisfies "PR description: why / what changed / claimed result / evidence" unusually well. It does not satisfy "Bring real evidence" (#210) or "Be explicit … no magic defaults" (#215) as written.
Novelty & status: genuinely additive. #619 (merged 2026-11-29) extended the two-frame predicate only to Decode|Speculative; #645 extends that same predicate and doc paragraph to Prefill, so it is not obsolete. #459/#538/#550 are the code it builds on, not a substitute. #644 (same author, same day) overlaps 7 files and rewrites LaneValue, but neither supersedes the other — this is a rebase/merge-order problem, not duplication.
Value vs cost: real, but overclaimed and under-gated. The effect is global: ActionCosts::get reroutes every single-lane prefill through the fitted predictor, moving prefill durations, expected_finish_ns, and admission timing for all prefill-capable cores (the 600 → 195–210 ns shift at phase_tests.rs:1311-1318 shows the magnitude can be large). Evidence, though, is largely simulator-side: +14.6%/−42.6% TTFT come from scripts/scheduling_sim on a synthetic catalog and are pinned as exact assertions; the +12.8% 8×8,192 result has no checked-in workload to reproduce it; #485's own DS4.1 TP4 64k–128k scenario is never re-run, and #485 supplied a measured prototype with a different design (logarithmic KV bands vs. this affine NNLS); the only live measurement (46,509-token prompt, 2655 ms TTFT, clean drain) is single-arm with no main control. Costs: an always-on coalescing_horizon_tokens (64.0) with no CLI flag, no server-config key, and no entry in the canonical PolicyConfig table or README; a silently lost checkpoint O(1) stride path in the non-constant regime; an undeclared mixed-branch guard change; a renamed/inverted test; and a hand-mirrored source copy in verification/helios-lifecycle/check.py. lukealonso's priority-contributor status argues for review, not for waiving #210.
Verdict: Worth it with changes. Before merge: (1) provide at least one live A/B against main on a served workload — ideally the SM121 2-Spark burst case the PR itself calls "expected but unmeasured" — plus a before/after for #485; (2) confirm the affine design satisfies @voipmonitor's #485 symptom, since the issue proposed a different, measured approach; (3) document coalescing_horizon_tokens in docs/scheduling-runtime-design.md:651-661 and helios/README.md and expose a --scheduler-*/server-config knob like sibling coefficients; (4) declare the mixed-branch guard and Estimate::nanos semantics changes; (5) confirm the stride-path loss is intended and budget it; (6) settle merge order with #644. No instruction-injection attempts found in the PR text.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, bug, performance, enhancement, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 79.5% -
triage:validation: 10.8% -
triage:design-review: 9.5% -
triage:investigate: 0.1% -
none: 0.1% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 91.6% -
priority:P2: 7.5% -
priority:P1: 0.9%
Type
- [✓]
performance: 98.4% - [✓]
enhancement: 73.1% - [✓]
bug: 65.1% -
community: 32.1% -
duplicate: 18.2% -
documentation: 0.2%
Area
- [✓]
area:scheduling: 99.5% -
area:selene: 4.2% -
area:rocenante: 2.0% -
area:preparation: 1.8% -
area:api: 1.4% -
area:engram: 1.2% -
area:caching: 1.0% -
area:memory: 0.7% -
area:orbit: 0.7% -
area:kernels: 0.3% -
area:packaging: 0.2%
Model
-
model:deepseek-v4.1: 6.0% -
model:deepseek-v4: 4.2% -
model:qwen3.8-flash-next: 4.2% -
model:qwen3.8-27b: 2.3% -
model:muse-glimmer: 2.0% -
model:nemotron-3.5-bolt: 1.1% -
model:kimi-k3.1: 0.6% -
model:glm-5.3: 0.5% -
model:inkling-small: 0.4% -
model:mimo-v2.6: 0.1% -
model:gemma4: 0.1%
Apply Labels (Intake)
Applied: +triage:review, +bug, +performance, +enhancement, +area:scheduling
Subtraction and simplicity
Subtraction/simplicity review of PR #645. The diff is dense but mostly load-bearing; six real subtractions, ranked.
ActionCosts::prefill_duration(cost.rs:529-557) rebuilds the exactKeyliteral and body ofprefill_entry(cost.rs:559-583); collapses to two lines with identical semantics and the same singleentry()lookup, so theENTRY_LOOKUPSbudget holds. Highest-value, zero-risk.- New
PrefillBucket(cost.rs:126-169) duplicates the existingReplayTimes9-sample ring and even/odd median (cost.rs:389-413), including the identical(lo+hi+1)/2. One generic ring saves ~25 lines and a second median definition. - The widened non-barrier kind predicate is now copied 8× (
scheduler.rs:1136,policy.rs:1290/1711,transport.rs:968/1021,threaded.rs:876,parallel.rs:263,threaded/protocol.rs:35) — andpolicy.rs:1335-1338was missed, still matching onlyDecode | Speculative. AddGraphKind::pipelines()inmanifest.rs:84-101, whereis_prefillalready lives. resize_prefill(policy.rs:1688-1694) hand-rolls the helper this PR adds (effective_prefill_catalog,policy.rs:338-352) plus a redundant!prompt_logprobsconjunct already inside the callee.prefill_step_requires_feedback's kind guard (scheduler.rs:1109-1112) is unreachable — its only call site already tests the kind; fold into onematchatscheduler.rs:1135-1137.Candidate::feedback's two new writes (policy.rs:1287-1290,1705-1711) re-derive whatplan_requires_feedbackcomputes authoritatively atpolicy.rs:1797; delete them. Andcoalescing_prefill_log_bonusscans the slot table twice, recomputing the samepost_prefill(policy.rs:475-477vs605-607).
Minor: coalescing_horizon_tokens has no flag, no server key and no entry in the defaults table/README; burst_four_low/burst_eight_low (workloads.py:52-53) are unreferenced. Docs were updated in three places — above repo norm. Open: whether Candidate::feedback is fully discarded or copied step→plan, and whether losing the constant-ns stride path is intended.
Correctness and contracts
Correctness/system-level review of PR #645 (Helios prefill scheduling overhaul, head 05cccb6). Four Majors and five Minors, all verified in the tree.
Majors
- The #459 O(1) checkpoint stride fast path dies on the first partial-fill sample, because
checkpoints.rs:222-232requiresconstant_ns(), whichcost.rs:298-302only sets whentheta1==theta2==0 && u_max>=0.75— the exact #485 tail regime. Pricing falls back to the whole-catalog walk; the PR says the fast path is preserved. - The "conservative upward bound" (
cost.rs:113-114) is uncapped: the PR's own test requires a full 3,584-token chunk to price ≥ 42.3 s when the same test measures it at 7.81 s (5.4×). That inflates prefill durations, which are the denominator ofValueRate::new, pushing the scheduler back into short-chunk round-robin. - Re-priced prefill durations interact badly with the hard
window_remaining()gate (policy.rs:423-438) thatsubmission_window_available/commitdepend on:phase_tests.rs:1311-1318records a 600→~200 ns shift for a 13-token tail, soexpected_finish_nsexpires early and the second pipelined prefill frame is refused — the bubble this PR removes, re-sourced from the cost model. coalescing_horizon_tokens(default 64.0,policy.rs:26,42) is a new always-on admission-ordering coefficient with no--scheduler-*flag, no server-config key, and no row in the documented PolicyConfig defaults table (docs/scheduling-runtime-design.md:651-661, verified).
Minors: value/service cursor split on first-output (policy.rs:749-752 vs service.rs:168-187); undeclared Mixed-branch narrowing (consumed_tokens >= prompt_tokens); prefill retained_ns now a fitted extrapolation from only lanes.first(); the +12.8% 8×8,192 burst has no checked-in workload (workloads.py:50-53 has 4096 only); two-frame prefill widens per-lane failure blast radius.
Sound: model.rs:349-354 guard, four-layer executor parity, Engram staging double buffering, learning.rs:11-13, resource accounting.
Open: whether stride loss was intended; no server-side live A/B against main; merge order with #644.
Final review
Recommendation: Changes Requested
The technical core of PR #645—completion-attributed burst coalescing, stratified fill/context prefill cost modeling, two-frame nonterminal GraphKind::Prefill pipelining, and mixed/terminal catalog fixes—is well-scoped, model-agnostic, ABI-compatible, and thoroughly tested on CPU. However, two mandatory verification gates from the charter and docs/design-review.md remain unmet (the runnable 64-seed learning.py --preset validate sweep was skipped, and no served-workload A/B baseline against main backs the performance claims or #485 fix), and two verified cost-model edge cases need fixes before merge (loss of the checkpoint O(1) stride fast path in the non-constant regime, and an uncapped post-TTL u / u_max upward extrapolation).
Merge Risk
Level: Medium
- Global unflagged scheduler/cost-model change:
ActionCosts::get(helios/src/scheduler/cost.rs:679-691) routes all single-lane prefill steps throughPrefillCostModel, andcoalescing_prefill_log_bonus(helios/src/scheduler/policy.rs:444-621) is enabled by default (coalescing_horizon_tokens: 64.0), affecting prefill durations, admission ordering, and checkpoint pricing for every prefill-capable core. - Two-frame pipelining across scheduler and all four executors: Widening
Decode | SpeculativetoDecode | Speculative | Prefill(helios/src/scheduler.rs:1132-1143,helios/src/model.rs:349-354,helios/src/execution/{transport,threaded,parallel}.rs,helios/src/execution/threaded/protocol.rs) is consistent and verified against device-side sticky error status (ignition/components/sampling.py:367-409) andcheck.py --mutations, though live TP2 serving was only checked single-arm on SM120. - Same-day semantic overlap with open PR #644: Shares 7 files (
policy.rs,policy_tests.rs,service.rs,utility.rs,docs/scheduling-runtime-design.md,scripts/scheduling_sim/utility.py,tests/test_scheduling_utility.py), includingLaneValueand delivery-fairness units (policy.rs:582-586uses inverse delivery ratestream_deliv_rate, whereas#644switches delivery fairness to duration-independent served shares_i).
Walkthrough
- Completion-attributed burst coalescing: Adds
PolicyConfig::coalescing_horizon_tokens(default64.0, validated nonnegative athelios/src/scheduler/policy.rs:222-234),LaneValue::prefill_finish(helios/src/scheduler/utility.rs:78-93), andcoalescing_prefill_log_bonus(helios/src/scheduler/policy.rs:444-621), mirrored inscripts/scheduling_sim/utility.py:12-246with burst workloads inscripts/scheduling_sim/workloads.py:50-53and tests intests/test_scheduling_utility.py:335-376andhelios/src/scheduler/policy_tests.rs:6494-6545. - Stratified fill-ratio and KV-context prefill cost model (
#485): AddsPrefillPredictor,PrefillBucket, andPrefillCostModelinhelios/src/scheduler/cost.rs:66-379(6 strata of 9-sample medians, 3-parameter relative-error-weighted NNLS, narrow-regime upward bound), wired throughActionCosts::{prefill_duration, prefill_entry, prefill_predictor, get, observe}(cost.rs:529-587, 679-724) intopolicy.rs,service.rs:167-193, andcheckpoints.rs:168-341. - Two-frame pipelining for consecutive nonterminal
GraphKind::Prefill: Addsprefill_cursor/_fromhelpers andprefill_step_requires_feedbackinhelios/src/scheduler.rs:854-944, 1109-1143, widenseligible(policy.rs:311-322),model.rs:349-354(ConsumedTokens | SnapshotConsumedTokensguard), and all four executor layers (transport.rs:967-968, 1020-1021,threaded.rs:872-876,threaded/protocol.rs:32-37,parallel.rs:262-264), and mirrors the_fromrefactor inverification/helios-lifecycle/check.py:544-605. - Mixed-graph curve and terminal-catalog fixes: Applies
powered_curve+forecast_tokensinhelios/src/scheduler/learning.rs:11-13,service.rs:250-265, andpolicy.rs:808-817(with the!prefillguard), and switches unmeasured prefill discovery toeffective_prefill_catalog(policy.rs:341-354, 729, 966, 1256). - Docs & tests: Updates
docs/scheduling-runtime-design.md:198-207, 403-423, 567-577, updateshelios/src/server/runtime/phase_tests.rs:1311-1318, and adds unit/lifecycle tests incost.rs:848-943,policy_tests.rs:1420-1483, 6494-6640, andthreaded/protocol_tests.rs:360-370.
Pre-merge Checks
- [PASS] Security / malicious screen: No credential handling, shell/network additions, unsafe code, or prompt-injection attempts in PR text or diff.
- [WARN] Charter & value fit: Strong architectural alignment (shared runtime layer, no per-model branches, no ABI/Protobuf changes, closes
#485), but fails Charter#210/docs/design-review.md:109-111(no served-workload A/B baseline overmain) and skips a mandatory runnable CPU gate (docs/design-review.md:201-206, 247-251). Also closes#485with an affine NNLS design rather than@voipmonitor's measured logarithmic-band prototype without re-running#485's long-context workload. - [WARN] Related / duplicate / conflict check: Direct extension of merged
#619,#538,#550,#459; non-duplicate, but open PR#644(same author, same day) overlaps 7 files and changesLaneValueand delivery-fairness units—merge order and formula reconciliation need to be settled. - [WARN] Tests & verification evidence: Crate suites (
eos,selene,selene-manager,helios,flare,flare-cli),pytest(644 passed), andcheck.py --mutations(all 8 TLA+ models) are reported passing and CI is green on05cccb6, and all new tests are properly isolated and exercise production entry points. However,learning.py --preset validate(64-seed sweep) was not run,8 × 8,192burst numbers have no checked-in workload, and live GPU measurements lack amaincontrol.
Blockers
-
Mandatory 64-seed timing-learning validation sweep was not run (
docs/design-review.md:201-206, 247-251;helios/src/scheduler/cost.rs,scripts/scheduling_sim/utility.py).docs/design-review.md:201-206requires changes to timing estimation or scheduling utility rules to be validated against the screening and 64-seed validation catalog inscripts/scheduling_sim/learning.py, and lines247-251explicitly specify that "Disclosure does not excuse skipping runnable CPU checks... Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."- The PR ran only
--preset smokeand disclosed that the 64-seedlearning.py --preset validatesweep was not run. - Fix: Run the full 64-seed
scripts/scheduling_sim/learning.py --preset validatesweep (with--configsperlearning.py:95-100) and include the pass/summary results in the PR evidence.
-
No served-workload A/B baseline against
mainbacks the performance overhaul or#485fix (Charter#210;docs/design-review.md:109-111;scripts/scheduling_sim/workloads.py:50-53).- All burst speedup claims (
+14.6%throughput,-42.6%max TTFT) come fromscripts/scheduling_simon a synthetic catalog (workloads.py:50-53), and the claimed8 × 8,192multi-chunk burst (+12.8%,1492 → 1056 ms) has no checked-in workload inworkloads.pyto reproduce it. - The live 2× SM120 GPU checks (
46,509-token prompt TTFT andB=4/B=8bursts) are single-arm with nomaincontrol, and#485's long-context (64k–128k) launch-drift scenario is not re-measured on GPU (unlike#485's own DS4.1 TP4 A/B table). - Fix: Provide at least one equivalent
mainvs. PR#645liveflare runA/B measurement on an exported core covering burst coalescing / pipelined long-prompt prefill and long-context chunk stability (#485), and either check in the8 × 8,192simulator workload or remove that row from the claimed results. Confirm with@voipmonitorthat the affine 3-bucket NNLS fit resolves#485's 64k–128k launch drift.
- All burst speedup claims (
Should Fix
-
Checkpoint O(1) stride fast path is disabled whenever any prefill capacity has a non-constant predictor (
helios/src/scheduler/checkpoints.rs:222-232,helios/src/scheduler/cost.rs:298-302).interval_prefill_nscomputesstrideviaentry.non_terminal?.constant_ns()?(checkpoints.rs:225), andconstant_nanosisSomeonly whenbest_theta[1] == 0.0 && best_theta[2] == 0.0 && u_max >= 0.75(cost.rs:298-302).- In the exact variable-fill / KV-depth-dependent regime
#485targets (any single capacity with positive fill slopetheta_1 > 0, context slopetheta_2 > 0, oru_max < 0.75),try_foldshort-circuitsstridetoNoneand every call tointerval_prefill_nsfalls back to the chunk-by-chunk catalog loop (checkpoints.rs:270-339). WhileENTRY_LOOKUPSstays bounded byprefill_catalog_costs, on long agentic prompts with hundreds of message boundaries (such as the 150k-token / 999-boundary workload incheckpoints.rs:1273-1325) this turns each boundary evaluation from O(1) into O((end - start) / chunk_size * catalog.len()), contradicting the PR description's claim that the O(1) stride path is preserved. - Fix: Either support a closed-form arithmetic-series stride for full-chunk runs under the affine predictor
theta_0 + theta_1 * 1 + theta_2 * (start + i * cap) / 4096(or precompute prefix costs across intervals once percheckpoint_selection_cached), and add a budget test incheckpoints.rscovering a non-constantPrefillCostModelon the 150k/999-boundary prompt.
-
Uncapped post-TTL upward extrapolation
t_at_umax * (u / u_max)can severely over-price a large prefill graph after a single short tail (helios/src/scheduler/cost.rs:113-115, 914-923).- When
u_max < 0.75 && (u_max - u_min) < 0.15 && u > u_max,PrefillPredictor::predictscales linearly fromt_at_umaxbyu / u_maxwith no upper cap. Incost.rs:914-923, a single post-TTL 128-token tail at1.51 sinside capacity3584(u = 1/28) predicts>= 42.28 sfor a full chunk (5.4×the test's own7.81 sfull-chunk cost). - If a large graph (for example
4096, or the soleTerminalPrefillcapacity) sees a single 64- or 128-token tail right after the 30 s TTL reset, fixed launch/overhead cost gets multiplied by up to64×. While a single full-fill observation infill_bin = 1(cost.rs:205, 213) clears the guard immediately, the inflated full-chunk estimate suppressesValueRate::new(utility.rs:124-134) so ordinary selection can lock out the large graph in favor of smaller capacities until a rate-limited funded refresh probe fires (and if selected,expected_finish_ns/retained_nsare inflated by the same multiple). - Fix: Cap the upward extrapolation multiple (e.g., bound the slope or cap
u / u_max, or retain/fallback cleanly across TTL resets for unobserved fill strata) and assert both a lower and reasonable upper bound incost.rs:919-923.
- When
Subtract / Simplify
-
Collapse
ActionCosts::prefill_durationontoprefill_entry(helios/src/scheduler/cost.rs:529-583).prefill_duration(529-557) duplicatesprefill_entry'sKeyliteral,self.entry(key)?, andestimate.nanos == 0check verbatim. Replacing lines536-556withself.prefill_entry(kind, capacity).map(|p| p.map_or(0, |p| p.predict(work, start_position)))removes ~20 lines with identical semantics and the same singleENTRY_LOOKUPScall.
-
Delete dead
is_prefill()branches left behind inadd_candidateandcontinuation_candidate(helios/src/scheduler/policy.rs:1076-1095, 1335-1376).add_candidatenow returns early atpolicy.rs:1248-1307wheneverkind.is_prefill(), making thekind.is_prefill()branches atpolicy.rs:1342-1347and1366-1376unreachable dead code. Likewise,continuation_candidatereturns early atpolicy.rs:933-1010forfollowing.is_prefill(), making the!mixedprefill block atpolicy.rs:1080-1092dead code. Delete both dead blocks.
-
Single-source the pipelinable
GraphKindpredicate and simplifyresize_prefill/prefill_step_requires_feedback(helios/src/execution/manifest.rs:84-101,helios/src/scheduler.rs:1109-1143,helios/src/scheduler/policy.rs:1688-1694).- The
Decode | Speculative | Prefillmatch is now duplicated 8 times acrossscheduler.rs:1136,policy.rs:1290, 1711,transport.rs:968, 1021,threaded.rs:876,parallel.rs:263, andthreaded/protocol.rs:35. AddingGraphKind::pipelines(self) -> boolonGraphKindinhelios/src/execution/manifest.rs:84-101(alongsideis_prefillandsamples) keeps all layers in lockstep. - In
policy.rs:1688-1694,resize_prefillhand-rollseffective_prefill_catalog(policy.rs:341-354) with a redundant!request.prompt_logprobscheck (already insideprefill_requires_terminal_completion_fromatscheduler.rs:915); replace those 6 lines withself.effective_prefill_catalog(request, request.prefill_kind(), cut). - In
scheduler.rs:1109-1112,if plan.kind != GraphKind::Prefill { return true; }insideprefill_step_requires_feedbackis unreachable because its only caller (scheduler.rs:1137) already checksplan.kind == GraphKind::Prefill; fold lines1136-1137into onematch plan.kindand remove the dead guard.
- The
-
Unify
PrefillBucketwithReplayTimes(helios/src/scheduler/cost.rs:133-169vs389-413) and avoid double-scanningself.slotsincoalescing_prefill_log_bonus(helios/src/scheduler/policy.rs:453-482, 592-619).PrefillBucketre-implementsReplayTimes's exact 9-slot ring and(lo + hi + 1) / 2median rounding in the same file; a small generic ring helper removes the duplicate median implementation.coalescing_prefill_log_bonusscansself.slotstwice with overlapping filters and recomputes the identicalpost_prefillformula (policy.rs:475-477and605-607); collecting(slot, post_prefill)into a stack-allocated[(usize, usize); REQUEST_LANES]array in the first pass removes the second scan.
Nits
- Defaults table & README sync: Add
coalescing_horizon_tokens(64.0) to thePolicyConfigtable indocs/scheduling-runtime-design.md:651-661and the defaults paragraph inhelios/README.md:478-482(both currently stop atadaptive_verification_alpha). - Unused simulator workloads:
burst_four,burst_four_low, andburst_eight_lowinscripts/scheduling_sim/workloads.py:50-53are not referenced bytests/test_scheduling_utility.py; either exercise them or keep only the used workloads. - Reconcile
#644delivery-fairness units on rebase: When rebasing with#644, checkpolicy.rs:582-586(delivery_fairness / (stream_deliv_rate * mean_out)), whose units assume pre-#644inverse-frequency delivery pricing rather than#644's served-share pricing. - Document
retained_nssemantics for prefill:Estimate::nanos/SubmittedTiming.retained_ns(cost.rs:217, 717,scheduler.rs:1146, 2389) now stores the fitted full-fill, zero-context prediction rather than a raw rolling median; a brief comment onPrefillCostModel::observeorselected_costavoids telemetry confusion.
Dropped on verification
- Dropped upstream F3 ("re-priced prefill durations collide with
window_remaining()and cause short-tail pipelines to self-drain", citingphase_tests.rs:1311-1318): Verifiedhelios/src/server/runtime/phase_tests.rs:1291-1318directly—the test feeds an actual GPU timing of200 ns(gpu_ns = [Some(100), Some(200)]) for a 13-token tail on a graph seeded at1000 ns. Predicting195..=210 nsis accurate (fixing the old600 nsaverage over-estimate), not a3×under-estimate; short tails are normally terminal (already feedback barriers), andwindow_remaining()stopping queueing pastexpected_finish_nsis the intended backpressure contract (helios/README.md:483-484). - Dropped upstream F4's "missing CLI/config flag breaks sibling parity" claim: Verified
PolicyConfig(helios/src/scheduler/policy.rs:15-27) vs.helios/src/server/config.rs:305-330—6 of the 10 pre-existingPolicyConfigcoefficients (output_token_value,token_fairness,delivery_fairness,decode_age_price,adaptation_ms,estimate_ttl_ns) likewise have no CLI flag or server-config key. Reduced to a Nit for the missing docs table/README row. - Dropped upstream F5 ("value-side
scheduled_consumedvs.service_ratesconsumed_tokenscursor mismatch"): Intentional design stated in the PR description; terminal frame 2 requires feedback and cannot commit while frame 1 is in flight (available_plandrains atpolicy.rs:1665), socommit()never normalizes a terminal chunk against staleconsumed_tokens, and the 1-token difference during drain-decision scoring is negligible. - Dropped upstream F6 ("undeclared narrowing of the Mixed decode branch at
policy.rs:808"): Explicitly declared in the PR description ("Mixed decode rate/continuation paths bypassedpowered_curve/forecast_tokensand lacked a!prefillguard"), matchesservice.rs:250, and a Helios request cannot holdgenerated_tokens > 0before prompt completion. - Dropped upstream F9 ("two-frame prefill widens per-lane failure blast radius / breaks counter validation on frame 2"): Verified the device kernel in
ignition/components/sampling.py:354-410—Status + slotandError + slotare sticky in device memory across consecutive frames (identical to two-frameDecode/Speculativepipelining), and nonterminal prefill hassample_enabled == 0. - Dropped F2's sub-claim that the upward bound "stays in force until 9 full-fill samples displace the medians": Verified
helios/src/scheduler/cost.rs:205, 213-214, 227-242—a single full-fill sample lands infill_bin = 1(strata[3]) and immediately setsu_max = 1.0 >= 0.75. (The core uncapped post-TTL extrapolation risk survives as Should Fix #2.) - Dropped Subtraction #3's claim that
policy.rs:1335-1338is a live divergence bug and corrected its hallucinated file path:helios/src/scheduler/manifest.rs(not opened) does not exist (GraphKindlives inhelios/src/execution/manifest.rs:69-101), andpolicy.rs:1335-1338is only reached when!kind.is_prefill()becauseadd_candidatereturns early atpolicy.rs:1248-1307. Replaced with the verified dead-code subtraction (policy.rs:1080-1092, 1342-1347, 1366-1376). - Dropped Subtraction #6's suggestion that
Candidate::feedbackis completely unread before overwrite: Verified viahelios/src/scheduler.rs:554, 1135thatScheduledPlanDerefs toScheduledStep, soplan_requires_feedback(&plan)OR-splan.requires_feedback(initialized fromcandidate.feedbackatpolicy.rs:1793)—making the PR's updates atpolicy.rs:1290, 1710live rather than dead.
Classify triage
Selected: triage:validation
Threshold: 65%
Triage
- [✓]
triage:validation: 65.1% -
triage:review: 34.8% -
triage:design-review: 0.0% -
none: 0.0% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0% 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.
Apply labels
Applied: +triage:validation, -triage:review