Prose scratchpad · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/c4424420-9623-4815-a137-54a414b4b35a.md

#1 [high] Research summary

Prose review of PR #548 completed. The description satisfies the repository's four-part rule (why / what / claimed result / evidence, in order), labels the claim as observability only, discloses the cancelled-and-failed exclusion, the #537 merge interaction and the unrun checks; every "What changed" assertion I checked matched the code (RequestTimes kept through park, stamps in reserve_and_pack/complete, two request_completed call sites replacing direct counter increments, count_tokens excluded from e2e, non-Linux process rendering empty).

Three should-fix findings, all in docs/api.md, plus four nits:

  1. docs/api.md:305-313 claims "one observation per completed generation" for flare_request_decode_seconds and flare_time_per_output_token_seconds, which are observed only when generated_tokens > 1 (metrics.rs:470-479), contradicting the HELP strings the same PR adds (metrics.rs:1398-1422).
  2. docs/api.md:288-290 keeps "Counter and gauge names start with flare_", falsified by the new process_* paragraph at :315-318.
  3. flare_request_e2e_seconds is documented as counting "each successful generation from admission to the completed response", but the observation is made at Delivery::Complete inside the SSE poll (http.rs:604-620), so an abandoned stream records nothing and the end point is delivery, not model completion; the neighbouring TTFR sentence already carries the "once the client reads it" caveat. Nits: the request histograms are never stated to be cumulative since start next to a windowed median gauge; "Request histograms observe the served response" is a vague lead-in; an ambiguous "it" in the description's TTFR sentence; the evidence paragraph makes the reader decode whether the measured tree equals the branch head. Also flagged as unverified rather than as findings: the claim that "CI covers" the Windows build and full helios suite (head ebecef1 has no checks), and the commit-body four-part scheme plus Design-Signed-Off-By trailer, which only git show ebecef1 can settle.

Note: the turn was cut short before I could record scratchpad entries, so the findings exist only in this report and the preceding review text.

#2 [high] Blocking: none — PR #548 description meets the four-part rule

Prose lens, PR #548 (Add request latency histograms and process metrics), head ebecef1, open draft.

Rules applied: AGENTS.md:43-70 (required prose review), :72-140 (four-part description), .agents/skills/repo-prose/SKILL.md, docs/design-review.md:137-152 (principle 16).

The description answers why / what exactly changed / claimed result / evidence in that order. Claimed result is explicitly "Observability only ... claims no performance or memory improvement", and it states the cancelled/failed exclusion, the #537 merge interaction, and what was not run (Windows build, full helios suite, one template test). That is what AGENTS.md:95-112 asks for.

Every "What changed" statement checked against the code held:

Code comments are invariant-style, not chronology ("Division is correctly rounded...", "Stamp here rather than at submission..."), and the new module doc in metrics/process.rs states source, degradation rule and non-Linux behaviour. No prose defect there.

#3 [high] Should fix: docs/api.md says "one observation per completed generation" for histograms that skip single-token requests

Severity: should fix. File: docs/api.md:305-313 (added by this PR).

Passage: "The runtime records one observation per completed generation in flare_request_queue_seconds from model-scheduler arrival to the first model step that includes the request, flare_request_prefill_seconds from that step to the request's first committed generated token, flare_request_decode_seconds from the first to the last committed generated token, flare_time_per_output_token_seconds as decode time divided by generated tokens after the first, and flare_request_prompt_tokens ..."

Why it is wrong: Metrics::request_completed observes decode and time-per-output-token only inside if let Some(first) = times.first_token_ns && generated_tokens > 1 (helios/src/server/metrics.rs:470-479). The HELP strings the same PR adds say so: "for completed requests with at least two generated tokens" (metrics.rs:1398-1422 render loop; the decode and time_per_output_token entries). So the doc contradicts the exposition text it is describing, and an operator reconciling flare_request_decode_seconds_count against flare_requests_completed_total sees a gap with no explanation. It also contradicts the PR's own "Evidence" section, which relies on decode count differing from completed count.

Fix: scope the sentence, e.g. "... one observation per completed generation in flare_request_queue_seconds, flare_request_prefill_seconds and flare_request_prompt_tokens, and, for generations with at least two tokens, in flare_request_decode_seconds and flare_time_per_output_token_seconds."

Settled by code reading; no test needed. The unit test request_histograms_bucket_completed_request_timings already pins the exclusion (metrics.rs:1676-1691 second call with generated_tokens 1 asserting decode count stays 1).