#1 [high] Research summary
Reviewed PR #582 at head 69bf2cf2 across helios/src/scheduler/checkpoints.rs, helios/src/scheduler.rs, the 417 new lifecycle-test lines, verification/helios-lifecycle/check.py + CheckpointReservation.tla/.cfg + README.md, and the three docs. All findings below are verified by opening the files.
F1 — Major (evidence / contracts). The formal conformance claim is produced on the pre-#595 harness and will not survive a rebase. At head, verification/helios-lifecycle/check.py:60-66 still does cfg.replace("SPECIFICATION Spec", …) + "\nINVARIANT Corresponds\n" and :66 writes ObservedInit == state = Initial / UNCHANGED state; main (check.py:60-92) instead carries the whole cfg and uses ObservedState/ObservedSafe over a real side step. Observation::project at head is fn project(&mut self, scheduler: &RequestScheduler) -> [u64; 15] (checkpoint_lifecycle_tests.rs:16) and CHECKS width is 15 (check.py:29-30); main post-#595 projects request.terminal_snapshot and cache.pending_retirement(). The PR touches no .tla file and CheckpointReservation.tla has no zero-budget concept (I read it whole: Next/AllowedEdge model only Guard/Armed/Copying/Published/Retired/Mandatory). So "59 CheckpointReservation.tla transitions covering multi-chunk fallback, EWMA drift and Mixed shift" describes the smaller check set, with TypeOK/OutstandingUseRetainsRow/PublicationWaitsForCopy/OneGuardAndCapturePerRequest never evaluated on the new states. Fix: rebase onto f7256584, move the new latch tests onto the 17-tuple projection, re-run check.py --mutations, and restate the numbers.
F2 — Major (metric span). Zero-capacity now silences the checkpoint skip counters. checkpoints.rs:482-484 (if self.limits.snapshots == 0 { return (accounting, false, false); }) returns before the unknown/budget flags that commit_checkpoint_plans publishes at :817-818, and allocate_terminal_capture's new guard :957-959 returns before :964/:968/:977/:998. Impact: for --prefix-cache-memory 0 — exactly the config the author benchmarked — flare_checkpoint_skips_total{reason} and checkpoint_skip_storage become 0 by construction, so part of the advertised "unknown_cost skips dropped to 0–1" is measurement suppression, not fewer real events, and storage-pressure monitoring goes blind where it used to fire. Fix: count the zero-capacity skip in one dedicated counter (or document/rename the metric) rather than dropping the observation.
F3 — Major (undeclared system consequence). Selene inbound restores change retention role at fraction 0. scheduler.rs:1794 now classifies through is_request_anchor_endpoint, which resolves the interior anchor (e.g. 600 of 1024) and therefore returns false for an inbound 1024 the old code classified RetentionRole::Anchor via request.checkpoint_anchor() as u64 == inbound.consumed_tokens. The ticket role is ranged into the cache at :1807 and consumed by publish_with_retention(..., ticket.role, ...) (:1848), and cache.promote only ever raises (node.role = node.role.max(role), cache.rs:345-350). Impact: cross-instance checkpoints restored at a nonzero interior boundary now publish as Endpoint, so RetentionRank/protected_eviction_tokens rank them below anchors and they become preferentially evictable under pressure — the inverse of the pre-PR behavior, unmeasured and unstated (the body says only "Selene inbound restore"). Fix: state the eviction-ranking consequence in the body and docs, and add an eviction-order test for an inbound restore at fraction 0.
F4 — Major (hot-path cost, no measurement). request_anchor_endpoint (checkpoints.rs:387-458) allocates a fresh Vec<PrefillCatalogCost> (:440), runs up to three O(prompt) interval_prefill_ns walks (:446-453), and does ready_by_prefix plus two cache.checkpoint(...).parent() probes (:416-428). It is called once per lane per commit (scheduler.rs:2411) and at admission (scheduler.rs:1794), outside the only memo scope checkpoint_planning_scope (checkpoints.rs:128-131, opened only in policy.rs:1208/:1453). promote_request_anchor runs at scheduler.rs:2411 before commit_checkpoint_plans (:2412) stores the latch, so the first prefill commit of every request pays the full re-pricing even though the latch exists moments later. Fix: read the latch before pricing and/or consult checkpoint_selections, and add a call-count assertion like STRIDE_RUNS/ENTRY_LOOKUPS for promote_request_anchor.
F5 — Minor (edge-case correctness). Two silent degradations inside request_anchor_endpoint: at :437-439 the else { return Some(raw_anchor) } trusts an interior raw_anchor with no split pricing when baseline_start > raw_anchor && baseline_start != prompt_tokens, so is_request_anchor_endpoint can report a token below consumed_tokens as the anchor; and :424-428 uses .ok()? inside and_then, so a failed checkpoint probe silently yields parent_tokens == 0 and prices the whole prompt from 0. Neither is exercised by the new tests (only 88/600/1024, 320 vs 200, 832 vs 768). Fix: make the failure cases explicit return Some(raw_anchor) / documented fallbacks and cover them.
F6 — Minor (claim/doc accuracy). anchor_split_is_zero_cost ends with before.saturating_add(after).saturating_sub(whole) == 0 (:384), so a split that saves predicted work also counts as "zero" — the accepted predicate is <=, not ==; docs (docs/core-design.md:1442-1445, docs/cli-design.md:703-708) state it as "adds zero predicted prefill work". Also the docs say "Zero snapshot capacity disables all checkpoint cuts" without noting that terminal capture is disabled too.
Verified sound: the same-snapshot pricing (anchor_split_is_zero_cost takes &[PrefillCatalogCost], no known_whole), the latch (zero_budget_anchor set at :526/:534, consulted at :529-535, :398-402, :711-717) surviving clear_reservations (which now clears only cuts/reserved_ns, :48-51) on the readmission path scheduler.rs:1726, the fraction-0 early return that avoids pricing optional candidates (:549-551), the zero-capacity no-op ordering (:482-484 before prefill_catalog_costs at :491), and the corrected docs text; existing tests boundary_tests.rs:193-210 remain consistent with the new no-cut behavior.
#2 [high] PR #582 correctness/system-level lens: findings F1-F6 (head 69bf2cf2)
All lines verified at head 69bf2cf2 (base ba3afb13, +1854/-19, 7 files).
F1 MAJOR (evidence/contracts) — conformance harness is pre-#595.
- Head
verification/helios-lifecycle/check.py:60-66:cfg = (MODEL / f"{module}.cfg").read_text()..."ObservedInit == state = Initial /\\ edgeIndex = 1 /\\ observed = Edges[1]","ObservedNext == /\\ edgeIndex' = IF edgeIndex < Len(Edges) ... /\\ UNCHANGED state";:75-79buildsObserved.cfgfromcfg...split("SPECIFICATION",1)[0] + "SPECIFICATION ObservedSpec\nINVARIANT Corresponds\n"→ onlyCorresponds, the #595 blindspot. - main
check.py:60-92: whole-cfg carry-over,ObservedState(Edges[1][1]),sidevariable,ObservedSafeinvariant. - Head projection:
helios/src/scheduler/checkpoint_lifecycle_tests.rs:16fn project(&mut self, scheduler: &RequestScheduler) -> [u64; 15];check.py:29-30width 15 for CheckpointReservation. Main post-#595 addsrequest.terminal_snapshotandcache.pending_retirement(). - PR touches no
.tla.CheckpointReservation.tla(read in full, 221 lines) models Guard/Armed/Copying/Published/Retired/Mandatory only;Nextat :148-167 andAllowedEdgeat :194-217 have no zero-budget anchor concept.CheckpointReservation.cfg:6-12invariants TypeOK/OutstandingUseRetainsRow/PublicationWaitsForCopy/OneGuardAndCapturePerRequest/CancelledRequestsHaveNoReservation/GuardsHaveNoGPUUse are not evaluated on observed states by the head runner. - Impact: "59 CheckpointReservation.tla transitions covering multi-chunk fallback, EWMA drift, Mixed shift" and "12 TLA+ + 21 Rust mutations" describe the smaller pre-#595 set. Fix: rebase onto f7256584, port the new latch tests to the 17-tuple projection, re-run, restate.
F2 MAJOR (metric/rate span) — zero capacity silences skip counters.
helios/src/scheduler/checkpoints.rs:482-484if self.limits.snapshots == 0 { return (accounting, false, false); }— returns before theunknown/budgetflags published at:817-818(self.stats.checkpoint_skip_unknown_cost += u64::from(plan.unknown);/checkpoint_skip_work_budget).checkpoints.rs:957-959if self.limits.snapshots == 0 { return Ok(None); }inallocate_terminal_capture, before:964/:968(checkpoint_skip_unknown_cost += 1),:977(work_budget),:998(storage).- Metrics consumed at
helios/src/server/metrics.rs:500-502(checkpoint_skips[0..2]). Impact: at--prefix-cache-memory 0(the author's measured config) the skip metrics are 0 by construction; the claimed "unknown_cost skips dropped to 0–1" is partly measurement suppression, and storage-pressure visibility is lost. Fix: keep one explicit zero-capacity skip counter or document the metric change.
F3 MAJOR (undeclared system consequence) — inbound restore role change → eviction ranking.
helios/src/scheduler.rs:1794let role = if self.is_request_anchor_endpoint(request, inbound.consumed_tokens) { RetentionRole::Anchor }replacingrequest.checkpoint_anchor() as u64 == inbound.consumed_tokens.is_request_anchor_endpoint=checkpoints.rs:460-463, delegates torequest_anchor_endpoint(:387-458) which returns the interior anchor (e.g. 600) and thusfalsefor inbound 1024.- Role flows:
scheduler.rs:1807ticket.role = ticket.role.max(role);→:1848self.cache.publish_with_retention(&ticket.history, &proposal, ticket.role, ticket.demand_epoch). helios/src/cache.rs:345-350pub fn promote(...) { self.touch(id, use_epoch)?; node.role = node.role.max(role); }— roles only rise, so a downgrade sticks.- Impact: Selene-restored checkpoints at a nonzero interior boundary publish as Endpoint and rank below anchors in RetentionRank/protected eviction (same area as #568's eviction rewrite), inverse of pre-PR. Not in the PR body beyond "single anchor endpoint ... Selene inbound restore". Fix: declare it; add an eviction-order test.
F4 MAJOR (hot-path cost, unmeasured) — request_anchor_endpoint is O(prompt) per lane per commit.
checkpoints.rs:440let catalog = self.prefill_catalog_costs(request);(fresh Vec per call),:446-453up to threeinterval_prefill_nswalks,:416-428ready_by_prefix+ twoself.cache.checkpoint(...).parent()probes.- Called at
scheduler.rs:2411for lane in &step.lanes { self.promote_request_anchor(lane.request)?; }(every commit, every lane) andscheduler.rs:1794(admission). - Memo
checkpoint_planning_scope(checkpoints.rs:128-131) is opened only atpolicy.rs:1208/:1453. - Ordering defect:
promote_request_anchoratscheduler.rs:2411runs beforecommit_checkpoint_plans(&plan.checkpoint_plans)at:2412, which is what writes the latch (checkpoints.rs:886self.request_mut(handle)?.checkpoints = accounting;), so the first prefill commit of each request always re-prices. Fix: consult the latch/cache first; add a call-count assertion.
F5 MINOR (edge-case correctness) — two silent fallbacks in request_anchor_endpoint.
checkpoints.rs:437-439} else { return Some(raw_anchor); }— no split pricing whenbaseline_start > raw_anchor && baseline_start != prompt_tokens;is_request_anchor_endpointcan then match a token belowconsumed_tokens.checkpoints.rs:424-428request.prefix.and_then(|id| self.cache.checkpoint(id).ok()?.parent()).and_then(|parent| self.cache.checkpoint(parent).ok()).map_or(0, ...)— a failed probe silently yieldsparent_tokens == 0, pricing the whole prompt from 0.- New tests cover only 88/600/1024 (
checkpoints.rs:3104-3234), 320 vs 200 (:3277), 832 vs 768 (:3348). Fix: make failures explicit and tested.
F6 MINOR (claim/doc accuracy) — the predicate is <=, not ==.
checkpoints.rs:384before.saturating_add(after).saturating_sub(whole) == 0accepts a split that saves work.- Docs say "adds zero predicted prefill work":
docs/core-design.md:1442-1445,docs/cli-design.md:703-708,docs/scheduling-runtime-design.md:551-558. Also "Zero snapshot capacity disables all checkpoint cuts" omits that terminal capture is disabled too (checkpoints.rs:957-959).
VERIFIED SOUND (state plainly): same-snapshot pricing (anchor_split_is_zero_cost takes &[PrefillCatalogCost], no known_whole); latch set :526/:534, read :529-535, :398-402, :711-717; survives clear_reservations which now clears only cuts/reserved_ns (:48-51), called from readmission scheduler.rs:1726; fraction-0 early return :549-551; zero-capacity return before prefill_catalog_costs at :482-484 vs :491; check.py mutation now one line (:325-330, needle accounting.zero_budget_anchor = Some((raw_anchor, chosen));); docs rewrites match code except F6; existing scheduler/boundary_tests.rs:193-210 (snapshot_capacity_does_not_disable_prompt_fallback_anchor) is consistent with snapshots==0 ⇒ zero anchor captures.