Verdict: not worth merging as it stands — worth it with substantial changes (request changes, not close)
The problem is real and in the right layer. The implementation, at head a3c64835, is not mergeable: two correctness blockers reported by a priority contributor are still present in the code at this head, and the design adds a second, divergent pricing path where a handful of lines would do.
Does it match the charter?
Yes on direction. Helios owns scheduling, caches and checkpoints; shaping prefill launches and prefix-cache checkpoints is squarely its job, and no per-model branch is introduced. It is not a non-goal, needs no maintainer sign-off, and the PR description has all four parts the charter asks for. The motivation is legitimate: at --scheduler-checkpoint-extra-work-fraction 0 an unaligned conversation anchor forces an extra padded prefill launch, which directly contradicts the purpose of setting the budget to zero.
Weak on "Bring real evidence" and "solve the right problem in the right place".
- No maintainer request, issue or roadmap item is cited. "What gets merged" lists maintainer requests, roadmap items, reproducible bugs, measured performance/memory issues, or bad docs. This is closest to a reproducible performance issue, but the PR itself states the gain is unverified on a served workload ("Live signed-core serving and isolated GPU latency measurements remain unverified"), and there is no benchmark table over
mainon a served workload as the charter requires for performance PRs. The reviewer's live 4× SM120 numbers (prefill steps 2→1 on a 242-token chat; 3→2 on ~12.2k-token prompts; 64K NIAH 59,453 tok/s, needle ok) are the only measured evidence and they come from the reviewer, not the author. - The benefit is narrow: it only bites when the deployment sets the fraction to exactly
0orsnapshots = 0. The default is0.05(docs/cli-design.md:700-708), and there is no issue or config guidance steering anyone to0. Users who never set0get nothing but extra code.
Who benefits, and how much
Operators who explicitly run with a zero checkpoint budget and whose prompts put a message boundary off the chunk grid — agentic/tool-use and multi-turn traffic, which is the advertised use case. For them the saving is up to one extra prefill launch per unaligned anchor (one of 3→2 launches, or 2→1 on short chats in the review). That is a real latency/throughput win, not cosmetic.
What it costs
-
Correctness risk, already realized. Reviewer
voipmonitor(priority contributor) has CHANGES_REQUESTED at this exact head with two blockers, both still visible in the diff:- Duplicate
RetentionRole::Anchorcaptures after modest upward GPU timing drift, because the latchedinitial_prefill_nsis passed as a staleknown_wholeand compared against freshly pricedbefore/after(helios/src/scheduler/checkpoints.rs:364-388,:471-481,:498-500). - Duplicate
Anchorcapture whenMixedprefill shifts chunk alignment, because theelse ifbranch re-prices frombaseline_start = 0(checkpoints.rs:489-507). Three majors remain too:is_request_anchor_endpointprices fromstart = 0instead ofbaseline_startand checksraw_anchorbeforesnapshots == 0(:390-419, called fromhelios/src/scheduler.rs:1794);clear_reservations()wipesanchor_fallback_fromalthough admission reuses the accounting across preemption/readmission (checkpoints.rs:48-52,helios/src/scheduler.rs:1726); and atfraction == 0.0the candidate loop still walks every message boundary withavailable == 0, costing2Ninterval walks per step and emitting spuriouscheckpoint_skip_work_budgetincrements (checkpoints.rs:520-639) — the reviewer observedflare_checkpoint_skips_total{reason="work_budget"}firing atfraction == 0.0in a live run. Duplicate anchors on ordinary multi-chunk traffic is a memory/eviction-behaviour regression on exactly the agentic workload this project targets, so this is not a nit.
- Duplicate
-
Conceptual duplication.
CheckpointAccounting.anchor_fallback_fromis reconstructed in four places — selection (:467-511),is_request_anchor_endpoint(:390-420),plan_checkpoints(:670-685) andpromote_request_anchor(:753-776) — each re-deriving "was the anchor replaced?" from a different starting point. That is how blockers 1 and 2 happened, and why major #3 exists. The reviewer's prescription — latch one explicit(raw_anchor, chosen_anchor)decision, pricewhole/before/afterfrom a single catalog snapshot, and keep it acrossclear_reservations()likebaseline_interval— is the right shape and is meaningfully smaller than what is here. -
Unmodelled tradeoff. At a zero budget the anchor moves from the last message boundary to the prompt end. Prefix reuse then depends on the exact assistant continuation, so regenerate, branch, or tool-retry turns stop hitting the checkpoint they used to hit. That may well be the correct trade (prompt-end state is what a real continuation reuses), but nothing in the PR measures or even mentions it, and the docs do not warn about it.
-
Test and harness weight. About 670 new test lines against roughly 160 lines of production logic, and a 13-line exact-string mutation literal in
verification/helios-lifecycle/check.py:325-343that any reformat breaks. The PR's owncomplete_test_stephelper passeddur_ns = 1_000against a 512,000 ns cost, driving the EWMA down sosaturating_subclamped to zero — which is why the author's tests missed blocker 1. Tests that hide the drift they should catch are worse than no tests here. -
CI health. The author reports two pre-existing base failures (
model::tests::packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape,server::runtime::phase_tests::worker_observes_prefill_decode_and_prerequisite_timings) rather than showing a clean run, which makes "broad suites pass" unverifiable from the description.
Is there a simpler way?
Yes, and it is where this should go:
snapshots == 0producing no cuts is a two-line early return nearcheckpoints.rs:460and needs no new state at all — keep it.- For the zero-fraction case, the minimal form is: if the anchor's predicted split cost is nonzero and
available == 0, substitute the prompt end once, latch that decision onCheckpointAccounting, and reuse it everywhere (includingpromote_request_anchorand the inbound ticket role). No second pricing entry point, no re-derivation frombaseline_start, and no stale latchedwhole. - Reuse the existing
split_nsmachinery already in the candidate loop instead of a parallelanchor_split_is_zero_costhelper, and let thefraction == 0.0path return early so the pricing walk does not run for unaffordable cuts.
That version is smaller than this diff, fixes blockers 1–2 and majors 3–5 by construction, and is the same user-visible behaviour.
What would make it worth merging
- Rebase and restructure as above: one latched anchor decision, one catalog snapshot per pricing, priced from
baseline_start, preserved byclear_reservations(), andsnapshots == 0checked first. Bind the existing lifecycle/TLA+ model to that latched field rather than to a re-derived predicate. - Regression tests for upward EWMA drift,
Mixed-prefill alignment shift, partial prefix hit shorter thanraw_anchor, and preemption/readmission — with timing values that do not collapse the EWMA. - A served-workload benchmark over
mainat--scheduler-checkpoint-extra-work-fraction 0: prefill launches, TTFT and reuse rate on a multi-turn agentic conversation, showing the reuse behaviour that prompt-end fallback gains and loses. - Document the reuse trade in
docs/core-design.md:1447-1457anddocs/scheduling-runtime-design.md:560-574(the follow-on sentences still describe unknown-cost handling as anchor-preserving, which is no longer true at fraction zero), and replace the string-literal mutation with something a formatter cannot invalidate. - Address the reviewer's remaining majors so the
checkpoint_skip_work_budgetmetric is not misleading atfraction == 0.0.
Close it only if the maintainers decide zero-budget checkpoint tuning is out of scope — but the reviewer has already reproduced the bug live on 4× SM120 and the fix is in the right subsystem, so the fair outcome is "changes requested", spelled out as above, consistent with the charter's respect-for-contributors rule.