PR #582: helios: avoid splitting prefill on zero-budget checkpoint anchors

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/01394ab1-5441-48d6-aa63-77f7e3688f51

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:

Full report · Notes

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".

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

  1. 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::Anchor captures after modest upward GPU timing drift, because the latched initial_prefill_ns is passed as a stale known_whole and compared against freshly priced before/after (helios/src/scheduler/checkpoints.rs:364-388, :471-481, :498-500).
    • Duplicate Anchor capture when Mixed prefill shifts chunk alignment, because the else if branch re-prices from baseline_start = 0 (checkpoints.rs:489-507). Three majors remain too: is_request_anchor_endpoint prices from start = 0 instead of baseline_start and checks raw_anchor before snapshots == 0 (:390-419, called from helios/src/scheduler.rs:1794); clear_reservations() wipes anchor_fallback_from although admission reuses the accounting across preemption/readmission (checkpoints.rs:48-52, helios/src/scheduler.rs:1726); and at fraction == 0.0 the candidate loop still walks every message boundary with available == 0, costing 2N interval walks per step and emitting spurious checkpoint_skip_work_budget increments (checkpoints.rs:520-639) — the reviewer observed flare_checkpoint_skips_total{reason="work_budget"} firing at fraction == 0.0 in 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.
  2. Conceptual duplication. CheckpointAccounting.anchor_fallback_from is reconstructed in four places — selection (:467-511), is_request_anchor_endpoint (:390-420), plan_checkpoints (:670-685) and promote_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, price whole/before/after from a single catalog snapshot, and keep it across clear_reservations() like baseline_interval — is the right shape and is meaningfully smaller than what is here.

  3. 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.

  4. 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-343 that any reformat breaks. The PR's own complete_test_step helper passed dur_ns = 1_000 against a 512,000 ns cost, driving the EWMA down so saturating_sub clamped 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.

  5. 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:

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

  1. Rebase and restructure as above: one latched anchor decision, one catalog snapshot per pricing, priced from baseline_start, preserved by clear_reservations(), and snapshots == 0 checked first. Bind the existing lifecycle/TLA+ model to that latched field rather than to a re-derived predicate.
  2. Regression tests for upward EWMA drift, Mixed-prefill alignment shift, partial prefix hit shorter than raw_anchor, and preemption/readmission — with timing values that do not collapse the EWMA.
  3. A served-workload benchmark over main at --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.
  4. Document the reuse trade in docs/core-design.md:1447-1457 and docs/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.
  5. Address the reviewer's remaining majors so the checkpoint_skip_work_budget metric is not misleading at fraction == 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:

Should fix:

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

Full report · Notes

Simplicity

Verdict: blocking issues

Blocking:

Should fix:

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

Full report · Notes

Architecture

Verdict: blocking issues

Blocking:

Should fix:

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

Full report · Notes

Prose

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 4 (all in the PR description) Link: https://github.com/NVIDIA/hyperflare-inference/pull/582

Full report · Notes

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:

  1. 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 Anchor cut at request.prompt_tokens — the exact duplicate prompt-end capture the PR description says it avoids.
  2. is_request_anchor_endpoint is 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's SelectionCache/planning-scope design for precisely the case (zero fraction, zero-cost interior anchor) the PR wants to preserve.
  3. Nit: the same helper prices from literal 0, a third origin, so it can disagree with checkpoint_selection about 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.)

Full report · Notes

Subtractive

Verdict: make it smaller first The change: +931 / −16 lines, 7 files Could remove: about 410 lines, in 5 places Biggest subtractions:

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.

Full report · Notes

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:

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:

  1. Duplicate RetentionRole::Anchor captures under ordinary timing drift — checkpoints.rs:364-388 with :471-473 / :498-500. anchor_split_is_zero_cost compares freshly priced before/after against the cached EWMA accounting.initial_prefill_ns passed as known_whole. Under upward drift before + 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.
  2. Duplicate Anchor when Mixed prefill 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 hardcoded 0 in is_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.
  3. The latched decision is destroyed on readmission — clear_reservations() sets anchor_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 fresh consumed_tokens; same request, same prompt, possibly a different anchor, orphaning the previously captured prompt-end anchor.
  4. A third, unmemoised price model on the commit hot path — is_request_anchor_endpoint (:390-420) rebuilds prefill_catalog_costs and walks the full 0..prompt interval, bypassing checkpoint_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.
  5. The evidence metric is self-contradictory today — at fraction 0, anchor falls back to prompt_tokens, so every message boundary still enters candidates (:529-539) and is priced with available == 0 (:528), setting budget = 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 at fraction == 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

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.

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.

Full report · Notes

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.

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.

Full report · Notes

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:

  1. Chunk 1 (start = 0): initial_prefill_ns latches 1_024_000. Branch A (:470-488) computes 512_000 + 512_000 - 1_024_000 == 0, selects 512 (anchor_fallback_from = None), runs 0..512, and publishes 512 as RetentionRole::Anchor.
  2. Normal upward GPU jitter on Chunk 1 (e.g. 515_000 ns, or a post-TTL window reset in cost.rs:82-84) shifts the rolling median upward (e.g. 513_500 ns).
  3. Chunk 2 (start = 512): raw_anchor > start is now false, so execution enters Branch B (:489-505). It calls anchor_split_is_zero_cost(..., baseline_start = 0, end = 1024, raw_anchor = 512, known_whole = Some(1_024_000)), getting 513_500 + 513_500 - 1_024_000 = 3_000 != 0 (!false == true), flips to anchor = 1024, and captures a second RetentionRole::Anchor at 1024.

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):

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

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

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

  1. Zero-snapshot short-circuits (helios/src/scheduler/checkpoints.rs:445-462, 917-963): Move if self.limits.snapshots == 0 before prefill_catalog_costs / interval_prefill_ns in checkpoint_selection_uncached, and short-circuit allocate_terminal_capture when self.limits.snapshots == 0 so zero-snapshot mode avoids catalog allocation and spurious checkpoint_skip_* increments.
  2. 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 in check.py are 1–4 lines). Shrink it to a 1–2 line needle targeting the consolidated anchor helper after refactoring.
  3. 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 explain promote_request_anchor's role (Endpoint → Anchor promotion) inline.

Verified passes


Dropped on verification

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

Priority

Type

Area

Model

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:

Full report · Notes

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):

  1. Rebase onto main (f7256584) and re-run conformance: at 69bf2cf2, check.py:62–80 still uses the pre-#595 observed-edge/Corresponds-only harness and the 15-tuple projection, so TypeOK/OutstandingUseRetainsRow were never checked on those states; "conflict-free against 44f59df5" is stale.
  2. Declare the inbound-restore role change (scheduler.rs:1794) and its RetentionRank/promote eviction consequence.
  3. Link an issue and secure maintainer engagement; voipmonitor's CHANGES_REQUESTED predates 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

Priority

Type

Area

Model

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.

  1. 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. One split_prefill_ns(...) helper deletes ~20 lines and one of two definitions of "what a split costs".
  2. Latch rule written three times — :398–402, :528–536, :703–720 spell the same three-clause condition. One LiveRequest::anchored_endpoint() collapses the 18-line map_or_else at :703–720 to a single line; this is the highest-value fix, since a change to the rule can silently diverge across selection, promotion and planning.
  3. request_anchor_endpoint's 37-line price_start cascade (:403–439) — five branches, three bare return Some(raw_anchor), plus two ready_by_prefix/parent() probes, and it prices the split from baseline_start while selection prices it from consumed_tokens. With the latch consulted first, delete :403–439 and use baseline_start.min(raw_anchor) (one formula, ~33 lines, two cache probes per lane gone).
  4. promote_request_anchor (:793–797) walks message_boundaries twice per lane per commit (checkpoint_anchor() at :791, :793, :794); runs per lane from scheduler.rs:2411. Return (raw, chosen) and hoist.
  5. Test duplication: complete_test_step (checkpoints.rs:1980), finish_step (checkpoint_lifecycle_tests.rs:494–541) and pre-existing complete_records (:94–118) are one helper written three ways; scenario Part A (:2778–2816) is re-asserted at :2912–2951 and Part C (:2837–2905) elsewhere, so ~110 lines go (keep Part B, the nonzero-fraction guard); the 2-second wall-clock test at :2502–2611 is 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.

Full report · Notes

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.

  1. Major — conformance evidence is on the pre-#595 harness. verification/helios-lifecycle/check.py still emits a cfg with only INVARIANT Corresponds and a no-op observed step, and Observation::project is still [u64; 15] (checkpoint_lifecycle_tests.rs:16); main post-#595 uses ObservedState/ObservedSafe and a wider projection. No .tla file is touched, so TypeOK/OutstandingUseRetainsRow/PublicationWaitsForCopy/OneGuardAndCapturePerRequest are never checked on the new latch states. The "59 transitions / 12+21 mutations" figure describes the weaker set; "conflict-free vs 44f59df5" predates the #595 merge.
  2. Major — zero capacity silences the skip metrics. checkpoints.rs:482-484 and :957-959 return before the flags published at :817-818 and the increments at :964-998, so flare_checkpoint_skips_total{reason} is 0 by construction at --prefix-cache-memory 0; part of the claimed "unknown_cost → 0–1" is measurement suppression.
  3. Major — undeclared retention-role change for Selene inbound restores. scheduler.rs:1794 now classifies via is_request_anchor_endpoint, so an inbound restore at the prompt end with an interior anchor publishes as Endpoint, not Anchor; cache.rs:345-350 only raises roles, so the downgrade sticks and cross-instance prefixes rank lower under eviction. Unstated, untested, inverse of pre-PR.
  4. Major — request_anchor_endpoint is O(prompt) per lane per commit. checkpoints.rs:440-453 allocates a fresh catalog and does up to three full walks plus two cache probes; called at scheduler.rs:2411 (before commit_checkpoint_plans writes the latch at :2412) and at :1794, outside the only memo scope. No call-count test, no isolated measurement.
  5. Minor — two silent fallbacks in request_anchor_endpoint (:437-439 trusts an interior anchor with no pricing; :424-428 makes a failed probe price from 0), neither tested.
  6. Minor — the predicate is <= not == (:384 saturating_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.

Full report · Notes

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

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Verify TLA+ conformance on main's post-1a5d4d8c harness before/on merge (verification/helios-lifecycle/check.py:60-93 on main): Branch head 69bf2cf2 is based on ba3afb13, where check.py:62-80 only evaluates INVARIANT Corresponds on Observed.cfg. main commit 1a5d4d8c added ObservedState / ObservedSafe and carries all CheckpointReservation.cfg invariants (TypeOK, OutstandingUseRetainsRow, PublicationWaitsForCopy, OneGuardAndCapturePerRequest, CancelledRequestsHaveNoReservation, GuardsHaveNoGPUUse). Manual inspection of the 59 new edges (helios/src/scheduler/checkpoint_lifecycle_tests.rs:278-692) indicates they satisfy ObservedSafe (fences stay within MaxFence = 2, cancelled decoder rows are Published not Owned), and the diff merges cleanly — confirm CI on the merge commit (or a quick rebase onto f7256584) passes python3 verification/helios-lifecycle/check.py --mutations.
  2. Avoid per-decode-step re-pricing in promote_request_anchor on full-prompt cache hits at fraction == 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, so plan_checkpoints (:699) never populates request.checkpoints.zero_budget_anchor. Because commit calls self.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-runs request_anchor_endpoint (cache probes, a small Vec<PrefillCatalogCost> allocation, and 3 stride-based interval_prefill_ns calls). Latch zero_budget_anchor = Some((raw_anchor, anchor)) inside promote_request_anchor once request.consumed_tokens >= raw_anchor as u64 (note: keep promote_request_anchor before commit_checkpoint_plans at helios/src/scheduler.rs:2411-2412 so existing checkpoints are promoted before snapshot-quote eviction runs).

Subtract / Simplify

  1. Deduplicate the latch lookup (helios/src/scheduler/checkpoints.rs:398-402, 528-532, 710-717): Extract a small CheckpointAccounting::latched_zero_budget_anchor(&self, raw_anchor: usize, prefix_tokens: u64) -> Option<usize> method so request_anchor_endpoint, checkpoint_selection_uncached, and plan_checkpoints share one definition instead of repeating the same guard three times.
  2. Avoid redundant checkpoint_anchor() scans in promote_request_anchor (helios/src/scheduler/checkpoints.rs:391, 790-797): Compute let raw_anchor = request.checkpoint_anchor(); once and pass it to a helper (request_anchor_endpoint_for) rather than walking message_boundaries up to three times per lane per commit.
  3. 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) and finish_step (checkpoint_lifecycle_tests.rs:494-541) can be consolidated with complete_records (checkpoint_lifecycle_tests.rs:94-118) in tests.rs (not opened); and the repeated inline GraphDescriptor { kind: GraphKind::Mixed, ... } literals (checkpoints.rs:2847-2861, 3024-3038, 3252-3266, checkpoint_lifecycle_tests.rs:569-583) can reuse a small descriptor helper like extra_graphs() (checkpoints.rs:1133-1147).

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

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):

Two traps that would otherwise waste the whole run:

  1. 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).
  2. --prefix-cache-memory 0 does not make snapshots == 0. snapshots is the GPU-side prefix-cache row budget, computed as rows - execution from the row/page virtual extents (helios/src/runtime_core/memory.rs:1026-1044, 1113, 1144); --prefix-cache-memory only sizes the host offload tier (selene/src/offload.rs:105-114). So the snapshots == 0 branch is essentially untestable from the CLI on cn5 — record flare_snapshot_capacity at 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)

  1. Rebase 69bf2cf2 onto f7256584 (the review's only pre-merge should-fix). The head is based on ba3afb13, which predates 1a5d4d8c's ObservedState/ObservedSafe harness.
  2. cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server --lib scheduler:: → expect 394 pass.
  3. python3 verification/helios-lifecycle/check.py (not opened) --mutations on the rebased commit → confirms the 59 new CheckpointReservation edges satisfy the post-1a5d4d8c full-.cfg invariant 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.
  4. Build both binaries from git archive of 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).


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

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):

  1. 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.
  2. 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.
  3. flare_message_checkpoints_total vs flare_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.
  4. 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-551 should silence it). unknown_cost should be 0–1.
  5. 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.
  6. Clean exit (exit=0) on both arms; no flare_requests_failed_total increment.

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.


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


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.

Full report · Notes

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):

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.

Full report