Opened by a workflow run, Dec 1, 2026 2:03 PM EST.
Classify draft
Selected: bug, performance, area:scheduling
Threshold: 65%
Priority
-
none: 99.4% -
priority:P2: 0.5% -
priority:P1: 0.2%
Type
- [✓]
performance: 98.6% - [✓]
bug: 79.8% -
community: 22.3% -
enhancement: 2.0% -
duplicate: 1.4% -
documentation: 0.3%
Area
- [✓]
area:scheduling: 99.2% -
area:orbit: 10.7% -
area:preparation: 10.7% -
area:api: 9.5% -
area:caching: 2.9% -
area:memory: 1.6% -
area:kernels: 1.4% -
area:selene: 0.5% -
area:packaging: 0.2% -
area:rocenante: 0.2% -
area:engram: 0.2%
Model
-
model:qwen3.8-flash-next: 4.7% -
model:deepseek-v4: 3.3% -
model:deepseek-v4.1: 3.3% -
model:kimi-k3.1: 0.9% -
model:inkling-small: 0.6% -
model:muse-glimmer: 0.4% -
model:glm-5.3: 0.4% -
model:nemotron-3.5-bolt: 0.3% -
model:qwen3.8-27b: 0.3% -
model:gemma4: 0.1% -
model:mimo-v2.6: 0.1% decide malicious: all_clear (100%): No malicious content found
explore
Author: FujitsuPolycom (CONTRIBUTOR; 15 merged / 11 closed / 3 open PRs in 180 days; Discord "Dooner")
Motivation: For interior conversation anchors, the checkpoint_extra_work_fraction knob was discontinuous: at 0.0 an anchor was kept only if splitting prefill cost nothing, but at any nonzero fraction (including the default 0.05) the anchor was pushed unconditionally with split_ns: 0, adding a padded prefill launch whose cost was never charged. This PR prices that split and only keeps the anchor when it fits the existing allowance.
Scale: +740 / −127 lines in 11 files (production code ≈ +60/−51 in checkpoints.rs; the rest is inline tests, 3 docs, check.py).
Proposal:
- Replace
anchor_split_is_zero_cost() -> boolwithanchor_split_ns() -> Option<(u64,u64)>(whole interval + split overhead) and rename the latchzero_budget_anchor→budgeted_anchor. - Keep an interior
raw_anchor < prompt_tokensonly whensplit_ns == 0orextra_spent_ns + split_ns <= allowance(initial_prefill_ns.unwrap_or(whole), fraction); otherwise fall back toprompt_tokens. - Charge a retained anchor's split to
Cut.split_nsandreserved_ns(copy_ns: 0), so it now feedscheckpoint_extra_work_ns. - Add an early-return guard so an already-charged, unreached Anchor cut survives multi-chunk steps and
revoke_unused_anchor_guards(); filter earlier Message cuts byend < raw_anchorinstead ofend < anchor. - Update three design docs plus the
check.pymutation string; no flags, ABI, Protobuf orunsafe. Touches: helios/src/scheduler/checkpoints.rs(anchor pricing, cut emission, reservation accounting, promotion latch)helios/src/scheduler/{tests,boundary_tests,checkpoint_lifecycle_tests,policy_tests,vision_window_tests}.rsandhelios/src/server/runtime/phase_tests.rs(existing fixtures re-tuned)docs/{cli,core,scheduling-runtime}-design.md(not opened),verification/helios-lifecycle/check.pyRelated items:- #582 helios: avoid splitting prefill on zero-budget checkpoint anchors (merged): direct predecessor by the same author; fixed only the
fraction == 0.0arm — this PR supersedes one of its behaviours - #69 Absorb a short final message segment into the prefill chunk (closed): same padded-tail complaint; its review asked for exactly this allowance-based rule
- #655 helios: retain measured snapshot cost after expiry (open): parallel edit to
checkpoint_selection_uncached, at Ready-To-Merge; rebase collision - #292 (closed): opposite-direction user report on the same knob at the default 0.05
- #661, #654, #663 (open): adjacent scheduler work by the same author and others; #663 cites #660 as complementary
Link: https://github.com/NVIDIA/hyperflare-inference/pull/660
Autobot comments: The PR body exists in two materially different versions — one A/B "atop
571a4471, not re-run on22cac916834f", the other claiming an exact-candidate A/B versus5d53040ewith different workload tables; the reader cannot tell which table is current. Six existing test fixtures/files were re-tuned to non-default fractions (0.1–1.0), i.e. the tests encoded the behaviour being labelled a bug. Charging the anchor split consumes headroom that previously funded optional Message/Endpoint captures (visible in the diff's own rewritten assertion,reserved_ns115 → 134, endpoint 640 dropped), andcheckpoint_extra_work_nanoseconds_totalnow counts anchor splits for the first time — neither is mentioned.helios/README.md:372-380was not updated. No CI on the head commit, no reviews, no comments, draft state, notriage:reviewlabel;kani, gated templates and the scheduling simulator are unaddressed.
Value Proposition
Value Proposition — PR #660 (helios/scheduler: budget interior conversation-anchor splits)
Charter alignment — good. The change removes a special-case exemption rather than adding surface: no new flag, config key, ABI, or unsafe, no per-model branch (charter: "keep the runtime small and model-agnostic"). It makes the interior conversation anchor obey the request-local work allowance that docs/core-design.md and docs/scheduling-runtime-design.md already document for Message/Endpoint extras, which is "solve the right problem in the right place." It addresses a measured cost with a reproducible scenario and answers a predecessor review request (#69 asked that a token threshold be folded into the existing allowance). It is not a non-goal and does not encroach on recipe ownership.
Novelty — genuinely additive, but on contested ground. #582 (merged, same author) fixed only the fraction == 0.0 arm and left nonzero fractions pushing split_ns: 0 uncharged; #660 finishes that discontinuity. So it is neither obsolete (#582 didn't fix the default 0.05 path) nor superseded — #655 is a parallel rewrite of checkpoint_selection_uncached, not a fix for this defect, and #663 explicitly calls #660 complementary. The cost is a near-certain rebase against #655 (already "Ready To Merge"), i.e. sequencing friction, not duplication.
Value vs cost — plausible, but the evidence is not yet reviewable. The benefit targets an ordinary default (0.05 in policy.rs), so it affects every deployment that never sets the flag, and the mechanism (anchor split now charged to reserved_ns, competing with Message/Endpoint extras) is verified in the diff. But the dossier shows two materially different PR bodies; one self-declares the A/B ran atop four-merge-old 571a4471 and "not re-run on 22cac916834f." There is no CI on the head, no review, no variance or repeat counts, and a disclosed mixed-c32 regression (93.9 → 71.0 tok/s, >250 ms gaps 215 → 434) appears in only one body version. Maintenance debts are concrete: six existing fixtures were re-parameterised to fraction: 1.0, so coverage of the changed default path now rests mainly on new inline tests; checkpoint_extra_work_nanoseconds_total and flare_checkpoint_skips_total change meaning without mention; helios/README.md:372-380 was left stale while the three design docs were updated; kani/gated templates are unrun with no N/A argument for scripts/scheduling_sim; the Design-Signed-Off-By trailer is unverified.
Verdict: Worth it with changes. The direction and layer are right and the blast radius is small, but the PR is not yet decidable. Before review effort: publish one authoritative body with a fresh A/B on 22cac916834f against current main (repeats, plus framing of the per-user regression); restore default-0.05 fixture coverage; disclose metric movement and update the README; run or explicitly justify the skipped checks and confirm the design-sign-off trailer; rebase/sequence behind #655.
(No instruction-like content directed at the reviewer was found in the PR material or dossier.)
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, performance, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 92.6% -
triage:validation: 5.2% -
triage:design-review: 1.9% -
triage:investigate: 0.1% -
none: 0.1% -
triage:partial: 0.0% -
triage:integration: 0.0% -
triage:superseded: 0.0% -
triage:verify-for-closure: 0.0%
Priority
-
none: 95.9% -
priority:P2: 2.6% -
priority:P1: 1.5%
Type
- [✓]
performance: 99.6% -
bug: 62.2% -
community: 37.8% -
duplicate: 11.9% -
enhancement: 9.5% -
documentation: 0.0%
Area
- [✓]
area:scheduling: 99.0% -
area:caching: 8.5% -
area:api: 5.3% -
area:preparation: 3.3% -
area:orbit: 1.1% -
area:engram: 1.0% -
area:selene: 1.0% -
area:memory: 0.8% -
area:rocenante: 0.1% -
area:kernels: 0.1% -
area:packaging: 0.0%
Model
-
model:deepseek-v4.1: 6.8% -
model:nemotron-3.5-bolt: 1.0% -
model:deepseek-v4: 0.4% -
model:kimi-k3.1: 0.4% -
model:inkling-small: 0.3% -
model:glm-5.3: 0.2% -
model:gemma4: 0.1% -
model:muse-glimmer: 0.1% -
model:qwen3.8-flash-next: 0.1% -
model:mimo-v2.6: 0.0% -
model:qwen3.8-27b: 0.0%
Apply Labels (Intake)
Applied: +triage:review
Subtraction and simplicity
Subtraction/simplicity review of PR #660 at head 22cac91. The production diff is lean — no new flag, config key, ABI, unsafe, or fallback layer; the anchor_split_is_zero_cost → anchor_split_ns change is a strict collapse (six early-return arms become ?); the zero_budget_anchor → budgeted_anchor rename is complete. Nothing should be reverted.
Four simplifications:
- HIGH — the anchor-affordability rule exists twice with undisclosed differences:
checkpoints.rs:509(split_ns <= allowance(whole, fraction), ignores spent work) vs:588-598(allowance(initial_prefill_ns.unwrap_or(whole), fraction)plusextra_spent_ns). Oneanchor_split_affordable(whole, split_ns, spent_ns, fraction)helper removes ~8 duplicated lines and makes the one real difference an explicit argument. This is the same two-site divergence that produced both #582 review blockers. - MED —
before.saturating_add(after).saturating_sub(whole)is spelled out atcheckpoints.rs:438-441and again at:685-701; onesplit_overhead_nshelper prices both, so anchor and extras cannot drift. - MED —
tests.rs:3305-3318andboundary_tests.rs:74-85paste the same 8-line "free aligned splits + fraction 1.0" block, andprefill_graphs(&[64,128,256,512])appears three times; hoist onezero_split_prefill_graphsbesideduration_graphs(tests.rs:157), following the existinglinear_checkpoint_costsprecedent (boundary_tests.rs:175-182). Alsophase_tests.rs:1539-1546rewrote a whole scenario (prompt 13/boundary 10 → chunk-aligned) where a one-line fraction override would have preserved unaligned-prompt-end coverage. - MED-LOW — the rule is restated near-verbatim in
docs/core-design.md:1436-1461,docs/scheduling-runtime-design.md:614-638anddocs/cli-design.md:696-710, whilehelios/README.md:372-382— the fileAGENTS.md:227names as required reading for scheduling changes — was left contradicting core-design (it still says the anchor is not gated and that extra captures "charge snapshot-copy cost"). Compress the runtime-design passage to a cross-reference and fix the README.
Minor: two lifecycle test names and one check.py mutation label still say "zero budget" after the rename.
Deliberately not flagged as removable: the split_ns == 0 || short-circuit at :591 (load-bearing, test-pinned) and the multi-chunk guard at :533-546 (preserves already-charged Anchor cuts; two tests).
Open: are the two budget bases intentional? Was the phase_tests rewrite forced? Should the third doc restatement be a cross-reference?
Correctness and contracts
PR #660 is well aimed and mostly sound, but the new anchor pricing is duplicated in two places that now disagree, and it changes an operator metric and the test baseline silently.
Findings (most important first):
- Major — two divergent anchor-budget rules.
request_anchor_endpointprices fromprice_startagainstwholeand ignoresextra_spent_ns(checkpoints.rs:500-516);checkpoint_selection_uncachedprices frominitial_prefill_nsand subtractsextra_spent_ns(checkpoints.rs:588-597).mainagreed because both were unconditional above zero (main checkpoints.rs:459-464, :577-579). Sinceis_request_anchor_endpoint(checkpoints.rs:519-522) drivesRetentionRole::Anchorat scheduler.rs:1797 and Anchor copies are ungated (checkpoints.rs:971-973), a planner-declined interior checkpoint can be promoted to Anchor rank and copied uncharged — the over-ranked-Anchor class that blocked #582. - Major —
flare_checkpoint_extra_work_nanoseconds_totalchanges scope (checkpoints.rs:899-908 vs mainsplit_ns: 0; docs/api.md:356-357, metrics.rs:852 unchanged);work_budgetskips move too. Neither body nor docs mention it. - Major — shipped default
0.05loses pre-existing coverage: fixtures re-baselined to1.0(tests.rs:3313-3318, boundary_tests.rs:81-85, checkpoint_lifecycle_tests.rs:156-161, policy_tests.rs, vision_window_tests.rs, phase_tests.rs); the TLA+ lifecycle conformance test now runs only at1.0. - Minor — helios/README.md:372-380 still states the pre-PR anchor contract while all three design docs were rewritten.
- Minor — check.py:672-677 only renamed its mutation; nothing kills a mutant of the new budget comparison or guard.
- Minor (conditional) — anchor split can be charged twice after preemption (
clear_reservationsat checkpoints.rs:48-51 keepsextra_spent_ns; new guard at :533-546 needs a live cut). - Claim accuracy: the "0 checkpoints.rs edits in
571a4471..5d53040e" caveat does not isolate #656/#628; no repeats/variance; unknown-cost arm at fraction > 0 (checkpoints.rs:599) is untested.
Sound: no new locks/allocations/blocking (single-threaded &mut self, thread-local selection cache), no new flag/ABI/unsafe, and end < raw_anchor (checkpoints.rs:645) genuinely closes a duplicate-capture path from #582.
Open: which budget basis should win; whether the mixed-c32 per-user regression is acceptable; whether dropping the late Endpoint capture is intended; sequencing against #655.
Final review
Recommendation: Changes Requested
The core scheduler change in helios/src/scheduler/checkpoints.rs is lean, well-motivated, and well-tested—closing the fraction == 0.0 vs. nonzero-fraction discontinuity for interior conversation anchors without adding flags, config knobs, ABI surface, or unsafe, backed by strong 4× RTX PRO 6000 A/B results on 22cac916834f vs. 5d53040e. However, generalizing the anchor check from 0.0 to arbitrary fractions left two anchor-decision sites (request_anchor_endpoint vs. checkpoint_selection_uncached) using different budget bases and spent-work rules, and helios/README.md (required reading for scheduling changes per AGENTS.md:227) was left contradicting the new contract. Fixing those two items will make this ready to land.
Merge Risk
Level: Medium
- Default-path behavior shift: Changes interior anchor retention under the shipped default
checkpoint_extra_work_fraction = 0.05(helios/src/scheduler/policy.rs:40(not opened)), trading interior anchor reuse on high-overhead single-chunk prompts (e.g.,<think>-stripping clients on 4.5K–13.7K prompts) and late optionalMessage/Endpointextras sharing the same allowance for eliminating over-budget padded prefill tails (and raisingmixed-c32mean decode batch from9.13to17.91, with disclosed per-user p50 and>250 msgap trade-offs). - Clean concurrency and memory footprint:
RequestScheduleris single-threaded (&mut self) with a per-plan thread-localSelectionCache(checkpoints.rs:134-137, 410-428); no new locks, allocations on hot decode loops, wire/ABI changes, or core re-export requirements are introduced. - Rebase conflict with #655: Open Ready-To-Merge PR #655 edits the same
checkpoint_selection_uncachedfunction (checkpoints.rs:634, replacingfresh_durationwithmeasured_duration) and the same documentation files; sequencing/rebase between #655 and #660 is near-certain.
Walkthrough
helios/src/scheduler/checkpoints.rs(:28, 430-442, 444-517, 524-650, 864-886): Replacedanchor_split_is_zero_cost() -> boolwithanchor_split_ns(...) -> Option<(u64, u64)>and renamedzero_budget_anchortobudgeted_anchor. Generalized interior anchor budgeting to all fractions>= 0.0: keepsraw_anchor < prompt_tokensonly whensplit_ns == 0 || extra_spent_ns + split_ns <= allowance(initial_prefill_ns.unwrap_or(whole), fraction)(retaining best-effort interior anchoring on unknown timings whenfraction > 0.0, else prompt-end fallback), chargesanchor_split_nstoCut.split_nsandreserved_ns(withcopy_ns: 0), filters earlierMessagecandidates byend < raw_anchor, preserves unreached chargedAnchorcuts across multi-chunk steps andrevoke_unused_anchor_guards()(:533-546), and latchesbudgeted_anchorinpromote_request_anchorfor all fractions.helios/src/scheduler/checkpoints.rs(:1530-4655): Updated existing assertions for anchor-split budgeting and added four isolated end-to-end tests covering default0.05SM120-like catalogs,revoke_unused_anchor_guards()preservation, C=16 short-prompt single-launch prefill batching, multi-chunk charged-anchor preservation, andsplit_ns == 0retention whenextra_spent_ns > available.helios/src/scheduler/{boundary_tests.rs, checkpoint_lifecycle_tests.rs, policy_tests.rs, tests.rs, vision_window_tests.rs}&helios/src/server/runtime/phase_tests.rs: Opted synthetic flat-cost or intentionally high-overhead boundary fixtures out of0.05(1.0/0.2/0.1) and alignedphase_tests.rs:1540toprefill_chunk_sizeso it stays on default0.05.docs/{cli,core,scheduling-runtime}-design.md(not opened) &verification/helios-lifecycle/check.py: Documented budgeted interior anchor retention and split charging (copy uncharged) in the three design docs and updated thebudgeted_anchormutation target incheck.py:674-675.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduler cost-accounting arithmetic, tests, and docs; no I/O, parsing, FFI,
unsafe, or untrusted-input surface added. - [WARN] Charter & value fit: Strong charter fit (model-agnostic, zero new flags/knobs, solves the right problem in the right layer, real benchmark evidence), but
helios/README.md:372-380is out of sync with the updated design docs. - [WARN] Related / duplicate / conflict check: Finishes #582 cleanly and is complementary to #663, but conflicts directly with open Ready-To-Merge #655 in
checkpoints.rsanddocs/. - [WARN] Tests & verification evidence: All new and modified unit tests are isolated and exercise real production scheduler paths;
4× RTX PRO 6000A/B ran on exact head22cac916834fvs.5d53040e, andscripts/scheduling_sim/kaniare N/A forcheckpoints.rs. However, CI results are not yet attached on22cac91, the4× DGX Spark GB10run is on pre-#656571a4471, and commit trailers (Design-Signed-Off-By) should be confirmed via CI/hook.
Blockers
None.
Should Fix
-
Unify the two diverged anchor-affordability decision sites (
helios/src/scheduler/checkpoints.rs:500-516vs.:588-601). Under #582 (fraction == 0.0),allowance(base, 0.0)was always0andsplit_ns == 0did not depend onextra_spent_ns, so both sites agreed. After generalizing tofraction > 0.0,checkpoint_selection_uncached(:589-597) prices againstbudget_base = accounting.initial_prefill_ns.unwrap_or(whole)and checkssplit_ns == 0 || accounting.extra_spent_ns.saturating_add(split_ns) <= allowance(budget_base, fraction), whilerequest_anchor_endpoint(:509) only checkssplit_ns <= allowance(whole, fraction)—ignoringrequest.checkpoints.initial_prefill_ns,request.checkpoints.extra_spent_ns, and thesplit_ns == 0 ||exemption.- Verified impact: Whenever
budgeted_anchoris absent or invalidated (for example, a preempted request whose grown prompt makeslatched_prompt != request.prompt_tokenswhile carryinginitial_prefill_nsandextra_spent_ns > 0, or afterclear_reservations/ policy updates):promote_request_anchor(checkpoints.rs:857-886, called duringcommitathelios/src/scheduler.rs:2405beforecommit_checkpoint_plansat:2406) can callrequest_anchor_endpoint, decideraw_anchorfits, and promote an already-ready cachedraw_anchortoRetentionRole::Anchor, whilecheckpoint_selection_uncachedon the next prefill step rejectsraw_anchor(due toextra_spent_nsorinitial_prefill_ns) and capturesprompt_tokensas a secondRetentionRole::Anchor.is_request_anchor_endpoint(checkpoints.rs:519-522, called athelios/src/scheduler.rs:1797) can misclassify a full-prompt inbound restore (inbound.consumed_tokens == prompt_tokens, which does not hit the:449short-circuit) asEndpointinstead ofAnchoror vice versa.
- Fix: Extract one private helper
fn anchor_split_affordable(budget_base: u64, split_ns: u64, spent_ns: u64, fraction: f64) -> boolreturningsplit_ns == 0 || spent_ns.saturating_add(split_ns) <= allowance(budget_base, fraction). Call it from bothrequest_anchor_endpoint(passingrequest.checkpoints.initial_prefill_ns.unwrap_or(whole)andrequest.checkpoints.extra_spent_ns) andcheckpoint_selection_uncached. Add a unit test assertingrequest_anchor_endpointandcheckpoint_selectionreturn the same endpoint whenextra_spent_ns > 0(andinitial_prefill_nsis set) without a matchingbudgeted_anchorlatch.
- Verified impact: Whenever
-
Synchronize
helios/README.md:372-380with the updated design docs.helios/README.md:372-380(named inAGENTS.md:227as required guidance for Helios scheduling changes) still states: "Checkpoint selection prioritizes the last eligible message boundary, using the prompt end when no message boundary is eligible. Earlier messages and a distinct prompt end compete within a work allowance ofscheduler_checkpoint_extra_work_fractiontimes estimated uncached prefill work, defaulting to 0.05. Extra captures charge snapshot-copy cost and additional prefill caused by splitting chunks." This now contradictsdocs/core-design.md:1434-1460,docs/cli-design.md:696-710, anddocs/scheduling-runtime-design.md:613-630.- Fix: Update
helios/README.md:372-380to state that an interior message boundary is retained as the anchor only when its predicted split fits the request's extra-work allowance (falling back to the prompt end otherwise), and that a retained interior anchor charges its split work against the shared allowance while its anchor snapshot copy remains uncharged.
- Fix: Update
Subtract / Simplify
- Deduplicate split-overhead pricing (
helios/src/scheduler/checkpoints.rs:438-441and:685-701). Bothanchor_split_nsand the optional-candidate loop compute the exact samebefore + after - wholeinterval formula with identicalsaturatingsemantics. Extract a singlesplit_overhead_ns(request, catalog, terminal_window, left, whole, endpoint, right) -> Option<u64>helper so anchor and optional-cut pricing cannot drift. - Deduplicate the zero-split test fixture setup (
helios/src/scheduler/tests.rs:3305-3318andhelios/src/scheduler/boundary_tests.rs:74-85, 438, 569). Both repeat the same100_000 + g.token_capacity as u64prefill-duration loop and&[64, 128, 256, 512]capacity list. Extract a small helper next toduration_graphs(tests.rs:157), matching the existinglinear_checkpoint_costspattern (boundary_tests.rs:175-182). - Avoid three-way prose duplication (
docs/scheduling-runtime-design.md:614-627). Oncehelios/README.mdis updated, the same rule will live in four places. Consider tighteningdocs/scheduling-runtime-design.md:614-627to a concise summary with a cross-reference todocs/core-design.md#exact-endpoint-capture.
Nits
- Pin unknown-cost nonzero-fraction anchor retention explicitly (
helios/src/scheduler/checkpoints.rs:1648-1650):unknown_prefill_or_stale_snapshot_cost_disables_extrasalready exercises theNone if fraction > 0.0 => (raw_anchor, 0)arm at default0.05, but only assertsunknown.cuts.len() == 1; addingassert_eq!(unknown.cuts[0].endpoint, 896)pins interior anchor retention against prompt-end fallback. - Note observable metric and budget-sharing effects in the PR description: Retaining an interior anchor now contributes
split_nstoflare_checkpoint_extra_work_nanoseconds_total(helios/src/server/metrics.rs:852, matchingdocs/api.md:356-357) and consumes allowance headroom previously available to optionalMessage/Endpointcuts (as reflected in the updated assertion atcheckpoints.rs:1809-1820). Also note explicitly under Evidence thatscripts/scheduling_simandkaniare N/A (neither models checkpoint/anchor budgeting). - Stale
"zero-budget"test/mutation names:checkpoint_lifecycle_tests.rs:309, 445andverification/helios-lifecycle/check.py:673-676still say"zero-budget"after thebudgeted_anchorrename; optional cleanup if touching those files.
Dropped on verification
- Stale claim of two circulating PR bodies / draft status / un-rerun
22cac916834fA/B (Discovery Dossier & Value Prop): Verified viaread_item(660)that the PR was updated at2026-12-01 20:55, is open (non-draft, labeledtriage:review), and has a single authoritative body reporting the4× RTX PRO 6000A/B on exact candidate22cac916834fvs.5d53040ewhile transparently separating the pre-#656571a44714× DGX Spark GB10run and disclosingmixed-c32trade-offs. - F2 (
Majorundocumented metric contract break onflare_checkpoint_extra_work_nanoseconds_total): Verifieddocs/api.md:356-357already defines this counter as "sums charged predicted extra prefill and copy work; it is not a GPU timing measurement." Including charged interior anchor splits makes the counter faithful to its documented contract; excluding them (as suggested upstream) would break consistency withextra_spent_ns. Downgraded to a brief PR-description nit. - F3 (
Majorclaim that TLA+ conformance now runs only at1.0and shipped0.05lost coverage): Factually false oncheckpoint_lifecycle_tests.rs:unused_anchor_guards_revoke_oldest_first_without_cancelling_requests(:264),terminal_reservations_match_lifecycle_model(:726), anddeferred_prefill_reservations_match_lifecycle_model(:946) all run at default0.05, andzero_budget_*(:309, 445) run at0.0. The fixtures changed to1.0(tests.rs:3315,boundary_tests.rs:82,checkpoint_lifecycle_tests.rs:156,phase_tests.rs:3903) use synthetic flat1000 nsprefill costs where any interior split is+100%, so opting out is appropriate whileboundary_tests.rs:190,phase_tests.rs:1540, and all new tests incheckpoints.rs:4176-4655cover default0.05. - F6 (conditional double-charging of anchor split across preemption): Verified false/mischaracterized.
preempt_newest(helios/src/scheduler.rs:1413) only preempts requests inRequestPhase::Decode. On readmission (helios/src/server/runtime.rs:2400-2490),raw_anchor > start(checkpoints.rs:579) is only entered if the anchor and all descendants were evicted and the GPU literally re-prefills acrossraw_anchorwith a second physical split—real extra GPU work that should be charged, identical to re-capturing an evictedMessagecut. - F1 sub-claim that inbound
raw_anchortickets get copied uncharged viacheckpoint_copy_allowed: Inaccurate. Inbound host restores do not go throughcheckpoint_copy_allowed, and an inbound restore atraw_anchoralready short-circuits atcheckpoints.rs:449(request.prefix_tokens == raw_anchor as u64). Retained the verified F1 divergence onpromote_request_anchorand full-prompt inbound restores. - F5 (
check.pymissing mutation tests for nanosecond budget checks):CheckpointReservation.tla(checkpoint_lifecycle_tests.rs) models snapshot-row ownership and guard states rather than nanosecond work budgets;checkpoints.rs:4176-4655directly unit-tests both the budget check (:591-597) and the charged-anchor guard (:542). Dropped as a change request. - S3 sub-claim that
phase_tests.rs:1539-1546lost unaligned prompt-end coverage: False—prompt_len = boundary + 3still exercises an unaligned prompt end (+3 tokens pastprefill_chunk_size) while keeping the runtime test on the shipped default0.05fraction. - Blocking
docs/design-review.mdviolation for unrunkani/scripts/scheduling_sim: Verified all 13#[kani::proof]harnesses live inexecution/transport,model/contract, andoutput/tagged, andscripts/scheduling_simhas zero checkpoint/anchor modeling—both are N/A underdocs/design-review.md:195-225.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.9% -
triage:design-review: 0.0% -
triage:validation: 0.0% -
triage:investigate: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: no (98%): 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. decide malicious: all_clear (100%): No malicious content found
explore
Author: FujitsuPolycom (CONTRIBUTOR; Discord "Dooner")
Motivation: Helios keeps a reusable "conversation anchor" checkpoint at the last message boundary inside a prompt, but cutting prefill at an arbitrary boundary can cost an extra, padded prefill launch. The existing checkpoint_extra_work_fraction knob (default 0.05) is supposed to bound that extra work — yet until now interior anchors were exempt from it, so this change makes the anchor pay from the same allowance as every other optional capture.
Scale: +887 / −151 in 12 files
Proposal:
- Replaces
anchor_split_is_zero_cost() -> boolwithanchor_split_ns() -> Option<(u64,u64)>and budgets the interior-anchor split against the allowance at every fraction, not just0.0. - Charges the retained anchor's predicted split work to
Cut.split_ns/reserved_ns(snapshot copy stays uncharged) and accounts it incheckpoint_extra_work_ns. - Renames
zero_budget_anchor→budgeted_anchorand latches it at every fraction inpromote_request_anchor; adds a guard preserving an already-charged, unreached Anchor cut across multi-chunk steps. - Unifies both anchor-decision sites on one helper,
anchor_split_affordable(checkpoints.rs:96-98), after autobot review flagged the divergence. - Rewrites
helios/README.md:372-389, threedocs/design files, and opts several shared test fixtures out to fraction 1.0/0.2/0.1, adding six new default-0.05 tests. Touches: helios/src/scheduler/checkpoints.rs(anchor pricing, selection, commit accounting)helios/src/scheduler/*_tests.rs(not opened) +server/runtime/phase_tests.rs(fixtures re-parameterised to non-default fractions)helios/README.mdanddocs/{cli,core,scheduling-runtime}-design.md(not opened) Related items:- #582 Finishes #582's zero-fraction-only anchor pricing (merged, same author): superseded, not reversed
- #655 open Ready-To-Merge, rewrites the same
checkpoint_selection_uncached: near-certain rebase collision - #663 merged, cites #660 as complementary: third-party acceptance of the framing
- #69 closed for inactivity, its review asked for exactly this "fold the threshold into the allowance": #660 is the surviving form
- #661 / #665 same author, same base/day, overlap tests.rs/policy_tests.rs (not opened)
Link: https://github.com/NVIDIA/hyperflare-inference/pull/660
Autobot comments: Head moved to
cf744dffafter an autobot Changes-Requested review and the author's point-by-point reply, so the two-body ambiguity, the stale README and the unmentioned metric movement are now resolved — but the benchmark A/B ran on22cac91, which predates a semantic change torequest_anchor_endpointthat feeds admission-time retention (helios/src/scheduler.rs:1797), so one of the two decision sites is unbenchmarked. Test opt-out from the 0.05 default is broader than "unit tests updated" suggests: a new sharedpermissive_checkpoint_costshelper runs all ofboundary_testsat fraction 1.0 on flat costs, andphase_testslost its short-prompt default-fraction scenario. Verification counts are still author-reported (no visible CI oncf744dff).
Classify intake
Selected: triage:review, bug, performance, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 98.6% -
triage:validation: 1.1% -
triage:design-review: 0.2% -
triage:investigate: 0.0% -
none: 0.0% -
triage:partial: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 84.5% -
priority:P2: 13.0% -
priority:P1: 2.6%
Type
- [✓]
performance: 99.5% - [✓]
bug: 79.8% -
duplicate: 13.3% -
community: 10.7% -
enhancement: 2.3% -
documentation: 0.4%
Area
- [✓]
area:scheduling: 99.3% -
area:preparation: 2.3% -
area:caching: 0.7% -
area:selene: 0.4% -
area:rocenante: 0.3% -
area:api: 0.2% -
area:engram: 0.1% -
area:memory: 0.1% -
area:kernels: 0.1% -
area:orbit: 0.0% -
area:packaging: 0.0%
Model
-
model:deepseek-v4.1: 2.6% -
model:deepseek-v4: 1.6% -
model:inkling-small: 1.1% -
model:qwen3.8-27b: 0.2% -
model:muse-glimmer: 0.2% -
model:kimi-k3.1: 0.1% -
model:glm-5.3: 0.1% -
model:mimo-v2.6: 0.1% -
model:nemotron-3.5-bolt: 0.0% -
model:qwen3.8-flash-next: 0.0% -
model:gemma4: 0.0%
Apply Labels (Intake)
No label changes
Subtraction and simplicity
Subtraction/Simplicity/Conventions review of PR #660 (head cf744dffef8d). Verdict: the production diff in helios/src/scheduler/checkpoints.rs is lean and I would merge it on this lens — no new flags, knobs, unsafe or ABI change, and the three new helpers (anchor_split_affordable checkpoints.rs:96-98, split_overhead_ns :434-446, anchor_split_ns :448-467) each have two real callers and replace rather than shadow the old code. Everything subtractable is in test fixtures and docs.
- (high) Dead 6-line
checkpoint_extra_work_fraction: 0.5block atcheckpoints.rs:4363-4368— overwritten by0.279at:4375-4380before any admission; delete it, assertions unaffected. - (high)
helios/README.md:372-390is a second normative copy ofdocs/core-design.md:1439-1457; cut:374-386to two sentences and delegate to the#exact-endpoint-capturelink already at:390, asdocs/scheduling-runtime-design.md:614-621already does. - (high)
permissive_checkpoint_costs(tests.rs:163-184): theOption<&[usize]>knob is pointless (all three call sites wantSTANDARD_PREFILL_CAPACITIES, andboundary_tests.rs:427-428/:559-560re-install it anyway), and its fusedconfigure_policyforcestests.rs:3330to re-measure a graph list the builder already measured (tests.rs:152-154). Make capacities non-optional; split out the policy write. - (medium) Four verbatim copies of the stepped cost table (128/100, 256/110, 512/200) at
checkpoints.rs:4369-4372,:4508,:4623,:4686-4692; add onestepped_costsbeside the existinglinear_costs(:1151-1161). - (medium) The
budgeted_anchorlatch triple + identity check is open-coded at:477-482and:636-640with writes at:634,:643-644,:893-903; since this PR broadens it to every fraction, give it amatchesmethod or two-line helper.
Explicitly rejected as non-issues: the differing interval bases and the four early returns in request_anchor_endpoint (correctness lens, load-bearing), the split_ns == 0 || short-circuit (the 0.0 arm), doc line wrapping, and stale zero_budget wording in three test strings.
Open: whether the README carries normative weight for readers who never open core-design (if so, keep only the predicate sentence); S4/S5 line offsets read at this head but not re-diffed; no green CI or A/B on cf744dff itself is visible.
Correctness and contracts
Review of PR #660 (head cf744df) under the correctness/contracts/system-consequences lens. The change is broadly sound — no locks, wire/ABI/graph changes, no new panics, saturating arithmetic throughout — but three substantive problems remain:
- Major — the two anchor-decision sites still price different intervals.
request_anchor_endpointprices[price_start, prompt]frombaseline_interval/admission reuse (checkpoints.rs:483-541) while selection prices[prefill_cursor, prompt](:562,:610-616), and the reconcilingbudgeted_anchorlatch only exists onceconsumed_tokens >= prompt_tokens(:893-896). With the PR's own measured costs, a mid-prefill request keeps Anchor(896) at selection (split clamps to 0 at:445) whilerequest_anchor_endpointfalls back to 1024 — and that site drives cache promotion at:904-908. - Major — a retained anchor is charged even when nothing is stored.
commit_checkpoint_plansdebitssplit_nsbefore the destination is known (:923-934) and thecheckpoint_skip_storagepath refunds onlycopy_ns(:983-986), so under snapshot pressure the allowance andflare_checkpoint_extra_work_nanoseconds_totalare permanently burned while retaining nothing. - Major (claims) — the A/B predates one of the two decision sites. The body attributes the post-
22cac91delta to "fallback helper + docs/tests", butcheckpoints.rs:534-539changes that site's budget base and adds theextra_spent_nsterm; thecheckpoints.rsLOC figure (+95/−60) is also ~19× smaller than the real +751/−87.
Also: coverage at the shipped 0.05 default is thin (the new permissive_checkpoint_costs at 1.0 now governs all of boundary_tests), the end < raw_anchor candidate filter admits message cuts below a rejected anchor, and the new doc lines exceed the files' wrap width.
Open: whether checkpoint_copy_allowed's unconditional Anchor arm (:997-1010) is the intended second gate; no A/B or CI visible on cf744df.
Re-review
Recommendation: Ready To Merge
Head cf744df cleanly resolves both Should Fix items, all three Subtract / Simplify suggestions, and all three Nits from the prior review (22cac91), while keeping the production diff tight (+95/-60, +35 net production LOC in helios/src/scheduler/checkpoints.rs, zero unsafe, zero new flags/ABI). Anchor-split affordability is now shared between request_anchor_endpoint and checkpoint_selection_uncached, all four doc sites are aligned, and verification covers unit/contract tests, TLA+/Observed lifecycle conformance, mutation testing, and served 4× RTX PRO 6000 A/B workloads. No blockers or should-fix defects remain; only minor optional test/doc cleanups are noted below.
Merge Risk
Level: Medium
- Default-path behavior shift (
0.05): Changes interior conversation-anchor retention under the shipped defaultcheckpoint_extra_work_fraction = 0.05, falling back to the zero-split prompt end when splitting at an interior message boundary exceeds the request's extra-work allowance and charging retained interior anchor splits against the shared allowance (while leaving the anchor snapshot copy uncharged). Trade-offs (mixed-c32per-user p5093.9 -> 71.0 tok/sat higher concurrency,>250 msgap count215 -> 434, and<think>-stripping clients on single-chunk 4.5K–13.7K prompts) are explicitly measured and disclosed. - Clean concurrency and hot-path footprint:
RequestSchedulermutates through&mut selfwith a per-planRefCell<Option<SelectionCache>>(helios/src/scheduler/checkpoints.rs:11-19,138-141,414-432);promote_request_anchorlatchesbudgeted_anchorforO(1)decode-step fast paths (STRIDE_RUNS == 0); no new locks, wire/ABI changes, or model core re-exports are introduced. - Expected rebase with open #655: Open Ready-To-Merge PR #655 modifies
checkpoint_selection_uncached(fresh_duration->measured_durationatcheckpoints.rs:666,1000,1067) and the same four documentation files; the changes are orthogonal and straightforward to rebase depending on merge order.
Walkthrough
helios/src/scheduler/checkpoints.rs(:28,96-98,434-467,469-547,554-728,883-912): Renamedzero_budget_anchor->budgeted_anchor; extractedanchor_split_affordable,split_overhead_ns, andanchor_split_ns; wired bothrequest_anchor_endpoint(:534-539) andcheckpoint_selection_uncached(:618-629) to checksplit_ns == 0 || extra_spent_ns + split_ns <= allowance(initial_prefill_ns.unwrap_or(whole), fraction); charged retained interior anchorsplit_nstoreserved_ns/extra_spent_ns/checkpoint_extra_work_ns(copy_ns: 0); preserved charged unreachedAnchorcuts across multi-chunk steps andrevoke_unused_anchor_guards()(:563-576); filtered earlierMessagecuts byend < raw_anchor(:677); generalizedbudgeted_anchorlatching inpromote_request_anchor(:893-903).helios/src/scheduler/checkpoints.rs(:1556-4771): Updated anchor-split budget assertions and added six isolated end-to-end tests covering default0.05SM120-like catalogs, guard revocation, C=16 single-launch prefill batching, multi-chunk charged-anchor preservation,split_ns == 0retention whenextra_spent_ns > available, and unlatchedrequest_anchor_endpointvs.checkpoint_selectionagreement (:4203-4771).helios/src/scheduler/{tests.rs,boundary_tests.rs,checkpoint_lifecycle_tests.rs,policy_tests.rs,vision_window_tests.rs}&helios/src/server/runtime/phase_tests.rs: AddedSTANDARD_PREFILL_CAPACITIESandpermissive_checkpoint_costs(tests.rs:161-184) for synthetic flat-cost mechanical fixtures; alignedphase_tests.rs:1542-1546toprefill_chunk_sizeto stay on default0.05; renamed stalezero_budgetlifecycle test names/messages.docs/{core,cli,scheduling-runtime}-design.md(not opened),helios/README.md,verification/helios-lifecycle/check.py: Synchronized normative and summary docs for budgeted interior-anchor retention, split charging, uncharged anchor copy, and unknown-cost behavior; updated thebudgeted_anchormutation target incheck.py:673-676.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduler cost-accounting arithmetic, tests, and docs; no I/O, parsing, FFI,
unsafe, or untrusted-input surface added. - [PASS] Charter & value fit: Model- and core-agnostic, zero new flags/config/ABI, removes a special-case discontinuity in the right runtime layer, backed by served
flare runA/B evidence and synchronized docs. - [WARN] Related / duplicate / conflict check: Cleanly finishes #582 and complements merged #663, but overlaps directly with open Ready-To-Merge #655 in
checkpoints.rsanddocs/; coordinate merge order / rebase cleanly. - [WARN] Tests & verification evidence: Isolated CPU tests exercise real
admit/plan/commit/completepaths,check.py(TLC + Observed +checkpoints.rsmutations) passed oncf744df,scripts/scheduling_sim/kaniare accurately noted N/A, and4× RTX PRO 6000A/B ran on22cac916834f(identical cold-request math, transparently disclosed inLimits). Confirm green GitHub Actions CI oncf744dfbefore merge.
Blockers
None.
Should Fix
None.
Subtract / Simplify
- Remove unreachable
configure_policy(0.5)block in new test (helios/src/scheduler/checkpoints.rs:4363-4368):default_fraction_anchor_guard_revocation_preserves_charged_anchor_splitconfigurescheckpoint_extra_work_fraction: 0.5and immediately overwrites it with0.279at:4375-4380after onlymeasure(...)calls, with no admission or selection in between. Deleting:4363-4368removes 6 dead lines without affecting behavior. - Optional — extract a shared
stepped_coststest helper (helios/src/scheduler/checkpoints.rs:4369-4372,4510-4513,4625-4628,4688-4691): Four of the new tests repeat the identical[(128, 100), (256, 110), (512, 200)]prefill measurement loop with only theSnapshotduration varying; a smallfn stepped_costs(scheduler: &mut RequestScheduler, snapshot_ns: u64)besidelinear_costs(:1151) would deduplicate them cleanly. - Optional — trim
helios/README.md:374-386to delegate normative detail:docs/scheduling-runtime-design.md:614-621concisely summarizes the rule and delegates todocs/core-design.md#exact-endpoint-capture, whereashelios/README.md:374-386restates the full normative clauses right before its existing link to../docs/core-design.md#exact-endpoint-capture(:390). Keeping a 2–3 sentence summary in the README would reduce future doc-drift surface.
Nits
- Doc line wrap:
docs/cli-design.md:699,708anddocs/core-design.md:1457run ~93–130 columns inside ~85-column wrapped paragraphs. - Latch readability: If
budgeted_anchor: Option<(usize, usize, usize)>(helios/src/scheduler/checkpoints.rs:28) is touched again in a follow-up, a tiny helper method or named struct (BudgetedAnchor) would avoid open-coding the 3-tuple match at:477-482and:637-640.
Dropped on verification
- Upstream claim that
request_anchor_endpointandcheckpoint_selection_uncacheddiverge mid-prefill (checkpoints.rs:483-541vs:562,610-635): Disproved on both arithmetic and lifecycle grounds. The cited counterexample miscomputed[512, 1024]as 400 ns (two 512-token chunks) instead of 200 ns (one 512-token chunk), yielding a bogus-90 -> 0split when the actual split is210 + 100 - 200 = 110ns (identical to[0, 1024]). Moreover,budgeted_anchoris latched during the first prefill chunk's selection (:634) and persisted on the very firstcommit_checkpoint_plans(:921,987), so mid-prefill calls torequest_anchor_endpointhit the latch at:477-482rather than re-pricing; during aMixedalignment shift (checkpoint_lifecycle_tests.rs:585-678),promote_request_anchorreturns early at:889-891beforecommit_checkpoint_plansupdates the latch. - Upstream claim that debiting
cut.split_nswhendestinationisNone(checkpoints.rs:925-934,983-986) is an over-charging defect: Disproved.commit_checkpoint_plansruns on a prefill step whose lane has already been split atcut.endpointand will execute on the GPU, incurringcut.split_nsof extra prefill work whether or not a snapshot row is available;cut.copy_nsis properly refunded at:984because the snapshot copy is skipped. Refundingcut.split_nswould under-report actual extra GPU prefill work and allow subsequent cuts to exceedcheckpoint_extra_work_fraction. This matches pre-existingMessagecut accounting. - Upstream claim that PR body LOC (
+95/-60, +35 net prod LOC) is wrong by 19× and that theLimitsA/B disclosure is misleading: Disproved. Counting production hunks inhelios/src/scheduler/checkpoints.rs:1-1123yields exactly+95/-60(+35net prod LOC), and the PR body separately states the total diff (12 files, +887/-151). On cold/warm requests withextra_spent_ns == 0andinitial_prefill_ns == None, the post-22cac91anchor_split_affordablewiring at:534-539is mathematically identical to22cac91, making theLimitsdisclosure accurate. - Upstream subtraction claim to remove
prefill_capacities: Option<&[usize]>frompermissive_checkpoint_costsand split its policy call (tests.rs:163-184): Disproved.prefill_capacities(512)(helios/src/scheduler.rs:83-92) yields[128, 256, 512](no64), so forcingSTANDARD_PREFILL_CAPACITIES(&[64, 128, 256, 512]) insidescheduler_with_concurrency(boundary_tests.rs:74) would silently alter the catalog for 30+ unrelated boundary tests, while stripping the100_000 + capacitycost rewrite fromprefill_to_publication_boundary(tests.rs:3328) would leave zero remaining budget forEndpointcapture atfraction = 1.0under flat1000 nsprefill costs. - Upstream claim that
permissive_checkpoint_costs/phase_tests.rs:1542leave default-0.05coverage too thin: Dropped as over-flagged. Opted-out fixtures use synthetic flat prefill costs (1000 nsper bucket, making any interior split+100%overhead) to test page-sharing/publication mechanics,phase_tests.rs:1542stayed on default0.05, and six new end-to-end tests incheckpoints.rs:4203-4771directly cover default0.05and intermediate fractions. - Upstream minor claim about
end < raw_anchorkeeping earlierMessagecuts below a rejected anchor (checkpoints.rs:677): Dropped. Intentional, strictly bounded byavailable = allowance(prefill, fraction), tested in Case 2 (checkpoints.rs:4318-4332), and already documented indocs/core-design.md:1446-1447. - Upstream open questions on
checkpoint_copy_allowed(checkpoints.rs:992-1011) anddocs/api.md:356-357: Verified sound. Telescoping conservation keepsextra_spent_ns + reserved_ns <= allowanceinvariant acrosscommit_checkpoint_plansfor all selected cuts, anddocs/api.md:356-357("sums charged predicted extra prefill and copy work") remains accurate.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 98.8% -
none: 0.7% -
triage:validation: 0.3% -
triage:design-review: 0.1% -
triage:partial: 0.1% -
triage:verify-for-closure: 0.0% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: yes (71%): Testing will add considerable value with the code. It is ready to merge and the tests will validate and improve confidence on hardware we have available for testing.
Pre Test Report
Hardware test plan — PR #660 (helios/scheduler: budget interior conversation-anchor splits)
What is being validated
Head cf744dffef8d (cf744df, +887/−151, 12 files; production change is +95/−60 in helios/src/scheduler/checkpoints.rs). Re-review verdict is Ready To Merge, 0 blockers, 0 should-fix; the case file says "Decision to Test: yes (71%)". This is the residual hardware risk, not a fix-verification pass.
The change: an interior conversation anchor (last eligible message boundary before the prompt end) was previously pushed unconditionally at any nonzero checkpoint_extra_work_fraction with split_ns: 0, adding an uncharged padded prefill launch. Now it is retained only when split_ns == 0 || extra_spent_ns + split_ns <= allowance(initial_prefill_ns.unwrap_or(whole), fraction) (checkpoints.rs:96-98, :608-650); otherwise the request falls back to the zero-split prompt end. A retained interior anchor charges its split to reserved_ns/extra_spent_ns and to flare_checkpoint_extra_work_nanoseconds_total (:651-658, :924-934), sharing headroom with optional Message/Endpoint cuts, while the anchor snapshot copy stays uncharged.
Two properties must be measured on silicon:
- P1 (the fix): a short/medium prompt whose last message boundary is a few tokens before the prompt end must cost one prefill launch, not two, and must not lose prefix reuse on the next turn.
- P2 (the cost): at high concurrency, the change reallocates prefill scheduling. The PR claims a large win
mixed-c32(SLO pass 9.1%→80.3%, mean decode batch 9.13→17.91) and a disclosed per-user regression (p50 93.9→71.0 tok/s,>250 msgaps 215→434).
Hardware reality check — read this first
The PR's exact A/B cannot be reproduced on this hardware. It ran DeepSeek-V4.1-Flash TP4 on 4× RTX PRO 6000. No DeepSeek-V4.1 core exists on cn5 or cn7, the best cell is 16 GiB scratch (docs warn against exporting cores here), and the cores report 0 GiB. So do not plan to re-run the PR table; plan to confirm the mechanism and its direction on the closest available core, and report the delta as a first data point on SM120, not as a reproduction.
| Machine | What it can do for this PR | What it cannot |
|---|---|---|
| cn5 (4× RTX PRO 6000 96 GiB, 48 CPU, 125 GiB RAM, 16 GiB scratch, amd64) | The only concurrency cell. Has local-inference-lab/GLM-5.3-Flash-NVFP4 and nvidia/GLM-5.3-Flash-NVFP4 → GLM-5.3-Flash TP4 for P2 at C=16/C=32 and for P1 padded-tail on a 4.5K prompt. Matches the PR's 4× RTX PRO 6000 hardware class. |
Cannot run DeepSeek-V4.1 (the PR's workload); magnitudes will not transfer — GLM uses 256-token KV pages (docs/core-design.md:1487-1488), DeepSeek 128, so snapshot cost and reuse granularity differ. |
| cn7 (1× GB10, 10 CPU, 60 GiB RAM, arm64, unified memory) | TP1 only (zai-org/GLM-5.3-Flash, nvidia/GLM-5.3-Flash-FP4-Local). Valuable only for (a) proving the arm64 build serves, (b) a single-GPU sanity read of P1's launch-count reduction. |
No multi-GPU, GB10 is pre-#656 in the PR's own GB10 number, 10 CPUs is thin for a load generator. Lowest value — cut it if time-boxed. |
Two build/run facts that shape the steps below:
- No re-export needed. The scheduler controls use the core's captured snapshot graphs (
docs/cli-design.md:694,710). This is the single biggest GPU-time saver: both arms run on the same core, so no export, no re-compile, no 16 GiB-scratch pressure. flare runwill likely refuse the 4-GPU TP on cn5. It aborts when the selected GPUs are not pairwise NVLink-linked unless--bypass-performance-checkis passed (docs/cli-design.md:735,1542-1549). A 4× RTX PRO 6000 workstation is almost certainly PCIe. Use the same flag in both arms and record it in the report; an arm-to-arm difference in this flag invalidates the comparison.
The plan (≈3 GPU-hours total, all on cn5)
Step 0 — arm preparation, zero GPU time (10 min)
Build both arms sequentially; keep only the flare binary (16 GiB scratch cannot hold two build trees).
# candidate
git fetch origin pull/660/head && git checkout cf744dffef8d08d83582a0f7601cc04544ecf4f0
cargo build --release --manifest-path flare-cli/Cargo.toml (not opened) # AGENTS.md:250
cp flare-cli/target/release/flare /scratch/flare-candidate
# baseline: the PR's stated base, which is current main for this test
git checkout 5d53040e
cargo build --release --manifest-path flare-cli/Cargo.toml (not opened)
cp flare-cli/target/release/flare /scratch/flare-baseline
Also, before spending any GPU time, run the CPU-only tests that already pin the behavior — these are the real regression gate and they cost nothing:
cargo test --locked --release --manifest-path helios/Cargo.toml \
--features runtime-core,server --target-dir flare-cli/target \
-- scheduler::checkpoints::tests
Relevant tests added by the PR: checkpoints.rs:4203 (453-token prompt with boundary at 450 → falls back to 453, exactly 1 prefill launch, terminal capture still funded at 0.05, turn-2 hits Anchor(453) and latches), :4361 (guard revocation keeps the charged anchor split), :4508 (multi-chunk at 0.28), :4623 (zero-split retention when spent exceeds available), :4685 (request_anchor_endpoint and checkpoint_selection agree with spent budget and no latch). If any of these fail, stop — do not spend GPU time.
Step 1 — the one cell that matters: P1 padded-tail, cn5, GLM-5.3-Flash TP4 (≈40 min)
This is the highest-value test: it directly exercises the discontinuity the PR removes, and the short prompt is cheap.
Run each arm on the same core, same flags:
/scratch/flare-<arm> run <GLM-5.3-Flash TP4 core path> --gpus 0,1,2,3 \
--bypass-performance-check --embedding-table-storage ram \
--scheduler-policy balanced \
--scheduler-checkpoint-extra-work-fraction 0.05 \
--host 127.0.0.1 --port 8000
Drive it with the in-repo closed-loop harness (scripts/benchmark_scheduler.py), which reports TTFT median/p99, coalesced groups, metrics_before/metrics_after, and per-request cached_tokens:
# A: boundary a few tokens before the prompt end (the 453/450 shape) — C=1, 6 trials
python3 scripts/benchmark_scheduler.py --base-url http://127.0.0.1:8000 \
--model <served name> --concurrency 1 --prompt-tokens 453 --output-tokens 64 \
--seconds 30 --warmup-seconds 10 --trials 6 --variant <arm> --output /scratch/p1-a-<arm>.jsonl
# B: same prompt, 32K tokens, C=1 — the "must not regress long prompt" control
python3 scripts/benchmark_scheduler.py ... --concurrency 1 --prompt-tokens 32768 ...
The harness's built-in prompt is a single user message (scripts/benchmark_scheduler.py:71-121), so the only message boundary is the final one, which lands a few tokens before the prompt end — exactly the padded-tail geometry. Known limitation: it cannot build a multi-turn conversation, so the turn‑1→turn‑2 reuse check needs a ~20-line local extension that appends {"role":"assistant",...},{"role":"user",...} and re-POSTs. Do that; it is the check that proves the fallback still yields reuse.
Pass gates for Step 1 (candidate arm, vs baseline arm on identical prompts):
| Observation | Source | Required |
|---|---|---|
| Prefill launches for the 453-token prompt | flare_graph_launches_total{kind="prefill"} delta |
1 on candidate (baseline: 2). This is the fix. |
| Anchor capture endpoint | flare_checkpoint_captures_total{role="anchor"} delta |
1 per request, at the prompt end |
| Turn‑2 cached tokens | usage.prompt_tokens_details.cached_tokens |
== full turn‑1 prompt length |
| 32K control TTFT p50 | harness ttft_median_seconds |
candidate within noise of baseline (PR claims +0.6%); a >5% regression fails |
| Failures | flare_requests_failed_total |
0 delta in both arms |
Read the sample size honestly: 6 trials of a 30 s C=1 loop with 64 output tokens is ~200 requests per arm — enough for launch-count and cached-token correctness, not enough to resolve a 3–5% TTFT difference. Do not report a TTFT speedup from this cell.
Step 2 — P2 concurrency direction, cn5 TP4 (≈90 min, the only expensive cell)
C=16 and C=32 on a mid-length prompt, both arms, alternating order to cancel drift:
python3 scripts/benchmark_scheduler.py --base-url http://127.0.0.1:8000 \
--model <served name> --concurrency 16,32 --prompt-tokens 4096 --output-tokens 256 \
--seconds 90 --warmup-seconds 20 --trials 3 \
--pair-index 1 --variant <arm> --pair-order <baseline,candidate|candidate,baseline> \
--output /scratch/p2-<arm>.jsonl
Run the pair twice with reversed --pair-order and require the sign of the delta to agree; discard a cell whose two pair orders disagree. Read tokens_per_second, ttft_median_seconds, burst_gap_p99_seconds, coalesced groups, and the flare_checkpoint_extra_work_nanoseconds_total delta.
What to expect and how to judge it: the candidate should show a larger flare_checkpoint_extra_work_nanoseconds_total per request (the split is now charged) and, when the split is retained, fewer prefill launches. The PR's mixed-c32 win needs mixed prefill/decode graphs, which GLM-5.3 declares (--mixed-prefill, docs/cli-design.md:464), so check flare_graph_launches_total{kind="mixed"} > 0 in the cell — if it is 0, the cell cannot test the claimed win and you must say so rather than reporting a null result.
Pass gates: 0 request failures; no flare_graph_launches_total kind disappearing; per-user p50 decode rate not worse than the PR's already-disclosed trade-off on the comparable cell. A regression larger than the PR's disclosure is a finding to report, not a test failure to paper over.
Step 3 (optional, only if Steps 0–2 are clean and time remains) — cn7 arm64 sanity, ≈30 min
One TP1 zai-org/GLM-5.3-Flash cell at C=1 and C=4, 453-token prompt, both arms. Purpose is narrow: prove the candidate arm builds and serves on arm64 and shows the same launch-count reduction. Do not attempt throughput comparison — 10 CPUs on one GB10 with unified memory will not reproduce the PR's 4× DGX Spark number, which was also measured on a pre-#656 base.
Explicitly do not spend GPU time on
- Re-running the PR's A/B table. The core does not exist on this hardware, and the numbers are model- and page-geometry-specific.
- The two review "Should Fix" items from
22cac91. I verified both are resolved atcf744dff:anchor_split_affordable(checkpoints.rs:96-98) is now called from bothrequest_anchor_endpoint(:534-539) andcheckpoint_selection_uncached(:620-625), andhelios/README.md:372-390now states budgeted retention, the charged split, and the uncharged copy. Testing them on hardware would be re-verifying a code read. - Long-prompt multi-chunk preemption/guard paths.
checkpoints.rs:4361,:4508,:4623already pin these on CPU with exact nanosecond catalogs, more precisely than a timing measurement can. - Any re-export or re-tuning. Structurally out of budget at 16 GiB scratch and unnecessary for a scheduler-only change.
Test-plan risk I would flag to the test engineer
The anchor budget fallback is invisible in the metrics. I read checkpoint_selection_uncached at head: the unknown/budget flags are initialized at checkpoints.rs:669-670 and only set inside the optional-candidate loop (:730-742). The anchor decision at :608-650 — the exact code this PR changes — sets neither flag, so when the new rule rejects an interior anchor and falls back to the prompt end, flare_checkpoint_skips_total{reason="work_budget"} does not increment, even though docs/api.md:352 says those counters "count selection or capture rejections." Consequence for testing: do not gate on a skip-counter delta; use the four observables I listed in Step 1 (anchor capture absence at the boundary, single prefill launch, turn‑2 cached_tokens, and the extra-work counter). This is a genuine, cheap-to-fix observability gap that the review record does not mention — worth reporting back to the author, and worth a one-line test addition asserting the fallback is deducible from metrics.
Two other minor items I confirmed at this head, for the report back (neither blocks hardware testing): docs/cli-design.md:699 and :708 still have over-long lines with an awkward mid-sentence wrap, and the retention rule is now restated normatively in four places (docs/core-design.md:1436-1448, docs/cli-design.md:696-710, docs/scheduling-runtime-design.md:614-635, helios/README.md:372-390) — a future drift surface the PR itself widened.
Bottom line
Test it, but narrowly. Step 1 on cn5 with GLM-5.3-Flash TP4 is the test worth running — it costs under an hour, directly exercises the padded-tail discontinuity the PR fixes, and has crisp pass gates (1 prefill launch instead of 2, plus preserved turn-2 reuse). Step 2 is the only way to see the claimed concurrency win, but only valid if mixed launches actually occur, and one reversed-order repeat is mandatory. cn7 should be treated as optional arm64 smoke coverage. The PR's headline speedup cannot be reproduced on this hardware and should not be presented as if it were; the deliverable is mechanism confirmation plus a first SM120 GLM-5.3 data point.
Discord Test Request
Here is the Discord post, followed by what I verified and what I did not get to.
Discord post (ready to paste):
Recommendation: Test
71% confidence — moderate: the mechanism is testable on our hardware, the PR's magnitudes are not.
Hardware Required
- cn5 — 4× RTX PRO 6000 96 GiB with the
GLM-5.3-FlashTP4 core (same GPU class as the PR; no DeepSeek-V4.1 core exists here) - The same core for both arms — scheduler-only change, so no re-export, no recompile, no 16 GiB-scratch pressure
- (optional) cn7 GB10 for an arm64 build/serve smoke check — lowest value, cut it if time-boxed
Justification
- The fix is concrete and cheap to confirm: a short prompt with a message boundary a few tokens before the end must cost 1 prefill launch instead of 2, and still reuse its prefix on the next turn.
- At high concurrency it reallocates prefill scheduling (PR claims
mixed-c32SLO 9.1%→80.3%) with a disclosed per-user regression (p50 93.9→71.0 tok/s) — worth a directional read, but GLM uses 256-token KV pages vs DeepSeek's 128, so magnitudes will not transfer.
Estimated Time to Complete
~3 GPU-hours total, all on cn5 (10 min build/CPU-test gate + 40 min P1 padded-tail + 90 min P2 concurrency + 30 min optional arm64). The one cell that matters — P1 on cn5 — is under an hour.
What I verified against the repo at head cf744dffef8d:
- The rule the post describes is real —
helios/src/scheduler/checkpoints.rs:96-98:anchor_split_affordablereturnssplit_ns == 0 || spent_ns + split_ns <= allowance(budget_base, fraction). Called fromcheckpoint_selection_uncachedat:618-629withbudget_base = accounting.initial_prefill_ns.unwrap_or(whole)andspent_ns = accounting.extra_spent_ns; the fallback is(request.prompt_tokens, 0)— i.e. the zero-split prompt end. Retained anchors chargesplit_nsintoreserved_nsand push aCut { split_ns, copy_ns: 0 }(:651-658), so the split is charged and the snapshot copy is not — matching the plan's P1/P2 framing. request_anchor_endpointandcheckpoint_selection_uncachedagree — both gate on the same helper, so the "one prefill launch" claim is a single decision point, not two divergent ones.- The observability gap the plan flags is confirmed —
unknown/budgetare initialized at:669-670and only set inside the optional-candidate loop (:729-742). The anchor decision at:608-650sets neither, so on an anchor fallbackflare_checkpoint_skips_total{reason="work_budget"}does not increment, even thoughdocs/api.md:352says those counters "count selection or capture rejections." That backs the plan's advice to gate on launches / capture role /cached_tokensrather than skip counters — worth passing back to the author. - Metric names are correct —
flare_graph_launches_total{kind="prefill"|"mixed"},flare_checkpoint_captures_total{role="anchor"},flare_checkpoint_skips_total{reason=...}, andflare_checkpoint_extra_work_nanoseconds_totalall exist (docs/api.md:349-357,helios/src/server/metrics.rs:1227 (not opened),1494-1497).tests/server/test_mixed_scheduler.py:27(not opened) already assertsmixedlaunches > 0, so the plan's "ifmixedis 0 the cell cannot test the claimed win" is a real, checkable trap. - The harness supports every flag the plan uses —
scripts/benchmark_scheduler.py:176-192has--concurrency,--prompt-tokens,--output-tokens,--seconds,--warmup-seconds,--trials,--pair-index,--variant {baseline,candidate},--pair-order {baseline,candidate|candidate,baseline},--output, plus--reuse-requests(better than the plan's proposal — it replays identical request bodies across arms, removing prompt-geometry drift). It reportstokens_per_second,ttft_median_seconds,ttft_p99_seconds,burst_gap_p99_seconds,coalesced_groups,cached_prompt_tokens, andmetrics_before/metrics_after(:163-173). - The plan's "known limitation" is half-wrong, in a helpful direction — the built-in prompt is a single user message (
:71-121,messages: [{'role':'user',...}]), so the padded-tail geometry is right. But the harness refuses to reuse a file with fewer lanes thanmax(concurrencies)(:197-198) and raises ifprompt_token_counts != [args.prompt_tokens](:212,218-219), so a multi-turn extension must preserve exact token geometry per lane. Also note--outputopens in mode'x'(:204) — it will hard-fail on an existing file, so don't rerun into the same path. - PR state matches the plan — PR #660, head
cf744dffef8d, +887/−151 across 12 files, files changed includehelios/src/scheduler/checkpoints.rs(+751/−87). Re-review verdict Ready To Merge, 0 blockers, 0 should-fix, confirming the plan's "this is residual hardware risk, not a fix-verification pass." - Charter fit — model-agnostic, zero new flags/knobs, real benchmark evidence required for performance PRs: the narrow test plan is consistent with how this repo wants perf claims backed ("Bring real evidence", #210).
Not verified — flagged honestly. I was cut off by the turn limit before finishing verification, so these plan claims rest on the packet alone:
- Machine specs and installed-core names (
local-inference-lab/GLM-5.3-Flash-NVFP4on cn5;zai-org/GLM-5.3-Flashon cn7) — I never saw a host inventory. - The cited doc lines:
docs/cli-design.md:694 (not opened),699,708,710,735,1542-1549,docs/core-design.md:1436-1448 (not opened),1487-1488,docs/scheduling-runtime-design.md:614-635(not opened),helios/README.md:372-390(not opened). - The test line numbers the plan uses as its CPU gate (
checkpoints.rs:4203, 4361, 4508, 4623, 4685) — I confirmed the behaviors exist in the code but not those exact line anchors, and the review lists the test block as:1556-4771. - The "71%" in the case file (I took it from the packet; the linked case file is off-repo and I did not open it) and the PR's own A/B numbers (I did not re-derive
mixed-c329.1%→80.3% or p50 93.9→71.0 tok/s from artifacts). - Whether
flare runactually aborts on a non-NVLink 4-GPU set without--bypass-performance-check— the plan asserts this from docs; if true it must be identical in both arms, as the plan says.
One caution on the post itself: the template's "Hardware Required" and "Justification" caps forced me to drop two things worth keeping in the thread reply, not the post: (1) the findings that the anchor-fallback path leaves work_budget unincremented and that there are now four normative restatements of the retention rule, and (2) that the PR's headline speedup cannot be reproduced on this hardware and must be presented as a first SM120/GLM-5.3 data point, never as a reproduction. I put the first into the Justification-adjacent framing by keeping the recommendation at 71% and scoping it "mechanism yes, magnitudes no," but the review record should carry both explicitly.