PR #660: helios/scheduler: budget interior conversation-anchor splits against checkpoint_extra_work_fraction

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/1f781189-5afb-4bf0-ad5c-b2ea836ced2f

Opened by a workflow run, Dec 1, 2026 2:03 PM EST.

Classify draft

Selected: bug, performance, area:scheduling

Threshold: 65%

Priority

Type

Area

Model

explore

Author: FujitsuPolycom (CONTRIBUTOR; 15 merged / 11 closed / 3 open PRs in 180 days; Discord "Dooner") Motivation: For interior conversation anchors, the checkpoint_extra_work_fraction knob was discontinuous: at 0.0 an anchor was kept only if splitting prefill cost nothing, but at any nonzero fraction (including the default 0.05) the anchor was pushed unconditionally with split_ns: 0, adding a padded prefill launch whose cost was never charged. This PR prices that split and only keeps the anchor when it fits the existing allowance. Scale: +740 / −127 lines in 11 files (production code ≈ +60/−51 in checkpoints.rs; the rest is inline tests, 3 docs, check.py). Proposal:

Full report · Notes

Value Proposition

Value Proposition — PR #660 (helios/scheduler: budget interior conversation-anchor splits)

Charter alignment — good. The change removes a special-case exemption rather than adding surface: no new flag, config key, ABI, or unsafe, no per-model branch (charter: "keep the runtime small and model-agnostic"). It makes the interior conversation anchor obey the request-local work allowance that docs/core-design.md and docs/scheduling-runtime-design.md already document for Message/Endpoint extras, which is "solve the right problem in the right place." It addresses a measured cost with a reproducible scenario and answers a predecessor review request (#69 asked that a token threshold be folded into the existing allowance). It is not a non-goal and does not encroach on recipe ownership.

Novelty — genuinely additive, but on contested ground. #582 (merged, same author) fixed only the fraction == 0.0 arm and left nonzero fractions pushing split_ns: 0 uncharged; #660 finishes that discontinuity. So it is neither obsolete (#582 didn't fix the default 0.05 path) nor superseded — #655 is a parallel rewrite of checkpoint_selection_uncached, not a fix for this defect, and #663 explicitly calls #660 complementary. The cost is a near-certain rebase against #655 (already "Ready To Merge"), i.e. sequencing friction, not duplication.

Value vs cost — plausible, but the evidence is not yet reviewable. The benefit targets an ordinary default (0.05 in policy.rs), so it affects every deployment that never sets the flag, and the mechanism (anchor split now charged to reserved_ns, competing with Message/Endpoint extras) is verified in the diff. But the dossier shows two materially different PR bodies; one self-declares the A/B ran atop four-merge-old 571a4471 and "not re-run on 22cac916834f." There is no CI on the head, no review, no variance or repeat counts, and a disclosed mixed-c32 regression (93.9 → 71.0 tok/s, >250 ms gaps 215 → 434) appears in only one body version. Maintenance debts are concrete: six existing fixtures were re-parameterised to fraction: 1.0, so coverage of the changed default path now rests mainly on new inline tests; checkpoint_extra_work_nanoseconds_total and flare_checkpoint_skips_total change meaning without mention; helios/README.md:372-380 was left stale while the three design docs were updated; kani/gated templates are unrun with no N/A argument for scripts/scheduling_sim; the Design-Signed-Off-By trailer is unverified.

Verdict: Worth it with changes. The direction and layer are right and the blast radius is small, but the PR is not yet decidable. Before review effort: publish one authoritative body with a fresh A/B on 22cac916834f against current main (repeats, plus framing of the per-user regression); restore default-0.05 fixture coverage; disclose metric movement and update the README; run or explicitly justify the skipped checks and confirm the design-sign-off trailer; rebase/sequence behind #655.

(No instruction-like content directed at the reviewer was found in the PR material or dossier.)

Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.

Classify intake

Selected: triage:review, performance, area:scheduling

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +triage:review

Subtraction and simplicity

Subtraction/simplicity review of PR #660 at head 22cac91. The production diff is lean — no new flag, config key, ABI, unsafe, or fallback layer; the anchor_split_is_zero_cost → anchor_split_ns change is a strict collapse (six early-return arms become ?); the zero_budget_anchor → budgeted_anchor rename is complete. Nothing should be reverted.

Four simplifications:

  1. HIGH — the anchor-affordability rule exists twice with undisclosed differences: checkpoints.rs:509 (split_ns <= allowance(whole, fraction), ignores spent work) vs :588-598 (allowance(initial_prefill_ns.unwrap_or(whole), fraction) plus extra_spent_ns). One anchor_split_affordable(whole, split_ns, spent_ns, fraction) helper removes ~8 duplicated lines and makes the one real difference an explicit argument. This is the same two-site divergence that produced both #582 review blockers.
  2. MED — before.saturating_add(after).saturating_sub(whole) is spelled out at checkpoints.rs:438-441 and again at :685-701; one split_overhead_ns helper prices both, so anchor and extras cannot drift.
  3. MED — tests.rs:3305-3318 and boundary_tests.rs:74-85 paste the same 8-line "free aligned splits + fraction 1.0" block, and prefill_graphs(&[64,128,256,512]) appears three times; hoist one zero_split_prefill_graphs beside duration_graphs (tests.rs:157), following the existing linear_checkpoint_costs precedent (boundary_tests.rs:175-182). Also phase_tests.rs:1539-1546 rewrote a whole scenario (prompt 13/boundary 10 → chunk-aligned) where a one-line fraction override would have preserved unaligned-prompt-end coverage.
  4. MED-LOW — the rule is restated near-verbatim in docs/core-design.md:1436-1461, docs/scheduling-runtime-design.md:614-638 and docs/cli-design.md:696-710, while helios/README.md:372-382 — the file AGENTS.md:227 names as required reading for scheduling changes — was left contradicting core-design (it still says the anchor is not gated and that extra captures "charge snapshot-copy cost"). Compress the runtime-design passage to a cross-reference and fix the README.

Minor: two lifecycle test names and one check.py mutation label still say "zero budget" after the rename.

Deliberately not flagged as removable: the split_ns == 0 || short-circuit at :591 (load-bearing, test-pinned) and the multi-chunk guard at :533-546 (preserves already-charged Anchor cuts; two tests).

Open: are the two budget bases intentional? Was the phase_tests rewrite forced? Should the third doc restatement be a cross-reference?

Full report · Notes

Correctness and contracts

PR #660 is well aimed and mostly sound, but the new anchor pricing is duplicated in two places that now disagree, and it changes an operator metric and the test baseline silently.

Findings (most important first):

  1. Major — two divergent anchor-budget rules. request_anchor_endpoint prices from price_start against whole and ignores extra_spent_ns (checkpoints.rs:500-516); checkpoint_selection_uncached prices from initial_prefill_ns and subtracts extra_spent_ns (checkpoints.rs:588-597). main agreed because both were unconditional above zero (main checkpoints.rs:459-464, :577-579). Since is_request_anchor_endpoint (checkpoints.rs:519-522) drives RetentionRole::Anchor at scheduler.rs:1797 and Anchor copies are ungated (checkpoints.rs:971-973), a planner-declined interior checkpoint can be promoted to Anchor rank and copied uncharged — the over-ranked-Anchor class that blocked #582.
  2. Major — flare_checkpoint_extra_work_nanoseconds_total changes scope (checkpoints.rs:899-908 vs main split_ns: 0; docs/api.md:356-357, metrics.rs:852 unchanged); work_budget skips move too. Neither body nor docs mention it.
  3. Major — shipped default 0.05 loses pre-existing coverage: fixtures re-baselined to 1.0 (tests.rs:3313-3318, boundary_tests.rs:81-85, checkpoint_lifecycle_tests.rs:156-161, policy_tests.rs, vision_window_tests.rs, phase_tests.rs); the TLA+ lifecycle conformance test now runs only at 1.0.
  4. Minor — helios/README.md:372-380 still states the pre-PR anchor contract while all three design docs were rewritten.
  5. Minor — check.py:672-677 only renamed its mutation; nothing kills a mutant of the new budget comparison or guard.
  6. Minor (conditional) — anchor split can be charged twice after preemption (clear_reservations at checkpoints.rs:48-51 keeps extra_spent_ns; new guard at :533-546 needs a live cut).
  7. Claim accuracy: the "0 checkpoints.rs edits in 571a4471..5d53040e" caveat does not isolate #656/#628; no repeats/variance; unknown-cost arm at fraction > 0 (checkpoints.rs:599) is untested.

Sound: no new locks/allocations/blocking (single-threaded &mut self, thread-local selection cache), no new flag/ABI/unsafe, and end < raw_anchor (checkpoints.rs:645) genuinely closes a duplicate-capture path from #582.

Open: which budget basis should win; whether the mixed-c32 per-user regression is acceptable; whether dropping the late Endpoint capture is intended; sequencing against #655.

Full report · Notes

Final review

Recommendation: Changes Requested

The core scheduler change in helios/src/scheduler/checkpoints.rs is lean, well-motivated, and well-tested—closing the fraction == 0.0 vs. nonzero-fraction discontinuity for interior conversation anchors without adding flags, config knobs, ABI surface, or unsafe, backed by strong 4× RTX PRO 6000 A/B results on 22cac916834f vs. 5d53040e. However, generalizing the anchor check from 0.0 to arbitrary fractions left two anchor-decision sites (request_anchor_endpoint vs. checkpoint_selection_uncached) using different budget bases and spent-work rules, and helios/README.md (required reading for scheduling changes per AGENTS.md:227) was left contradicting the new contract. Fixing those two items will make this ready to land.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Unify the two diverged anchor-affordability decision sites (helios/src/scheduler/checkpoints.rs:500-516 vs. :588-601). Under #582 (fraction == 0.0), allowance(base, 0.0) was always 0 and split_ns == 0 did not depend on extra_spent_ns, so both sites agreed. After generalizing to fraction > 0.0, checkpoint_selection_uncached (:589-597) prices against budget_base = accounting.initial_prefill_ns.unwrap_or(whole) and checks split_ns == 0 || accounting.extra_spent_ns.saturating_add(split_ns) <= allowance(budget_base, fraction), while request_anchor_endpoint (:509) only checks split_ns <= allowance(whole, fraction)—ignoring request.checkpoints.initial_prefill_ns, request.checkpoints.extra_spent_ns, and the split_ns == 0 || exemption.

    • Verified impact: Whenever budgeted_anchor is absent or invalidated (for example, a preempted request whose grown prompt makes latched_prompt != request.prompt_tokens while carrying initial_prefill_ns and extra_spent_ns > 0, or after clear_reservations / policy updates):
      • promote_request_anchor (checkpoints.rs:857-886, called during commit at helios/src/scheduler.rs:2405 before commit_checkpoint_plans at :2406) can call request_anchor_endpoint, decide raw_anchor fits, and promote an already-ready cached raw_anchor to RetentionRole::Anchor, while checkpoint_selection_uncached on the next prefill step rejects raw_anchor (due to extra_spent_ns or initial_prefill_ns) and captures prompt_tokens as a second RetentionRole::Anchor.
      • is_request_anchor_endpoint (checkpoints.rs:519-522, called at helios/src/scheduler.rs:1797) can misclassify a full-prompt inbound restore (inbound.consumed_tokens == prompt_tokens, which does not hit the :449 short-circuit) as Endpoint instead of Anchor or vice versa.
    • Fix: Extract one private helper fn anchor_split_affordable(budget_base: u64, split_ns: u64, spent_ns: u64, fraction: f64) -> bool returning split_ns == 0 || spent_ns.saturating_add(split_ns) <= allowance(budget_base, fraction). Call it from both request_anchor_endpoint (passing request.checkpoints.initial_prefill_ns.unwrap_or(whole) and request.checkpoints.extra_spent_ns) and checkpoint_selection_uncached. Add a unit test asserting request_anchor_endpoint and checkpoint_selection return the same endpoint when extra_spent_ns > 0 (and initial_prefill_ns is set) without a matching budgeted_anchor latch.
  2. Synchronize helios/README.md:372-380 with the updated design docs. helios/README.md:372-380 (named in AGENTS.md:227 as required guidance for Helios scheduling changes) still states: "Checkpoint selection prioritizes the last eligible message boundary, using the prompt end when no message boundary is eligible. Earlier messages and a distinct prompt end compete within a work allowance of scheduler_checkpoint_extra_work_fraction times estimated uncached prefill work, defaulting to 0.05. Extra captures charge snapshot-copy cost and additional prefill caused by splitting chunks." This now contradicts docs/core-design.md:1434-1460, docs/cli-design.md:696-710, and docs/scheduling-runtime-design.md:613-630.

    • Fix: Update helios/README.md:372-380 to state that an interior message boundary is retained as the anchor only when its predicted split fits the request's extra-work allowance (falling back to the prompt end otherwise), and that a retained interior anchor charges its split work against the shared allowance while its anchor snapshot copy remains uncharged.

Subtract / Simplify

  1. Deduplicate split-overhead pricing (helios/src/scheduler/checkpoints.rs:438-441 and :685-701). Both anchor_split_ns and the optional-candidate loop compute the exact same before + after - whole interval formula with identical saturating semantics. Extract a single split_overhead_ns(request, catalog, terminal_window, left, whole, endpoint, right) -> Option<u64> helper so anchor and optional-cut pricing cannot drift.
  2. Deduplicate the zero-split test fixture setup (helios/src/scheduler/tests.rs:3305-3318 and helios/src/scheduler/boundary_tests.rs:74-85, 438, 569). Both repeat the same 100_000 + g.token_capacity as u64 prefill-duration loop and &[64, 128, 256, 512] capacity list. Extract a small helper next to duration_graphs (tests.rs:157), matching the existing linear_checkpoint_costs pattern (boundary_tests.rs:175-182).
  3. Avoid three-way prose duplication (docs/scheduling-runtime-design.md:614-627). Once helios/README.md is updated, the same rule will live in four places. Consider tightening docs/scheduling-runtime-design.md:614-627 to a concise summary with a cross-reference to docs/core-design.md#exact-endpoint-capture.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: no (98%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with. decide malicious: all_clear (100%): No malicious content found

explore

Author: FujitsuPolycom (CONTRIBUTOR; Discord "Dooner") Motivation: Helios keeps a reusable "conversation anchor" checkpoint at the last message boundary inside a prompt, but cutting prefill at an arbitrary boundary can cost an extra, padded prefill launch. The existing checkpoint_extra_work_fraction knob (default 0.05) is supposed to bound that extra work — yet until now interior anchors were exempt from it, so this change makes the anchor pay from the same allowance as every other optional capture. Scale: +887 / −151 in 12 files Proposal:

Full report · Notes

Classify intake

Selected: triage:review, bug, performance, area:scheduling

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Subtraction/Simplicity/Conventions review of PR #660 (head cf744dffef8d). Verdict: the production diff in helios/src/scheduler/checkpoints.rs is lean and I would merge it on this lens — no new flags, knobs, unsafe or ABI change, and the three new helpers (anchor_split_affordable checkpoints.rs:96-98, split_overhead_ns :434-446, anchor_split_ns :448-467) each have two real callers and replace rather than shadow the old code. Everything subtractable is in test fixtures and docs.

  1. (high) Dead 6-line checkpoint_extra_work_fraction: 0.5 block at checkpoints.rs:4363-4368 — overwritten by 0.279 at :4375-4380 before any admission; delete it, assertions unaffected.
  2. (high) helios/README.md:372-390 is a second normative copy of docs/core-design.md:1439-1457; cut :374-386 to two sentences and delegate to the #exact-endpoint-capture link already at :390, as docs/scheduling-runtime-design.md:614-621 already does.
  3. (high) permissive_checkpoint_costs (tests.rs:163-184): the Option<&[usize]> knob is pointless (all three call sites want STANDARD_PREFILL_CAPACITIES, and boundary_tests.rs:427-428/:559-560 re-install it anyway), and its fused configure_policy forces tests.rs:3330 to re-measure a graph list the builder already measured (tests.rs:152-154). Make capacities non-optional; split out the policy write.
  4. (medium) Four verbatim copies of the stepped cost table (128/100, 256/110, 512/200) at checkpoints.rs:4369-4372, :4508, :4623, :4686-4692; add one stepped_costs beside the existing linear_costs (:1151-1161).
  5. (medium) The budgeted_anchor latch triple + identity check is open-coded at :477-482 and :636-640 with writes at :634, :643-644, :893-903; since this PR broadens it to every fraction, give it a matches method or two-line helper.

Explicitly rejected as non-issues: the differing interval bases and the four early returns in request_anchor_endpoint (correctness lens, load-bearing), the split_ns == 0 || short-circuit (the 0.0 arm), doc line wrapping, and stale zero_budget wording in three test strings.

Open: whether the README carries normative weight for readers who never open core-design (if so, keep only the predicate sentence); S4/S5 line offsets read at this head but not re-diffed; no green CI or A/B on cf744dff itself is visible.

Full report · Notes

Correctness and contracts

Review of PR #660 (head cf744df) under the correctness/contracts/system-consequences lens. The change is broadly sound — no locks, wire/ABI/graph changes, no new panics, saturating arithmetic throughout — but three substantive problems remain:

  1. Major — the two anchor-decision sites still price different intervals. request_anchor_endpoint prices [price_start, prompt] from baseline_interval/admission reuse (checkpoints.rs:483-541) while selection prices [prefill_cursor, prompt] (:562, :610-616), and the reconciling budgeted_anchor latch only exists once consumed_tokens >= prompt_tokens (:893-896). With the PR's own measured costs, a mid-prefill request keeps Anchor(896) at selection (split clamps to 0 at :445) while request_anchor_endpoint falls back to 1024 — and that site drives cache promotion at :904-908.
  2. Major — a retained anchor is charged even when nothing is stored. commit_checkpoint_plans debits split_ns before the destination is known (:923-934) and the checkpoint_skip_storage path refunds only copy_ns (:983-986), so under snapshot pressure the allowance and flare_checkpoint_extra_work_nanoseconds_total are permanently burned while retaining nothing.
  3. Major (claims) — the A/B predates one of the two decision sites. The body attributes the post-22cac91 delta to "fallback helper + docs/tests", but checkpoints.rs:534-539 changes that site's budget base and adds the extra_spent_ns term; the checkpoints.rs LOC figure (+95/−60) is also ~19× smaller than the real +751/−87.

Also: coverage at the shipped 0.05 default is thin (the new permissive_checkpoint_costs at 1.0 now governs all of boundary_tests), the end < raw_anchor candidate filter admits message cuts below a rejected anchor, and the new doc lines exceed the files' wrap width.

Open: whether checkpoint_copy_allowed's unconditional Anchor arm (:997-1010) is the intended second gate; no A/B or CI visible on cf744df.

Full report · Notes

Re-review

Recommendation: Ready To Merge

Head cf744df cleanly resolves both Should Fix items, all three Subtract / Simplify suggestions, and all three Nits from the prior review (22cac91), while keeping the production diff tight (+95/-60, +35 net production LOC in helios/src/scheduler/checkpoints.rs, zero unsafe, zero new flags/ABI). Anchor-split affordability is now shared between request_anchor_endpoint and checkpoint_selection_uncached, all four doc sites are aligned, and verification covers unit/contract tests, TLA+/Observed lifecycle conformance, mutation testing, and served 4× RTX PRO 6000 A/B workloads. No blockers or should-fix defects remain; only minor optional test/doc cleanups are noted below.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Remove unreachable configure_policy(0.5) block in new test (helios/src/scheduler/checkpoints.rs:4363-4368): default_fraction_anchor_guard_revocation_preserves_charged_anchor_split configures checkpoint_extra_work_fraction: 0.5 and immediately overwrites it with 0.279 at :4375-4380 after only measure(...) calls, with no admission or selection in between. Deleting :4363-4368 removes 6 dead lines without affecting behavior.
  2. Optional — extract a shared stepped_costs test helper (helios/src/scheduler/checkpoints.rs:4369-4372,4510-4513,4625-4628,4688-4691): Four of the new tests repeat the identical [(128, 100), (256, 110), (512, 200)] prefill measurement loop with only the Snapshot duration varying; a small fn stepped_costs(scheduler: &mut RequestScheduler, snapshot_ns: u64) beside linear_costs (:1151) would deduplicate them cleanly.
  3. Optional — trim helios/README.md:374-386 to delegate normative detail: docs/scheduling-runtime-design.md:614-621 concisely summarizes the rule and delegates to docs/core-design.md#exact-endpoint-capture, whereas helios/README.md:374-386 restates the full normative clauses right before its existing link to ../docs/core-design.md#exact-endpoint-capture (:390). Keeping a 2–3 sentence summary in the README would reduce future doc-drift surface.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: yes (71%): Testing will add considerable value with the code. It is ready to merge and the tests will validate and improve confidence on hardware we have available for testing.

Pre Test Report

Hardware test plan — PR #660 (helios/scheduler: budget interior conversation-anchor splits)

What is being validated

Head cf744dffef8d (cf744df, +887/−151, 12 files; production change is +95/−60 in helios/src/scheduler/checkpoints.rs). Re-review verdict is Ready To Merge, 0 blockers, 0 should-fix; the case file says "Decision to Test: yes (71%)". This is the residual hardware risk, not a fix-verification pass.

The change: an interior conversation anchor (last eligible message boundary before the prompt end) was previously pushed unconditionally at any nonzero checkpoint_extra_work_fraction with split_ns: 0, adding an uncharged padded prefill launch. Now it is retained only when split_ns == 0 || extra_spent_ns + split_ns <= allowance(initial_prefill_ns.unwrap_or(whole), fraction) (checkpoints.rs:96-98, :608-650); otherwise the request falls back to the zero-split prompt end. A retained interior anchor charges its split to reserved_ns/extra_spent_ns and to flare_checkpoint_extra_work_nanoseconds_total (:651-658, :924-934), sharing headroom with optional Message/Endpoint cuts, while the anchor snapshot copy stays uncharged.

Two properties must be measured on silicon:

Hardware reality check — read this first

The PR's exact A/B cannot be reproduced on this hardware. It ran DeepSeek-V4.1-Flash TP4 on 4× RTX PRO 6000. No DeepSeek-V4.1 core exists on cn5 or cn7, the best cell is 16 GiB scratch (docs warn against exporting cores here), and the cores report 0 GiB. So do not plan to re-run the PR table; plan to confirm the mechanism and its direction on the closest available core, and report the delta as a first data point on SM120, not as a reproduction.

Machine What it can do for this PR What it cannot
cn5 (4× RTX PRO 6000 96 GiB, 48 CPU, 125 GiB RAM, 16 GiB scratch, amd64) The only concurrency cell. Has local-inference-lab/GLM-5.3-Flash-NVFP4 and nvidia/GLM-5.3-Flash-NVFP4 → GLM-5.3-Flash TP4 for P2 at C=16/C=32 and for P1 padded-tail on a 4.5K prompt. Matches the PR's 4× RTX PRO 6000 hardware class. Cannot run DeepSeek-V4.1 (the PR's workload); magnitudes will not transfer — GLM uses 256-token KV pages (docs/core-design.md:1487-1488), DeepSeek 128, so snapshot cost and reuse granularity differ.
cn7 (1× GB10, 10 CPU, 60 GiB RAM, arm64, unified memory) TP1 only (zai-org/GLM-5.3-Flash, nvidia/GLM-5.3-Flash-FP4-Local). Valuable only for (a) proving the arm64 build serves, (b) a single-GPU sanity read of P1's launch-count reduction. No multi-GPU, GB10 is pre-#656 in the PR's own GB10 number, 10 CPUs is thin for a load generator. Lowest value — cut it if time-boxed.

Two build/run facts that shape the steps below:

The plan (≈3 GPU-hours total, all on cn5)

Step 0 — arm preparation, zero GPU time (10 min)

Build both arms sequentially; keep only the flare binary (16 GiB scratch cannot hold two build trees).

# candidate
git fetch origin pull/660/head && git checkout cf744dffef8d08d83582a0f7601cc04544ecf4f0
cargo build --release --manifest-path flare-cli/Cargo.toml (not opened)   # AGENTS.md:250
cp flare-cli/target/release/flare /scratch/flare-candidate

# baseline: the PR's stated base, which is current main for this test
git checkout 5d53040e
cargo build --release --manifest-path flare-cli/Cargo.toml (not opened)
cp flare-cli/target/release/flare /scratch/flare-baseline

Also, before spending any GPU time, run the CPU-only tests that already pin the behavior — these are the real regression gate and they cost nothing:

cargo test --locked --release --manifest-path helios/Cargo.toml \
  --features runtime-core,server --target-dir flare-cli/target \
  -- scheduler::checkpoints::tests

Relevant tests added by the PR: checkpoints.rs:4203 (453-token prompt with boundary at 450 → falls back to 453, exactly 1 prefill launch, terminal capture still funded at 0.05, turn-2 hits Anchor(453) and latches), :4361 (guard revocation keeps the charged anchor split), :4508 (multi-chunk at 0.28), :4623 (zero-split retention when spent exceeds available), :4685 (request_anchor_endpoint and checkpoint_selection agree with spent budget and no latch). If any of these fail, stop — do not spend GPU time.

Step 1 — the one cell that matters: P1 padded-tail, cn5, GLM-5.3-Flash TP4 (≈40 min)

This is the highest-value test: it directly exercises the discontinuity the PR removes, and the short prompt is cheap.

Run each arm on the same core, same flags:

/scratch/flare-<arm> run <GLM-5.3-Flash TP4 core path> --gpus 0,1,2,3 \
  --bypass-performance-check --embedding-table-storage ram \
  --scheduler-policy balanced \
  --scheduler-checkpoint-extra-work-fraction 0.05 \
  --host 127.0.0.1 --port 8000

Drive it with the in-repo closed-loop harness (scripts/benchmark_scheduler.py), which reports TTFT median/p99, coalesced groups, metrics_before/metrics_after, and per-request cached_tokens:

# A: boundary a few tokens before the prompt end (the 453/450 shape) — C=1, 6 trials
python3 scripts/benchmark_scheduler.py --base-url http://127.0.0.1:8000 \
  --model <served name> --concurrency 1 --prompt-tokens 453 --output-tokens 64 \
  --seconds 30 --warmup-seconds 10 --trials 6 --variant <arm> --output /scratch/p1-a-<arm>.jsonl

# B: same prompt, 32K tokens, C=1 — the "must not regress long prompt" control
python3 scripts/benchmark_scheduler.py ... --concurrency 1 --prompt-tokens 32768 ...

The harness's built-in prompt is a single user message (scripts/benchmark_scheduler.py:71-121), so the only message boundary is the final one, which lands a few tokens before the prompt end — exactly the padded-tail geometry. Known limitation: it cannot build a multi-turn conversation, so the turn‑1→turn‑2 reuse check needs a ~20-line local extension that appends {"role":"assistant",...},{"role":"user",...} and re-POSTs. Do that; it is the check that proves the fallback still yields reuse.

Pass gates for Step 1 (candidate arm, vs baseline arm on identical prompts):

Observation Source Required
Prefill launches for the 453-token prompt flare_graph_launches_total{kind="prefill"} delta 1 on candidate (baseline: 2). This is the fix.
Anchor capture endpoint flare_checkpoint_captures_total{role="anchor"} delta 1 per request, at the prompt end
Turn‑2 cached tokens usage.prompt_tokens_details.cached_tokens == full turn‑1 prompt length
32K control TTFT p50 harness ttft_median_seconds candidate within noise of baseline (PR claims +0.6%); a >5% regression fails
Failures flare_requests_failed_total 0 delta in both arms

Read the sample size honestly: 6 trials of a 30 s C=1 loop with 64 output tokens is ~200 requests per arm — enough for launch-count and cached-token correctness, not enough to resolve a 3–5% TTFT difference. Do not report a TTFT speedup from this cell.

Step 2 — P2 concurrency direction, cn5 TP4 (≈90 min, the only expensive cell)

C=16 and C=32 on a mid-length prompt, both arms, alternating order to cancel drift:

python3 scripts/benchmark_scheduler.py --base-url http://127.0.0.1:8000 \
  --model <served name> --concurrency 16,32 --prompt-tokens 4096 --output-tokens 256 \
  --seconds 90 --warmup-seconds 20 --trials 3 \
  --pair-index 1 --variant <arm> --pair-order <baseline,candidate|candidate,baseline> \
  --output /scratch/p2-<arm>.jsonl

Run the pair twice with reversed --pair-order and require the sign of the delta to agree; discard a cell whose two pair orders disagree. Read tokens_per_second, ttft_median_seconds, burst_gap_p99_seconds, coalesced groups, and the flare_checkpoint_extra_work_nanoseconds_total delta.

What to expect and how to judge it: the candidate should show a larger flare_checkpoint_extra_work_nanoseconds_total per request (the split is now charged) and, when the split is retained, fewer prefill launches. The PR's mixed-c32 win needs mixed prefill/decode graphs, which GLM-5.3 declares (--mixed-prefill, docs/cli-design.md:464), so check flare_graph_launches_total{kind="mixed"} > 0 in the cell — if it is 0, the cell cannot test the claimed win and you must say so rather than reporting a null result.

Pass gates: 0 request failures; no flare_graph_launches_total kind disappearing; per-user p50 decode rate not worse than the PR's already-disclosed trade-off on the comparable cell. A regression larger than the PR's disclosure is a finding to report, not a test failure to paper over.

Step 3 (optional, only if Steps 0–2 are clean and time remains) — cn7 arm64 sanity, ≈30 min

One TP1 zai-org/GLM-5.3-Flash cell at C=1 and C=4, 453-token prompt, both arms. Purpose is narrow: prove the candidate arm builds and serves on arm64 and shows the same launch-count reduction. Do not attempt throughput comparison — 10 CPUs on one GB10 with unified memory will not reproduce the PR's 4× DGX Spark number, which was also measured on a pre-#656 base.

Explicitly do not spend GPU time on

  1. Re-running the PR's A/B table. The core does not exist on this hardware, and the numbers are model- and page-geometry-specific.
  2. The two review "Should Fix" items from 22cac91. I verified both are resolved at cf744dff: anchor_split_affordable (checkpoints.rs:96-98) is now called from both request_anchor_endpoint (:534-539) and checkpoint_selection_uncached (:620-625), and helios/README.md:372-390 now states budgeted retention, the charged split, and the uncharged copy. Testing them on hardware would be re-verifying a code read.
  3. Long-prompt multi-chunk preemption/guard paths. checkpoints.rs:4361, :4508, :4623 already pin these on CPU with exact nanosecond catalogs, more precisely than a timing measurement can.
  4. Any re-export or re-tuning. Structurally out of budget at 16 GiB scratch and unnecessary for a scheduler-only change.

Test-plan risk I would flag to the test engineer

The anchor budget fallback is invisible in the metrics. I read checkpoint_selection_uncached at head: the unknown/budget flags are initialized at checkpoints.rs:669-670 and only set inside the optional-candidate loop (:730-742). The anchor decision at :608-650 — the exact code this PR changes — sets neither flag, so when the new rule rejects an interior anchor and falls back to the prompt end, flare_checkpoint_skips_total{reason="work_budget"} does not increment, even though docs/api.md:352 says those counters "count selection or capture rejections." Consequence for testing: do not gate on a skip-counter delta; use the four observables I listed in Step 1 (anchor capture absence at the boundary, single prefill launch, turn‑2 cached_tokens, and the extra-work counter). This is a genuine, cheap-to-fix observability gap that the review record does not mention — worth reporting back to the author, and worth a one-line test addition asserting the fallback is deducible from metrics.

Two other minor items I confirmed at this head, for the report back (neither blocks hardware testing): docs/cli-design.md:699 and :708 still have over-long lines with an awkward mid-sentence wrap, and the retention rule is now restated normatively in four places (docs/core-design.md:1436-1448, docs/cli-design.md:696-710, docs/scheduling-runtime-design.md:614-635, helios/README.md:372-390) — a future drift surface the PR itself widened.

Bottom line

Test it, but narrowly. Step 1 on cn5 with GLM-5.3-Flash TP4 is the test worth running — it costs under an hour, directly exercises the padded-tail discontinuity the PR fixes, and has crisp pass gates (1 prefill launch instead of 2, plus preserved turn-2 reuse). Step 2 is the only way to see the claimed concurrency win, but only valid if mixed launches actually occur, and one reversed-order repeat is mandatory. cn7 should be treated as optional arm64 smoke coverage. The PR's headline speedup cannot be reproduced on this hardware and should not be presented as if it were; the deliverable is mechanism confirmation plus a first SM120 GLM-5.3 data point.

Full report · Notes

Discord Test Request

Here is the Discord post, followed by what I verified and what I did not get to.


Discord post (ready to paste):

Recommendation: Test

71% confidence — moderate: the mechanism is testable on our hardware, the PR's magnitudes are not.

Hardware Required

Justification

Estimated Time to Complete

~3 GPU-hours total, all on cn5 (10 min build/CPU-test gate + 40 min P1 padded-tail + 90 min P2 concurrency + 30 min optional arm64). The one cell that matters — P1 on cn5 — is under an hour.


What I verified against the repo at head cf744dffef8d:

Not verified — flagged honestly. I was cut off by the turn limit before finishing verification, so these plan claims rest on the packet alone:

One caution on the post itself: the template's "Hardware Required" and "Justification" caps forced me to drop two things worth keeping in the thread reply, not the post: (1) the findings that the anchor-fallback path leaves work_budget unincremented and that there are now four normative restatements of the retention rule, and (2) that the PR's headline speedup cannot be reproduced on this hardware and must be presented as a first SM120/GLM-5.3 data point, never as a reproduction. I put the first into the Justification-adjacent framing by keeping the recommendation at 71% and scoping it "mechanism yes, magnitudes no," but the review record should carry both explicitly.

Full report