Recommendation: Ready To Merge
All Round 1 correctness blockers, major issues, and minor items are cleanly resolved in 69bf2cf with targeted regression tests and exact-SHA 4× SM120 flare run A/B evidence (-20% to -50% prefill launches and -15.1% to -23.8% prefill TTFT p50 on multi-turn zero-budget workloads), and priority contributor @voipmonitor has independently verified and approved this head. No correctness, safety, or default-path regressions remain. Ensure CI (or a quick rebase onto main f7256584) executes main's post-1a5d4d8c check.py --mutations harness on the merged commit, and consider the small non-blocking follow-up to latch zero_budget_anchor on full-prompt cache hits to avoid repeated per-decode-step re-pricing in promote_request_anchor.
Merge Risk
Level: Low
- Production behavior changes are strictly gated behind
self.limits.snapshots == 0orself.policy.checkpoint_extra_work_fraction == 0.0(helios/src/scheduler/checkpoints.rs:388-396, 482-484, 510-511, 549-551, 957-959); the default0.05scheduling and optional-Endpointeviction paths are unchanged. - No wire contracts, captured-graph contracts, config knobs, concurrency primitives, or per-model branches are introduced; all 7 modified files merge cleanly against current
main(f7256584). - The only residual runtime cost on the zero-budget path is minor CPU/allocation overhead in
promote_request_anchoron decode steps of full-prompt cache hits (wherezero_budget_anchorremainsNone), which does not affect correctness or undo the measured TTFT gains.
Walkthrough
helios/src/scheduler/checkpoints.rs: Short-circuitslimits.snapshots == 0before catalog pricing (:482-484) and terminal capture allocation (:957-959); adds same-catalog split-cost checkanchor_split_is_zero_cost(:363-385), latches(raw_anchor, chosen)inCheckpointAccounting::zero_budget_anchor(:28, preserved acrossclear_reservations()at:48-51, written at:526, 534, read at:529-532, 711-717), returns early after theAnchorcut whencheckpoint_extra_work_fraction == 0.0(:549-551), resolves a single anchor endpoint inrequest_anchor_endpoint/is_request_anchor_endpoint(:387-463) forpromote_request_anchor(:788-811), and adds regression tests covering zero capacity, multi-chunk fallback, upward/downward EWMA drift,Mixedprefill alignment shifts, partial prefix hits, preemption readmission, and zero-fraction skip counters (:2364-3501).helios/src/scheduler.rs: Routes Selene inbound-restore role classification (:1792-1808) throughself.is_request_anchor_endpoint(request, inbound.consumed_tokens)so prompt-end restores match the resolved zero-budget anchor.helios/src/scheduler/checkpoint_lifecycle_tests.rs: AddsCheckpointReservation.tlatrace-conformance tests for multi-chunk zero-budget fallback with cancellation points (:278-411) and upward EWMA drift +Mixed(256)alignment shifts (:414-692).verification/helios-lifecycle/check.py: Adds a single-line Rust mutation guard (:325-330) asserting multi-chunk zero-budget anchor fallback is retained.docs/cli-design.md,docs/core-design.md,docs/scheduling-runtime-design.md: Document zero-capacity cut suppression and zero-fraction interior-anchor split pricing, including unknown-cost fallback to the prompt-end anchor.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduling/checkpoint accounting, tests, docs, and one mutation test entry; no unsafe code, external I/O, or suspicious directives.
- [PASS] Charter & value fit: Fixes a measured zero-budget scheduling defect in Helios with no new flags, no per-model branches, and exact-SHA served 4× SM120 A/B benchmarks clearing the #210 evidence bar.
- [PASS] Related / duplicate / conflict check: Additive over
main(f7256584) and #568/#550; clean 3-way merge across all 7 touched files;@voipmonitorapproved69bf2cf2. - [WARN] Tests & verification evidence: Unit (
394 passed), pytest (312 passed), and served 4× SM120 A/B checks are strong, butcheck.py --mutationsran on baseba3afb13(pre-1a5d4d8c), so CI / a post-rebase run should confirm the 59 newCheckpointReservationedges passmain'sObservedState/ObservedSafefull-.cfginvariant check.
Blockers
None.
Should Fix
- Verify TLA+ conformance on
main's post-1a5d4d8charness before/on merge (verification/helios-lifecycle/check.py:60-93onmain): Branch head69bf2cf2is based onba3afb13, wherecheck.py:62-80only evaluatesINVARIANT CorrespondsonObserved.cfg.maincommit1a5d4d8caddedObservedState/ObservedSafeand carries allCheckpointReservation.cfginvariants (TypeOK,OutstandingUseRetainsRow,PublicationWaitsForCopy,OneGuardAndCapturePerRequest,CancelledRequestsHaveNoReservation,GuardsHaveNoGPUUse). Manual inspection of the 59 new edges (helios/src/scheduler/checkpoint_lifecycle_tests.rs:278-692) indicates they satisfyObservedSafe(fences stay withinMaxFence = 2, cancelled decoder rows arePublishednotOwned), and the diff merges cleanly — confirm CI on the merge commit (or a quick rebase ontof7256584) passespython3 verification/helios-lifecycle/check.py --mutations. - Avoid per-decode-step re-pricing in
promote_request_anchoron full-prompt cache hits atfraction == 0.0(helios/src/scheduler/checkpoints.rs:387-458, 788-811): Requests admitted on a full-prompt cache hit (consumed_tokens == prompt_tokens) never execute a prefill step, soplan_checkpoints(:699) never populatesrequest.checkpoints.zero_budget_anchor. Becausecommitcallsself.promote_request_anchor(lane.request)for every lane on every step (helios/src/scheduler.rs:2411), every decode/speculative step of such a request re-runsrequest_anchor_endpoint(cache probes, a smallVec<PrefillCatalogCost>allocation, and 3 stride-basedinterval_prefill_nscalls). Latchzero_budget_anchor = Some((raw_anchor, anchor))insidepromote_request_anchoroncerequest.consumed_tokens >= raw_anchor as u64(note: keeppromote_request_anchorbeforecommit_checkpoint_plansathelios/src/scheduler.rs:2411-2412so existing checkpoints are promoted before snapshot-quote eviction runs).
Subtract / Simplify
- Deduplicate the latch lookup (
helios/src/scheduler/checkpoints.rs:398-402, 528-532, 710-717): Extract a smallCheckpointAccounting::latched_zero_budget_anchor(&self, raw_anchor: usize, prefix_tokens: u64) -> Option<usize>method sorequest_anchor_endpoint,checkpoint_selection_uncached, andplan_checkpointsshare one definition instead of repeating the same guard three times. - Avoid redundant
checkpoint_anchor()scans inpromote_request_anchor(helios/src/scheduler/checkpoints.rs:391, 790-797): Computelet raw_anchor = request.checkpoint_anchor();once and pass it to a helper (request_anchor_endpoint_for) rather than walkingmessage_boundariesup to three times per lane per commit. - Optional test deduplication: Part A of
zero_fraction_aligned_interior_anchor_and_mixed_prefill_preserve_exact_contracts(helios/src/scheduler/checkpoints.rs:2778-2816) is subsumed by(a)at:2909-2951;complete_test_step(checkpoints.rs:1980-2054) andfinish_step(checkpoint_lifecycle_tests.rs:494-541) can be consolidated withcomplete_records(checkpoint_lifecycle_tests.rs:94-118) intests.rs(not opened); and the repeated inlineGraphDescriptor { kind: GraphKind::Mixed, ... }literals (checkpoints.rs:2847-2861, 3024-3038, 3252-3266,checkpoint_lifecycle_tests.rs:569-583) can reuse a small descriptor helper likeextra_graphs()(checkpoints.rs:1133-1147).
Nits
docs/cli-design.md:708,docs/core-design.md:1438-1439,docs/scheduling-runtime-design.md:554: Optionally note that zero snapshot capacity also skips terminal captures (matchinghelios/src/scheduler/checkpoints.rs:957-959), not just prefill checkpoint cuts.
Dropped on verification
- Stale review-state claim ("
voipmonitor'sCHANGES_REQUESTEDstands"): Verified in PR #582 discussion that@voipmonitorre-tested69bf2cf2and postedAPPROVEDon 2026-11-29 17:14. - TLA+ projection width /
44f59df5ordering claims: Upstream lenses claimedmainpost-1a5d4d8cwidenedObservation::projectpast 15 elements and that44f59df5predates1a5d4d8c. Verified onmainthatcheck.py:30andcheckpoint_lifecycle_tests.rs:16still use[u64; 15](width 15, populating those slots withterminal_snapshotandpending_retirement()), and1a5d4d8cis an ancestor of44f59df5. - Zero-capacity skip-counter suppression (
checkpoints.rs:482-484, 957-959): Dropped; explicitly configuring--prefix-cache-memory 0(flare_snapshot_capacity == 0) intentionally disables checkpoint planning (requested in Round 1), and the8GiBA/B runs independently confirm theunknown_cost/work_budgetskip reductions. - Claimed Selene inbound-restore role downgrade (
scheduler.rs:1794): Provably false. Pre-PR comparedrequest.checkpoint_anchor() == inbound.consumed_tokens; post-PR, an inbound restore atraw_anchorstill getsAnchorviacheckpoints.rs:394(request.prefix_tokens == raw_anchor as u64), a prompt-end restore with a zero-cost interior split still getsEndpoint(unchanged), and a prompt-end restore with a costly interior split is upgraded fromEndpointtoAnchor. - Claimed O(prompt) complexity of
interval_prefill_nsand suggestion to swapscheduler.rs:2411-2412:interval_prefill_ns(checkpoints.rs:219-266) skips uniform chunks in O(1) via stride pricing (O(|catalog|)), and movingpromote_request_anchoraftercommit_checkpoint_planswould allowcommit_checkpoint_plansto evict a cached checkpoint beforepromote_request_anchorraises its role/epoch. - Claimed silent fallbacks in
request_anchor_endpoint(checkpoints.rs:424-428, 437-439)::437-439(baseline_start > raw_anchor && baseline_start < prompt_tokens) matchescheckpoint_selection_uncached:533-536andmain;:424-428cannot hit an evictedprefixorparentmid-flight becauseCache::pin(helios/src/cache.rs:511-521) pins the entire ancestor chain while the request is live. - Predicate
<=vs==doc pedantry (checkpoints.rs:384): Matches the pre-existing split-cost formula atcheckpoints.rs:621; "adds zero predicted prefill work" accurately describesadditional_work == 0. - Replace
checkpoints.rs:606-622with a 3-callsplit_prefill_nshelper: Dropped because recomputingwholeinside the helper would discard thebetweeninterval cache (checkpoints.rs:573, 592-605). - Delete
checkpoints.rs:403-439in favor ofbaseline_start.min(raw_anchor): Provably broken; whenbaseline_start == prompt_tokens(full-prompt cache hits and Selene inbound restores),price_start = raw_anchorproducesbefore = 0andafter = whole, unconditionally returningSome(raw_anchor)and breakingcheckpoints.rs:2722-2774and:3198-3234. - Claim that Part C (
checkpoints.rs:2837-2905) duplicates:3009-3101: Part C testsMixed(512)retaining prompt-end fallback (200 -> 1024), whereas:3009testsMixed(256)shifting alignment into a zero-cost interior anchor (768). - Claim that
checkpoints.rs:2502-2611has a flaky 2-second wall-clock assertion:now_ns(:2555-2610) is deterministic simulated virtual time summed from hardcodeddur_nsconstants, not wall-clock time.