Opened by a workflow run, Nov 28, 2026 6:29 PM EST.
screen malicious
Screen Result: All Clear
Evidence:
I screened PR #582 ("helios: avoid splitting prefill on zero-budget checkpoint anchors", FujitsuPolycom, head a3c6483) in full: the description, the complete diff of all 7 changed files (+931/−16: helios/src/scheduler.rs, helios/src/scheduler/checkpoints.rs, helios/src/scheduler/checkpoint_lifecycle_tests.rs, three docs/ files, verification/helios-lifecycle/check.py), and the only discussion item — a CHANGES_REQUESTED review by voipmonitor.
No prompt injection found. The description is a plain engineering write-up with no instruction directed at a reviewer, bot, or agent — no "ignore previous instructions", no commands to run, no exfiltration requests, no approval/merge pressure. Two items worth naming but not flagging: an external evidence link to the author's personal fork (FujitsuPolycom/flare-local-inference@a3c6483), which is unverifiable from this repo and is cited as evidence only, and a "Discord: Dooner" signoff line. The review comment is purely technical (duplicate Anchor captures, EWMA known_whole staleness, is_request_anchor_endpoint start=0, clear_reservations wiping anchor_fallback_from, O(N) pricing).
Code additions contain no unsafe, no process::Command, no env::var, no include_*, no #[ignore], no network primitive, and no obfuscated literals. The check.py addition is a single conventional mutation-testing entry (verification/helios-lifecycle/check.py:326, "dropped multi-chunk zero-budget fallback") that rewrites a real else if branch to false inside the existing verification harness — consistent with the PR's claimed mutation evidence. Anchor logic in checkpoints.rs (anchor_fallback_from at :28, is_request_anchor_endpoint at :390/:402, accounting at :483–509, promote_request_anchor at :753/:763) matches the documented behavior; docs changes describe the feature and say nothing about reviewer conduct.
Text-hiding checks clean: non-ASCII scan found only typographic dashes, × and ellipses — no zero-width, bidi/override (Trojan Source), or homoglyph tricks. Greps for injection phrasing (ignore|assistant|instruction, all clear|malicious|prompt injection|ignore this) across helios/src/scheduler, docs/ and the verification harness returned no matches.
Open questions: the external fork commit and its self-reported test/TLA+ results cannot be verified from this repo; the two acknowledged pre-existing base failures were not reproduced; no CI ran on the head commit; live serving/GPU latency is unverified by the author. These bear on correctness and mergeability — reviewers should weigh voipmonitor's functional blockers — not on injection risk.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: FujitsuPolycom (CONTRIBUTOR; 7 merged/open PRs in this area, mostly export/ignition performance; Discord "Dooner")
Motivation: At --scheduler-checkpoint-extra-work-fraction 0, Helios still cut prefill at an interior conversation-message boundary, forcing an extra padded graph launch even though the budget allows no extra work, and multi-chunk prompts lost their prompt-end replacement anchor once prefill passed the boundary. The PR makes the cut conditional on prepared-graph pricing and keeps the prompt-end anchor alive.
Scale: +931 / −16 in 7 files
Proposal:
- Emit no checkpoint cuts at all when snapshot capacity is zero (
checkpoints.rs:460–462). - At fraction 0, keep an interior anchor only if
anchor_split_is_zero_costprices the split at zero; otherwise latchanchor_fallback_fromand use the prompt end (:467–511). - Preserve the fallback across chunk progress, prefix
Restore(role tagging changed,scheduler.rs:1794),Speculativecontinuation, andpromote_request_anchor's new prompt-end promotion (:753–776). - Add ~880 test lines (unit + lifecycle) and one
check.pysource mutation; rewrite three design docs. - Nonzero-fraction path and
checkpoint_anchor()definition unchanged. Touches: - helios/src/scheduler/checkpoints.rs (anchor selection, cut planning, snapshot promotion)
- helios/src/scheduler/checkpoint_lifecycle_tests.rs and verification/helios-lifecycle/check.py (conformance/mutation harness)
- docs/cli-design.md, docs/core-design.md, docs/scheduling-runtime-design.md (undescribed policy docs) Related items:
- #568 Bound optional Endpoint checkpoint eviction by age-discounted marginal gain (merged): same function/hours earlier; #582's "eviction unchanged" claim is undercut by its new Anchor promotions
- #550 Restore prefix checkpoints on prefill catalogs without terminal prefill (merged): pricing rule
anchor_split_is_zero_costdepends on; fixed a regression from the same author's #538 - #459 Price checkpoint candidates without walking every prefill chunk (merged): the loop being modified, written after per-commit pricing pinned the runtime thread at 96–100% CPU
- #335 Prefix-cache pool and scheduler fixes from a production degradation (closed): documented the fraction-0 workaround whose behaviour this PR changes
- #534 Checkpoint captures deadlock on an unmeasured snapshot cost (open): names the
anchor <= startbranch #582 rewrites; its fix is inert at fraction 0 Link: https://github.com/NVIDIA/hyperflare-inference/pull/582 Autobot comments: A CHANGES_REQUESTED review from priority contributor voipmonitor stands, with live 4× SM120 confirmation of the benefit (prefill_steps 2→1, 3→2) plus two duplicate-Anchorblockers (upward EWMA drift via staleknown_whole;Mixed-prefill realignment) and three majors (mispriced partial prefix hits,clear_reservations()wiping the latched decision, O(N) wasted pricing with spuriouswork_budgetskips). The description omits three edited doc files, the restore role-tagging and promotion changes that do alter eviction ranking, and a new unmemoised O(prompt) pricing walk per lane per commit. No linked issue; only served evidence is the reviewer's; no CI, no labels, no maintainer engagement, and the branch is 5–7 commits behind a file that took three PRs the same day. ~80% of the diff is tests and the TLA+ model does not model the new state.
Value Proposition
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.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Conventions
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/README.md:372-379: the anchor-selection paragraph is a fourth copy of the spec this PR updates in three docs, and it is left stale on both new rules (zero snapshot capacity, zero-fraction fallback).
- helios/src/scheduler/checkpoints.rs:467-511, 671-685, 390-420: "the anchor" is now derived in three places with different intervals and different memo handling, where
LiveRequest::checkpoint_anchor()was the single definition. - helios/src/scheduler/checkpoints.rs:364-388:
anchor_split_is_zero_costduplicates the candidate-loop split pricing at 557-591 (minus its interval cache) and flattens unknown costs to "not zero", which changes the anchor without countingstats.checkpoint_skip_unknown_cost. - helios/src/scheduler/checkpoints.rs:1942-2018:
complete_test_stepis a fourth completion-record test driver alongside policy_tests.rs:162, boundary_tests.rs:93 and checkpoint_lifecycle_tests.rs:94, and hardcodes 3-token speculative acceptance at 1959.
Nits: 3 — hand-built GraphDescriptors in new tests that extra_graphs()/walk_scheduler() (checkpoints.rs:1094-1138) already build; duplicated catalog + terminal_window derivation at 406-410 vs 445-450; inconsistent terminology and mid-paragraph insertion across the three updated docs.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/582
Simplicity
Verdict: blocking issues
Blocking:
- helios/src/scheduler/checkpoints.rs:371:
known_whole: Option<u64>onanchor_split_is_zero_costis the only difference between its two callers and is the direct cause of the stale-EWMA duplicate-Anchor defect; drop the parameter and pricewholeinside. - helios/src/scheduler/checkpoints.rs:489-507: the
|| (baseline_start < raw_anchor && !anchor_split_is_zero_cost(..))disjunct re-decides what lines 470-488 already decided and produces the second Anchor under Mixed alignment; keep only the latchedanchor_fallback_from == Some(raw_anchor)test. - helios/src/scheduler/checkpoints.rs:49:
clear_reservationsnow wipesanchor_fallback_from, so the latch the fallback depends on is discarded on readmission (scheduler.rs:1726); stop resetting the decision field there. - helios/src/scheduler/checkpoints.rs:390-420:
is_request_anchor_endpointis a second, independently parameterised price model of "is this the request anchor" (re-walks from 0 withknown_whole = None); store the chosen anchor onCheckpointAccountingand read it.
Should fix:
- helios/src/scheduler/checkpoints.rs:671-685:
plan_checkpointsre-derives the anchor fromcutsplus a second copy of the fallback condition; a storedanchorfield collapses the 15-line closure to one field read. - helios/src/scheduler/checkpoints.rs:1942-2016:
complete_test_stepis a third copy of the lane-walk completion helper already in boundary_tests.rs:93-145 and policy_tests.rs:162-200; hoist one intoscheduler::tests. - verification/helios-lifecycle/check.py:325-343: a 13-line source-text literal mutation that duplicates what the lifecycle test asserts, against AGENTS.md:194-197; replace with a one-line needle or drop it.
- docs/core-design.md:1452-1453 (and docs/scheduling-runtime-design.md:570-572): still claim unknown costs never exclude the anchor, which is false for zero-fraction interior anchors; add the exception per repo-prose SKILL.md:26-29.
Nits: 5 — synthetic wall-clock bound in balanced_c16_short_prompts_skip_interior_anchor_tails_and_reach_full_batch (checkpoints.rs:2554-2558), duplicate test at checkpoints.rs:2326, bundled Part B at checkpoints.rs:2764-2781, redundant lookup chains in promote_request_anchor (checkpoints.rs:758-767), and the new rule paraphrased three times across docs.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/582
Architecture
Verdict: blocking issues
Blocking:
- docs/design-review.md:232-240 (with 195-206): scheduler/pricing change lands with no
scripts/scheduling_simreference-solver evaluation, and the served-workload measurement principle 12 requires is self-declared "unverified"; the thread's live 2→1 number came from the reviewer. - docs/core-design.md:1436-1445, docs/cli-design.md:703-708, docs/scheduling-runtime-design.md:553-559: three docs now specify the zero-fraction anchor rule as fact, but the code (checkpoints.rs:467-507) violates it on the two duplicate-Anchor reproducers; the PR description never mentions the doc files.
Should fix:
- helios/src/scheduler/checkpoints.rs:411-419, 474-482, 491-501: one policy question priced from three start points (consumed_tokens, baseline_start, hardcoded 0), so the anchor flips across chunks with unchanged costs — root cause of both duplicate-
Anchorblockers. - helios/src/scheduler/checkpoints.rs:467-468: a second anchor regime gated on exact float equality
checkpoint_extra_work_fraction == 0.0, whileallowance(87-89) already yields 0 there, and the anchor cut is pushed unpriced (512-519). - helios/src/scheduler/checkpoints.rs:48-52 with helios/src/scheduler.rs:1722-1726:
clear_reservations()wipes the latch on a path that preserves accounting across preemption, contradicting docs/core-design.md:1456-1457. - helios/src/scheduler/checkpoints.rs:529-539, 782-783: at zero budget every boundary is still priced and
checkpoint_skips{reason="work_budget"}(metrics.rs:501 (not opened)) fires on intended behaviour.
Nits: 3 (promote_request_anchor widening (753-776); 13-line source-text mutation guard in verification/helios-lifecycle/check.py:325-343; allocate_terminal_capture pricing at zero capacity, 917-963)
Link: https://github.com/NVIDIA/hyperflare-inference/pull/582
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- docs/core-design.md:1441-1443, docs/cli-design.md:706-708, docs/scheduling-runtime-design.md:556-558: all three say the prompt-end fallback happens only when the split "adds predicted prefill work", but
anchor_split_is_zero_costalso returns false when pricing is unknown (checkpoints.rs:373-386), so a missing measurement silently discards the conversation anchor. - docs/core-design.md:1436-1445, docs/scheduling-runtime-design.md:553-559, docs/cli-design.md:703-708: none documents the second half of the change — the substituted prompt-end anchor surviving multi-chunk prefill progress, prefix
Restore,Speculativecontinuation and promotion to the anchor role (checkpoints.rs:402, 486, 671-685, 753-776). - docs/core-design.md:1452-1453 and docs/scheduling-runtime-design.md:570-572: untouched sentences still claim unknown prefill cost excludes extras "without excluding the anchor"; at zero fraction unknown pricing does now exclude the anchor, so each document states two incompatible rules. The reviewer raised the same thing as Minor #6.
Nits: 4 (all in the PR description) Link: https://github.com/NVIDIA/hyperflare-inference/pull/582
Correctness
Two should-fix issues, both in the new zero-budget anchor logic in helios/src/scheduler/checkpoints.rs, plus one nit of the same family:
- The interior-anchor/prompt-end decision is priced over different intervals depending on which code path runs, so a request that keeps a zero-cost interior anchor can later be re-priced over a longer interval, decide the anchor is expensive, and push a second
Anchorcut atrequest.prompt_tokens— the exact duplicate prompt-end capture the PR description says it avoids. is_request_anchor_endpointis called on the commit hot path for every lane (and on every inbound admit) and recomputes full prompt-interval prefill pricing each time, defeating the module'sSelectionCache/planning-scope design for precisely the case (zero fraction, zero-cost interior anchor) the PR wants to preserve.- Nit: the same helper prices from literal
0, a third origin, so it can disagree withcheckpoint_selectionabout which endpoint is "the anchor" and promote/stamp the wrong checkpoint.
Everything else I checked in the changed files came out clean and is listed under "Checked, no finding". Three open questions I could not settle from code alone are at the end.
(No summary was written: this is the report's Key findings section.)
Subtractive
Verdict: make it smaller first The change: +931 / −16 lines, 7 files Could remove: about 410 lines, in 5 places Biggest subtractions:
- helios/src/scheduler/checkpoints.rs:28,49,390-420,467-511,671-685,758-767 (+ scheduler.rs:1794): the
anchor_fallback_fromlatch,is_request_anchor_endpoint, the 45-line two-branch fallback, theplan_checkpointsmap_or_elseand thepromote_request_anchoror_elsecollapse into oneresolved_anchor()method: about 95 lines. - helios/src/scheduler/checkpoints.rs:1942-2016: delete
complete_test_stepand call the existingcompletion_records/complete_timedin policy_tests.rs:162/219: about 75 lines. - helios/src/scheduler/checkpoints.rs:2365-2448 and 2450-2560: drop the duplicate pricing test and the 16-request batching test (asserts no anchor behaviour): about 195 lines.
- helios/src/scheduler/checkpoints.rs:2764-2781: drop Part B of the aligned test — it re-proves unchanged nonzero-fraction behaviour that existing tests cover: about 18 lines.
- verification/helios-lifecycle/check.py:325-343: replace the 14-line verbatim Rust mutation literal with a one-line needle: about 15 lines.
Left behind: Nothing becomes dead — the change supersedes no existing flag, doc or test. It adds a second source of truth (
anchor_fallback_from) beside existing pricing helpers instead of removing one. Link: https://github.com/NVIDIA/hyperflare-inference/pull/582
The behaviour is needed: snapshots == 0 is reachable (ignition/cli/serve.py:503, ignition/planning.py:459, boundary_tests.rs:194 loops over snapshots in [0, 1, 2, 4, 8, 12]) and the zero-fraction rule is a genuine policy change. The finding is size, not purpose: the same behaviour fits in roughly half the code, and the simplification deletes the duplicate-anchor bugs the reviewer reports as blockers.
Pre Test Report
Pre-test report — PR #582 helios: avoid splitting prefill on zero-budget checkpoint anchors
Author: FujitsuPolycom · Head: a3c6483 · Base: main · Diff: 7 files, +931/−16
Recommendation: DO NOT REFER TO HARDWARE TESTING YET. Send it back to the author. Re-review the restructured version first; a small, sharply-scoped hardware test should follow only after the anchor decision is made one stable, priced field — because the hardware-observable behaviour this PR owns (how many Anchor captures a request makes, and whether a prefill gets split) is the exact behaviour the current code is known to get wrong.
Expected value of hardware testing now: near zero. It would burn a 4-GPU box to characterise numbers that the required fix will invalidate, and the metrics a tester would use as evidence are themselves currently wrong.
1. What the change does, and whether it is testable at all
Scope is right: anchor/snapshot selection is shared Helios scheduling and cache policy, nothing branches on model identity, and the underlying concern is real — with snapshots == 0 no snapshot row can ever be reserved, so the old code selected cuts whose captures could never be armed; and at scheduler_checkpoint_extra_work_fraction == 0 the work allowance is 0, so a padded prefill split is unfundable. That part (checkpoints.rs:460-462, placed after initial_prefill_ns is priced so unmeasured-cost accounting still works) is correct and should be kept in any rewrite.
Two caveats that bound any test plan:
- The change is inert at defaults.
scheduler_checkpoint_extra_work_fractiondefaults to0.05(ignition/cli/config.py:39(not opened),docs/cli-design.md:1366,helios/src/server/config.rs:728), so an operator only reaches the new code by explicitly setting0, or by havingsnapshots == 0. A test must set the fraction to0explicitly or it measures nothing. - The changed path requires chat-template multi-turn prompts.
message_boundariesis derived from the rendered frontend prompt (helios/src/server/request.rs:300(not opened)); the boundary must lie strictly interior and inside a chunk. A plain-text prompt yields no interior anchor and the new code never runs.
2. The defects are not gatekeeping symptoms — they are actual defects in the reviewed code
I read the head source directly; the review findings reproduced. These are behavioural, on the normal path, not nits:
- Duplicate
RetentionRole::Anchorcaptures under ordinary timing drift —checkpoints.rs:364-388with:471-473/:498-500.anchor_split_is_zero_costcompares freshly pricedbefore/afteragainst the cached EWMAaccounting.initial_prefill_nspassed asknown_whole. Under upward driftbefore + after − whole != 0, so the anchor flips to the prompt end after the interior anchor was already published — a second anchor capture for one request. - Duplicate
AnchorwhenMixedprefill shifts chunk alignment —checkpoints.rs:489-507. One policy question is priced from three different origins:start=consumed_tokens(:474-482),baseline_start(:491-501), and a hardcoded0inis_request_anchor_endpoint(:411-419). Once prefill passes the boundary, branch A is no longer reachable and branch B re-prices a longer interval, so an unchanged cost can yield a changed verdict. - The latched decision is destroyed on readmission —
clear_reservations()setsanchor_fallback_from = None(checkpoints.rs:48-52) and is called on the accounting that admission deliberately carries across preemption/readmission (scheduler.rs:1722-1726). Preemption therefore re-derives the anchor from a freshconsumed_tokens; same request, same prompt, possibly a different anchor, orphaning the previously captured prompt-end anchor. - A third, unmemoised price model on the commit hot path —
is_request_anchor_endpoint(:390-420) rebuildsprefill_catalog_costsand walks the full0..promptinterval, bypassingcheckpoint_selection_cached/SelectionCache. It is called per lane on every commit (scheduler.rs:2411→checkpoints.rs:763) and on every inbound admit (scheduler.rs:1794). This is a CPU-side cost regression on the model-serving critical path, and it would be easy to mis-blame on the GPU during testing. - The evidence metric is self-contradictory today — at fraction
0,anchorfalls back toprompt_tokens, so every message boundary still enterscandidates(:529-539) and is priced withavailable == 0(:528), settingbudget = true(:603) →stats.checkpoint_skip_work_budget(:782-783) →flare_checkpoint_skips_total{reason="work_budget"}(metrics.rs:501,:847). The reviewer saw this fire live atfraction == 0.0. A tester checking that counter would read a correctly behaving policy as a failure.
Additionally, plan_checkpoints (:671-685) reconstructs the anchor a fourth way, and the anchor Cut is pushed with split_ns: 0, copy_ns: 0 (:512-519), i.e. never charged through allowance() — so the zero-fraction regime is a magic == 0.0 branch (:467-468) rather than a natural limit of one policy. The architecture and simplicity lenses both conclude the fix is smaller than the current diff (the subtractive lens estimates ~410 of 931 lines removable, including ~95 production lines that collapse into one resolved_anchor()), so this is not a case of the reviewer demanding more work than the author already did.
Why "the tests pass" carries no weight here: the author's own suite drives complete_test_step with dur_ns of 1_000–1_000_000 against 512,000-ns-class costs (checkpoints.rs:2355, 2746, 2826, 2841), so saturating_sub clamps and the EWMA-drift defect is structurally invisible. The green run is not evidence about the riskiest property.
3. Also not yet fit to test
- Docs now specify a rule the code does not satisfy.
docs/core-design.md:1436-1445,docs/cli-design.md:703-708anddocs/scheduling-runtime-design.md:553-559all state the zero-fraction rule as fact; the code violates it on exactly the two reproducers above.helios/README.md:372-379is a fourth copy of the same spec and was not updated — it still says "prioritizes the last eligible message boundary" unconditionally. Two further sentences (docs/core-design.md:1452-1453,docs/scheduling-runtime-design.md:570-572) still claim unknown prefill costs never exclude the anchor, which is false at fraction zero sinceanchor_split_is_zero_costreturnsfalseon an unknown price. - Zero-regression evidence for the trade-off the PR makes. At a zero budget the anchor moves from the last message boundary to the prompt end, so reuse now depends on the exact continuation: regenerate/branch/tool-retry turns may stop hitting the checkpoint they used to. Nothing in the PR measures or even mentions this, though reuse loss is a plausible real regression.
- Evidence bar.
docs/design-review.md:106-115(principle 12) requires actual Helios service measurements for a performance claim, and the PR itself says "Live signed-core serving and isolated GPU latency measurements remain unverified." The only served evidence is the reviewer's. One nuance the architecture lens overstates: I checkedscripts/scheduling_sim/and it contains no checkpoint/anchor modelling at all (grep forcheckpoint|anchor|snapshotfinds only EWMAsnapshot()accessors intiming.py(not opened)/learning_policy.py(not opened)), so the demanded simulator sweep cannot evaluate this policy as written; the actionable evidence gap is the served-workload measurement. CI never ran on the head; the author reports two pre-existing base failures rather than a clean run.
4. Minimal hardware test plan — conditional, to be run only after the restructure
Do not run this now. Run it against the fixed head. It is deliberately small: one box (cn5), one model, two configurations, one probe. cn7 adds nothing — this is pure scheduler/cache policy with no CUDA, kernel or architecture-specific code, and cn5's RTX PRO 6000 Blackwell is the same SM120 class as the reviewer's 4× rig where the benefit was already demonstrated, so an architecture-extension test is not needed.
Gate 0 — probe (≈15 min, do not proceed if it fails). On main, at the default fraction 0.05, serve one multi-turn chat request with a message boundary strictly interior to the prompt (≥2 turns, prompt comfortably larger than prefill_chunk_size; SM120 record/replay core as usual) and confirm flare_checkpoint_captures_total{role="anchor"} increments. If it stays 0 on that model/core, the anchor path is not exercised by serving at all and the whole A/B is void — stop and report, do not fall back to guessing.
Test 1 — the PR's own claim, A/B on the same box (the only test that should get GPU time).
Same prompt set, A = main, B = PR head, both with --scheduler-checkpoint-extra-work-fraction 0.
- Prompt set (small, ~4 cases × 5 repetitions, single-stream): (i) short multi-turn chat whose interior boundary is not chunk-aligned; (ii) multi-turn prompt spanning ≥2 prefill chunks with an interior boundary; (iii) a prompt whose boundary is chunk-aligned (the "zero-cost aligned anchor stays eligible" case); (iv) a plain no-boundary prompt as a control that must be unchanged.
- Assert on B vs A, per request:
flare_sampling_graph_launches_total{kind="prefill"}drops by exactly 1 on (i) and (ii) and is unchanged on (iii) and (iv);flare_checkpoint_captures_total{role="anchor"}is exactly 1 per request (this is what catches both duplicate-anchor blockers);flare_checkpoint_skips_total{reason="work_budget"}is 0 at fraction 0. - Report TTFT and prefill tok/s from the same runs. Use
scripts/benchmark_prefill.py(--url,--tokens) for the token-rate leg; it drives the served endpoint.
Test 2 — prefix reuse, same runs, no extra cost. Over the same A/B, compare flare_cache_hits_total and flare_cache_reused_tokens_total (metrics.rs:1115/:1120) plus flare_snapshot_publications_total. Send each conversation twice (identical prefix) so reuse is measurable. This is the regression the PR most plausibly introduces; it is free because it rides on Test 1's runs.
Test 3 — preemption/readmission, only if it can be triggered deterministically. The latch is cleared by clear_reservations() on readmission, so a request preempted after its anchor commits may re-derive a different anchor. Drive it by admitting more concurrent long-prompt requests than request_slots allows (forcing park/admit) and assert one Anchor capture per request. If it cannot be triggered reliably in ~30 minutes, skip it — a unit test with realistic timing values is the better guard, and that test is part of what the author must add anyway.
Explicitly out of scope — do not spend hardware time on: nonzero-fraction behaviour (unchanged by this PR); snapshot eviction ranking (#568 territory, though note the inbound role-tagging change at scheduler.rs:1794 does touch it — cover it with a unit test, not a GPU run); the 16-request batching test's 2-second synthetic wall-clock bound (meaningless on hardware); anything on cn7; any multi-hour soak or throughput sweep — the effect is one prefill launch per request, which shows up immediately or not at all.
Baseline hygiene: measure main and the PR on the same box in the same session, and record the exact base commit. Because no CI ran on the head and the branch is behind main, an unexpected launch count or capture count must be attributable — the A/B form above is what makes that possible.
5. Bottom line
The problem is real, the layer is right, and the author's zero-capacity guard plus the core idea are worth keeping. But the current head gets the anchor decision wrong in three places for the same request, puts a new unmemoised pricing walk on the per-commit path, and leaves the very metric a tester would use reporting a false failure. Testing this build would produce numbers that the required restructure discards. Refer to the author with the consolidation prescription (one latched, priced anchor decision per request; check snapshots == 0 first; stop clearing the decision in clear_reservations; reuse the existing split-price expression; early-return at fraction 0), then re-review, then run the single conditional A/B above on cn5. When it comes back fixed, the hardware cost of validating it is genuinely small — one box, two configurations, about four prompt shapes, with reuse measurement riding along for free.
code review summary
Recommendation: Changes Requested
The change is real and belongs in Helios, but the zero-budget anchor verdict is priced from three different interval origins and latched in a field that clear_reservations() wipes on readmission, producing the duplicate-Anchor defects the PR claims to remove — and a snapshots == 0-reachable, docs-and-evidence gap remains.
- Blockers: 4
- Should fix: 3
- Subtractive suggestions: 4
- Nits: 2
B1 (merged from all six lenses + reviewer blockers 1–2): checkpoints.rs:467-507 prices "interior anchor vs prompt end" from consumed_tokens in branch A and baseline_start in branch B, and anchor_split_is_zero_cost (:373-387) compares a cached known_whole against freshly priced halves — so the verdict can flip mid-request and emit a second Anchor at prompt_tokens (EWMA drift and Mixed alignment repros). The suite misses it because linear_costs = capacity*1000 ns and every test commit uses dur_ns = 1_000.
B2: clear_reservations() now nulls anchor_fallback_from (:49) on the admission path (scheduler.rs:1722-1726) documented to preserve accounting (docs/core-design.md:1456-1457) — the reason B1's redundant branch exists.
B3: is_request_anchor_endpoint (:390-419) prices from literal 0, disagrees with selection, and lets promote_request_anchor (:758-767) stamp an endpoint selection never chose; it also re-prices the full interval on every inbound admit and per lane per commit (scheduler.rs:1794, :2411).
B4 (judgment call): no scripts/scheduling_sim sweep and no served measurement, against docs/design-review.md:234-240/:195-206/:106-115; the only live numbers came from the reviewer.
Should fix: helios/README.md:372-379 was never updated and is now false on both new rules, plus two stale sentences (core-design.md:1452-1453, scheduling-runtime-design.md:570-572) that contradict the new rule a few lines below each edit; zero budget is a separate regime keyed on == 0.0 (policy.rs:208-211) with an anchor cut that is never priced (:512-519); and at fraction 0 the selector still walks every boundary and increments checkpoint_skips{reason="work_budget"} (live-observed).
Subtract (~410 of 931 added lines, ~44%): one resolved_anchor() replaces four representations; delete the duplicated 75-line complete_test_step; drop three tests that assert nothing this PR adds (including the balanced_c16 test with its underived 2 s bound); shrink the 14-line verbatim mutation needle in check.py to one line.
Noise pre-filtered: no CI/runner claims existed to drop; cross-lineage promotion speculation, code-tidiness dedup superseded by the resolved_anchor() fix, and the correctness lens's "docs consistent" claim (refuted by the README) were dropped or reframed. Nothing was executed here (cargo/pytest unavailable); defect reproductions are cited verbatim from the reviewer's live run.
Final review
Recommendation: Changes Requested
The problem is real and in the right layer (helios/src/scheduler/checkpoints.rs), and live 4× SM120 testing by @voipmonitor confirmed the expected prefill-launch reduction at --scheduler-checkpoint-extra-work-fraction 0, but this head (a3c64835) has two verified correctness blockers that emit duplicate RetentionRole::Anchor captures on ordinary multi-chunk workloads, plus divergent anchor pricing on partial prefix hits, lost latch state across readmission, spurious work_budget skip accounting at fraction == 0.0, and stale documentation.
Blockers
1. Stale known_whole vs. live catalog causes duplicate Anchor captures on normal upward GPU timing drift
Location: helios/src/scheduler/checkpoints.rs:364-388, 451-459, 471-501; helios/src/scheduler/cost.rs:74-96, 302-325
checkpoint_selection_uncached latches accounting.initial_prefill_ns once (:451-459) and passes it as known_whole into anchor_split_is_zero_cost, which compares freshly priced before + after from the live catalog against that stale known_whole (:373-387):
let Some(whole) = known_whole
.or_else(|| Self::interval_prefill_ns(request, catalog, terminal_window, start, end))
else { return false; };
let Some(before) = Self::interval_prefill_ns(request, catalog, terminal_window, start, anchor) else { return false; };
let Some(after) = Self::interval_prefill_ns(request, catalog, terminal_window, anchor, end) else { return false; };
before.saturating_add(after).saturating_sub(whole) == 0
ActionCosts::observe updates per-graph durations via a 9-sample rolling median (ReplayTimes in helios/src/scheduler/cost.rs:74-96, 321). Trace prompt_tokens = 1024, raw_anchor = 512, prefill_catalog = [512] (initial sample 512_000 ns), fraction = 0.0:
- Chunk 1 (
start = 0):initial_prefill_nslatches1_024_000. Branch A (:470-488) computes512_000 + 512_000 - 1_024_000 == 0, selects512(anchor_fallback_from = None), runs0..512, and publishes512asRetentionRole::Anchor. - Normal upward GPU jitter on Chunk 1 (e.g.
515_000 ns, or a post-TTL window reset incost.rs:82-84) shifts the rolling median upward (e.g.513_500 ns). - Chunk 2 (
start = 512):raw_anchor > startis now false, so execution enters Branch B (:489-505). It callsanchor_split_is_zero_cost(..., baseline_start = 0, end = 1024, raw_anchor = 512, known_whole = Some(1_024_000)), getting513_500 + 513_500 - 1_024_000 = 3_000 != 0(!false == true), flips toanchor = 1024, and captures a secondRetentionRole::Anchorat1024.
Symmetrically, downward median drift makes before + after < known_whole, so saturating_sub clamps to 0 and misclassifies genuinely costly splits as zero-cost. The PR's aligned test (checkpoints.rs:2729-2748) missed this because linear_costs initializes Prefill(512) to 512_000 ns while line 2746 passes dur_ns = 1_000, dragging the median down to 256_500 ns and clamping saturating_sub to 0.
Fix: Remove known_whole from anchor_split_is_zero_cost and always price whole, before, and after from the same catalog snapshot — and latch the resulting anchor decision on CheckpointAccounting (see Blocker 2 and Subtract / Simplify). Add a regression test using realistic upward-jitter durations (> initial_cost) asserting checkpoint_anchor_captures == 1.
2. Shifting interval origins (start vs. baseline_start) cause duplicate Anchor captures on Mixed prefill with zero timing drift
Location: helios/src/scheduler/checkpoints.rs:467-511
Branch A (:470-488, while raw_anchor > start) prices the split over [consumed_tokens, prompt_tokens), whereas Branch B (:489-505, once consumed_tokens >= raw_anchor) re-prices over [baseline_start, prompt_tokens):
- Trace with constant costs:
prefill_catalog = [128, 512](150_000 ns,400_000 ns),mixed = [(2, 1, 256)],prompt_tokens = 1024,raw_anchor = 768,fraction = 0.0,baseline_start = 0.- At
start = 0:0..768..1024costs700k + 300k - 800k = 200k != 0→anchor_fallback_from = Some(768),anchor = 1024. - Chunk 1 runs
Mixed(256)(0..256). - At
start = 256:raw_anchor (768) > start (256)enters Branch A and prices[256, 1024):before(256, 768) = 400k,after(768, 1024) = 300k,whole(256, 1024) = 700k→ split cost0→ clearsanchor_fallback_from = None, selects768, and Chunk 2 (256..768) captures and publishes768asRetentionRole::Anchor. - At
start = 768:raw_anchor > startis false; Branch B seesanchor_fallback_from == None, re-prices frombaseline_start = 0, finds0..768..1024costs200k != 0, flipsanchor = 1024, and Chunk 3 (768..1024) captures a secondRetentionRole::Anchorat1024.
- At
Note also that merely switching to an unlatched helper over baseline_start is insufficient: even from one snapshot and fixed baseline_start, a cross-capacity rolling-median shift between chunks (e.g., Prefill(1024) dropping slightly relative to 2 * Prefill(512) after another request runs) can still flip a zero-cost decision into a fallback on Chunk 2.
Fix: Price the zero-budget anchor decision once over (baseline_start, prompt_tokens) from one catalog snapshot and latch the explicit decision on CheckpointAccounting (keyed by (raw_anchor, prompt_tokens)). Add a Mixed-alignment regression test asserting checkpoint_anchor_captures == 1.
Should Fix
1. is_request_anchor_endpoint prices from 0 instead of baseline_start, checks raw_anchor before snapshots == 0, and runs uncached pricing on commit/admit
Location: helios/src/scheduler/checkpoints.rs:390-420, 753-776; helios/src/scheduler.rs:1792-1808, 2411
- Divergent origin on partial prefix hits (
baseline_start < raw_anchor):is_request_anchor_endpointhardcodesstart = 0(:415), which disagrees with selection in both directions:- False promotion: With
prefill_catalog = [128, 512](150k, 400k),baseline_start = 88,raw_anchor = 600,prompt_tokens = 1024,fraction = 0.0, selection prices[88, 1024)as zero-cost (400k + 400k - 800k = 0) and selects600, whileis_request_anchor_endpoint(req, 1024)prices[0, 1024)as costly (550k + 400k - 800k = 150k) and returnstrue, allowingpromote_request_anchor/ inbound admission to stamp1024asAnchoralongside600. - Missed anchor: With
prefill_catalog = [512],baseline_start = 256,raw_anchor = 512,prompt_tokens = 768,fraction = 0.0, selection prices[256, 768)as costly (2*C - 1*C) and falls back to768, whileis_request_anchor_endpoint(req, 768)(whenanchor_fallback_fromisNone) prices[0, 768)as zero-cost (2*C - 2*C) and returnsfalse.
- False promotion: With
- Ordering:
endpoint == raw_anchor as u64(:392) returnstruebefore checkingself.limits.snapshots == 0(:395). - Uncached hot-path work:
promote_request_anchorruns for every lane on every committed step (scheduler.rs:2411), and inbound admission callsis_request_anchor_endpointright afterclear_reservations()(scheduler.rs:1726, 1794). Wheneverraw_anchoris not ready inself.cacheandanchor_fallback_fromisNone, it allocates aVecinprefill_catalog_costsand runs 3interval_prefill_nswalks bypassingSelectionCache.
Fix: Check self.limits.snapshots == 0 first, read the latched anchor decision on CheckpointAccounting, and when computing it on first use price from baseline_start when baseline_start < raw_anchor (falling back to 0 only when baseline_start >= raw_anchor, e.g., full-prompt reuse/inbound restore). Add a regression test for a partial prefix hit < raw_anchor.
2. clear_reservations() wipes the latched anchor decision across preemption/readmission and inbound retries
Location: helios/src/scheduler/checkpoints.rs:48-52; helios/src/scheduler.rs:1722-1726; helios/src/server/runtime.rs:1424-1449, 2572-2608, 2800-2827
admit_planned_with_checkpoint_accounting preserves CheckpointAccounting (including baseline_interval and initial_prefill_ns) across preemption/requeue and inbound fetch retries, then unconditionally calls checkpoints.clear_reservations() (scheduler.rs:1726). Clearing anchor_fallback_from at checkpoints.rs:49 discards the prior anchor verdict on readmission — and also guarantees anchor_fallback_from == None immediately before scheduler.rs:1794 calls is_request_anchor_endpoint.
Fix: Preserve the latched anchor decision across clear_reservations(), keyed by (raw_anchor, prompt_tokens) so normal preemption/readmission keeps the decision while growable-output prompt extension (helios/src/server/runtime.rs:2070-2093, which appends generated tokens to incoming.prompt.tokens) cleanly recomputes it. Add a preemption/readmission regression test.
3. At fraction == 0.0, selection still runs O(N) candidate pricing and increments checkpoint_skip_work_budget
Location: helios/src/scheduler/checkpoints.rs:520-641, 783; helios/src/scheduler/cost.rs:100-102, 264-268
When checkpoint_extra_work_fraction == 0.0, available is 0 (:528), while self.costs.fresh_duration(GraphKind::Snapshot, 1) (:523) only returns Some(nanos) for nanos != 0 (cost.rs:101, 266). Every candidate therefore has charge = split_ns + copy_ns >= 1 > 0 (:596-605), so no optional candidate can ever be accepted. Yet when anchor falls back to prompt_tokens, raw_anchor and every earlier message boundary enter candidates (:529-536), running 2 * N interval_prefill_ns walks per step and setting budget = true, which increments checkpoint_skip_work_budget / flare_checkpoint_skips_total{reason="work_budget"} on every request (:783; observed live by @voipmonitor at 1–3 skips/request).
Fix: Return (accounting, false, false) immediately after pushing the Anchor cut (:519) when self.policy.checkpoint_extra_work_fraction == 0.0.
4. Documentation contradictions in helios/README.md and stale unknown-cost sentences in the edited design docs
Location: helios/README.md:372-379; docs/core-design.md:1452-1453; docs/scheduling-runtime-design.md:570-572
helios/README.md:372-379was not updated and still states unconditionally that checkpoint selection "prioritizes the last eligible message boundary, using the prompt end when no message boundary is eligible" and "Unknown costs exclude extras while preserving best-effort anchor retention" — contradicting both thesnapshots == 0no-cut rule and thefraction == 0.0fallback rule.- Both
docs/core-design.md:1452-1453("Unknown prefill costs or unknown or stale snapshot-copy costs exclude extras without excluding the anchor") anddocs/scheduling-runtime-design.md:570-572("Unknown prefill costs and unknown or stale snapshot-copy costs disable extras while preserving anchor eligibility") still contradictanchor_split_is_zero_cost(checkpoints.rs:373-386), which returnsfalseon any unknown prefill price and therefore replaces the interior message anchor with the prompt end atfraction == 0.0.
Fix: Update helios/README.md:372-379 and those two follow-on sentences, and note explicitly that unavailable prefill pricing also triggers prompt-end fallback when scheduler_checkpoint_extra_work_fraction is zero.
Subtract / Simplify
1. Replace anchor_fallback_from and its 4 separate reconstructions with one latched anchor decision
Location: helios/src/scheduler/checkpoints.rs:28, 49, 364-420, 467-511, 671-685, 753-776
The PR currently reconstructs "was the anchor replaced by prompt_tokens?" in four places (checkpoint_selection_uncached, is_request_anchor_endpoint, plan_checkpoints, and promote_request_anchor) using three different pricing origins (start, baseline_start, 0) plus known_whole. Replacing anchor_fallback_from: Option<usize> with one explicit latched decision on CheckpointAccounting (e.g., resolved_anchor: Option<(usize, usize, usize)> for (raw_anchor, prompt_tokens, chosen_anchor)) and one shared helper eliminates known_whole and the multi-branch fallback logic, shrinking the production diff while fixing Blockers 1–2 and Should Fix 1–2 together.
Nits
- Zero-snapshot short-circuits (
helios/src/scheduler/checkpoints.rs:445-462, 917-963): Moveif self.limits.snapshots == 0beforeprefill_catalog_costs/interval_prefill_nsincheckpoint_selection_uncached, and short-circuitallocate_terminal_capturewhenself.limits.snapshots == 0so zero-snapshot mode avoids catalog allocation and spuriouscheckpoint_skip_*increments. - Brittle mutation literal (
verification/helios-lifecycle/check.py:325-343): The 14-line exact Rust snippet will break on any formatting or refactor (all other mutations incheck.pyare 1–4 lines). Shrink it to a 1–2 line needle targeting the consolidated anchor helper after refactoring. - PR description clarity (
AGENTS.md:88-102, 122-128): Mark "Zero-budget serving avoids extra padded prefill launches..." as an expected effect (or attach before/after served measurements including prefix-reuse impact on the revised commit, since moving the anchor from the last message boundary to prompt end changes reuse on branch/retry turns), briefly mention the design-doc updates under "What changed", and explainpromote_request_anchor's role (Endpoint→Anchorpromotion) inline.
Verified passes
- Zero-snapshot capacity (
checkpoints.rs:460-462):limits.snapshots == 0is genuinely reachable (ignition/cli/serve.py:503,helios/src/scheduler/boundary_tests.rs:194), and returning no cuts cleanly prevents splitting prefill when no snapshot row can be allocated. - TLA+ lifecycle conformance (
helios/src/scheduler/checkpoint_lifecycle_tests.rs:277-411): Exercises real production scheduler entry points across all 5 cancellation points of the multi-chunk prompt-end fallback and integrates withverification/helios-lifecycle/check.py --mutations. - Architecture & boundaries: No per-model branching, no new flags/ABI/wire fields, and no violations of the preparation/runtime boundary (
tests/test_design_review_hook.pyis solely a Git commit-trailer hook test and imposes no structural constraints onhelios/src). - Core benefit confirmed live:
@voipmonitor's 4× SM120 run (DeepSeek-V4.1-FlashTP4,--scheduler-checkpoint-extra-work-fraction 0) confirmedprefill_stepsdropped2 → 1on short 2-turn chat and3 → 2on ~12.2k-token multi-chunk prompts.
Dropped on verification
- Candidate B4 (
scripts/scheduling_sim/64-seedlearning.py(not opened) sweep): Dropped —scripts/scheduling_sim/{model.py,scheduler.py}does not model checkpoints, anchors, message boundaries, or snapshot cuts (its onlysnapshothits are policy-state serialization dicts), and this PR does not alter graph selection, service pricing, timing estimation, or refresh budgets (docs/design-review.md:195-206does not apply); served-evidence framing is addressed in Nit 3. - Candidate S2 (delete
== 0.0branch and charge the anchor through the candidateallowanceloop): Dropped — charging the anchor againstallowancewould break documented best-effort anchor retention at default0.05(docs/core-design.md:1439-1440, where splitting a short prompt adds ~100% > 5% work) and reject all anchors at0.0becausecopy_ns >= 1 > 0(checkpoints.rs:596,cost.rs:101, 264-268). - Candidate X1 (as originally proposed: delete latch and use a pure unlatched
resolved_anchor()): Dropped in unlatched form — even with same-snapshot pricing frombaseline_start, cross-capacity rolling-median updates between chunks can still flip the anchor mid-request and emit duplicateAnchorcaptures, while leaving uncached pricing oncommit/admit; replaced with a single latched anchor helper. - Candidate X2 (delete
complete_test_stepin favor ofpolicy_tests::complete_timed/boundary_tests::run_step): Dropped — existing helpers have incompatible semantics (policy_tests.rs:162-240auto-finishes requests and setsdraft_cache_consumed: -1;boundary_tests.rs:93-145lacksExecutionTiming,Mixedlane_kind, andpublished_output). Only thedur_ns = 1_000value incheckpoints.rs:2746needs fixing (covered in Blocker 1). - Candidate X3 (delete 4 new unit tests in
checkpoints.rs:2326-2781): Dropped — factually incorrect on two tests (boundary_tests.rs:193-210usesspec(None, ...)with no interior message boundaries and does not assertprefill_launches == 1;checkpoints.rs:2450-2559explicitly places interior boundaries atprompt_len - 4and assertsprefill_launches == 16), and the other tests cover multi-bucket large-prompt catalogs and the0.05negative control. - Candidate X4's
AGENTS.md:194-197citation: Dropped —docs/verification.md:133explicitly permits source matching to locate runtime mutations; kept only the needle-brittleness cleanup as Nit 2. - Candidate N2(a) ("
baseline_end == request.prompt_tokensatcheckpoints.rs:498-500is alwaysSome"): Dropped — false on growable-output readmission (helios/src/server/runtime.rs:2070-2093), whereincoming.prompt.tokensgrows whilebaseline_intervalretains the original prompt length (though the guard disappears anyway whenknown_wholeis removed). - Upstream B1 terminology ("EWMA drift"): Corrected —
helios/src/scheduler/cost.rs:74-96, 321implements a 9-sample rolling median (ReplayTimes), not an EWMA; the duplicate-anchor failure still reproduces identically on upward median shift.
Full report Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
Classify & Apply Labels
Applied: +triage:review, +performance, +area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 99.9% -
triage:design-review: 0.0% -
triage:validation: 0.0%
Priority
-
none: 82.1% -
priority:P2: 11.1% -
priority:P1: 6.7%
Type
- [✓]
performance: 98.8% -
bug: 62.2% -
duplicate: 40.7% -
enhancement: 37.8%
Area
- [✓]
area:scheduling: 90.5% -
area:caching: 43.8% -
area:preparation: 24.5%
Model
-
model:qwen3.8-27b: 37.8% -
model:glm-5.3: 24.5% -
model:deepseek-v4: 20.2% decide malicious: all_clear (100%): No malicious content found
explore
Author: FujitsuPolycom (CONTRIBUTOR, Discord "Dooner")
Motivation: At --scheduler-checkpoint-extra-work-fraction 0 the scheduler still cut prefill at an interior message boundary, forcing an extra prefill launch that operators had been paying for since #335. This PR keeps the interior anchor only when pricing says the split costs nothing, otherwise falls back to the prompt end and latches that choice across chunks.
Scale: +1854 / −19 lines in 7 files (head 69bf2cf2, was +931/−16 at a3c64835)
Proposal:
- Price whole/before/after from a single catalog slice (
checkpoints.rs:363–385), dropping the staleknown_wholethat produced duplicate Anchors under EWMA drift. - Add
CheckpointAccounting::zero_budget_anchor(:28) and keep it acrossclear_reservations()(:48–51), so preemption/readmission no longer re-decides the anchor. - Rebuild
request_anchor_endpoint(:387–458):snapshots == 0first, latch consulted first, pricing frombaseline_startinstead of 0. - Return early at fraction 0 (
:549–551) and before the catalog walk when snapshots are 0 (:482–484), so optional candidates are never priced. - Extend prompt-end promotion and inbound-restore role tagging (
:788–811,scheduler.rs:1794), plus docs and regression tests. Touches: helios/src/scheduler/checkpoints.rs(+1395/−4) — selection, pricing, promotion, latch; hottest file in the repo, three PRs landed there on 2026-11-28.helios/src/scheduler/checkpoint_lifecycle_tests.rs(+417) — four new model-conformance tests.verification/helios-lifecycle/check.py(+6) — one new mutation; harness otherwise untouched and now behind #595. Related items:- #595 Add lifecycle conformance harness Observ… (merged): replaced the harness this PR's evidence still runs on; base predates it.
- #568 Bound optional Endpoint checkpoint eviction by age-discounted marginal gain (merged): rewrote eviction hours before; this PR's claim "eviction unchanged" does not cover its promotion paths.
- #550 Restore prefix checkpoints on prefill catalogs without terminal prefill (merged): repaired the
interval_prefill_nspricing this PR depends on. - #538 Helios: checkpoint at message boundaries (merged): author's own PR that caused #550; established the interior split this one conditions.
- #335 scheduler checkpoint extra work fraction workaround (closed): documents fraction 0 as a production workaround.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/582
Autobot comments: Everything is fixed in code and evidenced — all six 2026-11-28 review findings are closed with tests, and the author added exact-SHA 4× SM120 A/B numbers (prefill launches 8→4, TTFT p50 −19% on short 2-turn; 16→10 launches, −15…−24% on mixed load) — but the formal conformance evidence is now invalidated by time: at
69bf2cf2check.py:62–80still emitsUNCHANGED stateand keeps onlyINVARIANT CorrespondsinObserved.cfg, andObservation::project(checkpoint_lifecycle_tests.rs:16–90) still omitsterminal_snapshotandpending_retirement(), all of which #595 (merged 2026-11-29 04:07) changed on main. So "the transitions match the lifecycle model" and "conflict-free with main" are weaker than they read and need a re-run after rebasing ontof7256584. Still undeclared: the inbound-restore role change atscheduler.rs:1794and the eviction-ranking consequence of prompt-end promotion. Still untested: readmission withprefix_tokens == raw_anchoroverwrites the latch (:533–535), andrequest_anchor_endpointremains per-lane-per-commit O(prompt) with up to three cache probes outside the planning scope — the same cost class #459 removed. No linked issue and no maintainer comment on any head.
Value Proposition
Value Proposition — PR #582 (helios: avoid splitting prefill on zero-budget checkpoint anchors)
Charter alignment — serves it. The change sits where the charter says scheduling cost logic belongs: helios/src/scheduler/, with no per-model branch, no new flag, no alias, no added hardware surface. It targets a measured performance defect (a wasted padded prefill launch), which is exactly the "measured performance/memory issue" category the charter lists as mergeable, and it fixes anchor selection in place rather than adding machinery. It touches no recipe/Ignition ownership boundary and no non-goal.
Novelty & status — additive. Main does not contain the fix. #595 replaced the TLA+ conformance harness but implements different behaviour; #568/#550 touch the same functions for different concerns (optional-Endpoint eviction, an earlier regression). No canonical superseding PR or merged commit exists.
Value vs cost — real but narrow. The evidence now clears the charter's #210 bar for the --scheduler-checkpoint-extra-work-fraction 0 mode: exact-SHA git archive binaries, served A/B on 4× RTX PRO 6000 SM120 TP4 with a signed DeepSeek-V4.1-Flash core, prefill launches 8→4 (short_2turn) and 16→10 (mixed_load), prefill TTFT p50 −15.1…−23.8%, clean exits, flare_message_checkpoints_total == 0. Beneficiaries are operators running zero-budget or zero-snapshot-capacity checkpointing on multi-turn prompts. Costs: reach is confined to fraction == 0 or limits.snapshots == 0 deployments; the default 0.05 path is unchanged and unmeasured; and the footprint is +1854/−19 in 7 files (~1400 lines in checkpoints.rs) for one scheduling branch. The earlier code blockers, ancillary pricing waste, and brittle mutation literal are all fixed with regression tests.
Remaining gaps (process/verification, not design):
- Rebase onto main (
f7256584) and re-run conformance: at69bf2cf2,check.py:62–80still uses the pre-#595 observed-edge/Corresponds-only harness and the 15-tuple projection, soTypeOK/OutstandingUseRetainsRowwere never checked on those states; "conflict-free against44f59df5" is stale. - Declare the inbound-restore role change (
scheduler.rs:1794) and itsRetentionRank/promoteeviction consequence. - Link an issue and secure maintainer engagement;
voipmonitor'sCHANGES_REQUESTEDpredates the fix push and adjacent owners are silent.
Verdict: Worth it with changes. Direction, placement and served evidence are sound and prior blockers are closed in code; merge after the post-#595 rebase/rerun and the description/process gaps above.
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: 99.2% -
triage:validation: 0.7% -
triage:design-review: 0.1% -
triage:partial: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
performance: 99.6% -
bug: 50.0% -
community: 40.7% -
enhancement: 13.3% -
duplicate: 5.3% -
documentation: 0.0%
Area
- [✓]
area:scheduling: 99.0% -
area:selene: 8.5% -
area:caching: 6.8% -
area:preparation: 6.0% -
area:memory: 0.7% -
area:api: 0.5% -
area:engram: 0.2% -
area:rocenante: 0.1% -
area:kernels: 0.1% -
area:packaging: 0.1% -
area:orbit: 0.0%
Model
-
model:qwen3.8-27b: 2.6% -
model:deepseek-v4.1: 1.8% -
model:nemotron-3.5-bolt: 1.6% -
model:kimi-k3.1: 0.5% -
model:glm-5.3: 0.5% -
model:inkling-small: 0.2% -
model:qwen3.8-flash-next: 0.2% -
model:deepseek-v4: 0.2% -
model:gemma4: 0.1% -
model:mimo-v2.6: 0.1% -
model:muse-glimmer: 0.0%
Apply Labels (Intake)
No label changes
Subtraction and simplicity
Reviewed PR #582 (head 69bf2cf2) for subtraction/simplicity/conventions. The production change is small (~150 lines) and introduces no new knob, flag, wrapper or dead code — nothing speculative to delete outright. But three computations are each written 2–3 times, and ~1,560 lines of new tests duplicate an existing shared fixture helper and re-assert two scenarios twice.
- Split-cost pricing exists twice — new
anchor_split_is_zero_cost(checkpoints.rs:363–385) repeats the before+after−whole arithmetic already inlined at:606–622. Onesplit_prefill_ns(...)helper deletes ~20 lines and one of two definitions of "what a split costs". - Latch rule written three times —
:398–402,:528–536,:703–720spell the same three-clause condition. OneLiveRequest::anchored_endpoint()collapses the 18-linemap_or_elseat:703–720to a single line; this is the highest-value fix, since a change to the rule can silently diverge across selection, promotion and planning. request_anchor_endpoint's 37-lineprice_startcascade (:403–439) — five branches, three barereturn Some(raw_anchor), plus twoready_by_prefix/parent()probes, and it prices the split frombaseline_startwhile selection prices it fromconsumed_tokens. With the latch consulted first, delete:403–439and usebaseline_start.min(raw_anchor)(one formula, ~33 lines, two cache probes per lane gone).promote_request_anchor(:793–797) walksmessage_boundariestwice per lane per commit (checkpoint_anchor()at:791,:793,:794); runs per lane fromscheduler.rs:2411. Return(raw, chosen)and hoist.- Test duplication:
complete_test_step(checkpoints.rs:1980),finish_step(checkpoint_lifecycle_tests.rs:494–541) and pre-existingcomplete_records(:94–118) are one helper written three ways; scenario Part A (:2778–2816) is re-asserted at:2912–2951and Part C (:2837–2905) elsewhere, so ~110 lines go (keep Part B, the nonzero-fraction guard); the 2-second wall-clock test at:2502–2611is better served by the served numbers.
Conventions: no AGENTS.md (not opened) exists, so no written rule is broken; the only implicit convention broken is keeping shared fixtures in helios/src/scheduler/tests.rs. Doc edits are proportionate — nothing to cut.
Open: whether the :415–436 probes guard an observed promotion miss (would change F3 from deletion to rewrite); whether mixed_graphs() can emit the hand-built Mixed descriptor; complete_records' other callers.
Correctness and contracts
PR #582 (head 69bf2cf2) is functionally the right fix — the double-Anchor pricing bug, the latch, and zero-capacity short-circuiting are all correctly implemented and tested — but four Major issues remain and the formal-evidence claim does not survive a rebase.
- Major — conformance evidence is on the pre-#595 harness.
verification/helios-lifecycle/check.pystill emits a cfg with onlyINVARIANT Correspondsand a no-op observed step, andObservation::projectis still[u64; 15](checkpoint_lifecycle_tests.rs:16); main post-#595 usesObservedState/ObservedSafeand a wider projection. No.tlafile is touched, soTypeOK/OutstandingUseRetainsRow/PublicationWaitsForCopy/OneGuardAndCapturePerRequestare never checked on the new latch states. The "59 transitions / 12+21 mutations" figure describes the weaker set; "conflict-free vs44f59df5" predates the #595 merge. - Major — zero capacity silences the skip metrics.
checkpoints.rs:482-484and:957-959return before the flags published at:817-818and the increments at:964-998, soflare_checkpoint_skips_total{reason}is 0 by construction at--prefix-cache-memory 0; part of the claimed "unknown_cost→ 0–1" is measurement suppression. - Major — undeclared retention-role change for Selene inbound restores.
scheduler.rs:1794now classifies viais_request_anchor_endpoint, so an inbound restore at the prompt end with an interior anchor publishes asEndpoint, notAnchor;cache.rs:345-350only raises roles, so the downgrade sticks and cross-instance prefixes rank lower under eviction. Unstated, untested, inverse of pre-PR. - Major —
request_anchor_endpointis O(prompt) per lane per commit.checkpoints.rs:440-453allocates a fresh catalog and does up to three full walks plus two cache probes; called atscheduler.rs:2411(beforecommit_checkpoint_planswrites the latch at:2412) and at:1794, outside the only memo scope. No call-count test, no isolated measurement. - Minor — two silent fallbacks in
request_anchor_endpoint(:437-439trusts an interior anchor with no pricing;:424-428makes a failed probe price from 0), neither tested. - Minor — the predicate is
<=not==(:384saturating_sub(whole) == 0), while docs say "adds zero predicted prefill work"; docs also omit that zero capacity disables terminal capture too.
Sound: same-snapshot pricing, latch survival across clear_reservations/readmission (:48-51, scheduler.rs:1726), fraction-0 early return (:549-551), zero-capacity ordering ahead of prefill_catalog_costs. Charter #210 evidence is met for fraction 0 (prefill launches 8→4, 16→10; TTFT p50 −15…−24%) but not for default 0.05. Open: green rebase? promotion cost? #568 eviction interaction? no maintainer review since the push.
Final review
Recommendation: Ready To Merge
All Round 1 correctness blockers, major issues, and minor items are cleanly resolved in 69bf2cf with targeted regression tests and exact-SHA 4× SM120 flare run A/B evidence (-20% to -50% prefill launches and -15.1% to -23.8% prefill TTFT p50 on multi-turn zero-budget workloads), and priority contributor @voipmonitor has independently verified and approved this head. No correctness, safety, or default-path regressions remain. Ensure CI (or a quick rebase onto main f7256584) executes main's post-1a5d4d8c check.py --mutations harness on the merged commit, and consider the small non-blocking follow-up to latch zero_budget_anchor on full-prompt cache hits to avoid repeated per-decode-step re-pricing in promote_request_anchor.
Merge Risk
Level: Low
- Production behavior changes are strictly gated behind
self.limits.snapshots == 0orself.policy.checkpoint_extra_work_fraction == 0.0(helios/src/scheduler/checkpoints.rs:388-396, 482-484, 510-511, 549-551, 957-959); the default0.05scheduling and optional-Endpointeviction paths are unchanged. - No wire contracts, captured-graph contracts, config knobs, concurrency primitives, or per-model branches are introduced; all 7 modified files merge cleanly against current
main(f7256584). - The only residual runtime cost on the zero-budget path is minor CPU/allocation overhead in
promote_request_anchoron decode steps of full-prompt cache hits (wherezero_budget_anchorremainsNone), which does not affect correctness or undo the measured TTFT gains.
Walkthrough
helios/src/scheduler/checkpoints.rs: Short-circuitslimits.snapshots == 0before catalog pricing (:482-484) and terminal capture allocation (:957-959); adds same-catalog split-cost checkanchor_split_is_zero_cost(:363-385), latches(raw_anchor, chosen)inCheckpointAccounting::zero_budget_anchor(:28, preserved acrossclear_reservations()at:48-51, written at:526, 534, read at:529-532, 711-717), returns early after theAnchorcut whencheckpoint_extra_work_fraction == 0.0(:549-551), resolves a single anchor endpoint inrequest_anchor_endpoint/is_request_anchor_endpoint(:387-463) forpromote_request_anchor(:788-811), and adds regression tests covering zero capacity, multi-chunk fallback, upward/downward EWMA drift,Mixedprefill alignment shifts, partial prefix hits, preemption readmission, and zero-fraction skip counters (:2364-3501).helios/src/scheduler.rs: Routes Selene inbound-restore role classification (:1792-1808) throughself.is_request_anchor_endpoint(request, inbound.consumed_tokens)so prompt-end restores match the resolved zero-budget anchor.helios/src/scheduler/checkpoint_lifecycle_tests.rs: AddsCheckpointReservation.tlatrace-conformance tests for multi-chunk zero-budget fallback with cancellation points (:278-411) and upward EWMA drift +Mixed(256)alignment shifts (:414-692).verification/helios-lifecycle/check.py: Adds a single-line Rust mutation guard (:325-330) asserting multi-chunk zero-budget anchor fallback is retained.docs/cli-design.md,docs/core-design.md,docs/scheduling-runtime-design.md: Document zero-capacity cut suppression and zero-fraction interior-anchor split pricing, including unknown-cost fallback to the prompt-end anchor.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduling/checkpoint accounting, tests, docs, and one mutation test entry; no unsafe code, external I/O, or suspicious directives.
- [PASS] Charter & value fit: Fixes a measured zero-budget scheduling defect in Helios with no new flags, no per-model branches, and exact-SHA served 4× SM120 A/B benchmarks clearing the #210 evidence bar.
- [PASS] Related / duplicate / conflict check: Additive over
main(f7256584) and #568/#550; clean 3-way merge across all 7 touched files;@voipmonitorapproved69bf2cf2. - [WARN] Tests & verification evidence: Unit (
394 passed), pytest (312 passed), and served 4× SM120 A/B checks are strong, butcheck.py --mutationsran on baseba3afb13(pre-1a5d4d8c), so CI / a post-rebase run should confirm the 59 newCheckpointReservationedges passmain'sObservedState/ObservedSafefull-.cfginvariant check.
Blockers
None.
Should Fix
- Verify TLA+ conformance on
main's post-1a5d4d8charness before/on merge (verification/helios-lifecycle/check.py:60-93onmain): Branch head69bf2cf2is based onba3afb13, wherecheck.py:62-80only evaluatesINVARIANT CorrespondsonObserved.cfg.maincommit1a5d4d8caddedObservedState/ObservedSafeand carries allCheckpointReservation.cfginvariants (TypeOK,OutstandingUseRetainsRow,PublicationWaitsForCopy,OneGuardAndCapturePerRequest,CancelledRequestsHaveNoReservation,GuardsHaveNoGPUUse). Manual inspection of the 59 new edges (helios/src/scheduler/checkpoint_lifecycle_tests.rs:278-692) indicates they satisfyObservedSafe(fences stay withinMaxFence = 2, cancelled decoder rows arePublishednotOwned), and the diff merges cleanly — confirm CI on the merge commit (or a quick rebase ontof7256584) passespython3 verification/helios-lifecycle/check.py --mutations. - Avoid per-decode-step re-pricing in
promote_request_anchoron full-prompt cache hits atfraction == 0.0(helios/src/scheduler/checkpoints.rs:387-458, 788-811): Requests admitted on a full-prompt cache hit (consumed_tokens == prompt_tokens) never execute a prefill step, soplan_checkpoints(:699) never populatesrequest.checkpoints.zero_budget_anchor. Becausecommitcallsself.promote_request_anchor(lane.request)for every lane on every step (helios/src/scheduler.rs:2411), every decode/speculative step of such a request re-runsrequest_anchor_endpoint(cache probes, a smallVec<PrefillCatalogCost>allocation, and 3 stride-basedinterval_prefill_nscalls). Latchzero_budget_anchor = Some((raw_anchor, anchor))insidepromote_request_anchoroncerequest.consumed_tokens >= raw_anchor as u64(note: keeppromote_request_anchorbeforecommit_checkpoint_plansathelios/src/scheduler.rs:2411-2412so existing checkpoints are promoted before snapshot-quote eviction runs).
Subtract / Simplify
- Deduplicate the latch lookup (
helios/src/scheduler/checkpoints.rs:398-402, 528-532, 710-717): Extract a smallCheckpointAccounting::latched_zero_budget_anchor(&self, raw_anchor: usize, prefix_tokens: u64) -> Option<usize>method sorequest_anchor_endpoint,checkpoint_selection_uncached, andplan_checkpointsshare one definition instead of repeating the same guard three times. - Avoid redundant
checkpoint_anchor()scans inpromote_request_anchor(helios/src/scheduler/checkpoints.rs:391, 790-797): Computelet raw_anchor = request.checkpoint_anchor();once and pass it to a helper (request_anchor_endpoint_for) rather than walkingmessage_boundariesup to three times per lane per commit. - Optional test deduplication: Part A of
zero_fraction_aligned_interior_anchor_and_mixed_prefill_preserve_exact_contracts(helios/src/scheduler/checkpoints.rs:2778-2816) is subsumed by(a)at:2909-2951;complete_test_step(checkpoints.rs:1980-2054) andfinish_step(checkpoint_lifecycle_tests.rs:494-541) can be consolidated withcomplete_records(checkpoint_lifecycle_tests.rs:94-118) intests.rs(not opened); and the repeated inlineGraphDescriptor { kind: GraphKind::Mixed, ... }literals (checkpoints.rs:2847-2861, 3024-3038, 3252-3266,checkpoint_lifecycle_tests.rs:569-583) can reuse a small descriptor helper likeextra_graphs()(checkpoints.rs:1133-1147).
Nits
docs/cli-design.md:708,docs/core-design.md:1438-1439,docs/scheduling-runtime-design.md:554: Optionally note that zero snapshot capacity also skips terminal captures (matchinghelios/src/scheduler/checkpoints.rs:957-959), not just prefill checkpoint cuts.
Dropped on verification
- Stale review-state claim ("
voipmonitor'sCHANGES_REQUESTEDstands"): Verified in PR #582 discussion that@voipmonitorre-tested69bf2cf2and postedAPPROVEDon 2026-11-29 17:14. - TLA+ projection width /
44f59df5ordering claims: Upstream lenses claimedmainpost-1a5d4d8cwidenedObservation::projectpast 15 elements and that44f59df5predates1a5d4d8c. Verified onmainthatcheck.py:30andcheckpoint_lifecycle_tests.rs:16still use[u64; 15](width 15, populating those slots withterminal_snapshotandpending_retirement()), and1a5d4d8cis an ancestor of44f59df5. - Zero-capacity skip-counter suppression (
checkpoints.rs:482-484, 957-959): Dropped; explicitly configuring--prefix-cache-memory 0(flare_snapshot_capacity == 0) intentionally disables checkpoint planning (requested in Round 1), and the8GiBA/B runs independently confirm theunknown_cost/work_budgetskip reductions. - Claimed Selene inbound-restore role downgrade (
scheduler.rs:1794): Provably false. Pre-PR comparedrequest.checkpoint_anchor() == inbound.consumed_tokens; post-PR, an inbound restore atraw_anchorstill getsAnchorviacheckpoints.rs:394(request.prefix_tokens == raw_anchor as u64), a prompt-end restore with a zero-cost interior split still getsEndpoint(unchanged), and a prompt-end restore with a costly interior split is upgraded fromEndpointtoAnchor. - Claimed O(prompt) complexity of
interval_prefill_nsand suggestion to swapscheduler.rs:2411-2412:interval_prefill_ns(checkpoints.rs:219-266) skips uniform chunks in O(1) via stride pricing (O(|catalog|)), and movingpromote_request_anchoraftercommit_checkpoint_planswould allowcommit_checkpoint_plansto evict a cached checkpoint beforepromote_request_anchorraises its role/epoch. - Claimed silent fallbacks in
request_anchor_endpoint(checkpoints.rs:424-428, 437-439)::437-439(baseline_start > raw_anchor && baseline_start < prompt_tokens) matchescheckpoint_selection_uncached:533-536andmain;:424-428cannot hit an evictedprefixorparentmid-flight becauseCache::pin(helios/src/cache.rs:511-521) pins the entire ancestor chain while the request is live. - Predicate
<=vs==doc pedantry (checkpoints.rs:384): Matches the pre-existing split-cost formula atcheckpoints.rs:621; "adds zero predicted prefill work" accurately describesadditional_work == 0. - Replace
checkpoints.rs:606-622with a 3-callsplit_prefill_nshelper: Dropped because recomputingwholeinside the helper would discard thebetweeninterval cache (checkpoints.rs:573, 592-605). - Delete
checkpoints.rs:403-439in favor ofbaseline_start.min(raw_anchor): Provably broken; whenbaseline_start == prompt_tokens(full-prompt cache hits and Selene inbound restores),price_start = raw_anchorproducesbefore = 0andafter = whole, unconditionally returningSome(raw_anchor)and breakingcheckpoints.rs:2722-2774and:3198-3234. - Claim that Part C (
checkpoints.rs:2837-2905) duplicates:3009-3101: Part C testsMixed(512)retaining prompt-end fallback (200 -> 1024), whereas:3009testsMixed(256)shifting alignment into a zero-cost interior anchor (768). - Claim that
checkpoints.rs:2502-2611has a flaky 2-second wall-clock assertion:now_ns(:2555-2610) is deterministic simulated virtual time summed from hardcodeddur_nsconstants, not wall-clock time.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 94.3% -
triage:validation: 4.1% -
none: 1.3% -
triage:design-review: 0.1% -
triage:integration: 0.1% -
triage:verify-for-closure: 0.0% -
triage:investigate: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: yes (78%): 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 #582 helios: avoid splitting prefill on zero-budget checkpoint anchors
Head to test: 69bf2cf2 (rebase onto main f7256584 first — see Gate 0). Diff: 7 files, +1854/−19.
Hardware: cn5 only, all 4 GPUs. Budget: ~2.5 h wall clock, of which ~1.5 h is GPU. cn7 is explicitly out of scope.
Verdict this plan serves: the final review is Ready To Merge with @voipmonitor approved; testing here is confirmation + independent measurement, not defect hunting. Both correctness blockers from Round 1 (stale known_whole duplicate Anchor, Mixed-alignment duplicate Anchor) are fixed in code at this head, so the launch/capture counts below should simply be clean, and any deviation is a real regression signal.
0. What the change actually touches (and why most runs measure nothing)
Every behavioural change is gated on one of two conditions (helios/src/scheduler/checkpoints.rs):
self.limits.snapshots == 0→ no checkpoint cuts at all (:482-484), no terminal capture (:957-959).self.policy.checkpoint_extra_work_fraction == 0.0→ interior anchor kept only if the split prices at zero; otherwise latch the prompt end (:510-551).
Two traps that would otherwise waste the whole run:
- The default is
0.05, so the flag must be passed explicitly:--scheduler-checkpoint-extra-work-fraction 0(flare-cli/src/cli.rs:638-639). --prefix-cache-memory 0does not makesnapshots == 0.snapshotsis the GPU-side prefix-cache row budget, computed asrows - executionfrom the row/page virtual extents (helios/src/runtime_core/memory.rs:1026-1044, 1113, 1144);--prefix-cache-memoryonly sizes the host offload tier (selene/src/offload.rs:105-114). So thesnapshots == 0branch is essentially untestable from the CLI on cn5 — recordflare_snapshot_capacityat startup and treat the fraction-0 path as the test surface. Do not claim coverage of the zero-capacity branch from a GPU run.
Also: message_boundaries come from the rendered chat template (helios/src/server/request.rs:300), so the new code is inert on one-shot prompts. The change only fires on a multi-turn request whose last complete message boundary lies strictly interior to the prompt. The repo's own load scripts cannot drive this — scripts/benchmark_scheduler.py:102 builds a single role:"user" message and scripts/benchmark_prefill.py:35 sends raw token strings to /v1/completions. Do not use them for the A/B; they would "prove" a null result.
Gate 0 — CPU-only, free, do this before booking a GPU (≈30 min)
- Rebase
69bf2cf2ontof7256584(the review's only pre-merge should-fix). The head is based onba3afb13, which predates1a5d4d8c'sObservedState/ObservedSafeharness. cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server --lib scheduler::→ expect 394 pass.python3 verification/helios-lifecycle/check.py (not opened) --mutationson the rebased commit → confirms the 59 newCheckpointReservationedges satisfy the post-1a5d4d8cfull-.cfginvariant set. This is the one piece of evidence the PR is actually missing; if it fails, stop and send back to the author — no GPU time.- Build both binaries from
git archiveof the exact base and head commits, so the A/B is attributable.
Gate 1 — 15-minute probe on main (do not skip)
On cn5, GPUs 0-3, GLM-5.3-Flash NVFP4 TP4, default fraction 0.05, send one 2-turn chat request with prompt > 4096 tokens (so it spans ≥2 prefill chunks and the last message boundary is strictly interior).
flare_checkpoint_captures_total{role="anchor"}must increment. If it stays 0, the anchor path is not exercised on this core/GPU and the whole A/B is void — report that instead of guessing.- Record
flare_snapshot_capacity,flare_pages, and the startup cache summary (per-rankN shared snapshot slots) into the test log. - Sanity-check the launch counter is live:
flare_graph_launches_total{kind="prefill"}climbs.
Test 1 — the PR's claim: A/B on the same box, same session (≈60 min GPU)
Setup (both arms identical):
flare run nvidia/GLM-5.3-Flash-NVFP4 --gpus 0,1,2,3 \
--scheduler-checkpoint-extra-work-fraction 0 \
--prefix-cache-memory 64G --port 8000
- Arm A =
mainbinary, Arm B = PR-head binary. Do not change any other flag between arms. - Run A, B, B, A to cancel thermal drift, and record the base commit hash.
- Single-stream,
max_tokenssmall (e.g. 16), 5 repetitions per prompt shape.
Prompt set — 4 shapes, multi-turn chat (/v1/chat/completions), sized with /v1/messages/count_tokens:
| # | Shape | What it proves |
|---|---|---|
| (i) | 2-turn, ~100-token prompt, last boundary not chunk-aligned | The headline win: prefill launch count drops 1 |
| (ii) | 2-turn, ~12k-token prompt spanning ≥2 chunks, boundary interior | Multi-chunk fallback survives chunk progress |
| (iii) | boundary exactly chunk-aligned / zero predicted split cost | Interior anchor is kept, not over-eagerly dropped |
| (iv) | single-turn, no interior boundary | Control: must be byte-identical between arms |
Assertions, per request, from /metrics deltas (server is idle before/after — wait for flare_active_requests == 0):
flare_graph_launches_total{kind="prefill"}— B must be exactly 1 lower than A on (i) and (ii); unchanged on (iii) and (iv). This is the claim; it is a discrete count, so it either shows or it doesn't.flare_checkpoint_captures_total{role="anchor"}— exactly 1 per request on every shape in both arms. >1 is the duplicate-anchor regression returning; 0 on (i)/(ii) means the anchor never armed.flare_message_checkpoints_totalvsflare_prompt_checkpoints_total— the discriminator for which anchor was chosen. Expect A: message-anchored on (i)/(ii); B: prompt-anchored on (i)/(ii) and message-anchored on (iii). A wrong discriminator with a correct launch count means the launch saving came from somewhere else.flare_checkpoint_skips_total{reason="work_budget"}— 0 on the PR arm at fraction 0 (Round 1's spurious-increment defect; the early return at:549-551should silence it).unknown_costshould be 0–1.- TTFT — no TTFT metric exists; measure client-side first-SSE-token arrival per request and report p50 for each shape. Expected: −15 to −25% on (i)/(ii) per the author's numbers; treat any TTFT improvement on (iii)/(iv) as suspicious, since nothing should change there.
- Clean exit (
exit=0) on both arms; noflare_requests_failed_totalincrement.
Test 2 — prefix reuse, free on the same runs (≈15 min)
This is the regression the PR most plausibly introduces: at zero budget the anchor moves from the last message boundary to the prompt end, so reuse now depends on the exact continuation, and regenerate/branch/tool-retry turns may miss the checkpoint they used to hit. Nothing in the PR measures this.
- Send each conversation twice, identical prefix.
- Compare across arms:
flare_cache_hits_total,flare_cache_reused_tokens_total,flare_host_cache_hits_total,flare_host_cache_reused_tokens_total,flare_snapshot_publications_total,flare_snapshot_evictions_total. - Also send one branch variant (same prefix, different final assistant turn) — that is precisely the case where prompt-end anchoring can lose a hit the message anchor used to provide. Report the reuse delta even if it is negative; that is the honest cost of the change and belongs in the merge record.
Test 3 — preemption/readmission: only if deterministic in ≤30 min
The latch (zero_budget_anchor) is now preserved across clear_reservations() (checkpoints.rs:48-51). Drive readmission by admitting more concurrent long-prompt requests than --max-concurrency allows, and assert one flare_checkpoint_captures_total{role="anchor"} per request and a non-zero flare_preemptions_total. If flare_preemptions_total stays 0, stop — the unit test at :3360-3440 already covers this, and a non-preempting run proves nothing.
Explicitly out of scope — do not spend GPU time
- cn7 (GB10, arm64). The PR is pure scheduler/cache policy: no CUDA, kernel, or architecture-specific code. A single-GPU arm64 box adds nothing and cannot even span TP.
- The default
0.05path. Unchanged by this PR; the probe at Gate 1 is all it needs. - Snapshot eviction ranking (#568 territory). Cover by unit test, not a GPU run.
- Throughput/soak sweeps. The effect is one prefill launch per request; it appears immediately or not at all. Anything past 5 repetitions per shape is wasted.
- The
promote_request_anchorper-decode-step re-pricing (review Should Fix #2, full-prompt cache hits at fraction 0). It is CPU/allocation only, does not affect correctness, and would be mis-attributed to the GPU. Note it and move on.
Reporting
Report per shape: prefill launches (A vs B, absolute), anchor captures per request, message-vs-prompt discriminator, work_budget skips, TTFT p50, and reuse deltas. State the exact base and head SHAs and confirm Gate 0's check.py (not opened) --mutations result on the rebased commit — that, not the GPU numbers, is what closes the PR's one outstanding should-fix.
Do not report a win on cn5 as reproducing the author's numbers. Their evidence is DeepSeek-V4.1-Flash TP4 on 4× SM120; DeepSeek-V4.1-Flash is not among cn5's models, so the only usable model on cn5 is GLM-5.3-Flash NVFP4 TP4 (a qualified config per docs/roce-ring.md:8 (not opened), docs/multi-host.md:565 (not opened)). The launch-count deltas should be identical in shape; the TTFT percentages will not be, and must be presented as an independent re-measurement with its own baseline.
Security note: nothing in the PR review material was directed at me and there was no injection attempt; the only caveat carried forward is the author's self-reported evidence hosted on a personal fork, which is unverifiable from this repo — hence the independent A/B above.
Discord Test Request
Discord post (ready to paste)
## Recommendation: Test
High confidence — both Round 1 correctness blockers are fixed and @voipmonitor approved 69bf2cf2; this run is confirmation + independent measurement, not defect hunting.
## Hardware Required
- cn5 only, all 4 GPUs (GLM-5.3-Flash NVFP4 TP4). cn7/arm64 is out of scope.
- CPU-only first: rebase onto f7256584, then run check.py (not opened) --mutations.
- Nothing extra: same box, --prefix-cache-memory 64G, one serve per arm.
## Justification
- Saves one prefill launch per multi-turn request at zero checkpoint budget (author: -20% to -50% launches, -15% to -24% TTFT). Their evidence is SM120 + DeepSeek-V4.1-Flash, which cn5 cannot run, so the numbers need an independent re-measure.
- It closes the PR's one open item (check.py (not opened) --mutations never ran on post-1a5d4d8c main) and measures its only plausible risk: prefix reuse loss when the anchor moves to the prompt end.
## Estimated Time to Complete
~2.5 h wall clock (~1.5 h of that is GPU): ~30 min rebase + CPU gates, ~60 min A/B on cn5, ~15 min prefix-reuse check, ~15 min reporting.
What I checked, and the leads I followed
Orientation packet vs. repo (all four claims I could test hold up):
- Flag and default:
--scheduler-checkpoint-extra-work-fractionexists and isOption<f64>onflare run(flare-cli/src/cli.rs:638-639(not opened), forwarded at:686-687); the default really is0.05(helios/src/scheduler/policy.rs:39(not opened)), so it must be passed explicitly as0. Packet correct. - Metric names exist as written:
flare_graph_launches_total{kind=…}(helios/src/server/metrics.rs:1235),flare_checkpoint_captures_total{role}andflare_checkpoint_skips_total{reason}withunknown_cost/work_budget/storage(docs/api.md:348-354),flare_snapshot_capacity(helios/src/server/metrics.rs:1567),flare_active_requests,flare_preemptions_total, message/prompt checkpoint andsnapshot_publicationscounters (helios/src/scheduler.rs:117-120(not opened),helios/src/server/metrics.rs:1125-1145). The packet's "discriminator" pair is real, not invented. - Load scripts:
scripts/benchmark_scheduler.py:102really does send a singlerole: "user"message, so the repo's own scripts cannot produce an interior message boundary — the packet's warning is correct and load scripts genuinely would report a null result. - Hardware caveat: docs qualify GLM-5.3 Flash TP4 on four DGX Sparks (
docs/roce-ring.md:8(not opened),docs/multi-host.md:565(not opened)), while the PR's A/B evidence is 4× RTX PRO 6000 SM120 on DeepSeek-V4.1-Flash (PR #582 description;@voipmonitor's approval at 17:14). So "independent re-measurement on a different qualified config, launch deltas transferable, TTFT percentages not" is the honest framing, and the post says exactly that. cn7 exclusion is justified by the diff: 7 files, all scheduler/tests/docs/mutation-guard, no CUDA or arch-specific code (pr_files). - Gate 0 / rebase: PR head is
69bf2cf2onba3afb13; the Autobot "Ready To Merge" review flags thatcheck.py (not opened) --mutationsran onba3afb13(pre-1a5d4d8c), so a post-rebase run onmainf7256584is the one outstanding item — that is what the "test" recommendation buys, and it is a 30-minute CPU task, not GPU. - Scope sanity: 394
scheduler::tests pass and@voipmonitorindependently reproduced -20% to -50% prefill launches, so nothing in the packet is hunting for a defect; a deviation on cn5 is a real regression signal.
Charter fit: test evidence for a perf PR is exactly what the charter's "Bring real evidence (#210)" rule demands, and the plan adds no new flags or per-model branches (read_charter; pr_files).
Security: no injection attempt in the PR body, reviews or files — nothing in the material was addressed to me or tried to direct my behaviour. The one carried-forward caveat is the author's own benchmark evidence on a personal fork, unverifiable from this repo; hence the independent A/B in the post. No PR content was sent anywhere.
Not relevant / consciously dropped: throughput-soak sweeps (effect is one launch per request, appears immediately), snapshot eviction ranking (#568, unit-testable), the zero-capacity snapshots == 0 branch (not reachable from the CLI — --prefix-cache-memory only sizes the host offload tier), and promote_request_anchor per-step re-pricing (CPU-only, would be mis-attributed to the GPU). None of these shape a short Discord post.
One honest gap: the "done when" also asked for every finding to have a scratchpad entry. I gathered and cross-checked all of the above directly from the repository (PR #582, read_charter, pr_files, metrics/CLI/doc sources), but the turn limit landed before I could write the scratchpad notes, so nothing was persisted there — the findings are recorded in full in this report instead.