Re review report · NVIDIA/hyperflare-inference #655

Raw Markdown for agents: https://autobot.eidonix.com/p/a5e8a6bf-66bd-42d5-91aa-c5a7f132a9cb.md

Recommendation: Ready To Merge

Head f7f4d25 cleanly resolves all three items from the prior review (2d9454f) and replaces the 30 s probe timer with a simpler, strictly better design: ActionCosts::measured_duration brings Snapshot pricing into parity with Prefill cost retention (PR #285) while handling coalesced batch > 1 observations, and a single in-flight snapshot_discovery slot handles cold warm-restart discovery (nanos == 0) without risking storage-refusal or cancellation lockouts. No correctness, safety, concurrency, or regression blockers remain, and the new end-to-end plan -> commit -> complete test plus 4-scenario SM120 validation cover the claimed behavior.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Drop the three redundant explicit snapshot_discovery clears (helios/src/scheduler.rs:2690-2692, :2700-2702, :3067-3069). snapshot_discovery_in_flight (helios/src/scheduler/checkpoints.rs:1018-1023) already treats RequestPhase::Finishing and retired/stale handles (self.request(handle) checks slot occupancy and generation equality at helios/src/scheduler.rs:1233-1239) as free. Both complete_inner branches set request.phase = RequestPhase::Finishing immediately above the clear (:2689, :2698), and retire removes slot.request at :3124. Removing all three clears deletes 9 lines across scheduler.rs, keeps a single source of truth, and avoids mutating self.snapshot_discovery at :3068 before the fallible ? operations in retire.
  2. Reuse exact_duration in ActionCosts::measured_duration (helios/src/scheduler/cost.rs:783-790). The inline Key { drafts: 0, kind, batch, tokens, prefill: 0, packed: 0 } lookup duplicates exact_duration(kind, batch, tokens, 0, 0) (:761-771), which also handles GraphKind::Speculative keys if ever called with one:
    pub fn measured_duration(&self, kind: GraphKind, tokens: usize) -> Option<u64> {
        self.batches(kind)
            .iter()
            .find_map(|&batch| self.exact_duration(kind, batch, tokens, 0, 0).filter(|&nanos| nanos != 0))
    }
    
    (Optionally, since all call sites pass (GraphKind::Snapshot, 1), this could be narrowed further to a dedicated snapshot-copy helper.)

Nits

  1. docs/api.md:355-356: Optionally note that the single cold-discovery terminal copy is priced at zero in flare_checkpoint_extra_work_nanoseconds_total (and that concurrent terminal captures skipped while discovery is in flight increment unknown_cost), matching the disclosure added to the four design docs.
  2. docs/scheduling-runtime-design.md:625-631, docs/core-design.md:1444-1457, helios/README.md:381-383: Optionally qualify "There is no fixed capture count or concurrency-based snapshot share" / "no capture-count limit" with "in steady state" (or "beyond the single cold-discovery capture") so it does not visually sit beside "allows at most one in-flight discovery capture".

Dropped on verification