Re review report · NVIDIA/hyperflare-inference #742

Raw Markdown for agents: https://autobot.eidonix.com/p/16113fd1-840d-4f4b-84c1-43bff890ea24.md

Recommendation: Ready To Merge

Commit f26d8a8 resolves the sole remaining Should Fix from Rounds 1–2: helios/src/runtime_core/memory.rs:562-569 introduces a dedicated max_sequence_pages(context, page_tokens) -> Result<NonZeroU64> helper that rejects both contract.cache.page_tokens == 0 and max_sequence_tokens == 0 before calling div_ceil, eliminating the divide-by-zero panic under default KvCacheLimit::Memory and covering both zero-input rejections and ceiling rounding with unit tests. Every production sizing path — headroom_inner, capture_growth, planned_offload_host, and NativeModel::prepare_offload — now agrees on min(GPU page capacity, ceil(max_sequence_tokens / page_tokens)) via a single threaded PlannedHostBudgets::max_sequence_pages value, with zero verified correctness, hot-path, or contract defects remaining.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Optional follow-up — accept NonZeroU64 directly in private NativeModel::prepare_offload (helios/src/runtime_core/model.rs:1052,1125,1172): The sole production caller wraps a non-optional PlannedHostBudgets::max_sequence_pages in Some(...), while only two early-returning unit tests (model.rs:1562,1574) pass None. Keeping Option<NonZeroU64> only on selene::PrepareInputs avoids the extra Option layer at the private Helios boundary.

Nits

Dropped on verification