Opened by a workflow run, Dec 1, 2026 2:42 PM EST.
Classify draft
Selected: performance, enhancement, area:scheduling
Threshold: 65%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
performance: 98.0% - [✓]
enhancement: 73.1% -
community: 43.8% -
duplicate: 16.5% -
bug: 6.0% -
documentation: 0.0%
Area
- [✓]
area:scheduling: 99.1% -
area:caching: 6.0% -
area:api: 4.7% -
area:preparation: 4.2% -
area:selene: 2.9% -
area:orbit: 2.3% -
area:kernels: 0.8% -
area:engram: 0.3% -
area:packaging: 0.3% -
area:rocenante: 0.2% -
area:memory: 0.0%
Model
-
model:deepseek-v4.1: 18.2% -
model:deepseek-v4: 1.0% -
model:glm-5.3: 0.3% -
model:kimi-k3.1: 0.2% -
model:mimo-v2.6: 0.1% -
model:nemotron-3.5-bolt: 0.1% -
model:inkling-small: 0.1% -
model:gemma4: 0.1% -
model:muse-glimmer: 0.1% -
model:qwen3.8-flash-next: 0.1% -
model:qwen3.8-27b: 0.0% decide malicious: all_clear (100%): No malicious content found
explore
Author: yatesdr (COLLABORATOR, Discord D-Rock)
Motivation: Prompts waiting for their first token earn no waiting-age credit while decoding streams do, so behind 8–16 active decoders a returning prompt can wait seconds for its token-service price to climb; an interior checkpoint cut then re-queues the 2-token tail at zero age, a "double stall". The PR gives waiting prompts a credit scaled by the incumbent decoders' served batch round time, reusing the existing decode_age_price, with no new knob.
Scale: +511 / −40 lines in 11 files (~105 net production Rust)
Proposal:
delivery_references_and_decode_batchadditionally returnsb_served * T_dec(stream-ms) of the fastest measured Decode/Speculative round.- New
LaneValue::first_output_value = decode_age_price * (b_served*T_dec) * age_ms, applied throughprefill_withinwithfrac = 1on completing steps elsework/initial_prefill; kept out of theT/2*sum c_ipenalty sum. - New
RequestAccounting::first_output_wait_ns, preserved only across a forcedRetentionRole::Anchorcut whenfits_single_prefill_fromholds;Carried::last_output_nsclamps readmitted streams to their last output. - Simulator mirror, four new Rust tests, Python test updates, two docs sections.
- Served A/B on DeepSeek-V4.1-Flash TP4 and (later comment) Qwen3.8-Flash-Next TP2, SM121 only. Touches:
helios/src/scheduler/policy.rs— lane valuation, waiting clock, newfits_single_prefill_from.helios/src/scheduler/service.rs/utility.rs— decode-batch reference and lane value plumbing.helios/src/scheduler.rs+helios/src/server/runtime.rs— anchor-cut preservation and readmission carry. Related items:- #662 helios/scheduler: price first-output waiting age on incumbent decode rounds (closed): identical change, draft under
flare-autobot, closed as wrong account. - #654 Add opt-in first-output age pricing and returning-agent benchmark (open): competing opt-in design, new CLI knob, reviewed Changes Requested.
- #660 helios/scheduler: budget interior conversation-anchor splits against checkpoint_extra_work_fraction (open): complementary, bot calls it complementary to #663.
- #661 helios/scheduler: explore smaller prefill chunks under active age-priced streams (open): complementary inverse side.
- #655 helios: retain measured snapshot cost after expiry and discover unmeasured cost once (open): same author, "Ready To Merge", overlaps scheduler.rs and the runtime-design doc.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/663
Autobot comments: Not opt-in and not declared as a default-behavior change:
PolicyConfig::default().decode_age_price = 0.1means every defaultbalanceddeployment changes scheduling, with no flag, no metric exposingfirst_output_wait_ns, and nobalanceddoc text updated. It contradicts docs/scheduling-theory.md:850 ("First-token waiting has no independent age penalty"), which it does not touch — the same line #654's review called a blocker. The simulator "mirror" models no checkpoints or readmission, so the whole anchor-cut/double-stall half is Rust-unit-test-only; the oracle reference solver is never evaluated. Two existing coalescing regression tests were weakened from relative to absolute assertions, described only as "updated". TLA+ numbers come from unmodified models. No linked issue. SM120, multi-host, alternate cache/parallel layouts and kani not run, while peer PRs #660/#661 did run SM120. Zero reviews/comments from anyone but the author; three design questions from its own predecessor #662 remain unanswered.
Value Proposition
Value Proposition — PR #663 (helios/scheduler: price first-output waiting age on incumbent decode rounds)
Charter alignment
Serves the runtime with a small footprint: no per-model branch (#267/#334), no new graph kind, no Protobuf/ABI change, no new PolicyConfig field, ≈105 net production Rust lines, one extra return value from an existing single pass (#404 satisfied). Three conflicts:
- Contradicts an unchanged documented invariant. docs/scheduling-theory.md:850-853 still says first-token waiting has no independent age penalty — exactly the term #663 adds — and #654's review treated that sentence as a blocking item. #663 amends neither it nor helios/README.md or docs/cli-design.md:683.
- Silent default change. The credit is gated on
decode_age_price = 0.1inPolicyConfig::default(), i.e. the documented defaultbalancedpolicy, with no knob andfirst_output_wait_nsexposed nowhere. That sits against "be explicit … no magic defaults" (#215). - Matrix gap. Only SM121 (DGX Spark GB10) was run; SM120 (4× RTX PRO 6000), multi-host, and alternate cache/parallel layouts were not, although sibling PRs #660/#661 did run SM120.
Novelty & status
Genuinely additive, not obsolete: no mainline commit implements first-output waiting age (search_history returns only a5c36978), and no issue reports the exact symptom. Not superseded: #654 is a competing opt-in design of the same term, #660/#661 are complementary (both sides say so), and #662 was closed as a duplicate of this same work. The live risk is that #654 and #663 are alternative designs for one term — only one should land.
Value vs maintenance cost
Beneficiary: anyone serving returning-agent or bursty traffic against active decode cohorts under the default policy. Evidence is unusually strong for this area — paired served A/B vs a3c80e19 on DeepSeek-V4.1-Flash TP4 (returning TTFT p50 −63.5 %/−83.0 %, turns/min +64.8 %/+105.7 %) and Qwen3.8-Flash-Next TP2 (p50 −79.9 %), throughput parity, 21/21 simulator trace identity at age_price = 0, green Rust/Python suites, disclosed limitations. Costs are contained but real: disclosed background decode p99 regressions (+95 ms DeepSeek K=16; +76 ms/+151 ms max on Qwen); the anchor-cut/readmission half is Rust-only (the simulator models no checkpoints), so no measurement isolates it from the credit term; no oracle (prefill_wait_price/F) comparison; two coalescing regression tests loosened from relative to absolute assertions; TLA+ figures re-verify unmodified models.
Required changes
Amend the theory-doc invariant with maintainer sign-off and update the balanced prose; expose the new clock; separate anchor/readmission contribution from the credit contribution; run SM120; justify or restore the loosened assertions; choose #654 vs #663 and rebase over #655.
Verdict
Worth it with changes.
Full report Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:design-review, performance, duplicate, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:design-review: 86.3% -
triage:review: 13.2% -
triage:validation: 0.2% -
triage:investigate: 0.1% -
none: 0.1% -
triage:integration: 0.1% -
triage:verify-for-closure: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
performance: 98.8% - [✓]
duplicate: 73.1% -
enhancement: 59.3% -
community: 46.9% -
bug: 7.6% -
documentation: 0.1%
Area
- [✓]
area:scheduling: 99.2% -
area:preparation: 1.0% -
area:selene: 0.3% -
area:api: 0.2% -
area:engram: 0.2% -
area:caching: 0.1% -
area:kernels: 0.1% -
area:packaging: 0.1% -
area:memory: 0.1% -
area:rocenante: 0.1% -
area:orbit: 0.0%
Model
-
model:qwen3.8-flash-next: 1.6% -
model:deepseek-v4: 1.4% -
model:deepseek-v4.1: 0.6% -
model:kimi-k3.1: 0.3% -
model:qwen3.8-27b: 0.3% -
model:muse-glimmer: 0.2% -
model:glm-5.3: 0.1% -
model:inkling-small: 0.1% -
model:mimo-v2.6: 0.1% -
model:gemma4: 0.1% -
model:nemotron-3.5-bolt: 0.0%
Apply Labels (Intake)
Applied: +triage:design-review, +duplicate
Subtraction and simplicity
Reviewed PR #663 through the subtraction/simplicity lens: read the full diff (11 files, +511/−40) and checked each new piece of logic against existing helpers.
Verdict: the production surface is honest — no new knob, flag, graph kind, crate or dead field — and mostly lean. Six concrete simplifications remain; three are worth asking for before merge:
- helios/src/scheduler.rs:2677-2702 — the
preserve_first_output_waitpredicate contains a dead conjunct (record.status != 3 && !finished), an unnecessarysaturating_sub, and re-derivesfinished/prefill/outputthat the same loop body defines again at :2742-2745. Hoist the locals once; ~10 lines gone. - helios/src/scheduler/service.rs:150-181 —
b_served * T_decis tracked per slot frombest[slot]then un-derived by squaring (served * served * per_delivery_ms).consider(:111-122) already hasnanos/served; moving the comparison there returnsserved * durationdirectly, once per candidate instead of once per candidate × slot. - helios/src/scheduler/policy.rs:442-464 —
fits_single_prefill_fromre-implements the catalog choice already inprefill_catalog(kind)(:357-363) and duplicatesnatural_fit_prefill_capacity(:413-438) body-for-body. The repo already has_fromvariants for work/kind resolution; a_fromfit search collapses ~20 lines and removes the drift risk in the area #660 also edits.
Lower value: policy.rs:259-281 (set_first_output_wait repeats set_arrival's validation for one caller pair — merge into one setter); utility.rs:93-111 (the #[cfg(test)]-only prefill shim passes consumed.max(1), so the surviving tail test never hits the partial-chunk path; plus two unreachable clamps); docs/scheduling-utility.md:287-318 vs docs/scheduling-runtime-design.md:266-284 (the new contract stated twice, already drifted — keep formula + pointer, per AGENTS.md:188-193).
Positives to say in review: initial_prefill_tokens() is a net simplification, delivery_references's thin wrapper is justified, and the Python mirror's cache shape matches the file's existing idiom.
Open questions: whether prefill_entry(...).is_some() vs duration(...).is_none() is a deliberate "measured vs registered" distinction; whether first_output_wait_ns must be public; when to cut the doc duplication given four docs PRs are open on the same file.
Correctness and contracts
PR #663 is mechanically careful — no race, panic, lock-contention, allocation or unbounded-buffering hazard — but its contract and evidence obligations are not met.
- Blocker: docs/scheduling-theory.md:850-853 still says "First-token waiting has no independent age penalty" while the credit is gated on
decode_age_price = 0.1inPolicyConfig::default()andbalancedis the CLI/docs default (docs/cli-design.md:683, flare-cli/src/cli.rs:859-861) — a shipped default change with no knob and a stale normative doc (the same sentence was a blocker against #654). - Major:
first_output_wait_ns(policy.rs:59) is never published inRequestDetail(metrics/scheduler.rs:55-70 (not opened), runtime.rs:1231-1240), so operators cannot see the clock that now reorders the default policy. - Major:
service.rs:150-181feeds Mixed (prefill+decode) shapes into the per-lanebest[]and promotes that intobest_decode, sob_served * T_deccan include prefill work, contradicting docs/scheduling-runtime-design.md:272-274 and the PR text; live on the Qwen3.8 Flash mixed-capture core used in the PR's own A/B. - Major: tests/test_scheduling_utility.py:388-395 and policy_tests.rs:6843-6862 replaced relative coalescing guarantees (
coal_ttft < base*0.85,end_ms < base*0.95,sub <= base_sub//2) with absolute ceilings; the description only says "updated the burst-coalescing isolation tests". - Major: scripts/scheduling_sim/utility.py:251-259 is not a mirror — it uses
now_ms - last_service_mswith nofirst_output_wait_ns, no anchor preservation, no readmission clamp, plus aview.weightRust lacks. The 21/21 trace-identity and "zero regressions" claims cover the credit term only, not the double-stall fix that motivates the PR. - Minor: ignition/direct/policy.py:114-142 mirrors
RequestAccounting/LaneValueand gained neither field; the credit stacks withcoalescing_prefill_log_bonus(policy.rs:635-650, 729-752) with no test bounding the combination; no lifecycle fixture for the new clock (check.py (not opened) unchanged); no oracleprefill_wait_pricecomparison; SM120 not run.
Open: will a maintainer accept inverting scheduling-theory.md:850 for a non-default-free change; is a silent default acceptable without an observable clock; how much of the 5.9× gain is credit vs anchor preservation (no artifact separates them); merge-order collisions with #654/#661/#655.
Final review
Recommendation: Changes Requested
The core formulation (decode_age_price * (b_served * T_dec) * age_ms * frac) is clean, well-bounded, single-threaded, and avoids the zero-age discontinuity and F > A monotonicity inversion seen in competing PR #654, backed by strong paired GPU A/B results on two model architectures (DeepSeek-V4.1-Flash TP4 and Qwen3.8-Flash-Next TP2). However, it cannot merge as-is: it ships a behavior change into the default --scheduler-policy balanced while leaving explicit normative invariants in docs/scheduling-theory.md:850-851 and docs/scheduling-runtime-design.md:234 directly contradicted (and without maintainer sign-off resolving #663 vs competing opt-in #654), silently allows GraphKind::Mixed shapes to populate the documented pure Decode/Speculative reference b_served * T_dec, and weakens existing burst-coalescing regression tests under balanced.
Merge Risk
Level: Medium
- Default-policy blast radius: Because the new credit is gated on
PolicyConfig::default().decode_age_price(0.1,helios/src/scheduler/policy.rs:35), every default--scheduler-policy balanceddeployment changes prefill-vs-decode ordering with no opt-out short of switching to--scheduler-policy throughput(which also disables decodedelivery_fairnessanddecode_age_price), trading large returning-prompt TTFT wins for disclosed background decode tail-latency increases (+95 msp99 atK=16on DeepSeek-V4.1-Flash;+76 msp99 /+151 msmax atK=16on Qwen3.8-Flash-Next). - Low runtime/safety risk: Production changes are compact (~105 net Rust lines), single-threaded (
&mut self), allocation-free on the hot path, and preserve Protobuf/ABI/prepared-graph compatibility and--scheduler-policy throughputidentity by construction; cancellation,status == 3errors, two-frame pipelining, and preemption/requeue readmission (Carried::last_output_ns) were verified sound. - High branch-conflict / design-fork risk: Competes directly with open opt-in PR #654 across all 11 touched files, overlaps
complete_innerinhelios/src/scheduler.rsanddocs/scheduling-runtime-design.mdwith same-author PR #655 (Ready To Merge), and overlapspolicy.rs/ docs with complementary PRs #660 and #661.
Walkthrough
helios/src/scheduler/service.rs: Extendeddelivery_referencesintodelivery_references_and_decode_batch(:69-183), retainingdelivery_referencesas a.0wrapper (:59-64) and returning the fastest decode cohort work-timeb_served * T_decin stream-ms (0.0when no measured decoder is active).helios/src/scheduler/utility.rs&helios/src/scheduler/policy.rs: AddedRequestAccounting::first_output_wait_ns(policy.rs:59),RequestScheduler::set_first_output_wait(:271-281),fits_single_prefill_from(:442-464), andLaneValue::first_output_value/prefill_within(utility.rs:90-111). Inlane_values(policy.rs:729-752), waiting prompts withconsumed_tokens < prompt_tokens,max_new_tokens > 0,decode_age_price > 0.0, andincumbent_decode_batch_ms > 0.0earn scaleddecode_age_price * incumbent_decode_batch_ms * age_ms(projected across queued prefill submissions, excluded from the common-T/2 * sum(age_price)sum, and threaded throughnext_progressandlane_value_for_tokens_within).helios/src/scheduler.rs&helios/src/server/runtime.rs: ExtractedLiveRequest::initial_prefill_tokens()(scheduler.rs:351-355, replacing inline expressions); preservedfirst_output_wait_nsacross forced interiorRetentionRole::Anchorsplits on single-graph-fitting prompts (scheduler.rs:2681-2702,:2791-2793) while still chargingServicePricetruthfully; carriedCarried::last_output_nsacross parking and readmission (runtime.rs:429,:1575-1577,:2456-2498).scripts/scheduling_sim/utility.py, tests & docs: Added the credit formula toUtilityScheduler(utility.py:158-162,:251-270), added four Rust unit tests (policy_tests.rs:6957-7138) and one Python test (tests/test_scheduling_utility.py:404-424), reworked burst-coalescing isolation tests (policy_tests.rs:6794-6860,test_scheduling_utility.py:363-401), and documented the new term indocs/scheduling-utility.md:287-318anddocs/scheduling-runtime-design.md:266-284.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduler arithmetic, request-accounting timestamps, tests, and docs; no I/O, parsing, FFI, privilege, or untrusted-input surface introduced.
- [WARN] Charter & value fit: Model-agnostic and compact in the right runtime layer with strong served A/B evidence on two architectures, but silently alters the shipped
balanceddefault while contradicting unchanged normative text indocs/scheduling-theory.md:850-851anddocs/scheduling-runtime-design.md:234; hardware validation covers SM121 only (SM120 and oracle reference comparison not run). - [WARN] Related / duplicate / conflict check: Directly competes with open PR #654 (opt-in design for the same term across all 11 files) — maintainers must choose one design; overlaps
helios/src/scheduler.rsanddocs/scheduling-runtime-design.mdwith #655 (Ready To Merge), and sharespolicy.rs/docs with complementary #660/#661. - [WARN] Tests & verification evidence: All new Rust/Python tests are isolated and exercise real production entry points, CI is green, and TLA+ lifecycle conformance passed on head; however, existing
balancedburst-coalescing relative assertions were weakened, and the PR's claimed adversarial stress checks and Python formula-scaling invariants lack committed tests.
Blockers
- Unresolved normative contract contradiction on a shipped default policy (
docs/scheduling-theory.md:850-853,docs/scheduling-runtime-design.md:234,helios/src/scheduler/policy.rs:35)docs/scheduling-theory.md:850-851(untouched by this PR) explicitly states: "First-token waiting has no independent age penalty: prompt work competes by its useful progress and token-service price." Similarly,docs/scheduling-runtime-design.md:234(34 lines above this PR's own edit at:268) still states: "Only decoding requests have a delivery coordinate or output-age cost."- Because the new credit is activated by
PolicyConfig::default().decode_age_price = 0.1(policy.rs:35) — the default--scheduler-policy balanced(docs/cli-design.md:683) — this PR changes default scheduling behavior for every user (including the disclosed+76 msto+95 msbackground decode p99 trade-off atK=16) while leaving normative docs contradicting the runtime and while competing opt-in PR #654 is open for the same term. - Fix: Update
docs/scheduling-theory.md:850-853anddocs/scheduling-runtime-design.md:234(andhelios/README.md:362-364if keeping it in sync) to reflect the new first-output waiting-age term, and obtain explicit maintainer sign-off on enabling this under the shippedbalanceddefault (versus opt-in gating as in #654) before merge.
Should Fix
b_served * T_deccan be sourced fromGraphKind::Mixed, contradicting both docs and inflating credit with prefill duration (helios/src/scheduler/service.rs:150-181,scripts/scheduling_sim/utility.py:153-162)- In
service.rs:150-160, whenkindisDecode | Speculative, all measuredself.mixed_catalogshapes are fed into the same per-slotbest[]array that:168-173then promotes intobest_decode.scripts/scheduling_sim/utility.py:153-162has the same behavior (for graph in measured if decoding and graph.decode_capacity, unlike line:200which explicitly filtersnot g.prefill_capacityfor coalescing). - Both
docs/scheduling-runtime-design.md:272-274("the fastest incumbentDecodeorSpeculativeround's work-time") anddocs/scheduling-utility.md:292-295("the decode or speculative graph minimizingT_dec / b_served") state thatT_decis a pure decode/speculative graph. On mixed-capture cores (qwen3.8-flashwith--mixed-prefill), if a mixed shape winsT / served(e.g. during cold warm-up when pure decode batches are unmeasured, or if mixed declares a larger decode batch capacity),b_served * T_decincludes prefill execution time and inflates the waiting-age credit. - Fix: Compute
best_decodestrictly over the pureDecode/Speculativeloops (service.rs:123-149, before theMixedloop at:150-160), and filternot graph.prefill_capacitywhen computingincumbent_decode_batch_msinscripts/scheduling_sim/utility.py:153-162(which also resolves Subtract/Simplify #2 cleanly).
- In
- Existing
balancedburst-coalescing regression guarantees were dropped instead of preserved (tests/test_scheduling_utility.py:363-402,helios/src/scheduler/policy_tests.rs:6840-6860)tests/test_scheduling_utility.pyremoved the relative coalescing guarantees underbalanced(coal_ttft < base_ttft * 0.85,end_ms < base * 0.95,coal_sub <= base_sub // 2, andburst_eight_lowrelative TTFT/sub-batch checks), replacing them with loose absolute ceilings (coal_ttft <= 600.0,coal_sub <= 2) and softening the movedage_price = 0.0checks to strict<with noburst_eight_lowcomparison. Similarly,policy_tests.rs:6855-6859dropped the simultaneous-arrivalbasecomparison underbalanced.- With first-output waiting age active alongside
coalescing_prefill_log_bonus, nothing in the suite now verifies that enabling coalescing underbalanceddoes not regress TTFT or makespan when stacked with the new credit. - Fix: Restore a non-regression comparison (coalescing-on vs coalescing-off on
burst_eight/burst_eight_lowunderbalanced, asserting makespan and max TTFT do not regress) and keep the stronger margin checks on theage_price = 0.0isolation case.
- Commit simulator tests for the claimed formula properties and adversarial bounds (
tests/test_scheduling_utility.py:404-425)- The PR description reports exact
b_served * T_decscaling, partial-chunkwork / initial_prefilllinearity,output_budget == 0inertness, and two adversarial simulator checks (32 dec / B=4 / 16 promptsholdingconsec_pre = 1, and4 dec / B=1 / 24 promptsexact parity), buttests/test_scheduling_utility.py:404-425only assertsret_row["ttft_ms"] < 400.0andtp_sched._first_output_value == {}atage_price = 0.0. - Fix: Add deterministic pytest coverage in
tests/test_scheduling_utility.pyasserting exactincumbent_decode_batch_msscaling, partial vs completingfrac,output_budget == 0inertness, and the two adversarial stress invariants; also note whether an evaluation against the reference oracle (scripts/scheduling_sim/oracle_sweep.py (not opened) --prefill-wait-price, perdocs/design-review.md:195-208) was run or why it is N/A.
- The PR description reports exact
Subtract / Simplify
- Deduplicate
preserve_first_output_waitand drop dead checks (helios/src/scheduler.rs:2681-2702,:2742-2789)record.status != 3 && !finished(:2691-2692) is redundant becausefinished's first disjunct isrecord.status == 3(:2684)..saturating_sub(request.consumed_tokens)(:2688-2689) is unnecessary because line:2624already rejectsrecord.consumed_tokens < request.consumed_tokens as i64(and:2785uses plain subtraction).record,finished,prefill, andoutputare computed twice in the same loop body. Computing the record-derived fields once (or extracting a small&selfhelperis_forced_anchor_cut(&self, request, record)called beforeself.request_mut(lane.request)) removes ~10 lines and the duplicated 3-disjunctfinishedexpression.
- Track
best_decodedirectly insideconsiderinstead of per-slot squaring (helios/src/scheduler/service.rs:111-181)best_decode.1 * best_decode.1 * best_decode.0(:178) recoversserved * T_decby squaringservedto undo the division inconsider(:116), after comparing once per(candidate × slot)in thereferencesloop (:168-173).- Tracking
best_decode: (f64, f64, u64)((cost, served, nanos)) once per candidate inside the pureDecode/Speculativepath returnsserved * nanos as f64 / 1e6directly, removes ~8 lines, avoids per-slot redundant comparisons, and solves Should Fix #1 in one edit.
- Collapse
fits_single_prefill_fromonto a_fromvariant ofnatural_fit_prefill_capacityandprefill_catalog(helios/src/scheduler/policy.rs:357-363,:413-464)fits_single_prefill_from(:442-464) repeats the 3-way catalog selection already inprefill_catalog(:357-363) and repeats the scan body ofnatural_fit_prefill_capacity(:413-438). Verified inhelios/src/scheduler/cost.rs:639-670and:761-771thatcosts.prefill_entry(resolved, capacity).is_some()andcosts.duration(resolved, 1, capacity).is_some()are behaviorally identical.- Generalizing
natural_fit_prefill_capacitytonatural_fit_prefill_capacity_from(request, start, catalog, cut)(matching the existingprefill_work_from/resolve_prefill_kind_from/prefill_requires_terminal_completion_frompattern) removes ~20 lines of parallel logic in the exact area PR #660 also modifies.
- Fold
set_first_output_waitintoset_arrival(helios/src/scheduler/policy.rs:259-281,helios/src/server/runtime.rs:1574-1577)set_first_output_waithas one production caller (runtime.rs:1576), always invoked immediately afterset_arrival, duplicating the validation guard and slot lookup while introducing an implicit call-order trap (callingset_first_output_waitbeforeset_arrivalwould silently clobberfirst_output_wait_ns). Acceptingfirst_output_wait_ns: Option<u64>(or a singleset_arrival_and_wait) deletes a public method and removes the ordering hazard.
- Trim duplicated contract prose in
docs/scheduling-runtime-design.md:272-284- The 13-line explanation repeats
docs/scheduling-utility.md:287-318(and already diverges slightly in phrasing, e.g., omittingprompt_logprobs). Keep the added formula line at:268, fix:234, and point toscheduling-utility.mdfor the detailed definition ofA_first,frac, and inertness rules, matching neighboring paragraphs (:235).
- The 13-line explanation repeats
Nits
helios/src/scheduler/utility.rs:94-110: Delete the#[cfg(test)] pub fn prefillshim (only called atutility.rs:410-412; callprefill_within(64, 64, true)directly) and drop the redundant outer.min(1.0)at:106(already guaranteed byinitial_prefill.max(consumed).max(1)in the denominator).helios/src/server/metrics/scheduler.rs:55-64&helios/src/server/runtime.rs:1231-1240: Consider exposingfirst_output_wait_nsinRequestDetailalongsidelast_progress_ns/last_output_nsif operators need to inspect anchor-cut wait-clock preservation in the scheduler trace dashboard.
Dropped on verification
- Correctness Finding 3 (
requeue()misseslast_output_nsclamp): False. Both callers ofrequeue()(runtime.rs:2874,:2924) only execute when the current admission hasgenerated_tokens == 0, andrequeue()preservesactive.carried(runtime.rs:2954), so any previously parked request retains itscarried.last_output_nsacross requeues. - Correctness Finding 6 sub-claim (
first_output_valueis outsidescale): False.policy.rs:678includesself.policy.decode_age_price.ln()inscaleand:768scalesvalue.first_output_value *= unit, matchingdecode'sage_price * reference_delivery_ms * age_msidentically. - Correctness Finding 11 sub-claims (
view.weightand_initial_prefilldiverge inscripts/scheduling_sim/utility.py): False. Every term inutility.py(:178,:188,:195,:239,:257,:296) intentionally multiplies byview.weightfor weighted-request simulation, and_initial_prefill(:146-148) capturesview.remaining_prefillon first appearance, which equals Rust's uncachedinitial_prefill_tokens(). - Correctness Finding 2 severity (
RequestDetailmissingfirst_output_wait_nsas Major): Downgraded to Nit.RequestDetailis an internal dashboard trace snapshot that also omitsarrival_nsandterminal_since_ns, not a blocking observability regression. - Correctness Finding 9 (
ignition/direct/policy.pymirror drift): Low-signal.docs/scheduling-runtime-design.md:15-17explicitly scopesignition/direct/to decode rounds only (it already omitsterminal,prefill, and coalescing). - Correctness Finding 12 (missing TLA+ lifecycle fixture for
first_output_wait_ns): Low-signal. The TLA+ lifecycle models verify discrete ownership/fencing/phase safety, not continuous priority timestamps likelast_progress_nsorfirst_output_wait_ns;check.py(not opened) was re-run and passed on head. - Dossier claim (
fits_single_prefill_fromrequires a "measured" graph): Inaccurate. Verified incost.rs:654-670thatprefill_entry().is_some()checks catalog registration (measured or unmeasured), matchingduration().is_some()and the PR's own wording ("eligible prefill graph").
Classify triage
Selected: triage:design-review
Threshold: 65%
Triage
- [✓]
triage:design-review: 85.1% -
triage:review: 14.8% -
none: 0.0% -
triage:validation: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:superseded: 0.0%
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.