Final review report · NVIDIA/hyperflare-inference #708

Raw Markdown for agents: https://autobot.eidonix.com/p/e78af151-7861-43f6-9189-7785cfb5ae46.md

Recommendation: Ready To Merge

PR #708 does exactly what it claims, at the right layer, with no per-model branching and no core-format change. I verified every load-bearing site at 4fee325 — the continuation validator (helios/src/model.rs:406-493), the two Admission entry points (helios/src/model/admission.rs:71-163), the Worker::admit boundary derivation and three error-isolation arms (helios/src/server/runtime.rs:1629-1717), and the index-driven VisionState (ignition/components/vision_state.py:38-61 with tests/components/test_vision_state.py:77-141) — and found no verified code bug: strict initial-prompt semantics are exactly preserved, -1 continuation indices pack cleanly through feature_index (helios/src/scheduler.rs:283-299, helios/src/model/packing.rs:711-725), failed admissions fully reclaim slot/pages, and admissions[slot] is no longer visible half-built. The only material gap is evidence, not code: the legacy token-keyed core compatibility claim (ExecutionError::Device { code: 32 }) was reasoned, not measured, which I raise as an explicit pre-merge WARN rather than a blocker since the author disclosed it and no core format, metadata, or storage contract changed.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. helios/src/server/runtime.rs:1649-1716 — the three isolation arms (:1642-1647, :1657-1662, :1677-1682) are byte-identical, and only the two stop-matcher arms force the Parked literal one indentation level deeper. TokenStops::new/TextStops::new depend on nothing the admission produces, so hoisting both above Admission::from_continuation collapses the structure to one cancel-and-fail site and restores a flat match parked (≈−30 lines, two indentation levels). Note this is maintainability only: those two arms are already unreachable in production because the same prompt and config were validated at helios/src/server/request.rs:336-339 and runtime.rs:949-957, and worker_admit_isolates_... (phase_tests.rs:9353-9357) mutates prompt.stop_sequences after preparation.
  2. ignition/components/vision_state.py:44-48 — three successive valid &= ~visual | … lines restate the single conjunction inject already builds at :55-60; collapsing them (keeping the tested index == -1 vs index < -1 distinction at test_vision_state.py:111-112) also removes the duplicated feature_slot bounds expression.
  3. helios/src/model/admission.rs:72-74,122-137 — Admission::validate and Admission::from_prompt have no production caller left after this PR (runtime.rs was the last one); keep them only if they are intended published API, otherwise delete with their wrapper-only assertions at model/tests.rs:2521 and phase_tests.rs:6412.

Nits

  1. ignition/components/vision_state.py:26,45-46 — image_token now defaults to None, which silently drops the tokens == image_token cross-check for a caller that omits it, and validate_prefill accepts index == -1 on a token that is the image token (intended here, but a relaxation in two directions). It is deliberate, documented, and both modes are tested (test_vision_state.py:128-141), and requiring the kwarg could be wrong for span-only layouts — so this is optional hardening: if token-keyed cores are meant to keep the cross-check, make image_token=None an explicit opt-in rather than a default.
  2. ignition/components/vision_state.py:51 — inject(self, metadata, embedding) no longer reads metadata (previously used for the token-id gate); the parameter is now dead weight at every call site.
  3. helios/src/model.rs:446-448 — the suffix bound uses config.contract.vocabulary while every other input-side check in the admission path uses the wider input_vocabulary (admission.rs:95, contract.rs:581,589). Using the sampling tier is the defensible choice (nonsampled sentinels beyond it must never appear in a decode continuation), but a one-line comment saying so would stop the next reader from "fixing" it.
  4. helios/src/model.rs:421-450 — the boundary checks and the geometry/span/vocabulary checks share one message ("prompt arrays violate prepared geometry"); a distinct message for initial_prompt_tokens misuse would make a future field report diagnosable.
  5. helios/src/server/runtime.rs:1642-1647 — admission-class failures are surfaced with incoming.fail (GenerationEvent::Error, the 5xx path) rather than incoming.reject_admission as at :1573; unreachable today, so only consistency.

Dropped on verification