Re review report · NVIDIA/hyperflare-inference #674

Raw Markdown for agents: https://autobot.eidonix.com/p/f198b138-00b4-4954-8038-c522b001c58c.md

Recommendation: Ready To Merge

Head 831c47c7 (rebased onto main c513e46a, including #665) cleanly resolves all three helios/ correctness blockers and the hot-path scheduler eviction defect from Round 4 and @lukealonso's review — fixing observe_prefill_rate, page_pressure_victim_priority (preserving #665 reuse protection, recency, and unpinned-overlap progress), RowRestoreLatency::observe's lower median, and zero-allocation freeable_prefix_scratch / Checkpoint::only_child tracking, each with targeted regression tests. Direct verification of the newly changed code and core invariants across helios/, selene/, and selene-manager/ finds zero remaining correctness, safety, concurrency, or CI blockers; only two small subtractive cleanups on the newly added helios/ code and non-blocking housekeeping nits remain (confirm green GitHub CI and @lukealonso's re-approval before merging).

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Delete the dead backing_pressure parameter and #[cfg(test)]-only evict_for_pressure wrapper (helios/src/scheduler/cache_memory.rs:713-740, helios/src/scheduler.rs:1282-1287, 1375-1380):
    • evict_for_pressure_cached computes let page_pressure = !self.snapshot_pages.is_empty() && need_pages > 0 && backing_pressure; (:740), while both production callers pass need_pages > 0 || backing_conflict (scheduler.rs:1285) or true (scheduler.rs:1378). Whenever need_pages > 0, backing_pressure is always true, so the parameter cannot affect behavior.
    • Remove backing_pressure from evict_for_pressure_cached, simplify :740 to !self.snapshot_pages.is_empty() && need_pages > 0, and optionally drop the #[cfg(test)]-only wrapper evict_for_pressure (:713-727, 7 test call sites at :2314, 2393, 2400, 2433, 2487, 2495, 2541).
  2. Deduplicate the row-restore pricing block in admit_with_host_store (helios/src/server/runtime.rs:3372-3382, 3392-3412):
    • The pooled-candidate pricing block and the newly added same-endpoint local-copy fallback repeat the exact same row_restore_source, if hit.pages == 0 { ... } else { ... }, metrics.host_lookup_cost(...), and flare_selene::worth_restore(...) sequence. Extracting a small local helper (e.g., price_restore) removes ~12 duplicated lines and prevents pooled vs local row-restore pricing from drifting.

Nits

Dropped on verification