Re review report · NVIDIA/hyperflare-inference #715

Raw Markdown for agents: https://autobot.eidonix.com/p/30810c14-869e-41d4-ba82-260e8b4276bd.md

Recommendation: Changes Requested

Commit 49d5840 cleanly closes two of Round 2's three Should Fix items and nearly all prior Subtract items: PreparedModel.__init__ (ignition/preparation/model.py:32-43) now enforces packed_token_capacity <= prefill_chunk_size with a regression test (tests/preparation/test_execution.py:440-463), docs/scheduling-runtime-design.md:21-25,455-475 is synchronized with the shipped catalog and batch == 1 stratified cost-model scope, geometry validation is unified in valid_packed_prefill_geometry (helios/src/execution/manifest.rs:452-468), the twin cohort selectors are consolidated in select_packed_prefill_cohort (helios/src/scheduler/policy.rs:1571-1678) with promoted-lane seeding tested at policy_tests.rs:9821-9835, dead packed re-validation in commit is removed, is_non_terminal_prefill_step uses binary_search_by_key, and clean Layer 1 test runs are reported (1,918 lib + 62 integration + 56 pytest passed). Direct verification at 49d5840 confirms no blocking code-correctness or hot-path defects in the packed-prefill implementation. However, both hard governance/verification blockers remain unresolved (no recorded owner approval for the extended PREFILL/TERMINAL_PREFILL operation contract, and incomplete Layer 2 simulator / Layer 3 widened-geometry conformance & mutation coverage), along with the non-equivalent A/B baseline.

Merge Risk

Level: High

Walkthrough

Pre-merge Checks

Blockers

  1. Extended captured-graph operation contract has no recorded owner approval (docs/design-review.md:22-26, AGENTS.md:376-381).

    • Verified behavior/impact: docs/design-review.md:22-26 states: "Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval." At 49d5840, this PR widens the PREFILL/TERMINAL_PREFILL operation contract — accepting batch_capacity >= 2 with explicit packed_token_capacity (helios/src/execution/manifest.rs:881-900), changing InputIndexing::PackedToken extent on prefill to aggregate P rows (helios/src/model/packing.rs:169-179), defining binding-derived vision exclusion (helios/src/model/packing.rs:113-126), and formalizing per-lane QUERY_LENGTH/SAMPLE_ENABLED multi-request completion (helios/model-contract.md:188-209). No maintainer comment, review, or linked approval exists on #715.
    • Fix: Obtain an explicit approval comment from Luke Alonso on #715 (or link the approval thread) for the extended Contract 3 prefill operation contract. (This is a sign-off gate, not a rejection — @original-el8 is a charter-named priority contributor and the design fits the charter.)
  2. Testing-hierarchy Layers 2 and 3 remain incomplete for the added cohort algorithm, timing rules, and widened B >= 2 prefill geometry (docs/design-review.md:195-251).

    • Verified behavior/impact:
      • Layer 2 (docs/design-review.md:195-208): Changes to cohort algorithms (helios/src/scheduler/policy.rs:1311-1401,1571-1678,1711-1778) and timing estimation (helios/src/scheduler/cost.rs:581-583,606-607,644-659,969-971) require evaluation against scripts/scheduling_sim/ and the 64-seed scripts/scheduling_sim/learning.py (not opened) catalog. No simulator run is reported, and scripts/scheduling_sim/scheduler.py:30-35 currently models at most one prefill lane per action (for view in [None, *prefills] if graph.prefill_capacity else [None]).
      • Layer 3 (docs/design-review.md:226-228,241-246): Although .github/workflows/helios-lifecycle.yml:34 (not opened),49 executes existing TLC and Kani suites on helios/**, :241-246 requires extending conformance fixtures/harnesses when supported runtime geometries expand, and :226-228 requires mutation testing (check.py --mutations) when adding safety guards. Neither verification/helios-lifecycle/** nor helios/src/scheduler/lifecycle_tests.rs (not opened) / checkpoint_lifecycle_tests.rs (not opened) is updated to cover B >= 2 packed prefill geometry (scheduler.rs:436-463, packing.rs:422-439, is_non_terminal_prefill_step), and no --mutations run is reported. :247-251 states disclosure does not waive runnable CPU checks.
    • Fix: Extend and run scripts/scheduling_sim/ + learning.py (not opened) (or record owner agreement that Layer 2 is inapplicable to packed prefill), add Layer 3 lifecycle conformance coverage for the widened B >= 2 prefill geometry, and run python3 verification/helios-lifecycle/check.py --mutations over the added safety guards.

Should Fix

  1. Headline performance A/B does not use an equivalent baseline (docs/design-review.md:109-115).
    • Verified behavior/impact: As disclosed in the PR description, the baseline 151-graph core (887785ad) was exported from an earlier FlashInfer revision while the packed 157-graph core (4aea5c54) was exported against FlashInfer 5a8ceed80, and the C=1 solo control regressed 111.2 ms → 118.7 ms (0.94×). The 1.68×–4.15× TTFT and 1.75×–4.23× throughput headline claims therefore do not yet meet the "equivalent baselines" requirement in docs/design-review.md:109-111.
    • Fix: Run and report an equivalent A/B using cores exported from the same FlashInfer revision and served by the same binary (or packed prefill off/on on an identical build), including the C=1 control.

Subtract / Simplify

  1. Remove the duplicate valid_packed_prefill_geometry check in ExecutionManifest::validate (helios/src/execution/manifest.rs:881-894 vs. :936-950). Inside the same for graph in &self.graphs loop, valid_packed_prefill_geometry is called twice with identical arguments (graph.batch_capacity, graph.token_capacity, graph.packed_token_capacity, self.request_capacity(), None). The second else branch at :941-949 can simply return true (already validated above) or be folded into one check.
  2. Unify the remaining duplicated offer-gathering and finishing-fill loops in helios/src/scheduler/policy.rs. While select_packed_prefill_cohort was extracted, the ~50-line offer-gathering loops at :1311-1366 and :1718-1761 still duplicate duration lookup, is_non_terminal_prefill_step, prefill_slot_state, prefill_work_through, packed_prefill_lane_compatible, and lane_value_for_tokens; similarly, the finishing cohort fill at :1372-1396 duplicates :1140-1160.
  3. Drop derived counters from PackedCohort (helios/src/scheduler/policy.rs:14-22). selected == mask.count_ones() as usize and promoted_count == promoted_mask.count_ones() as usize by construction; deriving them from the bitmasks removes redundant state that must be kept in sync across seeding (:1616-1623) and fill (:1642-1650).
  4. Consolidate the four manifest filter passes in helios/src/server/runtime.rs:848-900. A single pass over executor.manifest().graphs dispatching by (graph.kind, graph.batch_capacity) avoids repeating && batch_capacity == 1 across three sibling filter chains.

Nits

Dropped on verification