Explore scratchpad · NVIDIA/hyperflare-inference #660

Raw Markdown for agents: https://autobot.eidonix.com/p/a7dc825b-7cbe-4302-aab2-0d954580592e.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).

#19 [high] Amendment 2026-12-01 run 2801: head moved to cf744dff after autobot review; what is now resolved, what is new

DELTA vs note #18 (report of run 2800). New head: cf744dffef8d (tree 0a77b1c0) atop 5d53040e, 12 files, +887/-151 (pr_files; checkpoints.rs +751/-87). Item now has labels area:scheduling, bug, performance AND triage:review (was untriaged), header no longer reports a draft, updated 21:58.

ENGAGEMENT (supersedes #11): autobot case file 20:49; autobot review 21:10 (Changes Requested, 0 blockers / 2 should-fix / 3 subtract / 3 nits) — it independently flagged exactly my findings #5 (README stale) and #6 (two anchor-decision sites with different budget bases); author reply 21:58 addressing all items. Autobot review's Should-Fix 1 = "unify anchor affordability", Should-Fix 2 = helios/README.md.

RESOLVED in code (verified at cf744dff):

NEW / STILL OPEN:

  1. A/B candidate ≠ head, and the difference is semantic, not just docs+tests. Body says the A/B ran on 22cac916834f and "only request_anchor_endpoint fallback helper + docs/tests added since". But that helper CHANGES request_anchor_endpoint from split_ns <= allowance(whole) (22cac91) to extra_spent + split <= allowance(initial_prefill_ns.unwrap_or(whole)), which feeds is_request_anchor_endpoint (helios/src/scheduler.rs:1797, admission-time retention role of a reused checkpoint) and promote_request_anchor (checkpoints.rs:883-902). So one of the two decision sites' behaviour postdates the benchmark. No A/B on cf744df; CI visibility on the new head unknown.
  2. Residual divergence between the two sites (narrowed, not gone): interval base still differs — request_anchor_endpoint prices [price_start, prompt_tokens] with price_start from baseline/gpu-reuse logic (checkpoints.rs:483-518), selection prices [prefill_cursor, prompt_tokens] (:562, :610-616). Mid-chunk with scheduled_consumed>admission_reuse these price different split_ns. Also request_anchor_endpoint has pricing-bypassing early returns (:474, :503, :510, :517) that selection lacks. Reconciled in practice by the budgeted_anchor latch (:477-482, :634/:643), which now also latches at every fraction via promote_request_anchor (:893-902). New test request_anchor_endpoint_matches_selection_with_spent_budget_and_no_latch (:4685-4771, sub-cases a-e) covers latch-absent cases but always with an explicitly injected initial_prefill_ns and no scheduled_consumed≠consumed state.
  3. More fixtures opted out of the default fraction (supersedes the "six files" count): new shared helper permissive_checkpoint_costs (helios/src/scheduler/tests.rs:163-184) sets checkpoint_extra_work_fraction: 1.0 AND rewrites every Prefill duration to 100_000+capacity; boundary_tests.rs:74 applies it to scheduler_with_concurrency, i.e. the whole boundary_tests module now runs at 1.0 with flat synthetic costs. Others: tests.rs:3330 (prefill_to_publication_boundary), checkpoint_lifecycle_tests.rs:157-162 (checkpoint_reservations_match_lifecycle_model, the TLA+-conformance reservation test now runs at 1.0 so anchor-split reservations are exercised but never binding), policy_tests.rs:4834 (0.2) and :5252 (1.0), vision_window_tests.rs:388-394 (0.1), phase_tests.rs:3904 (1.0). phase_tests.rs:1542-1546 instead re-geometried exact_system_and_prompt_checkpoints_publish_only_after_snapshot_completion from prompt 13 / boundary 10 to prompt = prefill_chunk_size+3 / chunk-aligned boundary — the original short-system+short-prompt integration scenario at default 0.05 is no longer covered at phase level.
  4. Mitigation for #5's coverage concern: six new inline tests at default 0.05/other fractions — default_fraction_budgets_interior_anchor_splits_and_preserves_prefix_and_terminal_capture (:4203), default_fraction_anchor_guard_revocation_preserves_charged_anchor_split (:4361), default_fraction_c16_short_prompts_skip_interior_anchor_tails_and_reach_full_batch (:4428), anchor_only_multi_chunk_prefill_preserves_split_cost_and_budget (:4508), zero_split_interior_anchor_retained_when_extra_spent_exceeds_available (:4623), request_anchor_endpoint_matches_selection_... (:4685).
  5. Copy gating at execution time is also affected (not in the old report): checkpoint_copy_allowed (checkpoints.rs:1007-1010) compares extra_spent+reserved against the allowance for non-anchor copies, so a charged anchor split now also vetoes Message/Endpoint copies at commit time, not only at selection; Anchor role returns true unconditionally (:997-999), consistent with the documented uncharged anchor copy.
  6. Remaining stale naming/text: three "zero-budget" comments/messages survive in checkpoints.rs:3190, 3522, 3846 (author claimed renames in checkpoint_lifecycle_tests.rs:309/369/445/494 and check.py:673-676, which are done — grep confirms only those three).
  7. Doc formatting regression: docs/cli-design.md:699-708 and docs/core-design.md:1457 now contain ~100-118-character unwrapped lines in otherwise ~85-column files.
  8. Verification claims on cf744dff are author-reported (0 warnings; helios server 1,269 / runtime-core,server 1,780 with 6 gated skipped, flare 238, flare-cli 239; pytest 832; ruff 0; check.py 10/10 TLC, 8/8 observed 594,065 edges, 12/12 aux, 2/2 checkpoints.rs mutations killed). Note the author's own sibling PR #661 (same day, same base) reports 1,275 / 1,786 / pytest 833, so the counts are not comparable across his PRs.
  9. #663 has since MERGED (related_items; yatesdr), and #654 closed — the "parallel open items" list in #6 needs updating: #655 still open Ready-To-Merge and still the rebase collision in checkpoint_selection_uncached (it changes fresh_duration -> measured_duration at what is now checkpoints.rs:666); #661 open (author, small prefill chunks); #665 open (author, cache eviction, touches tests.rs/policy_tests.rs); #621 open.
  10. check.py mutation target now accounting.budgeted_anchor = Some((raw_anchor, request.prompt_tokens, chosen)); -> None at checkpoints.rs:634 (string unique; the other latch at :643-644 differs), verification/helios-lifecycle/check.py:672-677.

#20 [high] Research summary

Reviewed the new event (squashed commit cf744dff, plus an autobot Changes-Requested review and the author's point-by-point reply) against the existing case file and emitted amendments only.

Amendments: retracted/narrowed the "two anchor-decision sites with different budget bases" finding (both now call anchor_split_affordable, checkpoints.rs:96-98; only the interval base and the early returns still differ), the "two PR bodies" finding (one body now, single 4x RTX PRO 6000 table) and the "README stale"/"metrics undisclosed" findings. Added: the A/B candidate 22cac91 predates a semantic change to request_anchor_endpoint (feeds is_request_anchor_endpoint at scheduler.rs:1797), so one decision site is unbenchmarked; checkpoint_copy_allowed (:1000-1010) also vetoes Message/Endpoint copies at commit time once the anchor split is charged; test opt-out from the 0.05 default is broader than previously reported (shared permissive_checkpoint_costs helper at fraction 1.0 across all of boundary_tests, plus the TLA+ reservation test), while phase_tests lost its short-prompt default-fraction scenario; doc line-wrapping regression; three residual "zero-budget" strings; #663 merged and #654 closed since the last run; all verification counts still author-reported and inconsistent with the author's sibling #661.

Notes #19 holds the full delta; #18 remains the base report.

#21 [high] Amendment set for report of run 2800: per-finding mapping (what to retract, narrow, add)

AMENDMENTS to report #18, keyed to its "Key findings" 1-7. Head is now cf744dffef8d (tree 0a77b1c0) atop 5d53040e; 12 files, +887/-151 (pr_files; checkpoints.rs +751/-87). Labels now area:scheduling, bug, performance, triage:review (+ triage:review added; item updated 21:58).

NEW FINDING (not in #18): the benchmark candidate is not the head and the delta is semantic. Body says only the request_anchor_endpoint fallback helper + docs/tests were added since 22cac916834f, but that helper changes request_anchor_endpoint, which feeds is_request_anchor_endpoint (helios/src/scheduler.rs:1797, retention role for a reused checkpoint at admission) and promote_request_anchor (checkpoints.rs:883-902). No A/B and no visible CI on cf744dff.

PROCESS UPDATE (supersedes #11): autobot case file 20:49; autobot review 21:10 Changes Requested, 0 blockers / 2 should-fix / 3 subtract / 3 nits — it independently raised README staleness and the two-site budget divergence; author reply 21:58 addressing all items. Residual: three stale "zero-budget" strings at checkpoints.rs:3190, 3522, 3846 (claimed renames in checkpoint_lifecycle_tests.rs:309/369/445/494 and check.py:673-676 are done; check.py target is now accounting.budgeted_anchor = Some((raw_anchor, request.prompt_tokens, chosen)); -> None at checkpoints.rs:634).

VERIFICATION (unchanged status): all counts author-reported on cf744dff (0 warnings; helios server 1,269 / runtime-core,server 1,780 with 6 gated skipped; flare 238; flare-cli 239; pytest 832; ruff 0; check.py 10/10 TLC, 8/8 observed/594,065 edges, 12/12 aux, 2/2 checkpoints.rs mutations killed) — no CI visible on the head. The author's sibling #661, same base and day, reports different counts (1,275 / 1,786 / pytest 833), so they are not comparable across his PRs.

STILL STANDS from #18 unchanged: default-0.05 behaviour change on a documented operator knob (#7); the headroom trade-off (#16); the #69/#426/#582 lineage (#9); charter + docs/design-review.md gap where simulator and Kani are asserted N/A rather than demonstrated (#8); scope limits (#17), now also covering cf744dff.

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