Prose report · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/a1e9fd26-b9f6-4ef2-ba91-0264ba338ca4.md

Prose review — PR #548, "Add request latency histograms and process metrics"

Head reviewed: a34c4d06 (commits ebecef13, d64c3ea3, a34c4d06), base main, draft, 10 files +548/−25, no reviews, no CI checks on the head. Review lens: prose only — the description, the docs it adds, and the code comments it changes.

Rules applied, all read this round:

Key findings

Verdict: should-fix issues only. No blocking prose finding. The description answers why / what changed / claimed result / evidence in that order, labels its claim as observability-only, states that no performance or memory improvement is claimed, states that cancelled and failed requests are excluded from the request histograms, and discloses the checks that were not run; Discord: oystersmiles is present (docs/design-review.md:153-160). The two should-fix items are narrow: one stale clause in the description, one false-as-written sentence in docs/api.md. Everything else is nits.

Should fix

1. Description, "What changed → HTTP", first bullet omits the tool-limit exclusion the code and docs encode

The bullet reads: "flare_request_e2e_seconds is observed when delivery completes a successful response, except for /v1/messages/count_tokens." At head the observation is guarded by two conditions, not one — helios/src/server/http.rs:598-600:

// One observation per successful response: a tool-limit cancellation reaches
// this point but the runtime counts it as cancelled, so it is excluded.
if !count && !encoder.tool_limit_reached {
    state.model.metrics().request_e2e.observe(...);
}
yield Delivery::Complete(response);

The exclusion is pinned by helios/src/server/runtime/phase_tests.rs:4604-4613 ("A tool-limit cancellation completes delivery but is not a successful generation, so it records no end-to-end observation", asserting \nflare_request_e2e_seconds_count 0\n), and the runtime side confirms it: tool-limit paths bump cancelled (helios/src/server/runtime.rs:1317, :1338, :1360, :1407) and never call request_completed.

Why it matters: AGENTS.md:88-94 and docs/design-review.md:143-145 require the before/after to be explicit and complete, and AGENTS.md:134-137 forbids publishing a description whose material limitations must be guessed. An operator reconciling flare_request_e2e_seconds_count against flare_requests_completed_total will look for a gap in exactly the case the bullet says cannot exist. The bullet is stale relative to d64c3ea3, which added the guard.

Fix (description only): "…except /v1/messages/count_tokens and responses the runtime counts as cancelled, such as a parallel tool-limit stop", matching docs/api.md:303-306 and the comment at http.rs:598-599.

2. docs/api.md:315-316 — "Cancelled and failed requests enter only …" is unscoped and false as written

The closing sentence of the runtime-histogram paragraph reads: "Cancelled and failed requests enter only flare_requests_cancelled_total and flare_requests_failed_total."

Read literally, a cancelled or failed request contributes to no metric except the two outcome counters. That is contradicted by the paragraph directly above in the same document and by the code:

Why it matters: the paragraph's opener scopes the group ("The runtime histograms observe completed generations", docs/api.md:309), so a charitable reading is right, but the final sentence drops the scope and speaks about where those requests "enter", which reads as a statement about /metrics. It is precisely the sentence an operator will use to conclude that TTFR count and completion count can never diverge. Note the description already carries the scope word: "Cancelled and failed requests stay out of these histograms and appear only in …". This violates AGENTS.md:88-94 (exclusions complete) and the prose skill's requirement that a statement hold as written (SKILL.md:13-14).

Fix: one clause — "…enter only flare_requests_cancelled_total and flare_requests_failed_total among the runtime series", or reuse the description's "stay out of these histograms and appear only in …".

Nits

  1. docs/api.md:303 lead-in. "The HTTP histograms observe delivery." uses the implementation verb as the opening and the paragraph then switches subject at :309 ("The runtime histograms observe completed generations"). Naming the two groups on their own terms — HTTP-level response timing versus runtime per-request timing — would read better. (SKILL.md:22-25, :44-46.)
  2. docs/api.md:304-306, abandoned stream. "for a stream it is observed when delivery completes, which requires the client to drain the body" is exact but delicate: the observation now runs in the same poll that yields the terminal item (http.rs:598-606, then yield Delivery::Complete(response)), so a client that reads every data frame and disconnects before requesting the next item records nothing. A half-clause naming that case would remove doubt. (AGENTS.md:103-112, SKILL.md:35-37.)
  3. Description, "Claimed result": "nothing about serving changes". In the same diff each submitted step reads one monotonic clock (runtime.rs:2189-2203) and each committed token performs two stores (runtime.rs:1774-1775), so "nothing … changes" can be read as "no cost". One clause ("no serving behaviour changes; each submitted step adds a clock read …") keeps it from being read as a performance claim. (AGENTS.md:95-102.)
  4. Description, "Evidence": the measured tree is unidentified. "this commit was cherry-picked onto it" plus fork commit 5ffe4d54, while the branch now has three commits and the description never says which tree produced the numbers, or whether the two follow-up commits (d64c3ea3, a34c4d06) were in the container. Name the built SHA or say "the branch head". (AGENTS.md:122-128, SKILL.md:20-21.)
  5. docs/api.md:312-313 does not say a preempted request's decode span includes the parked interval. Worker::park moves the whole Incoming into self.parked untouched (runtime.rs:2094-2121), readmission reuses it, first_token_ns is get_or_insert and last_token_ns is overwritten per commit (runtime.rs:1774-1775), so request_completed computes last - first across the gap (metrics.rs:470-479). A "decode rate" or tail derived from these histograms therefore includes scheduler/preemption stalls. One clause after "at least two generated tokens" fixes it. (AGENTS.md:103-112.)
  6. Description, "Evidence": the 6-vs-5 observation gap is unexplained. "Counts gained 5 for each runtime histogram and 6 for the first-response histogram" for one window, attributed only to the instance "also serv[ing] this agent session's own requests". A reader cannot tell why the first-response count exceeds the runtime count by one; the two instruments observe at different points (latency.rs:116-127 vs metrics.rs:452-480), so a request in flight that had already offered text (most likely here, since the scrape was taken under live traffic) or a cancelled stream that delivered text accounts for it. Say it once. (AGENTS.md:106-108.)

Checked and sound (no finding)

Open questions (not findings)

Nothing else was found in the changed prose; every changed file was read in context through this lens.