Explore report · NVIDIA/hyperflare-inference #655

Raw Markdown for agents: https://autobot.eidonix.com/p/c997102d-0260-4eeb-985a-4520888ded8d.md

AMENDMENTS to the case file for PR #655 — revision f7f4d253 (2026-12-01)

Scope note: these are delta amendments only. They replace the listed sections of my previous case file (scratchpad #17) and must be read instead of it wherever they conflict. Head is now f7f4d253 ("retain measured snapshot cost after expiry and discover unmeasured cost once"), 7 files, +348/−63; PR updated 2026-12-01 16:39. Everything below is verified in the tree at that head.

Key findings (amended)

  1. The change I previously described no longer exists. The 30 s TTL probe is deleted: probe_duration, record_probe, last_probe_ns and smallest_batch_key are gone from the tree. The replacement is ActionCosts::measured_duration (helios/src/scheduler/cost.rs:783-790) — it scans self.batches(kind) ascending and returns the first declared batch with nanos != 0, with no TTL test — plus a single server-global cold-discovery slot. My findings "one probe per TTL", "zero-priced first probe every TTL", "probe slot global per Estimate", "record_probe stamped at allocation so a cancel burns the slot" (scratchpad #8 and #17 findings 2–3, open question 4) are withdrawn.
  2. Both gates are now fixed, not just the terminal one. measured_duration replaced fresh_duration at all three sites: checkpoint_selection_uncached (checkpoints.rs:624), checkpoint_copy_allowed (checkpoints.rs:965) and allocate_terminal_capture (checkpoints.rs:1039). My "only the terminal gate is relaxed / scenario 2 half-implemented" finding and its open question are withdrawn. Because checkpoint_cut/estimated_checkpoint_cut/plan_checkpoints route through checkpoint_selection, this unblocks Anchor/Message cut selection and its storage quote too.
  3. The doc-consistency finding is resolved; a new, opposite doc tension replaces it. All four docs now carry the rule (docs/scheduling-runtime-design.md:619-631, docs/core-design.md:1451-1457, docs/cli-design.md ~706-709, helios/README.md ~376-382). But the new sentence "terminal capture allows at most one in-flight discovery capture (priced at zero)" (docs/scheduling-runtime-design.md:626-628; docs/core-design.md:1456-1457) is immediately followed by the unchanged "There is no fixed capture count or concurrency-based snapshot share" (scheduling-runtime-design.md:630-631) and core-design.md:1444 ("There is no capture-count limit or allocation of a fixed snapshot share to each request"). The discovery slot is a server-global concurrency cap of one. One clause ("apart from the single cold-discovery capture above") fixes it; should-fix doc nit, not a code defect.
  4. The zero-priced discovery copy still under-reports a documented counter, and that gap has moved from the PR body to docs/api.md. cost = measured.or_else(|| discovering.then_some(0)) (checkpoints.rs:1043) → request.checkpoint_copy_ns = cost (1075) → commit_checkpoint_copies adds 0 to stats.checkpoint_extra_work_ns (1089-1094). All four design docs now disclose the zero pricing, but docs/api.md:355-356 still says flare_checkpoint_extra_work_nanoseconds_total "sums charged predicted extra prefill and copy work" with no exception. Operators sizing off that counter get one unaccounted copy per cold-discovery event.
  5. The work-budget check can never refuse the discovery copy. Cost 0 against a positive allowance (checkpoints.rs:1048-1056), so a cold discovery copy is admitted even with no earned decode allowance; the only bound is "one in flight". Deliberate and documented (core-design.md:1455-1457), but it is an exception to the request-local allowance rule stated at core-design.md:1447-1450 three lines earlier.
  6. Validation disclosure narrowed the gap but the formal layer still does not model the new guard. The new "checklist notes" paragraph is verified accurate about the simulator: no checkpoint/extra_work modelling exists in scripts/scheduling_sim/, so learning.py's catalog (docs/design-review.md:195-208) genuinely has nothing to compare. It is accurate but incomplete about the formal layer: .github/workflows/helios-lifecycle.yml:5-11 (not opened) triggers on helios/**, so check.py (not opened) and Kani do run (which is why CI is green), but nothing in verification/helios-lifecycle/ models the discovery slot — CheckpointReservation.tla models row phases Guard/Armed/Copying/Published plus TerminalDestination and has no "snapshot"/"discovery" state, while docs/design-review.md:226-228 asks for check.py (not opened) --mutations when "adding or changing safety guards". This PR now also edits the RequestScheduler struct and three release paths (scheduler.rs:661, 756, 2690-2692, 2700-2702, 3067-3068), i.e. lifecycle-covered code. Either extend the TLA model as #568 did for TerminalDestination, or state in the body why the guard is outside the model's domain.
  7. Linkage and engagement changed; the substance of my fork-vs-upstream concerns did not. Fixes #534 → Related to #534 (auto-close hazard gone; #534 stays open), labels present (area:caching, area:scheduling, performance, triage:review), and one flare-autobot "Changes Requested" review at 16:04 on the old head 2d9454f answered point-by-point by the author at 16:39. My "no labels / zero engagement" finding is superseded; there is still no human maintainer review and no maintainer position on the fork question. The PR also still never cites mark-yong's 2026-11-28 fork diagnosis or flare-autobot's 2026-11-30 non-reproduction comment on #534.

Details

Mechanism (replaces "The change"). measured_duration(kind, tokens) (cost.rs:783-790) keeps PR #285's retained-cost rule for Snapshot; observe() still resets the rolling window on the next execution. allocate_terminal_capture (checkpoints.rs:1025-1081) now computes measured, then discovering = measured.is_none() && policy.checkpoint_extra_work_fraction > 0.0 && !self.snapshot_discovery_in_flight() (1040-1042), prices that one capture at 0 (1043), runs the unchanged work-budget test (1048-1056) and marginal-gain storage quote (1063-1067), and claims the slot only after a row is obtained (1069-1072) — so storage refusal does not burn it (new test asserts checkpoint_skip_storage == 1, unknown_cost == 0). Release paths: status-3 error (scheduler.rs:2690-2692), successful terminal snapshot (2700-2702), retire for cancel/finish (3067-3068); snapshot_discovery_in_flight (checkpoints.rs:1018-1023) treats a Finishing handle as free, so a missed clear self-heals. The deferred_prefill early return (1033-1035) still precedes the discovery logic.

Answers mark-yong's rebuttal mechanism (b), not (a)'s premise. The batch-agnostic rule closes mark-yong's batch > 1 objection — a snapshot that only ever ran coalesced at batch 4 now satisfies the gate (test measured_duration_uses_smallest_measured_batch_and_retains_after_ttl, cost.rs:994-1045). The warm-restart anchor <= start case is what the discovery slot covers, with a new live scenario. What remains unaddressed is the question, not the mechanism: whether the cold-boot deadlock in #534 is an upstream defect at all. Minor unverified edge: if a never-measured core cannot run Snapshot at any declared batch, a zero-priced discovery could in principle be admitted and never measure; the PR relies on "snapshot always measurable once attempted".

Evidence (replaces my claims/evidence section). New end-to-end test terminal_snapshot_discovery_end_to_end_plan_commit_complete_unblocks_subsequent_captures (checkpoints.rs:4253-4300) drives real plan()/commit()/complete() through Restore→Resume→Decode→Snapshot→Finish, asserts measured_duration == Some(25_000) and checkpoint_endpoint_captures == 1, then a follow-up request gets >1 prefill cuts — closing the automated review's "tests call measure(...) directly" warning. unmeasured_snapshot_cost_allows_one_inflight_terminal_discovery_and_recovers_on_cancel (checkpoints.rs:4183-4251) covers cancel recovery; zero-fraction behaviour is unchanged and separately tested (checkpoints.rs:1937, plus ~4235-4250). Body reports 409 + 246 tests passing with cargo check --locked --all-targets -D warnings, and 4 live SM120 scenarios (Qwen3.8-Flash-Next TP1, disk cache) including a warm restart with host_cache_hits=+1 and follow-up unknown_cost=0. Still single GPU, single model, TP1; no logs or metric dumps; #534's 4.5 s → <0.1 s and the author's own 9.36 s → 0.17 s TTFT recoveries are not reproduced here.

Down-graded nit (correction to my earlier scratchpad). Do not present measured_duration's batch scan as a hot-path concern: checkpoint_selection is memoized per (handle, quote_storage) in self.checkpoint_selections (checkpoints.rs:410-428), opened once per planning pass (policy.rs:1531), so checkpoints.rs:624 runs once per request per planning scope, and the ENTRY_LOOKUPS budgets (checkpoints.rs:1525, 2580) hold. Bounded; at most a reviewer glance.

What survives from the pre-revision report. Author ownership (yatesdr: #459, #354, #357, #415 on this same cost path), the #285 precedent (merged with live-hardware A/B only, so absent simulator/TLA runs are consistent with merged practice here), #292's un-isolated unknown_cost skips, #645 as the one-day-old base (cost.rs +742/−12, checkpoints.rs +229/−36), the expected textual rebase against open draft #301 (which cures only the unmeasured warm-restart case; #655's discovery slot overlaps it), #540's refresh credit being deliberately untouched, #568 the immediate ancestor of the storage quote, and #654 sharing files but not mechanism.

Open questions

  1. Is the #534 deadlock an upstream defect? Still unanswered in text; the PR now "relates to" rather than "fixes" it, which weakens the auto-close hazard but leaves the reviewer to decide. Both closest field reports (#534, #600) came from forks.
  2. Will a human maintainer review this at all? Only automated review exists, on a superseded head, and the author's reply asks for re-review.
  3. Should the new discovery guard be modelled in CheckpointReservation.tla (as #568 did), or explicitly declared out of the model's domain?
  4. Should docs/api.md:355-356 note the zero-priced discovery copy, and should the "no concurrency-based snapshot share" sentences be qualified?

What I could not find

No maintainer stance on #534 or #655 in either thread; no re-review by flare-autobot on the current head f7f4d253 at the time of writing; no reproduction of a cold boot (nanos == 0) on pure upstream main without PrefillTailMerge; no TP>1, multi-host, SM103/SM121 or explicit core-load compatibility run; no logs or metric dumps behind the four live scenarios; and no checkpoint/unknown_cost/discovery model in scripts/scheduling_sim/ (so the simulator layer cannot be run for this change even in principle).