Explore report · NVIDIA/hyperflare-inference #692

Raw Markdown for agents: https://autobot.eidonix.com/p/001b94ef-fd82-48fc-80d1-24600b477dcf.md

Case file: PR #692 — helios: count output-layer stream failures under requests_failed_total

Key findings


The change

Size and shape (verified). 4 files, +1068/−32, head 348c06c, base main (branched at c513e46), "ready for review":

What it does, in plain terms. Before, the model worker decided the outcome of a request on its own: it bumped completed as soon as generation stopped, bumped cancelled whenever the HTTP reader dropped its channel, and only bumped failed from finish_error. But the HTTP output layer (parser, encoder, tool-call validation) runs after the worker and can still reject the response. Those rejections looked like drop-outs to the worker, so they were counted as cancellations. #692 makes worker and consumer share one atomic outcome word so that exactly one of the three counters increments, once, and only when the side that actually knows the answer says so.

Mechanics, verified in the diff and head files:

What the description does not say that the change does:

What the description says that the change does not do: I found no claim in the description that the diff fails to support. The "fail-then-cancel cannot double count" claim does hold: emit_finished/emit's Full arms still set cancelled, but record_cancelled can no longer reach an absorbing FAILED.

The why

Issue #679 (ktsaou, opened 2026-12-02 11:31, zero comments) is the filed report, and #692 declares "Fixes #679" the same day. Its evidence is a journal timeline: Qwen3.8-Flash-Next gb202 TP2, streaming Chat Completions with ChatML tool calls, two server_error entries ("tool parameter names must be nonempty and unique", stage=stream) at 09:00:39 and 09:43:50; counters over the period completed 9046, cancelled 2, failed 0, each cancelled increment 1 s after a journal line. An earlier occurrence on 2bdc8472 was a Responses stream ending "tool function requires parameter or closing tag".

The issue's own code trace at a3c80e19 matches the call chain the PR edits: chatml.rs:136 (not opened) rejects empty/duplicate parameter names → server/output.rs:359-364 (not opened) aborts with Termination::ExecutionError → http.rs yields Delivery::Failed and drops its receiver → runtime.rs's emit() sees TrySendError::Closed and sets cancelled → counted at metrics.cancelled.fetch_add → failed only ever touched in finish_error.

Importance to operators: #541's shipped Prometheus/Grafana example plots only completed and failed, so these mis-attributed cancellations are invisible on the documented dashboard — the practical reason nobody had seen the trend.

Recent activity

helios/src has had heavy same-day churn from other authors (#681, #661, #665, #660, #670, #667, #663, #666 on 2026-12-01/02), none of it touching the four files this PR changes — the orientation packet confirms zero commits on main since the branch point (c513e46) touching these files. So the PR is not racing a conflicting change, only other open PRs.

Of the recent commits, #670 (Luke Alonso, "parameterize THINK_TAGS reasoning, add TAGGED_JSON tool parser") is the nearest neighbour semantically: it grows the set of output parsers whose rejections this accounting must attribute correctly.

People

Community

Nothing. pr_comments returns "No comments." No reviews, no reactions, no labels, opened and last updated the same day. Issue #679 also has zero comments before the fix was proposed.

Project fit

Claims and evidence

Claimed and self-reported (unverifiable from the repository; head 348c06c has no CI checks):

What does back the claims: the test code exists and is substantial. Two unit tests in runtime.rs (terminal budget overflow and deferred drop orderings; a 2-thread Barrier test over 3×3 worker/consumer pairs × both defer modes × 128 iterations asserting exactly one counter increment) plus four tokio HTTP↔Worker integration tests at phase_tests.rs:8437-9020 (ChatML duplicate-parameter rejection on chat/messages/responses; mid-stream and at-EOS rejection after worker completion, streaming and buffered; genuine client disconnects on four routes; normal completion across four routes × stream and an n=2 fail/sibling-cancel case).

Gaps in the evidence:

Reach

Process

Open questions / not found

  1. Whether the docs/design-review.md:234-240 "blocking design failure" clause is satisfied by running check.py (not opened) without extending ResponseLifecycle.tla/conformance fixtures for the new PENDING→GENERATED→COMPLETED/CANCELLED/FAILED transitions — the PR argues no bounds changed; the deferred half of the machine is unmodelled.
  2. Whether the Python tests/server/*.py counter assertions (test_protocols.py:676, test_decisions.py:230-261) still hold under deferred completion; they were not run, and if any expected cancelled on a path that now lands in GENERATED-then-completed/failed, they will need updating.
  3. The merge order and rebase plan against #548, #560 and the author's own #691 — no comment on any of them references #692, and #692 references none of them.
  4. Whether docs/api.md:700-702 should be amended for the parallel-tool-limit path, which #692 changes the machinery for but not the documented outcome.
  5. Whether the emit_finished try_reserve()-before-record_generated() ordering can leave a request in GENERATED if the reserved slot is later lost — the tests cover Full and Closed, but not a reservation dropped without send.
  6. No maintainer has engaged; there is no signal yet on whether the PR is wanted in this batch, and its conflicts with the WynnD metrics series (#548/#560) are unresolved.