Case file: PR #697 "helios/scheduler: preserve interior anchor for open-reasoning prompts"
Open, ready for review, head bfae28a, base cc0a49d, opened and last updated 2026-12-02. 16 files, +510/−35.
Key findings
- This is the direct repair of a regression its own parent shipped the same day. #660 (same author, merged 2026-12-02 17:03) introduced interior-anchor budgeting and listed in its own trade-offs: "
<think>-stripping (4.5K-13.7K) skips Turn-1->2 reuse (--scheduler-checkpoint-extra-work-fraction 0.15retains it)". #697 replaces that global-fraction workaround with a targeted rule keyed onOutputStart::Reasoning. The disclosed regression therefore lived on main roughly one day. - Undeclared side effect: preserved turns publish a second, charged snapshot. Under the preserved path
checkpoint_selection_uncachedstill falls through into the optional-candidate loop, so a prompt-endEndpointcopy is emitted alongside the interiorAnchor(checkpoints.rs:620-623, then 666-791). The PR's own metrics show it:ckpt_caps ... end60→96, 64→96, 61→96 andmsg11→0 / 2→0 / 21→12. Two checkpoint rows per reasoning turn on the snapshot budget, charged to the same allowance; the description discusses neither the capacity cost nor the disappearance of extra Message cuts. - Merge-order hazard with an open PR in the same function. #655 (yatesdr, COLLABORATOR, open, "Ready To Merge") rewrites the snapshot-cost gate immediately adjacent to #697's new branch in
checkpoint_selection_uncachedand edits the same four docs. #660's own Autobot reviews flagged the same overlap twice. - A default-false boolean opt-in, against a stated design-review rule.
preserve_message_anchoris exactly whatdocs/design-review.md:56-61says to reject ("default-false opt-ins"). It satisfies the charter's model-agnostic rule (derived from shared parser state, no model-name branch), but the scheduler now knows a frontendOutputStartconcept via a bool plumbed through three structs. - The headline performance evidence is not reproducible from the PR. No harness repo, no command line, no raw logs — unlike #660/#661, which name
FujitsuPolycom/tokbenchand give explicit reproducers. The live binaries were built from298d3e68, not the current headbfae28a6, and there is no CI run at head. - No test asserts the outcome being claimed. The unit tests pin anchor-endpoint selection and
split_ns == 0; nothing drives a second turn that actually hits the retained checkpoint. The causal "Turn k checkpoint is an exact prefix of Turn k+1" claim rests entirely on the live A/B. - Zero engagement. No comments, reviews, labels, reactions, or even the automated "case file opened" intake comment that every neighbour PR received within ~2h. Zero CI checks.
The change
Plain terms: a request whose chat template opens a reasoning block gets its last complete-message checkpoint kept unconditionally (under the shipped nonzero fraction), instead of being dropped when splitting prefill there costs more than the extra-work allowance.
Mechanism, verified at head:
helios/src/server/request.rs:427-429—preserve_message_anchor = output.as_ref().is_some_and(|o| o.content.start == OutputStart::Reasoning), stored intoPromptat:452.helios/src/server/runtime.rs— new field onpub struct Prompt;Incoming::spec()propagates it on initial admission and preemption readmission.helios/src/scheduler.rs— newpub preserve_message_anchor: boolonRequestSpecandLiveRequest, copied atadmit().helios/src/scheduler/checkpoints.rs:469-471— one predicate:fn budget_interior_anchor(&self, request: &LiveRequest) -> bool { self.policy.checkpoint_extra_work_fraction == 0.0 || !request.preserve_message_anchor }called at:480(request_anchor_endpoint, earlySome(raw_anchor)),:621(checkpoint_selection_uncached, returns(raw_anchor, 0)and clearsaccounting.budgeted_anchor), and:908(promote_request_anchor, latch suppressed).- Predicate shape matters: it is
fraction == 0.0 || !preserve, not "preserve wins". At fraction0.0strict zero-split fallback still applies to reasoning requests (asserted in the new test).
Size: production diff +37/−8 across 4 Rust files, net +29. Verified structurally (scheduler.rs +5, runtime.rs +4, request.rs +4, checkpoints.rs +24/−8). The remaining ~+470 lines are tests: helios/src/server/runtime/phase_tests.rs +248 for one test, and mechanical preserve_message_anchor: false literals in model/tests.rs, model/packed_round_tests.rs, scheduler/{boundary,checkpoint_lifecycle,policy,tests}.rs, server/runtime/prompt_tests.rs.
What the description understates or omits:
- The second snapshot row per preserved turn (above) — the preserved branch only skips the interior split charge, not the prompt-end
Endpointcopy, which is charged (copy_nsfrom Snapshot cost). request_anchor_endpointreturns before thebudgeted_anchorlatch check (:484) and before the full-prompt GPU cache-hit /ready_by_prefixlogic (:495-525), so preserved requests get no cache-ready verification for their anchor — matching the existing nonzero-fraction best-effort branch, not the cache-checked zero-fraction branch.- Suppressing the latch at
:908means every decode step re-entersrequest_anchor_endpoint; for preserved requests this returns early at:480before catalog pricing, so no measurable per-step cost — but it is a behavior change in the hot path worth knowing. - The description lists
OutputStart::ToolBodyamong non-preserved starts, but no test coversToolBody(phase tests cover Reasoning, Content ×2, RecipientHeader, RecipientFrame ×2, Completions). - "Without debiting
split_ns" is accurate about accounting only; the real GPU prefill still stops atraw_anchorand launches a second tail prefill — which is the disclosed Turn-1 cost.
The why
Problem stated: PrefixCheckpointCache::lookup matches exact published checkpoints, so a Turn-k checkpoint whose stored prefix includes a reasoning tail the client stripped cannot match Turn k+1's divergent history; only a checkpoint at or before the last complete-message boundary can. Verified in helios/src/cache.rs:552-579 — nodes are filtered by history.key_at(node.prefix.consumed_tokens) == Some(node.prefix) and the longest match wins. The mechanism is real.
LiveRequest::checkpoint_anchor() (checkpoints.rs:118-125) returns the last eligible message_boundaries entry, else prompt_tokens — so the "interior anchor" is the last complete-message boundary from the native frontend.
Provenance of the problem: #660, merged 2026-12-02, disclosed it as a trade-off (quoted in Key findings) and suggested raising --scheduler-checkpoint-extra-work-fraction to 0.15 as the workaround. #697 supersedes that workaround. So the bug is one day old and self-reported by the author rather than filed by a user; no linked issue reports it. A related disclosure from the frontend layer exists in #396 (merged, yatesdr, 2026-11-19), whose "client-visible effects" list states that echoed-back control text "re-enters as ordinary tokens, so the replayed prefix differs from the generated one and cache reuse for such turns is lost" — the same divergence family, not cited by #697.
The preserve_message_anchor value is a property of the chat template/parser configuration, not the model name: OutputStart::Reasoning is set by the output parser per dialect (e.g. helios/src/output/chatml.rs:432 (not opened), 930, 1037; helios/src/output/argument_tags.rs:160 (not opened)).
Related work
- #660 (merged 2026-12-02 17:03, FujitsuPolycom, +900/−162, 12 files, labels area:scheduling/bug/performance/triage:review) — the parent. Introduced
anchor_split_affordable,split_overhead_ns,anchor_split_ns, renamed the latch tobudgeted_anchor, charged interiorsplit_ns. #697 modifies exactly the three sites #660 touched. #660 got two Autobot reviews (Changes Requested on22cac91, Ready To Merge oncf744df); both flagged the<think>-stripping trade-off as a measured cost and the #655 rebase overlap. - #582 (merged 2026-11-29, FujitsuPolycom, +2264/−20) — built the machinery: zero-snapshot-capacity exit, same-catalog pricing of whole/before/after, latching, unified
request_anchor_endpoint, zero-fraction early return (checkpoints.rs:675-677today, after the anchor cut at 666-674 — which is why the preserved branch still costs exactly one anchor cut). Two hard review rounds: voipmonitor CHANGES_REQUESTED (duplicate Anchor captures on EWMA drift, mixed-prefill alignment shift) and lukealonso (stale latch after grown-prompt preemption/readmission), fixed by keying the latch on(raw_anchor, prompt_tokens). That history is why the readmission test in #697 exists. - #655 (open, yatesdr, COLLABORATOR, updated 2026-12-02, "Ready To Merge" on
f7f4d25) —helios/src/scheduler/checkpoints.rs,scheduler.rs,cost.rs(not opened), and all four docs #697 edits. Itsfresh_duration→measured_durationsnapshot-cost gate is the adjacent line. Immediate merge-order conflict. - #674 (open, yatesdr) prefix-cache hit rate / L1 retention / NVMe / GPU snapshot packing — cites #660, touches the same files. #694 (open, yatesdr) NVMe/pool spill profitability gate — same files.
- #661 (merged 2026-12-02 20:15, ~3h after #660, FujitsuPolycom) — +1762 lines in
helios/src/scheduler/policy_tests.rs, the file where #697 adds 20preserve_message_anchor: falseliterals; #697's rebase ontocc0a49d2is what produced those. - #665 (merged, FujitsuPolycom) scan-resistant prefix-cache eviction; #663 (merged, yatesdr) first-output age pricing; #645 (merged, lukealonso) prefill scheduling overhaul and two-frame pipelining — all adjacent to the same anchor/cut surfaces, none semantically conflicting.
- #567 (closed) "Preserve resident prefixes on ordinary completion of message requests" — different concern (eviction of unused anchor guards). #534 (open issue) checkpoint captures deadlock on unmeasured snapshot cost — the motivating issue of #655.
- #677 (open, jcartu) preserve Chat reasoning aliases / allow literal closing tokens — same reasoning-parser space; may interact with #697's self-closed-empty-think limitation.
- No PR or issue was found that competes with #697's approach (i.e. nobody else is special-casing reasoning-open prompts in anchor selection).
Recent activity
The orientation packet's per-area commit history is unavailable (git: Could not read c513e46a...), and it records "commits on the default branch since PR branched (cc0a49d) touching its changed files: none" — the branch is essentially at repository head. Activity reconstructed from merged PRs:
- 2026-11-29 — #582 merged: zero-budget interior anchors (the latch + zero-fraction early return).
- 2026-12-01 — #655 opened against the same function and docs (still open).
- 2026-12-01 — #660 opened; 2026-12-02 17:03 merged: budgeting generalized to all fractions.
- 2026-12-01 — #663 merged (first-output waiting-age pricing); #665 merged (scan-resistant eviction, same docs +
scheduler.rs). - 2026-12-02 20:15 — #661 merged, ~3h after #660; +1762 lines in
policy_tests.rsforced #697's mechanical test-literal rebase. - 2026-12-02 — #681 merged (active cohort mean in coalescing horizon, same author); #697 opened on top of all of it.
Two people (FujitsuPolycom and yatesdr) are rewriting this area at several merges per day. No merged neighbour changed the interior-anchor retention rule between #660 and #697 — #697 is the first semantic change to that rule since #660 landed hours earlier.
People
- Author: FujitsuPolycom — GitHub association CONTRIBUTOR (not among the charter's named priority contributors @voipmonitor/@original-el8/@lukealonso). 19 merged / 11 closed / 1 open PR in 180 days; areas docs (14), helios/src (14), helios (6), heliopause/src (4), ignition/preparation (4). Discord handle given on the PR: "Dooner" (satisfies design-review principle 17). Recent series, all same author: #540 (bounded timing-refresh credit), #542 (closed, lock-free TP DispatchRing), #582 (zero-budget anchors), #660 (anchor budgeting), #661 (smaller prefill chunks), #665 (scan-resistant eviction), #681 (cohort mean). #697 is the fifth scheduling PR in ~5 days and the third step of the anchor line #582 → #660 → #697.
- yatesdr (COLLABORATOR) owns the competing same-file work: #655, #674, #694, plus #663 and #396 merged. Reviewed #396. The likeliest reviewer to catch interaction issues.
- lukealonso (charter-named priority contributor) blocked #582 on grown-prompt readmission/latch staleness and owns #582-adjacent and #645/#619/#656. The likeliest reviewer to re-check latch correctness here.
- voipmonitor (charter priority) gave the CHANGES_REQUESTED review on #582 with live 4× SM120 measurements.
- nepenth field-reported on #655 (2× GB10 TP2, GLM-5.3-Flash, 24.97 s → 330 ms warm TTFT).
- So far nobody has engaged with #697.
Community
Nothing on #697: pr_comments returns no comments; no review, no review request, no reaction, no label, and — unlike every neighbour — no flare-autobot intake or review comment, despite #660, #655, and #661 each receiving one within ~2h and going through 2–3 review rounds. #582 drew 10 discussion entries including two blocker rounds and an APPROVED review. The PR has no requested reviewers.
Project fit
Charter (read_charter) lines that line up:
- "Keep the runtime small and model-agnostic … shouldn't accumulate per-model branches (#267, #334)" — no model-name branch; the predicate keys on
OutputStart::Reasoning, shared by all think-tag/recipient-header/content-header dialects. - "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)" — 3-model A/B on signed
gb10-tp1cores, binary SHA-256s, 6 boots,/v1/models200, finite logprobs,flare_requests_failed_total == 0, OS page caches dropped, trade-offs self-disclosed. - "What gets merged: … a measured performance/memory issue" — qualifies, and closes a limitation #660 disclosed.
- "Supported matrix & compatibility: check across every supported model, cache scheme, parallel layout, multi-host setup and hardware target" — the live evidence covers one GPU type (SM121, single GPU). SM120 TP4 DeepSeek-V4.1-Flash is expressly not re-measured.
Where it sits in tension:
docs/design-review.md:56-61principle 3: "Reject per-model boolean policy flags, includingsupports_*,can_*, and default-false opt-ins."preserve_message_anchoris literally a default-false boolean opt-in threaded throughPrompt/RequestSpec/LiveRequest, derived in the server layer and consumed in the scheduler. It satisfies the spirit (model-independent meaning, prepared frontend metadata) but a reviewer applying the letter would ask why it is not derived inside the scheduler.docs/design-review.md:232-240makes failing to run the applicable TLA+ models, conformance fixtures, Kani harnesses and scheduling simulator "a blocking design failure". The PR assertscheck.py --mutationspassed (all 8 models) and argues Kani/scripts/scheduling_simare N/A — verified:scripts/scheduling_sim/contains no checkpoint/anchor model, so the claim holds.docs/design-review.md:298requires aDesign-Signed-Off-By:trailer on every commit; the PR body does not mention it (the same gap #660's review flagged).
Claims and evidence
Verified:
+29net production LOC /+37−8across 4 Rust files, zerounsafe, zero CLI / Protobuf / model-core ABI change, zero model-name branches — checks out against the diff.helios/src/cache.rs:552-579exact-prefix lookup — the stated mechanism is real.- Tests as described:
checkpoints.rs:4788-4862(preserved_message_anchor_retains_interior_boundary_and_respects_zero_fraction— assertscuts[0] = (896, Anchor, split_ns 0),cuts[1] = (1024, Endpoint),reserved_ns 5,budgeted_anchor None,request_anchor_endpoint == Some(896), then re-asserts with a stale latch andextra_spent_ns = 1000, then fraction 0.0 →cuts[0].endpoint == 1024) andcheckpoints.rs:4864-4925(non_preserved_continuation_with_reused_prefix_still_budgets_interior_anchor— real admit/plan/commit loop,admission_reused_tokens == 512, preserve=false → 1024, preserve=true → 896). These directly guard #660's multi-turn behavior. - Fault mutations: forcing
budget_interior_anchortotruefails the first test (exit 101); widening== OutputStart::Reasoningto!= OutputStart::Contentfails the readmission test onRecipientHeader(exit 101) — a genuinely useful check that protects the ATEMfalsecases. - Four docs + README updated consistently (
docs/cli-design.md:696-708,docs/core-design.md:1436-1457,docs/scheduling-runtime-design.md:664-674,helios/README.md:370-386).
Author-run but not independently verifiable here:
- Release compile and test counts (
RUSTFLAGS="-D warnings" cargo check --locked --releaseon six crates; helios 1,900 passed; selene 553; selene-manager 426; flare 254; flare-cli 245; eos 12) on a cleangit archive bfae28a6. No CI run exists at head (no checks), which is precisely the warning #660's Ready-To-Merge review raised. python3 verification/helios-lifecycle/check.py --mutationsall 8 models plus mutation guards pass. Itsbudgeted_anchormutation needle (the fullSome(...)line, nowcheckpoints.rs:649) remains unique after #697 adds a secondbudgeted_anchor = Noneat:622, andcheck_mutationsrequirescount(needle) == 1(check.py:249-250) — so the guard still holds.
Not backed:
- The two performance tables. No harness, no reproducer, no raw logs; the "C=6 × 4 turns, n=2, OpenAI content-only history" generator and the "warm-catalog cold-prefill burst" workload are unnamed. Contrast #660/#661, which name
FujitsuPolycom/tokbenchwith explicitpython3 -m tokbench run ...lines. This is the weakest link in the package. - The live binaries are SHA-256-pinned (
eccdaa0f…Arm A,8892aa6f…Arm B) but built from298d3e68, not headbfae28a6; the body says the rebase was test-only and production lines byte-identical, so this is defensible, but no live run exists at the reviewed head. - SM120 TP4 non-thinking workloads are not re-measured; the justification (preserve=false → unchanged path) is supported only by the
admission_reused_tokens == 512unit test, not a benchmark. - The Nemotron regression in the table (Turn 2+ median TTFT +8.0%, prefill launches 90 → 229 at
max_active = 4) is disclosed but unexplained beyond queueing.
Reach
- Users: every OpenAI-compatible and Anthropic chat request whose template opens a reasoning block — the common path on reasoning-enabled Qwen3.8 / Nemotron / DeepSeek cores, not an edge case. Turn 1 gets slower (TTFT p50 5.83–8.98 s → 7.54–9.25 s) to make Turns 2–4 much faster (prefill tokens −20.1% to −45.1%; Turn 2+ cache hit +9.74 pp to +31.78 pp; 0/108 zero-hit misses).
- Operators: no new flag, no independent opt-out. The only way to disable the rule is
--scheduler-checkpoint-extra-work-fraction 0.0, which also suppresses terminalEndpointextras and all optional Message cuts (checkpoints.rs:675-677) — far blunter than #660's documented 0.15 workaround. The effective meaning of the default0.05changed twice in two days for reasoning workloads. - Snapshot budget: an extra charged prompt-end
Endpointcopy per preserved turn (cuts.len() == 2), visible in the PR's ownckpt_caps end60→96 / 64→96 / 61→96 andmsg11→0 / 2→0 / 21→12. Undiscussed for snapshot-capacity-constrained deployments. - Compatibility: no wire, Protobuf, CLI, or core ABI change; existing signed cores load and serve unchanged, consistent with the diff.
RequestSpecis internal to helios (no occurrences underflare/ordocs/), so only in-repo callers/tests need updating. - Deployment: live evidence is single-GPU SM121 (
gb10-tp1) only, while #660's headline wins were 4× RTX PRO 6000 SM120 TP4 — a materially different bucket/expert layout. - Documentation: four docs + README, consistent wording.
- Known blind spot disclosed by the author: templates that inject a self-closed empty reasoning suffix when
enable_thinking=false(<think>\n\n</think>\n\n) resolve toOutputStart::Content, so they getpreserve_message_anchor = falseand remain budgeted.
Process
- State: open, ready for review (not draft). Labels: none (contrast #660's area:scheduling / bug / performance / triage:review). Reviews: none, none requested. CI at head
bfae28a: no checks. No Autobot/flare-autobot intake or review comment — every sibling PR in this series got one within ~2h. - Age: opened and last updated the same day as this case file (2026-12-02).
- Description quality is high by this repo's standards: binary hashes, boot protocol, cache-dropping, per-crate test counts, mutation checks, disclosed trade-offs and limitations, Discord contact. The missing pieces are a reproducer for the benchmarks, a CI run at head, and the design sign-off trailer.
Open questions / not found
- Why is there no CI run and no Autobot intake comment on this head, when every neighbour PR received both? Not determinable from the repository state.
- Does #655 land before or after #697, and in which order do they need rebasing? #660's reviews flagged the overlap; no ordering decision is recorded on #697.
- How much snapshot capacity does the second
Endpointrow per reasoning turn consume on a snapshot-constrained deployment? Not measured or discussed. - Is there any real-world report (issue, Discord, field measurement) of the multi-turn reuse collapse independent of #660's own disclosure? None found in the repo; the only related frontend-layer disclosure is #396.
- Whether
helios/src/server/runtime/phase_tests.rscoversOutputStart::ToolBody— it does not, though the description lists it among non-preserved starts. docs/design-review.md'sDesign-Signed-Off-By:trailer requirement is unaddressed in the PR body; whether the commits carry it was not verified here.