#1 [high] PR #655 correctness/system-level findings (verified)
Head 2d9454f. Files: cost.rs (+85/-2), checkpoints.rs (+159/-3), docs/scheduling-runtime-design.md (+9/-4).
CONFIRMED MECHANICS
- cost.rs:783-786
smallest_batch_key→ Key{drafts:0,kind,batch:batches(kind).first(),tokens,prefill:0,packed:0}. - cost.rs:794-804 probe_duration: None if fresh; else
ready.then_some(estimate.nanos); ready = last_probe_ns none or now-last >= ttl_ns. - cost.rs:806-813 record_probe stamps
self.entries[index].1.last_probe_ns = Some(self.now_ns). - cost.rs:805/815 stale_keys untouched (filters nanos != 0).
- checkpoints.rs:1032-1045 3-arm match; checkpoints.rs:1050-1057 allowance; 1065-1070 quote; 1071-1074 record_probe only if snapshot.is_some(); 1075-1077 reserved_ns/checkpoint_copy_ns = cost; 1079-1081 storage skip.
- commit_checkpoint_copies checkpoints.rs:1085-1099 adds
costto extra_spent and stats.checkpoint_extra_work_ns.
F1 (Major, metric/admission pricing span): first probe of an unmeasured entry is priced 0 ⇒ bypasses work budget and charges 0 to flare_checkpoint_extra_work_nanoseconds_total although a real GPU copy runs.
cost.rs:803 ready.then_some(estimate.nanos) returns Some(0) when nanos==0.
checkpoints.rs:1050 if accounting.extra_spent_ns.saturating_add(cost) > allowance(...) — cost 0 always passes.
checkpoints.rs:1077 request.checkpoint_copy_ns = cost; then 1095-1096 stats.checkpoint_extra_work_ns += cost → +0.
docs/api.md:355-356 "flare_checkpoint_extra_work_nanoseconds_total sums charged predicted extra prefill and copy work".
New test asserts the zero: checkpoints.rs:4161 assert_eq!(scheduler.request(h1).unwrap().checkpoint_copy_ns, 0);
Ceiling 1 uncharged copy / estimate_ttl_ns (30s default, policy.rs:39). Fix: price first probe at a conservative fallback (e.g., smallest measured Snapshot duration, or the largest declared lifecycle graph estimate) or count it in a separate probe counter; at minimum document the under-count.
F2 (Major, liveness/measurement parity): the probe is spent at allocation but the resulting observation can land on a different cost key (batch>1), so the smallest-batch entry the probe priced is never measured and the TTL slot is burnt.
observe keys on the executed step: cost.rs:865-872 batch: step.batch_capacity.
policy.rs:900-914 continuation_candidate fill extends a Snapshot cohort to capacity; unmeasured durations sort FIRST in utility.rs:154-158 (self.duration_ns == 0).cmp(&(other.duration_ns == 0)), so an unmeasured batch>1 Snapshot candidate outranks the measured batch-1 one and can absorb the probed request plus any ArmedCapture (Anchor) request already in RequestPhase::Snapshot.
checkpoints.rs:962-967 & 965: if capture.role == RetentionRole::Anchor { return Ok(true); } — anchor captures always run, so a second Snapshot-phase lane is reachable.
Result: fresh_duration(Snapshot,1) still None → probe slot consumed, no measurement.
Tests never exercise this: helper checkpoints.rs:1113-1127 measure() hardcodes batch_capacity: 1, and both new tests only ever place one request in Snapshot phase.
Fix: stamp the probe only after observe records that exact smallest-batch key, or let a measured larger-batch observation satisfy the smallest-batch freshness (or add a coalesced-batch regression test).
F3 (Minor→Major, failure propagation): record_probe at allocation time is not reverted when the dispatch never produces a measurement (cancel/preempt/Snapshot error status 3).
checkpoints.rs:1071-1074 stamps before the copy runs; scheduler.rs:3116 = let mut snapshot = request.terminal_snapshot; releases the row on retire() without clearing last_probe_ns; scheduler.rs:2684-2688 handles record.status == 3 by finishing the request with no observation.
Effect: one cancelled client request burns the only probe slot for the next 30s for every concurrent request (FYI the slot is global per Estimate, not per request).
Fix: stamp from the Snapshot completion path (scheduler.rs:2689-2696) when the probed key was observed, or clear last_probe_ns on cancel of the probing request.
F4 (Major, charter/design-review compliance): no simulator catalog run (design-review.md:195-208) and no lifecycle check.py/TLA coverage for the terminal-capture decision change (design-review.md:209-230), while design-review.md:234-240 calls this a blocking design failure and 247-251 says disclosure does not excuse skipping runnable CPU checks.
PR validation lists only cargo check (4 crates) + unit tests.
verification/helios-lifecycle/README.md:273-287 shows terminal_reservations_match_lifecycle_model and check.py --mutations already cover allocate_terminal_capture (precedent #568 extended it); the new early-accept arm is uncovered.
F5 (Minor, claim accuracy): description scenario 2 says both prefill extras and terminal capture skip; only the terminal arm is relaxed.
checkpoints.rs:624 still let Some(copy_ns) = self.costs.fresh_duration(GraphKind::Snapshot, 1) else { return (accounting, true, false) };
checkpoints.rs:965 still if self.costs.fresh_duration(GraphKind::Snapshot, 1).is_none() { return Ok(false); }
Docs updated only scheduling-runtime-design.md:618-629; core-design.md:1452-1455, helios/README.md:378-379, docs/cli-design.md:696-709 still state the old "unknown/stale snapshot-copy costs exclude extras" rule.
F6 (Minor): stale branch is priced at the retained duration, so a request whose allowance < retained cost skips as work_budget and never refreshes; "at most one probe per TTL" can be zero per TTL indefinitely. Test documents it: checkpoints.rs:4214-4216 (checkpoint_skip_work_budget == 1) with 1_024_000 ns prefill → 51_200 allowance vs 100_000 retained.
docs/scheduling-runtime-design.md:622-626 wording "still allows at most one probe per estimate_ttl_ns" is accurate but the practical consequence is undocumented.
F7 (Minor): metric rename/population shift — after the change unknown_cost skips are no longer emitted for the first request each TTL, and work_budget can appear where unknown_cost did (F6); no docs mention the shift (docs/api.md:348-354). Operators' dashboards keyed on unknown_cost≈1/request will see it drop.
PRE-EXISTING / NOT INTRODUCED: refresh_order/last_attempt_ns untouched (cost.rs:820-829) so the funded refresh path is not perturbed; deferred_prefill early return checkpoints.rs:1026-1028 precedes the probe; fraction==0.0 keeps byte-identical behaviour (test checkpoints.rs:4243-4261). No protobuf/metric-schema change verified in the 3-file diff.
#2 [high] Report quotes + sound areas for PR #655
Extra verified quotes for the report:
- utility.rs:154-158
pub fn compare(self, other: Self):(self.duration_ns == 0).cmp(&(other.duration_ns == 0)).then_with(|| self.score.total_cmp(&other.score))— unmeasured (duration 0) outranks measured. - policy.rs:1309-1311
let Some(duration_ns) = self.costs.duration(kind, batch, capacity) else { return; };— Some(0) admitted, so unmeasured Snapshot candidates of any declared batch compete. - policy.rs:899-914
fillclosure grows a Snapshot cohort to the candidate's batch capacity using best_cohort over remaining offers. - scheduler.rs:2684-2696:
if record.status == 3 { request.error_code = Some(...); request.phase = RequestPhase::Finishing; } else if kind == GraphKind::Snapshot { ... self.stats.checkpoint_endpoint_captures += 1; }— the only place a Snapshot measurement (and endpoint capture count) is realized. - scheduler.rs:3116/3145-3150:
let mut snapshot = request.terminal_snapshot;...snapshots: [snapshot, ...]— cancel path drops the probed row without touching costs. - cost.rs:865-872 observe key uses
batch: step.batch_capacity. - checkpoints.rs:1113-1127 test helper
measure()builds ScheduledStep withbatch_capacity: 1— both new tests therefore cannot observe the batch>1 coalescing miss (F2). - docs/design-review.md:234-240 "Modifying the Helios scheduler ... without running—and updating when behavior, transitions, or supported bounds change—the applicable TLA+ models, Rust conformance fixtures, Kani harnesses, and scheduling simulator is a blocking design failure".
- docs/api.md:355-356 counter semantics for flare_checkpoint_extra_work_nanoseconds_total.
- Sound areas (no finding): no wire/proto/CLI/metric-schema change; no new config key; per-Estimate
last_probe_nskept out of refresh_order/last_attempt_ns so funded refresh/exploration budgets are not double-counted (cost.rs:820-829, policy.rs:1563-1599); deferred_prefill guard precedes the probe (checkpoints.rs:1026-1028); fraction==0.0 path byte-identical (test checkpoints.rs:4243-4261); smallest_batch_key honours cores whose smallest Snapshot batch != 1 (improves on the #534 snippet), no per-model branch.
#3 [high] Research summary
Reviewed PR #655 (head 2d9454f) against its three changed files, their callers (scheduler.rs commit/complete/retire, policy.rs candidate selection and funded refresh, cache_memory.rs (not opened) quotes), and the contracts it touches (docs/scheduling-runtime-design.md, docs/api.md, docs/design-review.md, verification/helios-lifecycle/README.md). Findings are saved in the scratchpad with verbatim quotes; summary of the seven verified issues:
Major
- The first probe is priced at zero (
cost.rs:803,checkpoints.rs:1050/1077/1095).probe_durationreturnsSome(0)for a never-measured entry, so the capture can never fail the work-budget check andflare_checkpoint_extra_work_nanoseconds_total— documented atdocs/api.md:355as summing charged predicted copy work — silently under-counts one real GPU copy per TTL. The new test asserts the zero (checkpoints.rs:4161). - The probe can be spent without ever measuring the key it priced (
cost.rs:865-872vs783-786;policy.rs:900-914,utility.rs:154-158). Observations key onstep.batch_capacity, and unmeasuredduration == 0candidates rank ahead of measured ones, whilecheckpoints.rs:962-967letsAnchorcaptures run unconditionally. A coalesced batch>1 Snapshot step therefore burnslast_probe_nsand leavesfresh_duration(Snapshot,1)unmeasured. Both new tests use a helper that hardcodesbatch_capacity: 1(checkpoints.rs:1113-1127), so this path is untested. record_probeat allocation is never reverted when the copy never completes (checkpoints.rs:1071-1074; cancel/preempt viascheduler.rs:3116, error status 3 viascheduler.rs:2684-2688). One cancelled request burns the single global probe slot for every other request for the nextestimate_ttl_ns.- Charter/design-review gap:
docs/design-review.md:195-230and234-240make simulator-catalog and lifecyclecheck.py(not opened)/TLA runs blocking for scheduler timing changes, yet validation lists onlycargo checkplus unit tests; the already-existingterminal_reservations_match_lifecycle_modelharness that coversallocate_terminal_capturewas not extended for the new early-accept arm.
Minor — description's scenario 2 overclaims (prefill-extras gates at checkpoints.rs:624 and 965 are still strict, and three docs keep the old rule); the stale branch can yield zero probes per TTL indefinitely under a small allowance (test at checkpoints.rs:4214-4216); unknown_cost→work_budget skip-reason migration is undocumented.
Verified sound — no wire/proto/CLI/metric-schema change; last_probe_ns is kept out of refresh_order/last_attempt_ns so funded refresh budgets aren't double-counted; the deferred_prefill guard precedes the probe; fraction 0.0 behaviour is byte-identical; smallest_batch_key stays core- and model-agnostic (and improves on the batch: 1 snippet in the linked issue).
Context for the decider: the linked issue #534 was twice rebutted in-thread as fork-specific (AzallazA/hyperflare-inference PrefillTailMerge), and this PR supplies no cold-boot upstream reproduction — only the three other scenarios — so "is this an upstream defect" remains the open question, separate from the concrete defects above.
#4 [high] Framing, open questions and non-findings for PR #655
FRAMING FOR THE DECIDER
- PR fixes #534, whose premise was rebutted twice in-thread: mark-yong (2026-11-28) traced the cold-boot deadlock to the third-party fork
AzallazA/hyperflare-inference(ba6a4c11) carryingPrefillTailMerge/prefill_merge_min_rows(from closed PR #69), absent upstream, and noted "Puremainstill has two transient, self-healingunknown_costcases after the 30 s TTL" but "unless this reproduces on puremainwithoutPrefillTailMerge, this belongs on the fork". flare-autobot (2026-11-30) said it "does not reproduce in NVIDIA/hyperflare-inference on origin/main atc146d7be" and warned a probe "would alter the documented freshness contract ... without a demonstrated defect", recommending closure. - #655 does not cite either rebuttal. It reframes onto three other scenarios (>30 s decode, >30 s idle on an already-cached anchor, warm restart with
--prefix-cache-disk/--prefix-cache-pool) and supplies live A/B for those only; no cold-boot upstream reproduction. "Is this an upstream defect at all" is the separate open question from the concrete defects in entry 1. - Engagement on the PR itself: zero comments, zero reviews, zero labels at time of review.
- Author yatesdr owns this path (
#459,#354,#357,#415, commits7f1ac303/10bc91adon checkpoints.rs); precedent #285 (merged 2026-11-13) fixed the prefill half of this exact self-lock and supplied live A/B only, no simulator/TLA — relevant mitigation for finding F4, though #568 (which changed this very function) did extendCheckpointReservation.tlaand runcheck.py --mutations.
TEST COVERAGE NOTES (verified in diff)
- New tests:
checkpoints.rs:4122-4188(unmeasured → one probe per TTL, storage refusal does not consume the slot, TTL elapse re-arms, observation restores budgeted captures) andcheckpoints.rs:4191-4261(stale retained duration, work-budget refusal does not consume the slot, fraction 0.0 never probes);cost.rs:1015-1068(probe_durationhonours smallest declared batch b=2 and bounds by TTL). - Gaps: no test with a request cancelled/preempted while in
RequestPhase::Snapshotafter a probe (F3); no test with more than one Snapshot-phase lane so the batch>1 coalescing miss (F2) is unreachable from the suite; themeasure()helper hardcodesbatch_capacity: 1(checkpoints.rs:1113-1127). - Tests do drive real production entry points (
allocate_terminal_capture,probe_duration/record_probe), satisfying design-review.md:187-189.
EXPLICITLY CLEARED (no finding)
deferred_prefillearly return (checkpoints.rs:1026-1028) precedes the probe, so deferred requests cannot consume the slot — correct, though undocumented and untested.last_probe_nsis deliberately excluded fromrefresh_order/last_attempt_ns(cost.rs:820-829,policy.rs:1563-1599), so the funded timing-refresh budget is not double-counted by probing — matches #540's intent.- No new config key, flag, env var, metric name, Protobuf field or dependency;
PolicyConfigdefaults unchanged (policy.rs:39-40);stale_keys()(cost.rs:815-818) untouched so the funded refresh path is not perturbed. - Skip-reason metric wiring unchanged (
helios/src/server/metrics.rs:494-499). - 3-file diff review confirms the PR's compatibility claims structurally; "existing cores load and serve" was not exercised by the PR and I did not exercise it either.