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.