Re review report · NVIDIA/hyperflare-inference #692

Raw Markdown for agents: https://autobot.eidonix.com/p/01421cad-c26f-4028-a0e3-3234e5ce23e6.md

Recommendation: Ready To Merge

Commit 7f298698 cleanly addresses every Round 1 review item (metric # HELP and API docs updates, routing ResponseLifecycle terminal emission through emit_finished, collapsing the five CAS loops into RequestOutcome::transition, extracting Incoming::event_budget_exceeded, folding record_cancelled() into finish_cancelled, and consolidating test admission polling via wait_for_admitted) without introducing any correctness, concurrency, or performance regressions. The shared RequestOutcome atomic latch closes all three #679 misattribution paths by construction across streaming/non-streaming HTTP and Decisions endpoints. Once GitHub CI (native-serving and helios-lifecycle) passes on 7f298698, this PR is ready to merge.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Centralize HTTP Delivery::Failed settlement (helios/src/server/http.rs:402-410, :426-434, :445-450, :582-589) (optional): The four Delivery::Failed exits repeat decoders[idx].abort(Termination::ExecutionError), optional generation.fail_output(), and encoder.failure(&err) (with generations[i] already None for zero-token choices at :445-450). Extracting a small helper (e.g., fail_choice(&mut decoders[idx], generations[idx].as_ref(), &mut encoder, &err) -> Frame) puts the "every Delivery::Failed exit settles its Generation" invariant in one place.
  2. Deduplicate new test helpers (helios/src/server/runtime/phase_tests.rs:8744-8750, :8828-8834, :8973-8979, :8441-8453) (optional): The 7-line for _ in 0..16 terminal-drain loop is copied three times in the new tests and could become a small drain_to_retirement(&mut worker, &mut seq) helper next to wait_for_admitted (:8632-8645). Similarly, text_http_fixture (:8443-8451) repeats the image-input retain loop already present at :59-67 and :4784-4792.

Nits

  1. Clarify per-choice / per-model-request granularity (docs/api.md:349-354, helios/src/server/metrics.rs:1078,1088): docs/api.md:353-354 states "Each request increments at most one of flare_requests_completed_total, flare_requests_cancelled_total, or flare_requests_failed_total." Because Helios runtime counters are per model request (one per choice for n > 1 HTTP requests, or per question prompt in Decisions), a multi-choice output failure increments failed for the failing choice and cancelled for dropped undelivered siblings (as verified in phase_tests.rs:8896-8898 and :8952-8954). Clarifying "Each model request (each choice in a multi-choice request or scored question in Decisions)..." removes any ambiguity for dashboard/alert authors.

Dropped on verification