#1 [high] Change: what PR #693 actually does (file:line map)
PR #693 (open, ready for review, head a9f7dd7, base main, opened 2026-12-02, 3 files +502/-51: helios/src/scheduler/policy.rs +177/-46, policy_tests.rs +294, rounds.rs +31/-5). No comments, no reviews, no CI checks.
What it does at head:
- New
pub(super) struct CurveCache { optimistic: bool, entries: [Option<Vec<f64>>; REQUEST_LANES] }withnew(optimistic),get_or_insert_with(slot, optimistic, build)guarded bydebug_assert_eq!(self.optimistic, optimistic, "CurveCache cannot mix optimistic and non-optimistic survival curves"), and cfg(test)is_cached(policy.rs ~98-127). candidates()allocates oneCurveCache::new(false)per pass and shares it acrossmixed_candidates_with_curves,packed_round_candidates_with_curves, and every non-prefilladd_candidate(policy.rs:1641-1705).cached_expected_tokens(r, tokens, curves)returnsf64::from(tokens != 0)for tokens<=1, elseforecast_tokens(cache-or-build curve, tokens); withNoneit falls back toself.expected_speculative_tokens(policy.rs:1387-1404).lane_valuekept (nowpub(super), uncached, passesNone),cached_lane_value/cached_lane_value_withinadded,lane_value_for_tokens_withinkeeps its 6-arg signature and delegates withNone(policy.rs:1406-1524).next_progress,prerequisite_value,add_candidate,continuation_candidate,mixed_candidates_with_curves,phase_planall thread&mut CurveCache(policy.rs:896-1033, 1021-1029, 1092-1101, 1272-1283, 1564-1632, 1718-1772, 2117-2123).powered_curvereturns the survival vector unchanged whenadaptive_verification_alpha == 1.0and increments a cfg(test) thread-localCURVE_EVALUATIONScounter (rounds.rs:633-645);proposal_forecast_tokensshort-circuits width<=1 (rounds.rs:626-631);packed_round_candidates_with_curvesskips lanes whose speculative limit is <=1 and takesCurveCacheinstead of a local array (rounds.rs:842-850, 892-895). No config, wire/protobuf, core-format, dependency or documentation changes; no docs file touched.
#2 [high] Change: undeclared restructure in next_progress and mixed_candidates cache tag
Not stated in the PR description:
next_progressis restructured, not just threaded: the mixed-shape decode pricing moved inside the speculative branch and that branch nowreturnsbestearly (policy.rs:957-981), while the Resume/no-speculation branch keeps a single mixed loop whose decode price is hard-codedvalue.decode(1.0, ...)(policy.rs:1008-1010). On main that value wasif self.speculative_widths.is_empty() { 1.0 } else { forecast_tokens(mixed_curve, tokens) }(main policy.rs:959-968; result 12). Equivalent only because the first branch fires whenspeculative_widths.is_empty() || generated_tokens == 0and the mixed decode arm also requiresgenerated_tokens > 0; worth confirming by the reviewer, description only says "next_progress reuses cached_expected_tokens".mixed_candidateswrapper always buildsCurveCache::new(false)even whenoptimistic == true(policy.rs:1714), whereaspacked_round_candidatesbuildsCurveCache::new(optimistic)(rounds.rs:844). Harmless today because the optimistic mixed branch never touches the cache (policy.rs:1770 usesoptimistic_tokens), but the tag is nominally inconsistent and any future optimistic mixed pricing would trip thedebug_assert_eq!.lane_valuevisibility widened from private topub(super)(policy.rs:1406) purely so the new test can call it;lane_value_withinwas renamed tocached_lane_value_within.- The pre-existing comment in packed_round_candidates on main ("Lane forecasts stay fixed while shapes compete; evaluate each at most once", main rounds.rs:830-834) is deleted and replaced by a doc comment on
packed_round_candidates_with_curves(rounds.rs:848). next_progressnow allocates a freshCurveCache::new(false)(8-slot Option<Vec> array) on every call that arrives withNone(policy.rs:958), i.e. allprerequisite_valuepaths.CurveCacheindexes byr.handle.slot as usizeinto aREQUEST_LANES-sized array (policy.rs:1399) — same slot-index convention as the existingvalues[slot]arrays.
#3 [high] Verification: equivalence of the short-circuits (tokens<=1, alpha==1.0)
Verified by reading code (not by running):
forecast_tokens(powered, width) = f64::from(width != 0) + sum(powered[..width-1])(rounds.rs:1016-1019). For width 0 -> 0.0, width 1 -> 1.0, socached_expected_tokens'tokens <= 1 => f64::from(tokens != 0)(policy.rs:1393-1395) andproposal_forecast_tokens'width <= 1return (rounds.rs:626-631) are exactly equal to the old curve path, no rounding difference.GraphKind::Decodealways yieldslane_tokens == 1(policy.rs:1379), so a non-speculative Decode pass now never builds a curve — this is the "decode-only builds no forecast curve" claim and it is exactly equivalent, not approximate.powf(p, 1.0)is exactlypfor finite, infinite, NaN and signed-zero p, so thealpha == 1.0early return inpowered_curve(rounds.rs:638-640) preserves bits; default alpha is 1.0 (policy.rs:41), and alpha is validated finite and >0 (policy.rs:267). The existing fixed-width packed path already special-cases alpha==1.0 the same way (rounds.rs:872-873).- packed_round_candidates' new
if limit <= 1 { continue; }(rounds.rs:892-894) drops no ranking entries: the following loop isfor position in 0..limit.saturating_sub(1), which pushes nothing for limit 0 or 1. Caveat: none of this was executed here (no cargo run available to this review); the PR reports 1839 helios lib + 62 integration tests passing, including a dedicated cached-vs-uncached equality test (cached_lane_pricing_matches_uncached_for_unit_and_fractional_alpha, policy_tests.rs ~9500-9780) that asserts bit-equality of candidate keys andValueRate::score.to_bits().
#4 [high] Why: issue #547 is the origin, its patch is this change, filed by a different person
#547 "Scheduler: candidate pricing rebuilds each decoding lane's speculative curve for every shape it prices", opened 2026-11-26 20:21 by shieldstar (Discord shieldstarx), labels area:scheduling, performance, triage:validation; still open; 0 discussion; refers to #188; referred to by #540 and #693. PR #693 says "Fixes #547" and its Discord is jcartu — a different person, so the PR adopts someone else's issue and its attached full patch.
#547's own patch (in the issue body, "applies to 966df82e") is the same design: cached_lane_value with caller-owned &mut Option<Vec<f64>> per lane, candidates()/phase_plan() one cache per pass, mixed_candidates per-call cache, powered_curve skipping powf at alpha 1. Differences in #693: named CurveCache struct with debug_assert mode tag and slot-indexed array (vs per-call [Option<Vec<f64>>; REQUEST_LANES]), lane_value_for_tokens_within wrapper keeping the old signature, tokens<=1 short-circuit placed in a shared cached_expected_tokens, an extra limit<=1 skip in packed_round_candidates_with_curves, and four tests instead of three.
#547's own reproduction numbers (before fix): "decode-only candidates built 16 forecast curves", "a waiting Init added 256 curve evaluations for 4 decoding lanes", "mixed candidates made 20 curve evaluations for 4 decoding lanes".
#547's motivation evidence is a perf record sample on a GB300 aarch64 host serving DeepSeek-V4.1-Flash with MTP: 5.48% libm.so.6 pow@@GLIBC_2.29 on the flare-model thread — from a downstream tree, stripped binary, no call graph, so the profile cannot attribute pow to this path (issue says so itself). PR #693 reuses that number as its Why; PR #693 measures only host-side CPU.
#547 also notes #188 had already introduced once-per-lane curves in packed_round_candidates, next_progress and service_rates; #693 extends it to the remaining three call sites.
#5 [high] Related work: #188 is the direct predecessor; #540 nearly landed the same fix
- #188 (merged 2026-11-03, voipmonitor, +391/-80, 7 files incl. policy.rs/rounds.rs/policy_tests.rs): "Remove repeated work from scheduler planning" — the origin of the once-per-lane curve cache. Its change list includes "Packed rounds ... evaluate lane curves once per call and priorities once per shape"; its problem statement is the same: "planning runs on the model worker thread, which does not poll completions while it plans". It reported live service gains (+2.6% tok/s over 40 cells) and byte-identical traces over ~210k plans. #547 and #693 are the continuation of #188 for the callers #188 left out.
- #540 (merged 2026-11-29, FujitsuPolycom, 11 files) is where shieldstar's related finding first landed: in its comment thread shieldstar proposed reusing a single forecast for both the duration-priced and zero-duration (
refresh_expected) mixed/decode values, plus the#[cfg(test)] CURVE_EVALUATIONScounter and two call-count tests (mixed_refresh_value_reuses_each_decoding_lanes_forecast,decode_refresh_value_reuses_each_decoding_lanes_forecast). FujitsuPolycom folded it in at e5a69669; the Autobot review of that PR then recommended deleting the CURVE_EVALUATIONS counter and its two tests under "Subtract/Simplify". - Checking main (result 43/50): neither
CURVE_EVALUATIONSnorzero_durationexists on main today — the counter and the zero-duration reuse did not survive intomain, so #693 re-introduces aCURVE_EVALUATIONScounter that a prior review asked to delete, and the double pricing #540's fix targeted (add_candidate duration + zero-duration value) is still on main. - #547's comment in #540 states: "This is independent of #547. If #547 lands too, the forecast here would come from its per-pass curve cache" and warns "whichever lands second needs a small rebase."
- Files-overlap with #693 (related_items): #656, #644, #620, #510, #555, #188 (3 files each), #681, #663, #661 (2 files); closed: #654, #542, #632, #521. Open pull requests touching policy.rs/policy_tests.rs that would conflict: #571 (malventano, "force a wide round after persistent width-one selection"), #621 (jcartu, admission validation, touches policy_tests.rs), #334, #306, #301.
#6 [high] Project fit: charter #210 / design-review rule 12 want served evidence; PR measures host CPU only
Charter (read_charter) says performance PRs "need benchmarks showing an actual speedup over main on a served workload (#210)"; "Bug fixes need to address the root cause"; "Keep the runtime small and model-agnostic" (Helios = scheduling/caches/requests, no per-model branches); "Be explicit and pin everything"; expected PR description = why / what changed / claimed result / evidence.
docs/design-review.md:106-115 (rule 12): "Performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements ... Comparisons against other runtimes must use exported cores with flare run". docs/design-review.md:196-203: changes to "selection, service pricing, timing estimation, refresh or exploration" require a scripts/scheduling_sim/ evaluation with the validation catalog.
Fit: #693 is exactly the model-agnostic Helios scheduling layer the charter protects — no per-model branch, no flag, no wire/ABI change, four-part description. Gap is evidence: PR says "No standalone GPU serving throughput or latency improvement is claimed"; numbers are host-side CPU pricing microbenchmarks, not the served-workload / actual Helios service measurement rule 12 asks for (contrast #188, which reported live tok/s +2.6%). The Python work it ran is the utility-policy simulator CLI (21 deterministic workloads) and the scheduling_sim test suites, not the learning.py validation catalog at design-review.md:196-203.
No benchmark harness exists for this path (helios/benches/ holds only template.rs), so the component timing table is ad hoc (7 runs x 5,000 iterations) and was collected against c513e46a before the rebase onto cc0a49d2.
#7 [high] Claims and evidence: what PR #693 claims vs what backs each claim
Declared (PR body): helios 1839 lib + 62 integration tests 0 failed (90 ignored); flare 246+8; flare-cli 219+26; 837 Python scheduling tests; scripts/scheduling_sim --policy utility --decode-values 64 ... --mixed 21 workloads; verification/helios-lifecycle/check.py (TLC 2.19) all pass. Component CPU table: 117,240 -> 44,866 ns (2.61x) for 8-slot speculative + waiting Init; 3,940 -> 730 ns (5.40x) mixed_candidates; 4,350 -> 958 ns (4.54x) non-speculative candidates. Disclosed limits: no GPU serving benchmark; Kani not run; table measured against c513e46a before rebasing to cc0a49d2.
Not backed by anything in the PR: the CPU table has no script, harness or command line (contrast #188/#681, which cite benchmark repos and configs), and helios/benches/ contains only template.rs, so those numbers are not reproducible from the PR. The pow@@GLIBC_2.29 5.48% figure is inherited from #547, and #547 states the profiled binary was stripped, from a downstream tree, with no call graph, so pow cannot be attributed to this path.
Test evolution: #547's patch reported "371 passed" scheduler tests and used ≤/relative thresholds (with_init - without_init <= decoding.len()); #693 replaces them with exact equalities (assert_eq!(evaluations, decoders.len())) and adds a 4th test cached_lane_pricing_matches_uncached_for_unit_and_fractional_alpha (policy_tests.rs ~9585-9780) asserting bit-equality of candidate keys (c.rate.score.to_bits()), cached vs uncached lane values at widths 0/1/2/4/8, no cache entry for a 1-token lane, decode-only zero curve, tie-breaking to the lower slot, and plan() winners at alpha 1.0 and 0.6.
Verifiable at head by reading: counter (rounds.rs:635-636), the four tests (policy_tests.rs:9490-9780), the debug_assert mode tag (policy.rs ~117-121). Not verifiable here: that any suite actually ran — orientation packet says "CI on the head commit: no checks".
#8 [high] People: jcartu's record, shieldstar's role, area regulars, no engagement yet
- jcartu (CONTRIBUTOR), Discord jcartu, author of #693. Last 180 days: 3 merged, 3 closed, 10 open. Merged work touched docs (3), helios/src (3), heliopause/src (1), helios (1), helios/proto (1) — mostly docs/small fixes rather than scheduler core. Open PRs opened 2026-12-02 unless noted: #692, #691, #690, #689, #688, #687, #686, #642 (2026-11-30), #621 (2026-11-29, touches policy_tests.rs); #520 closed.
- shieldstar (Discord shieldstarx) filed #547 with the full patch, reproduced the
powprofile on GB300 aarch64, and pushed the related zero-duration fix in #540. Not credited in #693's description, which only says "Fixes #547"; 0 comments on #693, so there is no recorded endorsement or objection to the reimplementation. - Baseline commit
c513e46ain the PR's timing table is unreadable in this checkout (git: "cannot simplify commit ef38cb9395..."), so the baseline tree cannot be inspected; orientation packet adds "Commits on the default branch since this PR branched (cc0a49d), touching its changed files: none". - Area regulars (nobody has commented on #693): lukealonso (#656, #645, #644, #620, #619, #510, #613, #569, #568), FujitsuPolycom (#681, #661, #665, #660, #582, #538, #540 — merged #681 the same day #693 opened), voipmonitor (#188, #555, #522, #515, #479; priority contributor per charter), yatesdr (#663, #459, #655, #674, #694), original-el8 (#426, #473, #632, #306; priority contributor).
- Community interest: 0 comments, 0 reviews, no labels, no reactions on #693; 0 discussion on #547. Contrast #681 and #540, which drew multi-round Autobot reviews and maintainer replies.
#9 [high] Process and reach: ready-for-review, no CI, heavy concurrent churn, paths left uncached
Process: #693 open, "ready for review", opened and last updated 2026-12-02, head a9f7dd7, base main, 3 files +502/-51, labels none, reviews none, "CI on the head commit: no checks". Only link is "Fixes #547".
Recent activity in the same code: #681 merged 2026-12-02 (same day #693 opened) by FujitsuPolycom, touching coalescing_prefill_log_bonus in policy.rs (+16/-18, ~:599-679); #661, #663, #665, #660, #656, #645 all merged recently and all touch policy.rs / policy_tests.rs / rounds.rs, i.e. the same file regions and in several cases the same functions (lane_value, continuation_candidate, mixed_candidates). #693 therefore builds directly on that churn; main has no commits on its files since it branched, so no conflict yet, but open PRs editing the same files will conflict textually: #571 (policy.rs + policy_tests.rs), #621 (policy_tests.rs), #334 (policy.rs), #306 (policy_tests.rs + rounds.rs).
Reach/risk: single-threaded &self scheduler arithmetic; no unsafe; allocation is one [Option<Vec<f64>>; REQUEST_LANES] per pass plus at most one Vec<f64> per decoding lane; no config/default/CLI, no wire/protobuf/core-format, no CUDA graph, no dependency, no docs touched. Intended to be bit-identical in behaviour; the only operator-visible effect is less CPU time on the model worker thread that plans (the thread #188 documents as unable to poll completions while planning). Defaults unchanged: adaptive_verification_alpha: 1.0 (policy.rs:41), so the alpha short-circuit is the default path; alpha is validated finite and positive (policy.rs:267).
Cache-safety invariant: the PR justifies reuse because request and forecast state are immutable during a pass; in code candidates takes &self (policy.rs:1634-1639), so this holds by the borrow checker, and packed_round_candidates_with_curves already depended on the same invariant on main (main rounds.rs:830-834, the deleted "Lane forecasts stay fixed while shapes compete" comment).
Coverage gap worth noting: add_prefill_candidate/resize_prefill (policy.rs:1947-2007) still price decoding lanes via uncached lane_value (policy.rs:1993-1999), and coalescing_prefill_log_bonus still calls powered_curve per decoder per pass (policy.rs:658-672) — both remain outside the cache, so the change does not make every per-pass curve evaluation single-shot; #547 noted the resize_prefill double-pricing as deliberately left alone.