Prose review — PR #582 "helios: avoid splitting prefill on zero-budget checkpoint anchors"
Reviewed at head a3c648351c9c364099c57479eba858a7fd33998a. Lens: description, commit message, and changed docs/comments against AGENTS.md and .agents/skills/repo-prose/SKILL.md (not opened).
Key findings
The description is structurally sound — all four required parts in order, Before/After tense discipline followed, limitations disclosed — and the commit message is a single accurate subject line. The real prose defects are in the three changed design docs, all of the same kind: the new text states only half of the new rule.
- Should fix — all three doc edits say the zero-fraction fallback happens only when the split adds predicted prefill work; the code also falls back when pricing is simply unavailable.
- Should fix — no doc states that the substituted prompt-end anchor now survives multi-chunk prefill progress,
Restore,Speculativecontinuation and reuse promotion, which is the second defect the PR fixes. - Should fix — two untouched sentences still assert that unknown prefill cost never affects anchor eligibility, which the new zero-fraction branch falsifies; each affected doc now contains two incompatible rules.
- Nits — four description gaps (causal mechanism missing from "Why", one unexplained identifier, docs changes unmentioned, a result stated as observed while only unit tests back it).
Rules applied: AGENTS.md:43-65 (prose skill mandatory for docs, PR descriptions and review text; "State designed behavior that the code does not implement…", "rewrite passages that… claim results beyond the stated evidence"), AGENTS.md:72-140 (the mandatory four-question description scheme), .agents/skills/repo-prose/SKILL.md:13-14 (not opened), 26-29 ("Documentation is a present-state specification… Replace stale claims instead of layering history on top"), SKILL.md:38-46 (comments explain invariants; PRs state problem, resulting behavior, technical reason, compatibility, validation), SKILL.md:48-59 (review before publishing, quote the passage and describe the information needed to repair it).
Should fix #1 — Docs omit that unavailable pricing forces the prompt-end anchor at zero fraction
Where: docs/core-design.md:1441-1443, docs/cli-design.md:706-708, docs/scheduling-runtime-design.md:556-558.
All three changed passages give the same rule:
- core-design.md:1440-1443 — "when
scheduler_checkpoint_extra_work_fractionis zero, an interior message boundary is retained as the anchor only if splitting prefill there adds zero predicted prefill work, otherwise the prompt end serves as the anchor." - cli-design.md:705-708 — "when the fraction is zero, an interior message endpoint is used as the anchor only when splitting prefill there adds zero predicted prefill work, and otherwise the prompt end acts as the anchor."
- scheduling-runtime-design.md:556-558 — "falling back to the prompt end when no message is eligible or when
scheduler_checkpoint_extra_work_fractionis zero and splitting prefill at an interior message boundary would add predicted prefill work."
What the code does: anchor_split_is_zero_cost returns false on any unavailable price, not just on a positive predicted cost — helios/src/scheduler/checkpoints.rs:373-377 (whole unknown → false), :378-382 (before unknown → false), :383-386 (after unknown → false). At zero fraction that false sends checkpoint_selection_uncached down the accounting.anchor_fallback_from = Some(raw_anchor); request.prompt_tokens path (checkpoints.rs:485-488, and the else if variant at :489-504), and is_request_anchor_endpoint re-derives the same answer with !Self::anchor_split_is_zero_cost(..) (checkpoints.rs:411-419).
So an unmeasured prefill capacity — for example a capacity the core prepared but which has not been measured yet, exactly the situation scheduling-runtime-design.md:563-570 describes — discards the conversation anchor even though no predicted work was added.
Why it matters: docs/cli-design.md:700 documents --scheduler-checkpoint-extra-work-fraction as user-facing behavior; a reader of any of the three passages will conclude that a known zero-cost split is always kept and will not expect anchor selection to depend on measurement coverage. AGENTS.md:52-56 requires documents to state the behavior the code implements, and SKILL.md:26-29 forbids leaving the reader to infer it. The same passage is the natural place a user diagnosing "why did my conversation anchor disappear at fraction zero" would look.
Fix: state both conditions in each of the three places, e.g. "retained only when prepared-graph pricing is available for the whole prompt and both sides of the split and predicts zero additional prefill work; when pricing is unavailable, or it predicts additional work, the prompt end serves as the anchor."
Should fix #2 — Docs never describe the new multi-chunk retention and promotion of the fallback anchor
Where: docs/core-design.md:1436-1445, docs/scheduling-runtime-design.md:553-559, docs/cli-design.md:703-708.
The description's own "After" says the change "preserves a prompt-end replacement Anchor across multi-chunk prefill progress, prefix Restore, Speculative continuation, and reuse promotion (promote_request_anchor)". None of the three docs says this. They say only "the prompt end serves as the anchor" (core-design.md:1442-1443), "the prompt end acts as the anchor" (cli-design.md:707-708), "falling back to the prompt end" (scheduling-runtime-design.md:555-556) — statements that would have been equally true of the buggy pre-change behavior for single-chunk prompts.
What the code adds, all undocumented:
CheckpointAccounting::anchor_fallback_from(checkpoints.rs:28,:49-52), set at:486and:503, consulted at:402and:489.plan_checkpointsresolves the anchor back torequest.prompt_tokenswheneveranchor_fallback_from == Some(raw_anchor)even after noAnchorcut remains incuts(checkpoints.rs:671-685).promote_request_anchorfalls back to the prompt-end key and promotes that checkpoint toRetentionRole::Anchor(checkpoints.rs:753-776, gated byis_request_anchor_endpoint,checkpoints.rs:390-420).- Inbound-restore role assignment in
helios/src/scheduler.rs:1791-1805now routes throughis_request_anchor_endpointinstead of a direct token comparison.
Why it matters: the docs do specify that a distinct prompt end is a lower-priority capture than the anchor (docs/core-design.md:1534-1537 orders retention by role), so a reader who needs to reason about which snapshot survives memory pressure cannot learn from the docs that the prompt-end checkpoint is now promoted into the anchor role. This is the substantive new contract in the change and the one that makes reuse work; leaving it out means the design docs do not specify it (AGENTS.md:52-56).
Fix: add one or two sentences, e.g. "The substituted prompt-end anchor is retained after prefill advances past the skipped interior boundary and after a prefix restore, and the prompt-end checkpoint is promoted to the anchor role when it is reused."
Should fix #3 — Stale sentences now contradict the new zero-fraction rule
Where: docs/core-design.md:1452-1453; docs/scheduling-runtime-design.md:570-572. Also raised by the reviewer as Minor #6 in the 2026-11-28 review.
- core-design.md:1452-1453 — "Unknown prefill costs or unknown or stale snapshot-copy costs exclude extras without excluding the anchor."
- scheduling-runtime-design.md:570-572 — "Unknown prefill costs and unknown or stale snapshot-copy costs disable extras while preserving anchor eligibility."
Both PR edits stop one paragraph short of these sentences and leave them unchanged. At scheduler_checkpoint_extra_work_fraction == 0 with nonzero snapshot capacity, an unknown prefill price makes anchor_split_is_zero_cost return false (checkpoints.rs:373-386), the interior boundary is dropped, and the prompt end takes the anchor role (checkpoints.rs:485-488). Anchor eligibility is therefore now a function of pricing availability, so both sentences are false as written, and each document states two incompatible rules a few lines apart (core-design.md:1440-1443 vs :1452-1453; scheduling-runtime-design.md:556-558 vs :570-572). This is precisely the "replace stale claims instead of layering history on top" case in SKILL.md:26-29.
Fix: qualify both sentences with "under a nonzero extra-work fraction" and state the zero-fraction behavior (which is the same repair as finding #1).
Nits — PR description (4)
The description meets AGENTS.md:74-80 and 82-112: why, what changed with explicit Before/After, claimed benefit, and evidence, in the required order; the Before/After tense discipline of AGENTS.md:88-94 is followed; material limitations are disclosed per AGENTS.md:103-112 — "Live signed-core serving and isolated GPU latency measurements remain unverified", plus two named pre-existing base failures with their base commit. The Discord: Dooner line is present. The commit message (a3c64835 helios: avoid splitting prefill on zero-budget checkpoint anchors) is a single clear subject with no chronology. The remaining gaps are nits:
- "Why" states the defect but not the mechanism (AGENTS.md:82-87: "Technical vocabulary and a sequence of operations do not substitute for a causal explanation"). The description does not say why the anchor cut is emitted today regardless of cost: the anchor
Cutis pushed withsplit_ns: 0(checkpoints.rs:512-519) and never charged against the work allowance, while optional candidates are charged againstallowance(prefill, fraction)(checkpoints.rs:528,:596-605). One sentence naming that would let a reviewer validate the approach without reading the diff. promote_request_anchoris used as unexplained shorthand (AGENTS.md:122-128: "Explain a component's role before using its internal shorthand"). The description names the function but not that it promotes a reused prefix checkpoint fromEndpointtoAnchorretention rank.- The docs changes are invisible (AGENTS.md:88-94: "Name the affected components and explain the concrete implementation and behavior changes"). The PR changes
docs/cli-design.md,docs/core-design.mdanddocs/scheduling-runtime-design.md(+19/−9) but "What changed" mentions no documentation change, including new user-facing text for--scheduler-checkpoint-extra-work-fraction. - A measured-sounding result with only unit-test evidence (AGENTS.md:95-102: "distinguishing an expectation from a measured result… Never attribute a combined result to one PR"). "Zero-budget serving avoids extra padded prefill launches" is stated as a result, but every item in the evidence list is a CPU unit, lifecycle or TLA+ check; no launch count from serving is quoted and live serving is listed as unverified. Either mark it as an expectation or cite the reviewer's live 4×SM120 measurement (voipmonitor review, 2026-11-28:
prefill_steps2→1 short prompt, 3→2 multi-chunk), which is the direct support for the headline claim.
Checked and found acceptable (no finding)
- Comment added in the diff (
checkpoints.rs:463-466): explains the invariant and the retention intent rather than narrating the change; conforms to SKILL.md:38-39. It is also the only prose in the code that hints at the multi-chunk retention — a reason the docs lag is surprising. - Test names and comments in
helios/src/scheduler/checkpoint_lifecycle_tests.rsand the newcheckpoints.rstests state the behavior being pinned (zero_snapshot_capacity_produces_no_cuts_and_never_splits_prefill,zero_fraction_falls_back_to_prompt_end_when_interior_anchor_splits_prefill,balanced_c16_short_prompts_skip_interior_anchor_tails_and_reach_full_batch). One nit-level observation outside my lens: the added mutation literal inverification/helios-lifecycle/check.py:325-343embeds a copy of the source block, which the reviewer already flagged as brittle (Minor #6). - "Zero-cost aligned interior anchors remain eligible without adding a duplicate prompt-end anchor" in the claimed benefit matches
checkpoints.rs:482-484(keepsraw_anchor, clearsanchor_fallback_from) and the aligned-boundary test. - The
Restore/Speculativevocabulary in the description matches realGraphKindnames used in the new test helper (checkpoints.rscomplete_test_stepmatch arms), so it is not invented shorthand.
Open questions / could not verify
- Whether the docs should also state the behavior change for an already-admitted request whose pricing is learned mid-flight (a capacity measured after chunk 1 now makes the same anchor zero-cost or no longer zero-cost between chunks). The code re-prices on every selection; the reviewer's Blocker #1 exercises exactly that drift. I did not record this as a finding because the docs make no claim about re-pricing stability and the code fix is in the other reviewer's lens.
- Findings #1-#3 are prose-only and provable from the cited lines; no test is needed to settle them. Confirming finding #1's user-visible consequence (an anchor disappearing because a prefill capacity is unmeasured) would need a test that admits a request with a prepared-but-unmeasured capacity, which the PR does not add.
- I did not evaluate the five code blockers or the code Majors raised by voipmonitor; they fall outside the prose lens.