Re review report · NVIDIA/hyperflare-inference #674

Raw Markdown for agents: https://autobot.eidonix.com/p/13d486b2-e21f-4a08-82eb-2dfe5b3e6850.md

Recommendation: Changes Requested

The 19ce4a7b refresh cleanly resolved all five Round-1 Subtract / Simplify items (TierStore::retired consolidation, filter_writeback_waiters unification, direct scalar Metrics::host_lookup_cost, Incoming::clear_pool_lookup, and helios/src/cache.rs + check.py cleanup) and rewrote the PR body into the charter's four-part format. Deeper system-level inspection confirms the core mechanisms (GPU midpoint half-width alias packing, pressure-aware eviction, O_DIRECT packed writes, clean L1 DRAM retention, clean manager arena buddy coalescing, and event-driven waiter wakeups) are sound—several upstream alarms (including a claimed spin loop in selene-manager's pump()) were verified false. One verified correctness bug carried over from Round 1 remains unfixed (RowRestoreLatency::start resets its decay clock on failed fetches, resurrecting stale latency spikes), alongside the Round-1 baseline/disclosure carry-over (5d53040e vs base 1fbcc3c9, no benchmark/CI report on 19ce4a7b, and three omitted compatibility items).

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Fix RowRestoreLatency::start resetting the decay clock on failed fetches (helios/src/server/runtime.rs:301-303, carry-over from Round 1):
    • start() unconditionally overwrites bucket.last_median's timestamp (*last = now) whenever a prior median exists. When a row-only fetch fails synchronously (runtime.rs:3401-3407) or asynchronously (StoreEvent::Fetched { result: Err(_) } at runtime.rs:2825-2826), finish(&key, false) decrements bucket.in_flight to 0 and returns early without calling observe() (runtime.rs:313-315), leaving *last = now.
    • As a result, a historical slow spike that had already decayed toward zero via the 10 s half-life (runtime.rs:342) jumps back to 100% of median on every failed fetch, causing worth_restore() (runtime.rs:3346-3355) to reject healthy row-only restores for another recovery window. The existing test (helios/src/server/runtime/phase_tests.rs:8799-8801) only exercises start + finish(false) when last_median is None.
    • Fix: Delete lines 301-303 (if let Some((_, last)) = &mut bucket.last_median { *last = now; }) in RowRestoreLatency::start()—estimate_seconds() already holds median undecayed while bucket.in_flight > 0 (runtime.rs:339-341), and observe() updates last_median on successful completion. Add a regression test in phase_tests.rs that observes a median, ages last_median, runs start + finish(false), and asserts the decayed estimate is preserved.

Should Fix

  1. Re-verify baseline A/B against 1fbcc3c9 (on 19ce4a7b) and disclose remaining compatibility changes in the PR body (carry-over from Round 1; charter #210, docs/design-review.md (not opened) Principles 12 & 16):
    • Headline Tables A–C compare against 5d53040e, four commits behind PR base 1fbcc3c9 (#657, #666, #663, #667), where #663 (8489d504) changes scheduler latency pricing directly affecting Tables B/C and #667 (1fbcc3c9) changes GB10/multi-host peer exports; hardware runs were also executed on pre-refactor 7d7dcdcb rather than 19ce4a7b. Re-baseline the headline A/B against 1fbcc3c9 (or confirm no baseline shift from #663/#667), confirm green CI on 19ce4a7b, and post the midpoint half-width conflict-span conclusion on #451.
    • Add concise bullets under Compatibility and Limitations for the three still-omitted changes: (a) new internal rank-relay event Kind::StoreInvalidated = 4 (selene/src/shard.rs:470, 484-485), requiring matching rank builds in multi-host TP deployments; (b) sub-page warm memory budgets without local disk now failing startup cleanly (selene/src/offload.rs:706-712); and (c) public flare-selene trait/struct updates (HostStore::begin_lookup, TierStore::retired, TierStore::pending_pool_drain, HostHit.pooled, StoreStats reserved/rate fields at selene/src/store.rs:100-103, 248-256, 377, 401-404, 433-440).

Subtract / Simplify

  1. Deduplicate the "half the prefill" restore predicate (helios/src/server/runtime.rs:225-229, selene/src/store.rs:450-468): worth_restore(transfer_seconds, prefill_saved_seconds) in Helios duplicates the 0.5 * + is_finite() policy from selene::worth_transfer, which now has only test callers left. Expose worth_restore in selene/src/store.rs, express worth_transfer through it, and delete the duplicate in helios/src/server/runtime.rs.
  2. Group admit_with_host_store's 15 positional arguments (helios/src/server/runtime.rs:3285-3302): Remove #[allow(clippy::too_many_arguments)] by passing a small request-probe struct (spec, prefill_spans, conditioned_images, core_parameter_defs, core_parameters), which can also eliminate the duplicate PreparedImageInput::conditioned_input mapping at runtime.rs:1722-1725 and :3324-3327.

Nits

Dropped on verification