Explore scratchpad · NVIDIA/hyperflare-inference #660

Raw Markdown for agents: https://autobot.eidonix.com/p/51aba6dc-9800-4365-be9f-ee3bcb171e3d.md

#1 [high] Change: what PR #660 does to checkpoints.rs

PR #660 (open, draft) "helios/scheduler: budget interior conversation-anchor splits against checkpoint_extra_work_fraction", branch fix/budgeted-interior-anchor-split -> main, head 22cac916834f, opened 2026-12-01 19:02, labels area:scheduling, bug, performance. 11 files, +740/-127.

Core change in helios/src/scheduler/checkpoints.rs (prod hunks ~+60/-51; the rest of the file's +626/-78 is inline mod tests additions):

#2 [high] Claims: PR #660 description appears in two materially different versions

The PR body reachable through read_item(660) and the body given in the orientation packet are materially DIFFERENT, including different A/B bases and different result tables. Both are dated 2026-12-01 and the item is marked "updated 19:03" (one minute after open at 19:02), so one is a stale snapshot of a body edit.

Version A (orientation packet, calls itself the newer one):

Version B (read_item 660, the local copy):

Why it matters for a reader: in version B the headline A/B was run on a base four merged PRs old and explicitly "not re-run on 22cac916834f"; version A claims an exact-candidate A/B. The mixed-c32 and Burst-8 tables exist only in version A; the 13.7K->24.6K table only in version B. Either way the numbers to check differ. NOTE: both bodies say "kani unrun" and "gated templates unrun", so charter line 42 (supported matrix) coverage is partial by the author's own admission.

#3 [high] Related work: #582 is the direct predecessor (same author, same function)

PR #582 "helios: avoid splitting prefill on zero-budget checkpoint anchors" (FujitsuPolycom, opened 2026-11-28, merged 2026-11-29 20:58, +2264/-20, 7 files, labels area:scheduling, performance, triage:review). This is the PR that INTRODUCED anchor_split_is_zero_cost and zero_budget_anchor and the fraction == 0.0 gating that #660 now removes/generalizes. #660 is effectively "finish the job for nonzero fractions".

#582's own statement of scope (relevant to #660's "why"): "Before: Helios always kept the last eligible message boundary as the anchor regardless of ... zero-fraction prefill split cost". So the discontinuity exists because #582 only fixed the zero-fraction arm; nonzero fractions kept the old unconditional behaviour. That is exactly the bug #660 reports.

Review history on #582 (two rounds, extensive):

#4 [high] Change: code-level details, dual decision paths, metric effects

Verified in PR head source (helios/src/scheduler/checkpoints.rs):

#5 [high] Change: existing tests re-tuned to non-default fractions (undeclared in body)

The production diff is small but the test churn is large and, notably, several EXISTING tests had to be changed in ways the PR description does not mention ("Updated ... unit tests" is all it says). Changes to existing tests (not new ones), from pr_diff:

  1. helios/src/scheduler/tests.rs prefill_to_publication_boundary (helper used by many boundary tests): now registers prefill_graphs(&[64,128,256,512]), rewrites every Prefill graph duration to 100_000 + token_capacity ns, and sets checkpoint_extra_work_fraction: 1.0. Without fraction 1.0 the shared boundary helper no longer produces interior anchors, i.e. the default-fraction behaviour change is visible in the test fixtures.
  2. helios/src/scheduler/boundary_tests.rs scheduler_with_concurrency (widely used fixture): Prefill durations rewritten to 100_000 + capacity, and checkpoint_extra_work_fraction: 1.0. Two call sites additionally add prefill_graphs(&[64,128,256,512]).
  3. helios/src/scheduler/checkpoint_lifecycle_tests.rs checkpoint_reservations_match_lifecycle_model (the exhaustive TLA+ edge(...) conformance test that drives CheckpointReservation.tla): sets fraction 1.0.
  4. helios/src/scheduler/policy_tests.rs: terminal_prefill_runs_at_checkpoint_boundary_cut sets 0.2; short_prefill_tail_caps_service_price_on_decode_transition sets 1.0.
  5. helios/src/scheduler/vision_window_tests.rs partial_image_prefix_reuse_preserves_canonical_indices_and_only_counts_initial_reuse sets 0.1.
  6. helios/src/server/runtime/phase_tests.rs: exact_system_and_prompt_checkpoints_publish_only_after_snapshot_completion was rewritten to use prompt_len = limits.prefill_chunk_size + 3 and boundary = chunk size instead of prompt 13 / boundary 10 (so the interior anchor lands on an aligned boundary and survives the budget); exercise_text_preemption sets fraction 1.0. 7. checkpoints.rs existing assertions rewritten where the old expectations encoded the unconditional interior anchor: e.g. cuts == [256,512,640,768,896,1024]/reserved 115 became [256,512,768,896,1024]/reserved 134; the "Part B: nonzero fraction still keeps the unaligned interior boundary (200) as Anchor" case now asserts fallback to 1024 at 0.05 and retention at 0.15; [94,96] became [96] plus a new aligned-64 subcase. Interpretation (factual): the tests had baked in the behaviour this PR calls a bug, so they were re-tuned to non-default fractions (0.1/0.2/0.279/0.28/0.5/1.0) or aligned boundaries. That is a legitimate signal but also means the PR changes the meaning of widely shared test fixtures, and coverage of the default 0.05 path now comes mainly from the four new tests in checkpoints.rs (default_fraction_budgets..., default_fraction_anchor_guard_revocation..., default_fraction_c16_short_prompts..., anchor_only_multi_chunk..., zero_split_interior_anchor_retained_when_extra_spent_exceeds_available).

#6 [high] Related work: file map and overlapping/parallel PRs on checkpoints.rs

#7 [high] Reach: default-behaviour change on a documented operator knob; metrics move; README stale

Reach: the knob --scheduler-checkpoint-extra-work-fraction / [server] scheduler_checkpoint_extra_work_fraction is a first-class, documented, user-facing control and is validated/thresholded in 4 crates:

#9 [high] Why: the padded interior-anchor tail has been a target since #69 (Oct), #426, #582

The complaint #660 fixes (an interior anchor split costs a padded prefill launch) is one the project has been chasing since at least late October:

#12 [high] Claims vs evidence: what the diff proves and what is only asserted

Claim-by-claim, separating what I verified from what is only asserted in the body: VERIFIED from the diff/source:

#14 [high] Open leads resolved: dual decision sites, metric movement, stale README, dismissed leads

Lead 1 (divergent duplicate decisions) resolved as a REVIEWER NOTE, not a claim of a bug. Two independent places decide the interior-vs-prompt-end anchor:

#15 [high] Research summary

Case file for PR #660 is complete: 14 scratchpad entries cover all nine angles.

What it is: a ~+60/−51 production change in helios/src/scheduler/checkpoints.rs (the +626/−78 file total is mostly new inline tests) that makes an interior conversation anchor obey the existing checkpoint_extra_work_fraction allowance instead of being pushed unconditionally at every nonzero fraction with split_ns: 0. It replaces anchor_split_is_zero_cost with anchor_split_ns -> Option<(u64,u64)>, renames zero_budget_anchor to budgeted_anchor, charges the anchor's predicted split to reserved_ns/extra_spent_ns, and adds a guard so an already-charged unreached Anchor cut survives multi-chunk steps and guard revocation. Docs in three design files updated; check.py mutation string updated. No flags, ABI or unsafe.

Most important things a reader cannot get from the description: (1) The body exists in two materially different versions — different A/B bases (571a4471 "not re-run on 22cac916834f" vs "exact candidate vs 5d53040e"), different workload tables, different trade-off disclosures (mixed-c32 per-user p50 93.9→71.0 tok/s and >250 ms gaps 215→434 appear in only one). (2) Six existing test files/fixtures were re-tuned to non-default fractions (0.1/0.2/0.279/0.28/0.5/1.0), including the widely shared scheduler_with_concurrency and prefill_to_publication_boundary helpers and the TLA+-conformance lifecycle test — i.e. the tests had encoded the behaviour this PR calls a bug. (3) Because treating a retained anchor split as zero cost was what funded the anchor, optional Endpoint/late-Message captures lose that headroom in return; the diff's own rewritten assertion ([256,512,640,768,896,1024]/115 → [256,512,768,896,1024]/134) shows early Messages gaining at the expense of a late one, and checkpoint_extra_work_nanoseconds_total now counts anchor splits for the first time. (4) helios/README.md:372-380 was not updated and still describes anchor selection without the allowance gate. (5) There are two independent decision sites (request_anchor_endpoint vs checkpoint_selection_uncached) using different budget bases — the same class of divergence that produced both blockers in #582's review.

History and fit: #660 is the third attempt at the same padded-tail cost, after #69 (closed, original-el8 — whose review literally asked for folding a token threshold into checkpoint_extra_work_fraction) and #582 (merged, same author — which fixed only the fraction == 0.0 arm and left nonzero fractions unconditional). It builds on #582's latch and #645/#459/#568; it supersedes one #582 behaviour and rewrites the docs sentences that stated it. It runs parallel to #655 (same function, already Ready-To-Merge) and #654/#663, so a rebase conflict is certain. Charter and docs/design-review.md line up on layer, footprint and "real evidence"; the gaps are that no CI ran on the head, kani and gated templates are declared unrun, the simulator is not addressed at all, and the design-sign-off trailer is unverifiable from here. Engagement so far is zero: draft, untriaged, no reviews or comments; only yatesdr's #663 cites it as complementary. Leads #534 and #600 were checked and are fork-specific (rebutted upstream), so not relevant.

#16 [high] Trade-off: charging the anchor split spends the headroom that used to fund optional extras

Interpretation a reader needs (connection between two entries, not stated in the PR body): before this change, an interior Anchor captured at a nonzero fraction was charged split_ns: 0 (checkpoints.rs old hunk: split_ns: 0, no reserved_ns addition). Because the optional-cut budget check is extra_spent_ns + reserved_ns + charge <= available (checkpoints.rs:707-716), an uncharged anchor left the whole allowance available for Message/Endpoint extras. Once the anchor's split is charged to reserved_ns (checkpoints.rs:619-627), those extras compete for what remains. The PR's own before/after assertion shows the effect: cuts == [256,512,640,768,896,1024], reserved_ns == 115 became [256,512,768,896,1024], reserved_ns == 134, with the comment "Anchor 896 adds 110 ns ... leaving 90 ns ... 640 (split 90 + copy 1) exceeds the remaining budget" (checkpoints.rs:~1806-1830 in the diff). So the change deliberately trades a late, expensive extra (and, in the new test Case 2, the terminal Endpoint when the anchor falls back) for the prompt-end/earlier-Message captures. The asymmetry to note: the anchor's own snapshot copy stays uncharged (copy_ns: 0, documented in all three docs), so an anchor is "split-priced but copy-free". Also: the optional Endpoint is only offered when prompt_tokens != anchor (checkpoints.rs:648), so an anchor that falls back to the prompt end keeps the terminal capture — the new test default_fraction_budgets... asserts exactly this for the 453-token case ("terminal capture must remain funded under default 0.05") but Case 3 shows the same budget being consumed to the exact nanosecond (22_500_000 of 22_500_000).

#8 [medium] Project fit: docs/design-review.md mandatory verification vs what #660 ran

docs/design-review.md (repo's mandatory process doc) matters for judging the evidence package:

#10 [medium] People: author history (Dooner/FujitsuPolycom) and reviewers of this code

Author: FujitsuPolycom (GitHub association CONTRIBUTOR; Discord handle "Dooner" per the PR body). In the last 180 days: 15 merged, 11 closed, 3 open PRs. Merged work spans docs (10), helios/src (10), heliopause/src (4), ignition/preparation (4). Relevant to this PR:

#11 [medium] Community & process: no comments, no reviews, no CI, draft, untriaged

Community and process, as of 2026-12-01:

#13 [medium] Recent activity: checkpoints.rs rewritten every few days; adjacent merges between A/B base and head

#17 [medium] Scope limits: what this case file did and did not verify

Limits of this case file, so the report does not overclaim: