Opened by a workflow run, Nov 30, 2026 12:56 PM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: lukealonso (COLLABORATOR, one of the charter's named priority contributors; 26 merged PRs in 180 days, 229 commits to helios/src, 384 to docs; Discord lukealonso)
Motivation: Under the default balanced policy Helios picks shallow speculative verification depths (W=1/P=3) instead of deeper, higher-tok/s ones, because the waiting-age and delivery-fairness prices charge served decoders and tax longer rounds. This PR changes that accounting plus the depth-calibration estimator so that when nobody is excluded the scheduler maximises throughput.
Scale: +649 / −230 lines in 10 files
Proposal:
- Replace cumulative-prefix calibration in
rounds.rswith survival-weighted per-step conditional calibration, clamp 2.0→4.0, deeper unobserved depths inherit the deepest observed shallower factor. - Charge waiting age only to excluded decoders:
sigma_i = (K−b)·T/binstead ofK·T/b; addLaneValue::decode_within(preceding, horizon)for two-stage lookahead. - Replace burst-frequency delivery fairness (
delivered=1,maximum_rate=1/T_min) with served wall-time shares_i ∈ (0,1], so a served decoder earns a duration-independent+g_i/s_i. - Mirror all three in
scripts/scheduling_sim/utility.pyand rewritedocs/scheduling-utility.md. - Claims no Protobuf/core-format/CUDA-graph ABI change (verified: only scheduler, docs, simulator and tests touched). Touches:
helios/src/scheduler/rounds.rs(calibration estimator, rewritten)helios/src/scheduler/policy.rs+service.rs+utility.rs(pricing, delivery references,LaneValue)docs/scheduling-runtime-design.md/docs/scheduling-utility.md(only the latter fully updated) Related items:- #632 helios/scheduler: scale GPU prefix calibration ceiling per step across depth (open): competing fix for the same clamp in the same file, opposite design, also updates
helios/README.mdwhich #644 leaves stale. - #645 Overhaul Helios prefill scheduling, cost modeling, and two-frame pipelining (open): same author, opened one minute later, 7 files in common and still prices the old delivery-rate variable
z_ss. - #152 balanced policy collapses to width-1 rounds at B=4 (open, 2026-10-30): the month-old field report of exactly this defect; never referenced by the PR, and its cadence-evidence request is unmet.
- #522 Scope GPU confidence calibration per request (merged): the
RequestCalibrationcode #644 rewrites, landed three working days earlier. - #515 Calibrate GPU confidence forecasts (merged): parent of
DepthCalibration; its own thread documents the instability and a −19…−27% GB300 run. Link: https://github.com/NVIDIA/hyperflare-inference/pull/644 Autobot comments: Description does not mention open competing #632 (same defect/file,2.0*1.75^depthceiling instead of redefining the quantity), nor #645's overlap, nor #152. Benchmark claims lack a same-coremainbaseline: 76.11 balanced is compared to throughput on a new core, before/after is another core (72.46→74.15), and the DFly2 "+24.2%" is against a forced P=6. Reach exceeds the framing — only calibration is GPU-confidence-gated; the age/delivery andfinishchanges affect every core shape and both policies (throughputkeepsterminal_age_price=1, andfinishnow ignorescompletion_ms).helios/README.md:446-450and six sections ofscheduling-runtime-design.mdstill document the old model, so the two design docs contradict each other. Unexplained constants (4.0 clamp,clamp(sum_w/count,0,1), flat 0.5 prior) — the same gap #632 was twice blocked on. Zero engagement: no reviews, labels, or Autobot pass.
The PR bundles three coupled scheduler changes (per-step conditional speculative calibration in helios/src/scheduler/rounds.rs; excluded-only waiting age with sigma_i = (K−b)·T/b; served-share delivery fairness with s_i ∈ (0,1]), mirrored in scripts/scheduling_sim/utility.py and documented only in docs/scheduling-utility.md. I verified at head that the arithmetic supports the central claim: with sigma_i = 0, s_i = 1 and preceding = 0, the served-lane +c_i·T/2 term exactly cancels ValueRate::new's common −T/2·Σc, so the score reduces to v_i/T + g_i + c_i·A_i and no T-dependent bias remains; cohort selection stays additive and the excluded-only derivation matches the docs. I found no arithmetic contradiction with the description.
What the description omits, in order of decision weight: #632 is an open competing fix by original-el8 for the same under-selection defect in the same file (it scales the ceiling 2.0·1.75^depth; #644 redefines the calibrated quantity and raises the flat clamp to 4.0), and it already updates helios/README.md:446-450, which #644 leaves stating the old [0,2] contract. #645, by the same author, opened one minute after #644, shares 7 files, adds LaneValue::prefill_finish next to #644's decode_within, and still prices the old delivery-rate variable z_ss that #644 redefines. #152 (open since 2026-10-30, triage:design-review) is the month-old user report of exactly this defect (416 width-1 vs 165 width-6 rounds under balanced), and its maintainer triage asked for inter-token cadence evidence that #644 does not supply. Reach is wider than the framing: only the calibration half is gpu_confidence()-gated; the age/delivery and LaneValue::finish changes hit every core shape and both policies (throughput leaves terminal_age_price = 1, and finish now ignores completion_ms and charges the full horizon). Evidence gaps: no same-core main baseline (76.11 balanced vs 76.43 throughput on the new core; the only before/after is another core, 72.46→74.15; the DFly2 "+24.2%" is against a forced P=6), no derivation for the 4.0 clamp, the clamp(sum_w/count,0,1) round weight or the new flat 0.5 prior, and the B=4 / K>4 regimes the new unit tests assert are unmeasured on hardware. Six sections of docs/scheduling-runtime-design.md still describe the old model, so the two design docs now disagree.
Process: open, ready for review, CI green on 2b15114, no labels, no reviews, no comments, no Autobot pass — the review has effectively not started, and neither voipmonitor (#515/#522 author of the estimator being replaced) nor original-el8 (#632) has engaged.
Value Proposition
Value Proposition — PR #644 "per-step speculative calibration and excluded-only waiting/delivery fairness"
Charter alignment. The change is confined to Helios scheduling — no model branches, no new flags, no Protobuf/core-format/CUDA-graph ABI change (10 files: scheduler, docs, tests). It targets a reproducible, filed performance defect (#152: default balanced choosing 416 width-1 rounds vs 165 width-6 at B=4 on 3× DGX Spark), which fits "measured performance issue" and the named DGX Spark target. Two frictions: CALIBRATION_FACTOR_MAX = 4.0, the clamp(sum_w/count, 0, 1) round weight and the new flat 0.5 prior are undocumented derivations ("no magic defaults"); and delivery_fairness/decode_age_price keep their names and defaults while measuring different quantities, silently reinterpreting tuned configs — while LaneValue::finish charging the full horizon also reprices --scheduler-policy throughput (terminal_age_price = 1.0).
Novelty & status. Not obsolete — nothing on main fixes this; #515/#522 introduced the estimator. Not fully superseded: #632 (open) attacks the same W=1/P=3 collapse in the same rounds.rs, but only the calibration half, with two outstanding "Changes Requested" for missing derivation and default-α regressions. #645 (same author, one minute later) overlaps 7 files and still prices the old delivery-rate variable. The change is genuinely additive, though two of its three parts are contested or colliding.
Value vs maintenance cost. Beneficiaries are real: every flare run user on default balanced, plus #152's reporter (uncredited, unlinked). The evidence is the weak leg. The headline 76.11 tok/s compares balanced to throughput on a new core; the only before/after pair is on a different core (mean 72.46→74.15, greedy_code 70.30→75.98); DFly2 "+24.2%" compares against forced P=6, not main. That misses charter #210 and #152's triage ask for inter-token/cadence gaps. The B=4 and K>4 regimes the PR rests on are hardware-unmeasured. helios/README.md still says the clamp is [0, 2] and six sections of docs/scheduling-runtime-design.md still document the old model.
Verdict: Worth it with changes. Conditions: same-core main A/B plus the cadence data #152 requested; derivation for 4.0, the round weight and the 0.5 prior; rename or gate the reused pricing fields and state the throughput effect; fix the stale docs; and resolve supersession/order with #632 and #645 before merge.
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, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 95.0% -
triage:validation: 3.7% -
triage:design-review: 1.2% -
none: 0.1% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 98.7% -
priority:P2: 0.8% -
priority:P1: 0.6%
Type
- [✓]
performance: 98.6% - [✓]
bug: 83.5% -
duplicate: 59.3% -
community: 43.8% -
enhancement: 0.6% -
documentation: 0.0%
Area
- [✓]
area:scheduling: 99.9% -
area:preparation: 1.4% -
area:selene: 1.2% -
area:kernels: 0.4% -
area:rocenante: 0.2% -
area:engram: 0.2% -
area:caching: 0.1% -
area:api: 0.1% -
area:packaging: 0.1% -
area:orbit: 0.0% -
area:memory: 0.0%
Model
-
model:deepseek-v4.1: 29.4% -
model:deepseek-v4: 4.7% -
model:qwen3.8-flash-next: 0.4% -
model:gemma4: 0.0% -
model:glm-5.3: 0.0% -
model:muse-glimmer: 0.0% -
model:qwen3.8-27b: 0.0% -
model:inkling-small: 0.0% -
model:kimi-k3.1: 0.0% -
model:nemotron-3.5-bolt: 0.0% -
model:mimo-v2.6: 0.0%
Apply Labels (Intake)
Applied: +triage:review, +bug, +performance, +area:scheduling
Subtraction and simplicity
Subtraction/Simplicity review of PR #644 (head 2b15114). The diff is structurally lean — no new flags, knobs, feature gates, fallback layers or ABI files — so the findings are about duplication inside the new code.
-
(high) The "inherit deepest observed shallower depth" walk exists twice in
helios/src/scheduler/rounds.rs: productionForecast::prior_calibration_factor(290-305) and#[cfg(test)] Forecasts::calibration_factor(364-375), differing only in the request-local step. Tests assert the test-only copy (policy_tests.rs:5257-5518), so they can drift. Extract one free fn takingOption<&[RequestCalibration]>. -
(high) The cumulative-product prefix loop is duplicated:
speculative_curve(rounds.rs:451-455, pricing) andobserve_packed_forecasts(rounds.rs:627-637, observation) both documulative_factor *= forecast.calibration_factor(...). Onecalibrated_prefix_meanshelper serves both — important because this PR's defect is pricing disagreeing with observation. -
(high, pure subtraction)
LaneValue::finish'scompletion_ms(utility.rs:121-130) now appears only in adebug_assert; three production callers (policy.rs:606, 741, 872) and policy_tests.rs:3554 still thread it, and policy.rs:723'sfirst_msexists only to feed it. Drop the parameter. -
(medium)
service.rsscans the delivery catalogs twice per plan —service_rates(165-286) computes adelivery_ratewhose magnitude survives only as the(count-1)/rseed at :66, whiledelivery_references(100-158) re-walks the catalogs for the same quantity; the rate is otherwise bound asSome(_)and discarded (:313, :411). Keep one scan or reduce to a presence flag. -
(medium) The maximum rate is now the literal
1.0at all three delivery observe sites (service.rs:47-52, 315, 420) and in tests;ServicePrice::observe'smaximum_rateis vestigial on that path. Addobserve_deliveryor split observe. -
(high, conventions) Docs left self-contradictory:
docs/scheduling-runtime-design.md:203-210, 233-247still state the oldsigma_i = K*T/min(batch_capacity,k)/g/zmodel whiledocs/scheduling-utility.md:230-239, 251-254states the new one;helios/README.md:446-450still says "clamped to [0, 2]" vsCALIBRATION_FACTOR_MAX = 4.0(rounds.rs:13). Replace with a pointer rather than a second derivation.
Already lean: vec![DepthCalibration::new(0.5); …] (rounds.rs:337) simplifies seeding; observed replaces a heuristic; decode (utility.rs:95-97) is a warranted wrapper; DeliveryReference is a documented struct, not over-modelling.
Open: whether (count-1)/r is a deliberate pre-measurement reference (no derivation given); which doc is normative; merge order vs #632 (also edits rounds.rs + runtime-design doc and patches helios/README.md) and #645 (same LaneValue, old z_ss), since #645 still prices the delivery-rate variable #644 redefines.
Correctness and contracts
PR #644's pricing arithmetic is sound — I re-derived the excluded-only Bellman identity, the −c·T/2 cancellation between LaneValue::decode_within and ValueRate::new, and the served-share delivery term against head code. No ABI/proto/core-format contract is touched, and no new hot-path cost, lock, allocation, or platform-parity gap exists. The problems are documentation contracts, an under-described semantic change, knob redefinition, and evidence.
Top findings:
- Major — helios/README.md:446-450 still says the calibration ratio is "clamped to [0, 2]" and per-depth; head is CALIBRATION_FACTOR_MAX = 4.0 (rounds.rs:13) and a cumulative per-step product (rounds.rs:661). Competing #632 does fix this sentence; #644 omits it.
- Major — docs/scheduling-runtime-design.md:527-538 still says one served delivery per burst and init "one delivery over its measured frame duration"; head records delivered = duration_ms with normalizer 1.0 (service.rs:47-52) and initial(1.0) (service.rs:424). Sections :203-210, :233-247, :378-383, :645 are also stale.
- Major — LaneValue::finish now charges the full horizon and completion_ms is used only by a debug_assert (utility.rs:121-130), so terminal retirement is repriced at policy.rs:741 (stage-one finish charged the whole two-stage horizon). throughput keeps terminal_age_price = 1.0 (policy.rs:36,49), so --scheduler-policy throughput is repriced too — the PR body only says "updated".
- Major — delivery_fairness (4.0) and decode_age_price (0.1) keep names and defaults while changing dimension (burst rate 1/T → dimensionless served share); the age/delivery half is not GPU-confidence-gated (rounds.rs:471-474) so it changes default balanced for every core shape with no opt-in.
- Major — CALIBRATION_FACTOR_MAX = 4.0, the flat 0.5 prior (rounds.rs:337) and round_w = clamp(sum_w/count) (rounds.rs:701) are underived; #632 was twice asked to close the same gap.
- Minor — the pre-measurement delivery default assumes b = 1 ((K−1)/r, service.rs:66), so sigma > 0 at startup even when all decoders fit one batch, contradicting the PR's "sigma = 0 when all served" claim.
- Major evidence — no same-core main baseline; the only before/after is on a different core, DFly2 compares against forced P=6, and #152's requested cadence data is absent.
- Minor — observe_calibration is now #[cfg(test)]-only (rounds.rs:352-356) yet policy_tests.rs:5420,5436 still exercise it, so the bleed test validates a non-production path.
Open: same-core main baseline and cadence data; derivations; merge order vs #632/#645; whether the throughput-policy finish repricing is intended.
Final review
Recommendation: Changes Requested
The core mathematical design in PR #644 is sound: the survival-weighted per-step conditional calibration in rounds.rs, the exact excluded-only Bellman continuation $\sigma_i = (K - b_f) T_f / b_f$ (including heterogeneous multi-family wall-time shares), and served-share delivery fairness all check out algebraically and align cleanly across Rust and the Python simulator with zero ABI changes. However, deep inspection surfaced one real mathematical bug introduced in next_progress (helios/src/scheduler/policy.rs:501), where ValueRate::new(ns, work, 0.0) leaves the new +age_price * T / 2 term uncanceled for delivery-bearing multistage requests, alongside six superseded passages in docs/scheduling-runtime-design.md and two in helios/README.md that now directly contradict docs/scheduling-utility.md and the code. Fixing policy.rs:501, reconciling the stale docs, and removing the dead completion_ms parameter from LaneValue::finish will make this ready to merge (with #645 rebased/re-derived afterward).
Merge Risk
Level: Medium
- Global default-policy blast radius: While per-step calibration is gated on
gpu_confidence()(helios/src/scheduler/rounds.rs:472-474), the excluded-only waiting-age and served-share delivery-fairness changes apply unconditionally to--scheduler-policy balancedacross all cores and model families (andLaneValue::finishapplies under--scheduler-policy throughputas well, whereterminal_age_price = 1.0). - Hardware validation gap in multi-concurrency regimes: Live GPU measurements cover solo concurrency (
B=1, including an isolated same-corebalancedbefore/after ongb10-tp4-202611301141), whileB=4uncontended,K>4oversubscribed, and inter-token cadence/delivery-gap behavior (open issue #152) are verified in CPU unit/simulator tests only. RaisingCALIBRATION_FACTOR_MAXto4.0per step warrants attention on moderate-acceptance concurrent workloads given theC=1..32regressions observed when loosening calibration ceilings in #632 (now closed in favor of this PR). - No concurrency, ABI, or hot-path allocation hazards: All changes are pure
f64arithmetic on the single-threadedRequestSchedulerplanning/completion path with no Protobuf, core-format, CUDA-graph, lock, or hot-path allocation changes. Note that open sibling PR #645 overlaps 7 files and still prices delivery as a rate (delivery_fairness / (z_ss * E)), so #645 will need to be rebased and re-derived once #644 lands.
Walkthrough
helios/src/scheduler/rounds.rs:13, 22-56, 85-116, 290-324, 334-376, 446-469, 627-710: Replaces cumulative-ratioDepthCalibration/RequestCalibrationwith survival-weighted per-step conditional calibration (CALIBRATION_FACTOR_MAX = 4.0, flat0.5per-step prior, round weightclamp(sum_w / count, 0, 1)), inherits the deepest observed shallower factor for unobserved deeper steps (request-local preferred over global), and multiplies cumulative per-step factors across0..=depthduring pricing and surplus observation.helios/src/scheduler/utility.rs:76-131, 339-383: AddsLaneValue::decode_within(expected, preceding_ms, horizon_ms)(withdecodewrappingpreceding_ms = 0.0) so served decoders cancel-age_price * T / 2inValueRate::newwhile modeling prerequisite wait over[0, preceding_ms], updatesLaneValue::finishto cancel waiting over the full horizon, and expands the Bellman continuation identity test to include an excluded lane.helios/src/scheduler/service.rs:27-33, 43-55, 59-160, 304-318, 340-372, 411-428: Replaces scalardelivery_reference_intervalswithDeliveryReference { excluded_wait_ms, served_share }((K - b) * T / bandb / K), switches delivery accounting from burst count (1.0against1 / T_min) to served wall-time share (delivered = duration_ms, normalizer1.0, first-burst init1.0), and updatesprojected_serviceandobserve_serviceaccordingly.helios/src/scheduler/policy.rs:427, 448, 467-473, 793-796, 906-966: ThreadsDeliveryReferenceintolane_valuesand passespreceding_nsthroughlane_value_within/lane_value_for_tokens_withinfor two-stage lookahead incontinuation_candidate.scripts/scheduling_sim/utility.py:133-236& tests (helios/src/scheduler/policy_tests.rs,tests/test_scheduling_utility.py,tests/test_scheduling_learning_policy.py): Mirrors excluded-only waiting and served-share delivery accounting in the Python simulator and adds isolated CPU/simulator tests for per-step calibration inheritance, unexcluded peak-throughput depth selection (B=1/B=4), oversubscribed fairness (K=8, b=4), and the excluded-only Poisson equation.docs/scheduling-utility.md&docs/scheduling-runtime-design.md:113-152: Documents served-share delivery fairness, excluded-only waiting/continuation, and per-step conditional calibration.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure
f64scheduler pricing and calibration arithmetic; no I/O, unsafe code, external input parsing, or credential/network changes. - [WARN] Charter & value fit: Model-agnostic change in the right layer with zero new flags/ABI impact, required four-part PR structure, and
Discord: lukealonso; addresses open issue #152 (unlinked in PR body). However,docs/scheduling-runtime-design.mdandhelios/README.mdare left contradicting the new model, and the DFly2 benchmark compares against forcedP=6rather thanmain(while multi-concurrencyB=4/K>4remains GPU-unmeasured). - [PASS] Related / duplicate / conflict check: Competing PR #632 was explicitly closed by
original-el8in favor of #644. Sibling PR #645 (same author) overlaps 7 files and still uses the pre-#644 delivery-rate formula; merge #644 first and rebase/re-derive #645. - [PASS] Tests & verification evidence: Isolated production-path Rust (
400scheduler::tests + crate suites under--locked --release), Python simulator (786tests), and all 8 TLA+ formal lifecycle conformance models passed; Kani-covered validators are unmodified; liveB=1same-corebalancedA/B ongb10-tp4-202611301141shows+2.3%mean /+8.1%greedy_code.
Blockers
None.
Should Fix
-
Uncanceled
+age_price * T / 2duration bias innext_progressfor delivery-bearing multistage requests (helios/src/scheduler/policy.rs:501).LaneValue::decode(helios/src/scheduler/utility.rs:95-119) now adds+ self.age_price * service_ms * (self.age_ms + service_ms / 2.0)to cancel the- decode_age_price * duration_ms / 2.0subtraction inValueRate::new.- However,
next_progress(helios/src/scheduler/policy.rs:501) still constructsValueRate::new(ns, work, 0.0)when scoringResume,Decode,Speculative, andMixedshapes at lines547,556, and587. For any delivery-bearing request withvalue.age_price > 0(e.g., a request inRestoreor non-terminalSnapshotwithconsumed_tokens == prompt_tokens, evaluated viaprerequisite_valueandcontinuation_candidate'sfill()), dividing byTleaves an uncanceled+ value.age_price * T / 2bonus that rewards slower graphs over faster ones producing the same tokens. - Fix: Change
helios/src/scheduler/policy.rs:501fromValueRate::new(ns, work, 0.0)toValueRate::new(ns, work, value.age_price)(for prefill requestsvalue.age_priceis0.0, so prefill scoring is unaffected, while delivery-bearing requests cancel the+ c * T / 2term cleanly). Add a unit test inpolicy_tests.rsverifying thatnext_progressprefers a faster decode/resume shape over a strictly slower equal-token shape whenvalue.age_price > 0.
-
Reconcile superseded scheduler equations in
docs/scheduling-runtime-design.mdandhelios/README.md.docs/scheduling-runtime-design.mdstill documents the pre-PR model in six places that now contradictdocs/scheduling-utility.mdand the implementation:docs/scheduling-runtime-design.md:200-210: still describes"one delivery regardless of its token count","delivery rate z", and"output delivery: g/z".docs/scheduling-runtime-design.md:233-247: still gives the oldsigma_i = K*T/min(batch_capacity,k)and the old score formula"- T/2 * sum over active decoders of c_i"without excluded-only cancellation.docs/scheduling-runtime-design.md:338-339and:378-383: still state that terminal rows in a two-stage sequence stop accumulating age at timeTand save waiting over[T, H](now zero waiting over the full horizonH, matchingdocs/scheduling-utility.md:296-305).docs/scheduling-runtime-design.md:527-538: still says visible publication records"one served delivery"and initializes a missing delivery history"to one delivery over its measured frame duration"(nowdelivered = duration_ms, normalizer1.0, initial share1.0athelios/src/scheduler/service.rs:47-52, 424).docs/scheduling-runtime-design.md:645: still callsdelivery_fairnessthe"Delivery-rate log-utility coefficient, value/ms"instead of served delivery-share.
helios/README.mdis untouched and still states the superseded model in two places:helios/README.md:446-450: still describes a"per-depth verification calibration ratio (... clamped to [0, 2])"instead of per-step conditional factors multiplied cumulatively, clamped to[0, 4], with unobserved deeper inheritance.helios/README.md:470-476: still says a delivery is credited"once per completion regardless of token count"and initialized"from its reference delivery interval"instead of served wall-time share initialized from batch-feasible served share.
- Fix: Update
helios/README.md:446-450, 470-476and updatedocs/scheduling-runtime-design.md(preferring concise statements + pointers todocs/scheduling-utility.mdover duplicating full derivations so the two docs cannot drift again).
-
Add or clarify multi-concurrency (
B=4/K>4) validation and reference #152 in the PR description.- Open issue #152 reports this exact
balancedwidth-1 collapse atB=4and its triage asked for matched inter-token/delivery-gap evidence alongside throughput; meanwhile #632 showed that raising calibration ceilings can regressC=4..32moderate-acceptance workloads on real hardware. - Fix: Link #152 (and #632/#645) in the PR description, clarify that the DFly2
gb10-tp4-202611301002comparison is against forcedP=6(notmain), and if a 4× DGX Spark host is available before merge, run a quickB=4main-vs-PRbalancedcheck (throughput + inter-token/delivery gaps) to confirm no multi-concurrency over-allocation regression fromCALIBRATION_FACTOR_MAX = 4.0.
- Open issue #152 reports this exact
Subtract / Simplify
-
Delete dead
completion_msparameter fromLaneValue::finishand unusedfirst_mslocal (helios/src/scheduler/utility.rs:121-130,helios/src/scheduler/policy.rs:606, 723, 741, 872).- After switching terminal retirement to excluded-only waiting over the full horizon,
completion_msis used solely indebug_assert!(horizon_ms == 0.0 || completion_ms <= horizon_ms)atutility.rs:122and is completely dead in release builds.let first_ms = duration_ns as f64 / 1e6;atpolicy.rs:723exists only to pass it. - Fix: Change the signature to
pub fn finish(&self, horizon_ms: f64) -> f64, deletefirst_msatpolicy.rs:723, and simplify all callers (policy.rs:606, 741, 872,policy_tests.rs:3554,utility.rs:365).
- After switching terminal retirement to excluded-only waiting over the full horizon,
-
Deduplicate the descending calibration inheritance walk (
helios/src/scheduler/rounds.rs:290-305vs:364-375).Forecast::prior_calibration_factorand#[cfg(test)] Forecasts::calibration_factorduplicate the same descending(0..depth).rev()search, differing only in whetherself.calibrationis checked alongsideglobal.- Fix: Extract a single helper
fn inherited_calibration_factor(local: Option<&[RequestCalibration]>, global: &[DepthCalibration], depth: usize) -> f64called withSome(&self.calibration)in production andNonein the#[cfg(test)]accessor, preventing drift between test assertions and production pricing.
-
Deduplicate the cumulative calibration-factor product loop (
helios/src/scheduler/rounds.rs:451-455vs:627-637).- Both
speculative_curve(pricing) andobserve_packed_forecasts(learning/surplus) independently accumulatecumulative_factor *= forecast.calibration_factor(depth, &self.forecasts.calibration). - Fix: Extract a zero-allocation iterator helper on
Forecast(e.g.,fn cumulative_calibration_factors<'a>(&'a self, global: &'a [DepthCalibration], limit: usize) -> impl Iterator<Item = f64> + 'a) used by both sites so pricing and learning cannot diverge without adding aVecallocation tospeculative_curve.
- Both
Nits
helios/src/scheduler/rounds.rs:13: Add a brief 1-line comment onCALIBRATION_FACTOR_MAX = 4.0noting the rationale (bounding per-step conditional upscaling when raw proxy confidence is ~0.25 vs realized ~1.0, now that cumulative multiplication across0..=depthhandles multi-step compounding).helios/src/scheduler/policy.rs:956-963:GraphKind::Decode | GraphKind::SpeculativeandGraphKind::Resumenow share identicaldecode_within(..., preceding_ns as f64 / 1e6, horizon_ns as f64 / 1e6)calls and can be merged into one match arm if touched.
Dropped on verification
- Upstream claim that #632 is an open competing PR with undecided supersession: Dropped as stale. Verified via
read_item(632)thatoriginal-el8already closed #632 on2026-11-30 18:02explicitly in favor of #644. - Correctness Lens F4 ("
LaneValue::finishcharges the full horizon and reprices terminal retirement toward later snapshots, silently affectingthroughput"): Dropped as a sign-inversion misread. Adding+ age_price * horizon_ms * (age_ms + horizon_ms / 2.0)cancels the common-c * H / 2waiting penalty inValueRate::new(increasing retirement value, not charging it), is required by excluded-only waiting, and is explicitly documented—including itsthroughput-policy applicability—indocs/scheduling-utility.md:294-305. Only the deadcompletion_msargument was kept (under Subtract / Simplify). - Correctness Lens F5 ("
delivery_referencesfallback(count - 1.0)/rintroduces bias in the unmeasured startup window"): Dropped as factually false. Verified inservice.rs:176-188, 282-285that unmeasured graphs producedelivery_rate = None, so lines64-69never execute at unmeasured startup; when any graph in a ready family is measured, lines150-158overwritereferences[slot]. Lines64-69remain active only for multistage-blocked streams (family(r) == None), matchingdocs/scheduling-utility.md:245-246. - Correctness Lens F7 ("
cost == best[slot].0tie-break inservice.rs:107is inert"): Dropped as low-signal. Exact IEEE 754 ties occur in linear/power-of-two cost models and tests (matchingutility.py:137), while real GPU shapes scale sub-linearly so larger batches have strictly smallerT / served. Adding an epsilon would introduce an arbitrary magic constant. - Correctness Lens F8 ("
delivery_fairness/decode_age_pricesilently change physical dimension and need opt-in"): Dropped as inaccurate on dimensions. Bothdelivery_fairness(value/ms) anddecode_age_price(value/ms²) retain identical physical units and identical equilibrium magnitude (g_i * K / batT = T_f); adding a legacy-bias flag would violate the charter's anti-flag principle. - Correctness Lens F9 (flat
0.5prior andround_w = clamp(sum_w / count, 0, 1)are underived/asymmetric): Dropped.0.5is the exact per-step conditional equivalent of the prior0.5^(d+1)geometric cumulative prior (realized == predicted == 0.5, neutral factor1.0), and dividingsum_wbycount(notsum_w, which would trivially yield1.0) is the mathematically correct mean survival weight per round. Only a brief rationale comment forCALIBRATION_FACTOR_MAX = 4.0was kept as a Nit. - Correctness Lens F11 ("no before/after on one core exists"): Dropped the blanket claim as an upstream misread of the PR body, which does report an isolated same-core
balancedbefore/after ongb10-tp4-202611301141(72.46 -> 74.15mean,70.30 -> 75.98greedy_code); retained only the narrower note on DFly2's forced-P=6comparator and unmeasuredB=4/K>4cadence. - Correctness Lens F13 ("
#[cfg(test)] observe_calibrationmeans the cross-workload bleed test no longer tests production code"): Dropped as misleading. Verified inpolicy_tests.rs:5420, 5436, 5453-5519thatobserve_calibrationis a 1-line wrapper around productionobserve_calibration_weighted(..., 1.0)used only to seed preconditions; the bleed test itself drivescomplete_packed_round_with_survivalend-to-end withw < 1. - Subtraction Lens F4 & F5 (drop
service.rs:64-69fallback / merge catalog scans; addServicePrice::observe_deliverywrapper) & Minor (utility.pydataclass): Dropped. Droppingservice.rs:64-69would break the documentedb = 1reference for multistage-blocked streams;service_rates(per-request) anddelivery_references(cross-request cohort) have distinct scopes; addingobserve_deliveryexpands API surface rather than subtracting; and(cost, -served)inutility.py:137is concise, idiomatic Python.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.7% -
triage:validation: 0.1% -
triage:design-review: 0.1% -
none: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: no (80%): 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.