#1 [high] Change: what PR #655 actually does (verified in code)
PR #655 (yatesdr, open, 2026-12-01, base main, head 2d9454f, +253/−9, 3 files). Description says: helios: probe unmeasured or stale snapshot cost once per TTL on terminal capture. Fixes #534.
Verified in the diff:
- helios/src/scheduler/cost.rs:
Estimategainslast_probe_ns: Option<u64>(cost.rs:490), initialised None inprepared(cost.rs:610).- New private helper
smallest_batch_key(kind, tokens)(cost.rs:783-786) returnsKey { drafts:0, kind, batch: self.batches(kind).first(), tokens, prefill:0, packed:0 };fresh_duration(cost.rs:788-792) and the newprobe_duration(794-804) /record_probe(806-813) all use it. probe_durationreturns None when the entry is fresh; otherwiseSome(estimate.nanos)iflast_probe_nsis None ornow - last_probe >= ttl_ns. Note it returnsSome(0)for a never-measured entry, i.e. zero cost.record_probestampslast_probe_ns = nowon the existing index entry (no insert; entry must exist fromprepared).
- helios/src/scheduler/checkpoints.rs
allocate_terminal_capture(1018-1083): the old singlefresh_duration(...) else unknown_cost++becomes a 3-arm match (1032-1045). Middle arm: only whenpolicy.checkpoint_extra_work_fraction > 0.0, takeprobe_duration, else unknown_cost skip.record_probeis called only insideif snapshot.is_some()(1071-1074), so work-budget refusal (1056) and storage refusal (1080checkpoint_skip_storage) do not consume the TTL probe slot. The probed cost is used for the normal allowance checkextra_spent_ns + cost > allowance(prefill + productive_decode_ns, fraction)(1050-1054) and is stored asrequest.checkpoint_copy_ns = costso the copy is later charged as extra work (commit_checkpoint_copies, 1085-1099). - docs/scheduling-runtime-design.md: 617-629 — "unknown or stale snapshot-copy costs disable prefill extras"; added sentence at 622-626 documenting the one-probe-per-
estimate_ttl_nsterminal-capture behaviour when the fraction is positive and the cost is unmeasured or stale (priced against retained duration when stale).
Differences from the fix proposed in issue #534 (verified): the issue's snippet hard-coded batch: 1 keys and reused last_attempt_ns (self.now_ns.max(1)); the PR instead shares smallest_batch_key with fresh_duration (so it honours a core whose smallest Snapshot batch is not 1) and adds a separate last_probe_ns so probing does not disturb refresh_order/last_attempt_ns used by the funded timing-refresh path (policy.rs:1564-1566, scheduler.rs:2427-2430). Both were noted as concerns by mark-yong's #534 comment (batch>1 batching) — the shared-key helper addresses the batch part.
Other scope facts: prefill extras are NOT probed — checkpoint_selection_uncached still returns unknown at checkpoints.rs:624-626 and checkpoint_copy_allowed still gates non-Anchor captures on fresh_duration (checkpoints.rs:965-967). Only the terminal/Endpoint allocation path changed, as the description states.
No Protobuf/metric/CLI/config change in the diff; behaviour is gated by the existing scheduler_checkpoint_extra_work_fraction (default 0.05, policy.rs:40).
#2 [high] Why: issue #534 and the contested reproduction (fork vs upstream)
PR #655's description says "Fixes #534" (issue: "Checkpoint captures deadlock on an unmeasured snapshot cost: host prefix cache never receives anything (unknown_cost skips forever)", by semireg, opened 2026-11-26, open, labels area:caching/area:selene/bug/performance/priority:P2/triage:investigate).
#534's reported upstream failure (DeepSeek-V4.1-Flash FP8, TP3, SM120): flare_checkpoint_captures_total flat at 0 for all roles and flare_graph_launches_total{kind="snapshot"} flat, while flare_checkpoint_skips_total{reason="unknown_cost"} grows ~1 per request; nothing published to Selene so host DRAM/NVMe prefix cache never serves a hit; persists for the whole boot. Claims this is at least one cause of #327 ("Prefill ram cache fills but is never reused"). Cause as reported: three gate sites require fresh_duration(GraphKind::Snapshot,1) (checkpoints.rs ~427 checkpoint_selection_uncached, ~730 checkpoint_copy_allowed, ~791 allocate_terminal_capture), Estimate::fresh() requires nanos != 0, and stale_keys() filters nanos != 0, so nothing ever measures an unmeasured snapshot; only RetentionRole::Anchor captures are exempt. Cites #285 (same class of bug for prefill costs) and #292.
IMPORTANT — the issue's premise is contested in-thread:
- 2026-11-28, mark-yong: the cold-boot deadlock is specific to a third-party SM120 TP3 fork (
AzallazA/hyperflare-inference,ba6a4c11) carryingPrefillTailMerge/prefill_merge_min_rows(ported from closed PR #69); those symbols do not exist upstream. On upstreammain(353551e9)checkpoint_anchorfalls back toprompt_tokens, soanchor > startholds on a cold boot, the first request arms Anchor and measures Snapshot-1-1. mark-yong said pure main still has two "transient, self-healing" unknown_cost cases after the 30 s TTL — (a) resumed prompt hittinganchor <= startat checkpoints.rs:416, (b) concurrent anchor copies batching intobatch > 1whilefresh_durationchecksbatch: 1— and concluded "unless this reproduces on pure main without PrefillTailMerge, this belongs on the fork and can probably be closed here." - 2026-11-30, flare-autobot comment on #534: says it does not reproduce on
origin/mainatc146d7be; walks the anchor path (checkpoint_anchorcheckpoints.rs:108-115,checkpoint_selection_uncached543-559,prefill_work_throughpolicy.rs:337-351,resolve_prefill_kindscheduler.rs:854-884,checkpoint_copy_allowed888-895); says "No upstream code change is proposed" and that "adding an unconditional terminal-capture probe to work around fork-specific prefill tail-merging behavior would alter the documented freshness contract in docs/scheduling-runtime-design.md (lines 573–575) without a demonstrated defect"; recommended disposition: close as fork-specific. Based on static inspection only — explicitly "no Rust crate tests, scheduling simulator runs, formal lifecycle checks, or GPU serving workloads were executed." - PR #655 was opened the next day (2026-12-01) by yatesdr with the probe fix and a live SM120 before/after validation, addressing three different (non-cold-boot) serving scenarios: >30 s decodes, requests >30 s apart on an already-cached anchor, and warm restarts with
--prefix-cache-disk/--prefix-cache-pool. Note #655's description does not cite mark-yong's or flare-autobot's rebuttals at all.
Connection: mark-yong's concern (b) batch>1 is partly answered by the PR's shared smallest_batch_key (probe uses the same smallest declared batch as fresh_duration, not hard-coded batch 1, unlike #534's proposed snippet); concern (a) anchor <= start (no Anchor cut runs) is exactly scenario 2 in #655's description.
Issue #534 "Referred to by": #600 (open issue), #655 (this PR).
#3 [high] Related work: #285 left the snapshot gate open; #292 saw the skips
Same-class precedents for the "gate on a fresh duration that only the gated work can measure" bug:
- #285 "fix(cache): retain measured prefill costs after expiry" (dbotwinick, merged 2026-11-13, +38/−11, touches checkpoints.rs + docs/scheduling-runtime-design.md): changed
interval_prefill_nsto use retained measured durations after the 30 s TTL, because a rarely selected prefill shape disabled all optional checkpoints indefinitely. Its description explicitly says "the fresh snapshot-copy requirement still governs optional captures" and "Initial unmeasured prefill shapes can still suppress optional checkpoints" — i.e. #285 fixed the prefill half and left the snapshot half, which is what #655 addresses. Evidence in #285: live GB10 Spark, TTFT 5.72–5.78 s → 0.43–0.44 s after a 31 s idle gap. #655 is the same pattern applied to the Snapshot estimate. - #292 (iein, closed 2026-11-18): branch reuse lost at the default 0.05 fraction; server reported 11
work_budgetand 14unknown_costcheckpoint skips on a fresh server; "unknown_costskips suggest that checkpoints are also skipped before their capture cost has been measured. Neither cause has been isolated." Closed with the conclusion that the budget is a deployment setting (use 0.25); #655's probe does not change the budget rule, only the unknown-cost gate. So #292's isolated observation of unmeasured-snapshot skips is an early, still-unresolved report of the same gate. - #534 (see separate entry) is the direct predecessor.
Timeline of the "wanted" duration: #285 (2026-11-13, notes the remaining snapshot gate) → #292 (2026-11-14, observes
unknown_costskips) → #534 (2026-11-26, reports the deadlock) → #655 (2026-12-01, fixes).
#4 [high] Related work: #301, #540, #645 stacking, #654 overlap
Open/adjacent work that touches the same mechanism:
- #301 "feat(scheduler): persist learned graph costs across serving restarts" (shadownetX, draft, triage:design-review, open since 2026-11-15): persists and restores
ActionCostsestimates keyed to model core/GPU/driver/config, restoring them as known-but-stale. It touches helios/src/scheduler/cost.rs (+81 lines) and docs/scheduling-runtime-design.md. Verified: on pr/301Estimatestill has onlylast_attempt_ns(cost.rs:54), nolast_probe_ns, and it has noprobe_duration, so the two changes are additive but will conflict textually inEstimate/prepared. Relevance to #655: #301 would remove the unmeasured half of #655's scenario 3 (warm restart) but not the stale half — restored estimates are stale-by-construction, which is precisely the state #655's stale probe handles. Neither PR cites the other. - #540 "Retain bounded timing-refresh and acceptance credit across idle" (FujitsuPolycom, merged 2026-11-29): removes the idle credit reset so funded timing refresh survives idle gaps. Its own description says a server idle >30 s that wakes on one short request "can execute one refresh episode before negative debt suppresses further probes". That refresh path runs through
ActionCosts::stale_keys()(cost.rs:815-818, filtersnanos != 0) andrefresh_order=observed_at_ns.max(last_attempt_ns)(cost.rs:820-822); #655 deliberately keeps its probe timestamp out of that ledger (last_probe_nsseparate), so the two do not double-count refresh. #655's description does not mention #540. - #645 by lukealonso (merged 2026-11-30, +1886/−204, 21 files) rewrote cost.rs (+742/−12, new
PrefillCostModel, stratified fill/context model) and checkpoints.rs (+229/−36) one day before #655 branched, and touched the same doc section (docs/scheduling-runtime-design.md:567-577 per its review). #655's diff context (Estimateat cost.rs:484-491,fresh_durationat 788,allocate_terminal_captureat 1018) sits on top of #645's code, so #655 is stacked on post-#645 main; no merge conflict reported by GitHub and the packet notes no default-branch commits touched these files since #655 branched (571a447). Load-bearing detail: #645 also changedValueRatesemantics and prefill cost modeling that #655's tests lean on (e.g. the stale test'sallowance = 5% of 1_024_000 = 51_200 nscomputation). - #654 "Add opt-in first-output age pricing and returning-agent benchmark" (logprobz, open) shares docs/scheduling-runtime-design.md + checkpoints.rs with #655; unrelated mechanism (first-output age pricing), no textual conflict expected but same doc section could collide.
- #582 (merged, FujitsuPolycom: "avoid splitting prefill on zero-budget checkpoint anchors") and #613/#550 (merged, checkpoint plumbing) are the immediate ancestors of the code #655 edits; #655's
checkpoint_extra_work_fractiongating follows the convention established there (fraction == 0.0 disables optional copies — cf. checkpoints.rs:578, 618, 857).
#5 [high] Project fit: design-review mandates simulator + TLA layers for timing-estimation changes
The PR does not run two of the three mandatory validation layers listed in docs/design-review.md:
- docs/design-review.md:195-208 ("Scheduling simulator and mathematical references"): "Changes to graph selection, service pricing, timing estimation, refresh or exploration budgets, or cohort algorithms must be evaluated against the Python simulator ... Changes to timing estimation or funded refresh require running the screening and 64-seed validation catalog in
scripts/scheduling_sim/learning.py... Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog." PR #655 adds a new timing-estimation rule (a per-TTL probe forGraphKind::Snapshot) in Helios. Its validation section lists onlycargo check(four crates) and crate unit tests — nolearning.pyrun, no simulator change. Verified:scripts/scheduling_sim/*has no checkpoint/snapshot-copy orunknown_cost/probe model at all (grep forcheckpoint|snapshotreturns only Pythonsnapshot()state-dump methods; no probe/unknown-cost gate), so the qualified policy and the new Helios rule are not comparable through the simulator as it stands. - docs/design-review.md:209-230 ("Formal lifecycle conformance"): run
verification/helios-lifecycle/check.py"whenever changing admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering or ownership..." andcheck.py --mutations"when adding or changing safety guards". #655 changesallocate_terminal_capture(snapshot destination allocation). The nearest precedent, #568 (merged), both extendedverification/helios-lifecycle/CheckpointReservation.tlawith aTerminalDestinationaction and twice rancheck.py --mutations; #655 neither touches the TLA model nor reports a lifecycle run. Note #655 adds no new lifecycle transition (it changes the cost gate before allocation; the allocation path is unchanged), which is an argument reviewers could weigh either way. - docs/design-review.md:247-251: "Disclosure does not excuse skipping runnable CPU checks. All three layers run without a GPU or model checkpoint." #655's unrun items are the 6
FLARE_TEST_TEMPLATE_DIRtests (CI), which is normal, but the simulator and TLA layers are simply absent rather than disclosed. - docs/design-review.md:186: "
cargo checkdoes not substitute forcargo test" — the PR lists both, so this is satisfied on its face. Contrast: #285 (the analogous earlier fix) also did not report simulator/TLA runs (its evidence was live GB10 A/B), so the omission is consistent with merged precedent in this area, not unique to #655.
#6 [high] People: author owns this code path; zero engagement on the PR
Author: yatesdr (COLLABORATOR), self-described Discord "D-Rock" (same as #459). Last 180 days: 80 merged, 10 closed, 5 open PRs/issues; touched helios/src (47 commits, third behind Luke Alonso 233 and Martin Vit 52) and docs (47). Merged work in exactly this code: #459 "Price checkpoint candidates without walking every prefill chunk" (merged 2026-11-22, same Discord handle), plus commit history shows yatesdr commits on checkpoints.rs: 7f1ac303 "Size ordinary prefill graphs to quoted checkpoint work", 10bc91ad "Estimate checkpoint work without quoting snapshot storage", and #415 "Keep Selene rows by role and write pool records back on eviction", #354, #357. So the author owns most of the checkpoint-cost/pricing path this PR edits (checkpoint_selection, allocate_terminal_capture, cost.rs).
Sustained interest in this exact user-facing symptom: yatesdr commented on #327 ("Prefill ram cache fills but is never reused") on 2026-11-21 asking the reporter to rebuild on main, then ran and posted a controlled GB10/SM121 Qwen3.8-27B DRAM-tier repeat showing the host cache does restore (22,878 tokens, 0.17 s vs 9.36 s) when sized correctly. That is the same host-prefix-cache complaint that #534 (the issue #655 fixes) says is "at least one cause" of.
Who else works here: Luke Alonso (lukealonso, maintainer) authored #645 one day earlier, the biggest same-area change; dbotwinick authored #285 (the analogous prefill fix); FujitsuPolycom #540/#582; iein #550 and #292; original-el8 #426; semireg filed #534; mark-yong produced the strongest technical rebuttal of #534 on the issue thread (not on the PR).
Engagement so far on the PR itself: none. pr_comments returns "No comments" — no reviews, no maintainer reply, despite the disputed premise on the linked issue. Reviewers arriving cold will see a PR whose "Fixes #534" target has an in-thread recommendation to close it as fork-specific, with no rebuttal in the PR description.
#8 [high] Change: what the diff does that the description does not say
Undeclared/under-stated behaviour found in the code (not in the description):
- The first probe of a never-measured Snapshot entry returns
Some(0)(cost.rs:794-804), soallocate_terminal_captureprices the capture at zero: the allowance checkextra_spent_ns + 0 > allowance(...)can never refuse it (checkpoints.rs:1050-1054), andrequest.checkpoint_copy_ns = 0meanscommit_checkpoint_copiescharges 0 tostats.checkpoint_extra_work_ns(checkpoints.rs:1091-1096; docs/api.md:355 says that counter sums charged predicted work). New test asserts this explicitly:assert_eq!(scheduler.request(h1).unwrap().checkpoint_copy_ns, 0)(checkpoints.rs:4159-4161). So the discovering capture is accounted as free work; the real duration only entersActionCostslater viaobserve(cost.rs:857-891) when the Snapshot step completes. Consequence for operators watchingflare_checkpoint_extra_work_nanoseconds_total: one terminal copy per TTL can be omitted from it. - The probe window is per
Estimateentry (onActionCosts), i.e. global across requests, not per request. The description's wording "once per TTL" is accurate, but the practical effect is that whichever request first needs an Endpoint capture wins the slot and every other request's terminal capture in that TTL still skipsunknown_cost— including, in the unmeasured case, requests that would have succeeded. New test asserts exactly this (h2skips withunknown_cost == 1, checkpoints.rs:4163-4174). record_probeis stamped at allocation time, before the copy actually executes; if the copy never runs (dispatch refused, cancellation, preemption before the Snapshot step), the TTL slot is consumed without a measurement. Not covered by either new test.- The stale path prices the capture at the retained duration, which can itself be refused by the work budget (new test:
checkpoint_skip_work_budget == 1,unknown_cost == 0, checkpoints.rs:4209-4216) — a refusal that also does not consume the probe slot, but does mean a stale entry can stay stale for more than one TTL window while budget-starved requests keep trying. - Untouched, as described:
checkpoint_selection_uncached(checkpoints.rs:624-626) andcheckpoint_copy_allowed(checkpoints.rs:965-967) still return unknown / false on stale-or-unmeasured Snapshot. PR #655's stated scenario 2 ("both prefill extras and terminal Endpoint capture skip") is therefore only half fixed: the prefill-extras half still skips. Docs now say exactly that ("disable prefill extras", docs/scheduling-runtime-design.md:620). reflecton the doc text: the diff only reapportions "unknown or stale snapshot-copy costs disable prefill extras" and adds the probe paragraph;docs/core-design.md:1452-1455,helios/README.md:378anddocs/cli-design.md:696-709still describe the old rule ("Unknown costs exclude extras while preserving best-effort anchor retention") and are not updated by this PR — a documentation-consistency gap across the three documents that the merged #285 and #568 both updated in lockstep.
#9 [high] Claims and evidence: live SM120 A/B yes; simulator and TLA run absent
Claims in the PR description vs what backs them:
- "Fixes #534" → the three serving scenarios (long decode > TTL; requests >30 s apart on a cached anchor; warm restart with
--prefix-cache-disk/--prefix-cache-pool). Evidence given: live before/after onQwen3.8-Flash-NextTP1, 1× RTX PRO 6000 SM120,--prefix-cache-memory 4G --prefix-cache-disk ... --prefix-cache-disk-limit 16G --lossless-kv-compression off, main at3801ff1dvs PR at2d9454fe: 33 s idle pause on a fully-cached prompt →endpointcaptures +1 /unknown_cost+0 vs +0/+1; warm disk restart (flare_host_cache_hits_total = 1, 2917 reused tokens) → endpoint +1, unknown_cost +1 (prefill only) vs +0/+2; 6000-token/31.833 s decode captured both endpoint checkpoints at EOS. Not verifiable from the repository (no logs, metric dumps, or checked-in harness are attached); it is a well-formed before/after with named SHAs, matching the charter's evidence bar for a bug fix. Unstated: single-GPU, single-model, single-hardware; no TP/multi-host run; no measurement of the throughput or TTFT effect of the recovered captures (the issue #534 itself claims 4.5 s → <0.1 s TTFT, and yatesdr's #327 comment shows 9.36 s → 0.17 s on a different core — neither is reproduced in this PR). - Test claims:
1,758helios tests (pluscore::cache::selection_tests::failed_default_clear_keeps_the_selected_entryrun as non-root),242flare,211flare-cli + 2 individually re-run flakes; 6FLARE_TEST_TEMPLATE_DIRtests left to CI;RUSTFLAGS="-D warnings" cargo check --locked --all-targetson 4 crates. Evidence: stated; CI on head is green; the two new tests are visible in the diff (cost.rs:1015-1068, checkpoints.rs:4122-4262) and exercise real production entry points (allocate_terminal_capture,probe_duration/record_probe), which design-review:187-189 asks for. - Absent evidence against a documented mandatory gate: no
scripts/scheduling_sim/learning.pyscreen/validate run and no simulator update for the new timing rule (docs/design-review.md:195-208), and noverification/helios-lifecycle/check.pyrun/extension (docs/design-review.md:209-230, 247-251). Compare #540 and #645, which both ran the simulator catalog and the TLA+ suite for comparable scheduler/timing changes, and #568 which extendedCheckpointReservation.tlafor a change toallocate_terminal_capturespecifically. - "No Protobuf, core-package, CLI, or metric schema changes. Existing cores load and serve without re-export." Verified structurally from the diff (3 files; none wire/CLI/metric). "Load and serve" was not exercised — there is no core-load test in the validation list; the claim rests on the change being runtime-only.
- "Behavior is shared across all cache schemes and models that declare
GraphKind::Snapshot." Verified by inspection: the only new gate ischeckpoint_extra_work_fraction > 0.0plus the core'sbatches(GraphKind::Snapshot)(cost.rs:783-786) and the defaultlimits.snapshots/storage path; no model or cache-scheme branch. Host/disk/pool schemes are affected only through the same terminal-capture path.
#14 [high] Research summary
Case file gathered for PR #655 (helios: probe unmeasured or stale snapshot cost once per TTL on terminal capture, yatesdr, open, +253/−9, 3 files, CI green, zero reviews). Thirteen scratchpad entries cover every angle: the change, the why, related work, recent activity, people, community, project fit, claims/evidence, reach, and process.
Key findings a reader could not get from the description:
- The linked issue #534 is disputed in its own thread. mark-yong (2026-11-28) traced the reported cold-boot deadlock to a third-party SM120 TP3 fork carrying
PrefillTailMerge(absent upstream) and said it "can probably be closed here"; flare-autobot (2026-11-30) also failed to reproduce it onmainatc146d7beand warned that "adding an unconditional terminal-capture probe … would alter the documented freshness contract … without a demonstrated defect". PR #655 was opened the next day doing exactly that probe and does not mention either rebuttal. The PR reframes the problem onto three other scenarios (long decodes, >30 s idle gaps on cached anchors, warm restarts), for which it supplies a live SM120 before/after. The two closest field reports (#600, and #534 itself) both came from forks, which is why the upstream-defect claim is the central open question. - The first probe of a never-measured Snapshot entry returns
Some(0), so that capture bypasses the work-budget check and is recorded at zero inrequest.checkpoint_copy_ns, meaningflare_checkpoint_extra_work_nanoseconds_totalunder-reports one copy per TTL. The new test asserts the zero explicitly. - The probe slot is global per
Estimate, not per request: every other request's terminal capture inside that TTL still skipsunknown_cost.record_probeis stamped at allocation, before the copy runs, so a cancelled or refused dispatch burns the slot. - Only the terminal-capture gate is relaxed.
checkpoint_selection_uncached(checkpoints.rs:624) andcheckpoint_copy_allowed(checkpoints.rs:965) still skip on stale/unmeasured Snapshot, so the PR's "prefill extras and terminal capture both skip" is only half fixed — the docs now say so, butdocs/core-design.md:1452,helios/README.md:378anddocs/cli-design.md:696were not updated. - Documented mandatory validation layers are absent: no
scripts/scheduling_sim/learning.py(not opened) run or simulator model for the new rule (design-review.md:195-208; the simulator has no checkpoint/unknown-cost model at all), and noverification/helios-lifecycle/check.py(not opened) run or TLA extension (209-230, 247-251) — contrasting with #568, which extendedCheckpointReservation.tlafor the sameallocate_terminal_capturefunction, and with #540/#645 which both ran the catalog. - Stacking: the PR sits on #645's day-old rewrite of the same two files and reproduces #285's pattern for the Snapshot half; it shares its
Estimatestruct edit with open draft #301, so a rebase is expected. The sharedsmallest_batch_keyanswers mark-yong's batch>1 concern for the probe path (but not for measurement). Author yatesdr owns most of this checkpoint-cost path (#459, #354, #357, #415) and previously investigated the same host-cache symptom on #327; no maintainer has engaged with the PR.
#15 [high] Project fit: charter and design-review mapping, in both directions
Charter (read_charter) statements that bear on #655, as facts:
- Vision: "fast local inference engine for NVIDIA GPUs, built for long conversations, coding agents, and heavy tool use" — the three serving scenarios the PR fixes (>30 s decodes, >30 s inter-turn idle, warm restart with host/disk cache) are those workloads.
- Goals: "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene" — the PR's stated benefit is that terminal checkpoints again reach the host tier, directly serving this goal.
- "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210). Bug fixes need to address the root cause" — this is framed as a bug fix; it carries a live before/after counter comparison rather than a speedup benchmark, and it addresses the gate (root cause) rather than masking the skip. The recovered-capture speedup claimed in #534 (4.5 s → <0.1 s TTFT) is not measured in this PR. - "Keep the runtime small and model-agnostic" / design-review.md:27-35 forbids hardcoded batch-capacity lists: the PR's
smallest_batch_keyreadsself.batches(kind).first()from prepared metadata, so it stays model-agnostic and does not hardcode batch 1 (unlike the snippet proposed in #534). - "Be explicit and pin everything. No magic defaults" — no new default is introduced; the change is gated by the existing
checkpoint_extra_work_fraction(default 0.05, policy.rs:40, docs/cli-design.md:696-709). - "PR descriptions: Expect four parts (why, what changed, claimed result, evidence)" — satisfied and unusually thorough.
- Code Review Standards "Supported matrix & compatibility: Check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target named in the docs … verify that existing data, artifacts, and exported cores still load" — the PR validates one model on one SM120 GPU TP1; multi-host, TP, SM103/SM121, and an explicit core load-and-serve are not exercised. The compatibility claim is structural only (3 files, no wire/CLI/metric change).
- "What gets merged: PRs that address a maintainer request, a roadmap item, a reproducible bug…" — the linked bug (#534) is contested as fork-specific (see entry 2), which is the single biggest charter-fit question for a decision-maker.
- Roadmap/Non-goals: nothing here touches the listed roadmap items (in-process SDK #6, Engram #267, FlashInfer #215) or any non-goal; it is neither broadened hardware support nor a new operation contract.
#16 [high] File map: every code, doc and precedent location the decision needs
Where everything lives (for a reviewer who should not re-discover it): Production code changed
- helios/src/scheduler/cost.rs:484-491 (
Estimate, newlast_probe_ns), 604-611 (initialisation), 783-786 (smallest_batch_key), 788-792 (fresh_duration, refactored to use it), 794-804 (probe_duration), 806-813 (record_probe). Adjacent, unchanged but load-bearing: 515-517 (Estimate::fresh), 615-622 (batches), 815-818 (stale_keys), 820-829 (refresh_order/record_attempt), 857-891 (observe, the only real measurement path). - helios/src/scheduler/checkpoints.rs:1018-1083 (
allocate_terminal_capture; the 3-arm match at 1032-1045, budget check 1050-1054, storage quote 1059-1070,record_probe1072-1074), 1085-1099 (commit_checkpoint_copiescharging), 965-967 (checkpoint_copy_allowed, untouched), 624-626 (checkpoint_selection_uncached, untouched), 1026-1028 (deferred_prefillearly return that precedes the probe). Tests added: cost.rs:1015-1068; checkpoints.rs:4122-4262 (two tests). Docs changed: docs/scheduling-runtime-design.md:617-629 (only file). Docs left stale by the change: docs/core-design.md:1452-1455, helios/README.md:374-380, docs/cli-design.md:696-709, docs/api.md:348-356 (counter semantics). Related mechanisms a reviewer will want: helios/src/scheduler/policy.rs:23/39/221/236/245 (TTL 30 s andadvance_to), 1376-1427 (Snapshot candidates come fromcosts.batches), 1530-1606 (funded refresh viastale_keys), 1752-1755 (selected cost); helios/src/scheduler.rs:1109-1150 (plan_requires_feedback, unmeasured plans need feedback), 2312-2430 (commit,record_attempt), 2862-2900 (whereallocate_terminal_captureis called), 1141 (!is_freshforces feedback); helios/src/scheduler/utility.rs:133-150 (ValueRate, zero duration = optimistic exploration). Verification: verification/helios-lifecycle/README.md:258-287 (terminal-allocation lifecycle coverage and mutation guards, as extended by #568); docs/design-review.md:180-261 (three mandatory layers). Precedents to read side by side: PR #285 (same pattern, prefill half), issue #292 (earlyunknown_costobservation), PR #568 (same function, TLA coverage), PR #645 (day-earlier rewrite), PR #301 (open cost-persistence overlap), PR #540 (refresh credit across idle).
#7 [medium] Process: ready-for-review, CI green, no labels or reviews, new same day
Process facts (as of the orientation packet, same day as opening):
- State: open, "ready for review" (not draft); opened 2026-12-01 and last updated 2026-12-01; base main, head 2d9454f; 3 files, +253/−9. Labels: none. Reviews: none. CI on head 2d9454f: passed. Age: hours old.
- No default-branch commits since the branch point (571a447) touched the three changed files, so it is not stale against main.
- Charter process expectations the PR does and does not meet: "PR descriptions: Expect four parts: why the change is needed, what changed, the claimed result, and the evidence backing it" — this description has all four and is unusually detailed; "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main ... Bug fixes need to address the root cause" — it supplies a live before/after on SM120 rather than a speedup benchmark (see the claims entry); "Solve the right problem in the right place ... Look for the smallest footprint in shared code" — the change is 20 lines of production code in two shared scheduler files plus docs, with the rest tests, which fits.
- No new CLI flag, no new config key, no Protobuf/wire change, no metric change: it reuses
scheduler_checkpoint_extra_work_fraction(default 0.05) as the gate. Existing cores load unchanged. This matches the charter's compatibility and "no magic defaults"/"explicit configuration" principles. - No per-model branch: the probe is keyed on
GraphKind::Snapshotand the core's declared smallest batch viasmallest_batch_key, which is model-agnostic (charter: "Keep the runtime small and model-agnostic"; design-review principle 1 forbids hardcoding batch capacities — the PR's helper deliberately readsself.batches(kind).first()instead of hardcoding batch 1, unlike the snippet in #534).
#10 [medium] Reach: gated by the default 0.05 fraction; docs core-design/README/cli not updated
Who and what is affected (verified from the code, docs and call sites):
- Operators/users: anyone running with the default
scheduler_checkpoint_extra_work_fraction = 0.05(helios/src/scheduler/policy.rs:39-40; also theignition/cli/config.py:39default and--scheduler-checkpoint-extra-work-fraction, docs/cli-design.md:696-709). With the fraction at 0 nothing changes at all (new test, checkpoints.rs:4243-4261). Host/DRAM/NVMe and Selene pool restores benefit, because a captured terminal checkpoint is what gets offered to the host tier (issue #534's framing; docs/api.md:340-345 for the host-cache counters). - Wiring: no new config key, flag, env var, metric, Protobuf field, or dependency. The only observable signal changes are (a)
flare_checkpoint_captures_total{role="endpoint"}rising where it used to be 0 (docs/api.md:348-354), (b)flare_checkpoint_skips_total{reason="unknown_cost"}falling, (c)flare_checkpoint_extra_work_nanoseconds_totalunder-reporting the one probed copy per TTL because the unmeasured probe is priced at 0 (checkpoints.rs:1050-1096; docs/api.md:355). - Cost/behaviour tradeoff: at most one extra Snapshot copy per
estimate_ttl_ns(30 s default, policy.rs:23/39) is admitted outside the measured-cost path, and its work is charged to the request's allowance only at the retained/zero price. Prefill extras still disabled while stale, so the change cannot increase prefill splitting. - Compatibility: no core re-export; existing cores unchanged. Charters compatibility principle ("existing data, artifacts, and exported cores still load") is satisfied by construction but untested in this PR (no load-and-serve run listed).
- Deployment: the three scenarios in the description (long decodes >30 s, inter-turn gaps >30 s, warm restarts with
--prefix-cache-disk/--prefix-cache-pool) are ordinary serving patterns for the agent/long-conversation workloads the charter targets ("long conversations, coding agents, and heavy tool use"). - Risk surface for reviewers:
ActionCostsis shared by every graph kind; addinglast_probe_nstouches the struct initialised inprepared(cost.rs:604-611) and, per #301, that is exactly where a competing persistence PR edits, so a rebase is expected if #301 lands. - Docs reach:
docs/scheduling-runtime-design.mdonly.docs/core-design.md:1452-1455,helios/README.md:378-379,docs/cli-design.md:696-709still describe unknown costs as excluding extras with no mention of the terminal probe — three documents left inconsistent with the new rule.
#11 [medium] Recent activity: stacked on #645 one day later, consistent with #568/#582/#613
Recent commits in the touched areas (from the orientation packet plus commit history) and whether #655 builds on, conflicts with, or reverses them:
e85019b9(#645, Luke Alonso, 2026-11-30, merged the day before #655 opened): rewrotehelios/src/scheduler/cost.rs(+742/−12, newPrefillCostModelstratified fill/context model) andcheckpoints.rs(+229/−36), and edited the same doc section (docs/scheduling-runtime-design.md:567-577in its review). #655's diff context is squarely on top of #645's tree; it builds on it and does not reverse it. Detail: #655's stale test computes its allowance as5% of 1_024_000 = 51_200 ns(checkpoints.rs:4210-4213), which depends on #645's prefill predictor producing 1,024,000 ns for that catalog — a reviewer re-running the test on an older base would see different arithmetic.c3489b23(#582, PCCessna/FujitsuPolycom, 2026-11-29) "avoid splitting prefill on zero-budget checkpoint anchors": established thecheckpoint_extra_work_fraction == 0.0conventions #655 follows (checkpoints.rs:459, 578, 618, 857) and thezero_budget_anchorlatch used in the tests' neighbouring code.0c25e88f(#613) and1364062c(#550) fixed deferred-prefill checkpoint handling and catalogs without terminal prefill;allocate_terminal_capture'sif request.deferred_prefill { return Ok(None) }early-return (checkpoints.rs:1026-1028) is exactly that guard, and it runs before the new probe, so a deferred request cannot consume the TTL probe slot. #655 preserves that ordering.5deacda9(#568, Luke Alonso, 2026-11-28) added thequote_snapshots_with_budget(1, 0, rank, Some(gain_tokens))marginal-gain storage check that #655's probe now reaches (checkpoints.rs:1059-1070); this is why the new test must assert that astoragerefusal does not burn the probe slot (checkpoints.rs:4144-4153,checkpoint_skip_storage == 1,unknown_cost == 0).97cfeb00(#285, dbotwinick, 2026-11-13): the analogous retained-cost fix for prefill; #655 completes the same pattern for Snapshot.cd1daa3e/a4720050(2026-12-01 flare-autobot, #638/#625) are the only other same-day default-branch commits in helios/src and docs; they touch unrelated subsystems (Responses tools, THP compaction/offload timings). No conflict.- Nothing in the last 60 days reverses the freshness contract #655 relaxes; the doc line it edits ("unknown or stale snapshot-copy costs disable extras") came from #285 (docs/scheduling-runtime-design.md:617-621). Conclusion: #655 is a forward extension stacked on #645/#568/#582, one day after #645 merged, with no conflicting recent work in the same files.
#12 [medium] Why (mechanism): the fresh_duration key is one shape; only that shape's step can measure it
Does the fix actually close the gate? Verified from the code: fresh_duration(kind, tokens) (cost.rs:788-792) reads exactly one entry — Key { drafts:0, kind, batch: batches(kind).first(), tokens, prefill:0, packed:0 }. prepared (cost.rs:587-630) requires every declared graph to have a unique shape and records all batch capacities; batches(kind) is the sorted, deduplicated list of declared batch capacities for that kind (cost.rs:615-622). An Estimate is fresh only when nanos != 0 and now - observed_at < ttl (cost.rs:515-517).
So the unmeasured/stale state persists unless a ScheduledStep whose key is exactly that smallest-batch, tokens=1 shape gets observed (ActionCosts::observe, cost.rs:857-891, which matches on the step's full key including its actual batch_capacity). That is the self-locking property the PR name describes, and it is independent of any fork feature: on upstream main, a Snapshot step that runs at batch 2 (e.g. two requests' copies batched into a wider capacity) does not measure the batch-1 entry, which is the mechanism mark-yong raised in #534 ("concurrent anchor copies batching into batch > 1 while fresh_duration at cost.rs:233 checks batch: 1"). probe_duration/record_probe use smallest_batch_key, so they target the same entry fresh_duration reads and cannot drift to a different batch — this addresses that concern for the probe path but not for measurement, and it does not make a batch-2 measurement satisfy fresh_duration.
Also verified: the probe is only reachable from allocate_terminal_capture; the candidate enumeration for Snapshot graphs (policy.rs:1376-1427) still prices the shape from costs.batches(kind) and estimated_duration_ns from selected_cost (policy.rs:1752-1755, scheduler.rs:1145-1150), so a zero-priced probe stays an "unmeasured" (Discovery) plan requiring completion feedback (plan_requires_feedback, scheduler.rs:1141-1142 !self.costs.is_fresh(...)) — the probe therefore measures its own Snapshot phase on completion, which is what closes the loop.
#13 [medium] Community: no PR comments; the only issue discussion argues the premise
Interest drawn so far:
- On PR #655 itself: zero comments, zero reviews (pr_comments → "No comments"), no labels; CI passed. No maintainer has responded, and the description mentions the linked issue is disputed only implicitly (it does not mention the two rebuttals at all).
- On the linked issue #534: two comments, both sceptical of the premise — mark-yong (2026-11-28, fork-specific, lists upstream
mainline numbers and the two "transient, self-healing" upstream cases; concludes "can probably be closed here") and flare-autobot (2026-11-30, "does not reproduce in NVIDIA/hyperflare-inference on origin/main at c146d7be", "No upstream code change is proposed", recommended disposition close as fork-specific, and explicitly warns that "adding an unconditional terminal-capture probe ... would alter the documented freshness contract ... without a demonstrated defect"). PR #655 was opened the next day and does exactly that probe — a factual reversal of that recommendation, though the PR's phrasing (gated oncheckpoint_extra_work_fraction > 0.0, priced against the retained duration) is narrower than what the autobot comment called "unconditional". - On the related user-facing complaint #327 ("Prefill ram cache fills but is never reused"): 7 comments, multiple independent reporters (officiallymarky, mayhem4markets "0% hit rate on RAM prefix cache ... GPU KV 79.7%"), javieratomic counter-example, jcartu and yatesdr asking for controlled repeats. #534 claims to be at least one cause of it.
- On the user reports of the symptom in other configurations, #600 shows the same family (
unknown_cost+2 per request, endpoint captures not incrementing) on a different third-party fork image (AzallazA/wynnd), where WynnD also attributes it to the fork and to missing #550. So the two independent field reports that most resemble #655's scenario 1/2 both came from forks, which is the strongest reason a reviewer might question the upstream defect claim. - Discord contact is listed as "D-Rock", matching the author's other PRs (#459), so internal interest is plausible but not recorded anywhere in the PR. Bottom line: the change has drawn no PR-level discussion at all; the only community signal is a linked issue whose two responders argued it should be closed.