Prose scratchpad · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/a038e8bb-bd6f-43fc-90a0-a34adbf52fc1.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).

#5 [high] Research summary

Verdict on the pushed head (a34c4d06): should-fix items now mostly closed; one description gap and a few nits remain.

Resolved by the two new commits (verified in the code):

Should fix (one):

Nits:

Open, not findings (cannot be settled from what I can read):

The rest of the prose holds up: the description still answers why / what / claimed result / evidence in order, keeps "Observability only" with the no-performance-claim and cancelled/failed-exclusion caveats, and the new comment at helios/src/server/http.rs:598-599 and the process module doc (helios/src/server/metrics/process.rs:1-6) state invariants rather than chronology. Earlier scratchpad entries describe the superseded state of the three docs findings; this report supersedes them.

#6 [high] Report of 2026-11-27, head a34c4d06 — verdict and findings after the push

Prose review — PR #548, head a34c4d06 (three commits: ebecef13, d64c3ea3, a34c4d06), base main, draft, 10 files +548/−25.

Rules applied: AGENTS.md:43-70 and :72-140 (prose review, four-part description), :108-112 (evidence must not stand in for contract), docs/design-review.md:137-152 (principle 16), .agents/skills/repo-prose/SKILL.md:13-46, 48-59.

Superseded findings (verified resolved in the code at a34c4d06)

  1. Decode/time-per-output-token eligibility is now stated — docs/api.md:312-314 matches helios/src/server/metrics.rs:470-479 (if let Some(first) = times.first_token_ns && generated_tokens > 1) and the HELP strings at metrics.rs:1406-1418.
  2. Naming rule now carries its exception — docs/api.md:290 "except the standard process_* series described below"; those six series documented at docs/api.md:318-321 and emitted at helios/src/server/metrics/process.rs:79-125.
  3. e2e end point and stream caveat — docs/api.md:303-306 ("for a stream it is observed when delivery completes, which requires the client to drain the body"), and the code was moved to match: single observation before yield Delivery::Complete at helios/src/server/http.rs:598-606, guarded by !count && !encoder.tool_limit_reached; old post-hoc arms removed (http.rs:621 Delivery::Complete(_) => None, and http.rs:635-645 no longer observes).
  4. Vision work inside queue — docs/api.md:309-311 says the first model step "can be a vision step"; stamp is before the GraphKind::Vision split (helios/src/server/runtime.rs:2189-2203 vs :2208). Code unchanged, doc now accurate.
  5. "cumulative since server start" added — docs/api.md:297-298.

Should fix (1)

Nits (3)

Open, not findings

Checked and sound

#8 [high] Should fix (still open at a34c4d06): PR description e2e bullet omits the tool-limit exclusion the code and docs encode

PR #548 head a34c4d06 (three commits: ebecef13, d64c3ea3, a34c4d06), draft, 10 files +548/−25, no reviews, no checks on the head.

Should fix — description, "What changed → HTTP", first bullet. It 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 !count && !encoder.tool_limit_reached:

Why it matters. AGENTS.md:88-94/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 comparing flare_request_e2e_seconds_count with flare_requests_completed_total will look for a gap in precisely the case (a tool-call response that ends in cancellation) that the bullet says cannot exist. The tool-limit path is exactly what the follow-up commit d64c3ea3 added, so the bullet is stale relative to the code it describes.

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.

#12 [high] Report of 2026-11-27, run (a34c4d06, no new commits) — headline verdict and full finding list

Prose review — PR #548, head a34c4d06 (three commits ebecef13, d64c3ea3, a34c4d06), base main, draft, 10 files +548/−25, no reviews, no CI checks on the head. No new commits since the previous round (confirmed: search_history on pr/548 still lists a34c4d06 newest, and the PR body is byte-identical to the one reviewed in entries #6/#7).

Rules applied (all read this round): AGENTS.md:43-70 (required prose review; the skill path referenced there did not resolve via list_files patterns for .agents, so I read .agents/skills/repo-prose/SKILL.md directly — 88 lines), AGENTS.md:72-140 (four-part description: why, what exactly changed, claimed result, evidence; before/after explicit :88-94; evidence connected to claims :103-112; references resolved :122-128; must not require guessing limitations :134-137), docs/design-review.md:125-152 (principle 16: same scheme for commit bodies and PR descriptions, explicit before/after, disclose material limitations, no unexplained references), docs/design-review.md:153-160 (principle 17: Discord line).

Verdict: should-fix issues only

Blocking: none. The description answers why / what changed / claimed result / evidence in order, and carries the required caveats (observability only, no performance or memory claim, cancelled and failed requests excluded from the request histograms, what was not run). Discord line present (Discord: oystersmiles).

Should fix (1) — entry #8: the "What changed → HTTP" bullet still says flare_request_e2e_seconds is observed for every successful response "except for /v1/messages/count_tokens". The code also excludes tool-limit cancellations (helios/src/server/http.rs:598-600), pinned by helios/src/server/runtime/phase_tests.rs:4604-4613. AGENTS.md:88-94, :134-137; docs/design-review.md:143-145. Description-only fix.

Nits (5, entries #9 and #10 plus #11):

  1. docs/api.md:303 leads with the implementation verb ("observe delivery") before the paragraph switches to the runtime group at :309.
  2. docs/api.md:304-306 is exact but "requires the client to drain the body" leaves the abandoned-stream case (client reads every frame, never requests the terminal item) unnamed.
  3. Description, "Claimed result": "nothing about serving changes" can be read as "no cost", though each submitted step adds a clock read (runtime.rs:2189-2203) and each committed token two stores (:1774-1775).
  4. Description, "Evidence": "this commit was cherry-picked onto it", with three commits now on the branch, leaves the measured tree unidentified (AGENTS.md:122-128).
  5. Entry #10: docs/api.md:312-313 does not say a preempted request keeps its stamps, so the parked interval sits inside flare_request_decode_seconds and flare_time_per_output_token_seconds (runtime.rs:2094-2121 park keeps Incoming; :1774 get_or_insert; :1775 overwrite; scheduler.rs:1436-1462 preemption).
  6. Entry #11: the scrape reports 6 first-response observations against 5 runtime observations for one window with no explanation; the extra can only be a stream that delivered text and was cancelled (latency.rs:116-127 vs metrics.rs:452-480, runtime.rs:1317/:1338/:1360/:1407).

Open, not findings: "CI covers the first two" is an expectation, not a check — .github/workflows/native-serving.yml:56-68 does run the full helios suite on Linux and Windows for PRs, so the sentence names a real job but not by name (AGENTS.md:108-109). The commit-body four-part scheme (docs/design-review.md:139-145) is not visible from the history view; only git show can settle it.

Verified resolved earlier and re-confirmed at head: decode/time-per-output-token eligibility stated (docs/api.md:312-314 vs metrics.rs:470-479 and HELP strings :1406-1418); process_* naming exception (docs/api.md:290); e2e end point and drain caveat (docs/api.md:303-306 vs http.rs:598-606); vision-step note (docs/api.md:309-311 vs runtime.rs:2189-2203/:2208); "accumulate since server start" (docs/api.md:297-298).

Checked and sound: every "What changed" statement re-verified (completed.fetch_add only at metrics.rs:459; the two request_completed call sites; non-Linux process.rs:8-14 writes nothing; JSON branch server.rs:645-659 never renders histograms; open_descriptors/page_size/raise_open_file_limit reused from runtime_core/eos). All new comments state invariants, not chronology (metrics.rs:450-451, http.rs:598-599, metrics/process.rs:1-6, :24-25, :29-30, runtime.rs:189-190, :2189-2190, test comments at metrics.rs:1678-1679 and phase_tests.rs:4604-4605).

#13 [high] Should fix: docs/api.md:315-316 "Cancelled and failed requests enter only …" is unscoped and falsified by the HTTP TTFR histogram

PR #548 head a34c4d06, docs/api.md:315-316 (added by this PR), end of the runtime-histogram paragraph:

"…flare_request_prompt_tokens counts prompt tokens including tokens reused from the prefix cache. Cancelled and failed requests enter only flare_requests_cancelled_total and flare_requests_failed_total."

Problem. Read literally, the sentence says a cancelled or failed request contributes to no metric except the two outcome counters. That is false, and the paragraph immediately above in the same document falsifies it: flare_time_to_first_response_seconds is observed as soon as the client reads answer or reasoning text (helios/src/server/latency.rs:116-127, called from the SSE filter at helios/src/server/http.rs:614), independently of how the request ends. A stream that delivers text and is then cancelled by the parallel-tool-limit path (helios/src/server/http.rs:563-567, helios/src/server/runtime.rs:1317/:1338/:1360/:1407) records a TTFR observation and no runtime observation. helios/src/server/runtime/phase_tests.rs:4407-4434 pins the analogous failed case: assert_eq!(snapshot.samples, u64::from(emit_text && poll_body)) after incoming[0].fail(...), so a failed request that emitted text does record an observation. flare_http_requests_total also counts every cancelled or failed request (helios/src/server/http.rs:142).

Why it matters. The paragraph's opening scopes the group ("The runtime histograms observe completed generations"), so a charitable reading is correct. But the final sentence drops the scope and speaks about where those requests "enter", which reads as a statement about /metrics. Someone writing the alert or query that sentences like this exist to enable (TTFR against completion counts) will conclude the two can never disagree. Note the PR description's version already carries the scope word: "Cancelled and failed requests stay out of these histograms and appear only in …".

Fix. One word: "Cancelled and failed requests enter only flare_requests_cancelled_total and flare_requests_failed_total among the runtime series" — or restore the description's phrasing, "stay out of these histograms and appear only in …".

Severity: should fix (one clause; the defect is precision, not a wrong number). Default-boundary case: an operator reconciling TTFR count with completed count will hit it.

#15 [high] Final tally at a34c4d06 — supersedes counts in #12, corrects #11

Final tally for the written report; supersedes the counts in entry #12 and takes precedence over #11 where they differ.

Head reviewed: a34c4d06 (commits ebecef13, d64c3ea3, a34c4d06), base main, draft, 10 files +548/−25, no reviews, no CI checks on the head. No new commits since the previous round; the description is unchanged.

Blocking: none.

Should fix: 2

  1. Description, "What changed → HTTP", first bullet — omits the tool-limit exclusion that helios/src/server/http.rs:598-600 applies and helios/src/server/runtime/phase_tests.rs:4604-4613 pins (entry #8).
  2. docs/api.md:315-316 — "Cancelled and failed requests enter only flare_requests_cancelled_total and flare_requests_failed_total" is unscoped and false as written: flare_http_requests_total counts them (helios/src/server/http.rs:142), and a request that offered text before being cancelled or failing also records flare_time_to_first_response_seconds (helios/src/server/latency.rs:116-127, helios/src/server/http.rs:614, pinned for the failed case at helios/src/server/runtime/phase_tests.rs:4407-4434). One-word fix: "among the runtime series", or reuse the description's phrasing (entry #13).

Nits: 6

  1. docs/api.md:303 lead-in uses the implementation verb and then switches subject at :309 (entry #9.1).
  2. docs/api.md:304-306 does not name the abandoned-stream case (entry #9.2).
  3. Description "Claimed result": "nothing about serving changes" can be read as no cost (entry #9.3).
  4. Description "Evidence": the measured tree is identified only as fork commit 5ffe4d54 plus "this commit" (entry #9.4).
  5. docs/api.md:312-313 does not say a preempted request's stamps span the parked interval (entry #10).
  6. Description "Evidence": 6 first-response observations against 5 runtime observations for one window, unexplained (entry #14 corrects entry #11's explanation; either an in-flight request or a cancelled stream accounts for it).

Open, not findings: "CI covers the first two" names no job, though .github/workflows/native-serving.yml:56-68 does run the full helios suite on Linux and Windows for every PR; the commit-body four-part scheme cannot be checked from the history view.

Resolved earlier, re-confirmed at head: docs eligibility split (docs/api.md:312-314 vs metrics.rs:470-479), process_* naming exception (:290), e2e end point and drain caveat (:303-306 vs http.rs:598-606), vision-step note (:309-311 vs runtime.rs:2189-2203/:2208), "accumulate since server start" (:297-298).

Nothing else found: no prose defect in the changed code comments, the new module documentation, or the test comments; the four-part description order and the "Observability only" framing hold; the Discord line is present.

#16 [high] Research summary

Prose review of PR #548 at head a34c4d06 (three commits, draft, no new commits or description edits since the previous round). Verdict: should-fix issues only — no blocking prose finding. The description still answers why / what changed / claimed result / evidence in order, keeps the "Observability only", no-performance-claim, cancelled/failed-exclusion and unrun-checks caveats, and carries its Discord line.

Two should-fix findings: (1) the "What changed → HTTP" bullet still says flare_request_e2e_seconds is observed for every successful response "except for /v1/messages/count_tokens", but the code also excludes tool-limit cancellations (helios/src/server/http.rs:598-600, pinned by helios/src/server/runtime/phase_tests.rs:4604-4613); (2) docs/api.md:315-316 — "Cancelled and failed requests enter only flare_requests_cancelled_total and flare_requests_failed_total" is unscoped and false as written, since flare_http_requests_total counts them and a request that offered text before being cancelled or failing also records flare_time_to_first_response_seconds (latency.rs:116-127, http.rs:614, pinned at phase_tests.rs:4407-4434); the fix is one word ("among the runtime series").

Six nits: the docs/api.md:303 implementation-verb lead-in; the unnamed abandoned-stream case at :304-306; the missing preemption caveat for decode / per-output-token spans at :312-313 (park keeps Incoming, runtime.rs:2094-2121, :1774-1775); the "nothing about serving changes" wording; the unidentified measured tree in Evidence; and the unexplained 6-vs-5 observation gap in the scrape paragraph. Two open questions (unnamed CI job, commit bodies not visible) are recorded as questions, not findings.

All changed files were read in context and each earlier docs finding was re-verified as resolved at head. Full findings, citations and rewrites are in scratchpad entries #8–#15, with #15 as the final tally (it supersedes the counts in #12 and corrects the explanation in #11).

#17 [high] Rule citations (file:line) mapped to each finding for the final report

Rule citations to attach to each finding in the final report (all read this round; the report should cite these rather than re-derive them).

Governing text

Mapping used in the report

Clean on every rule above: the changed code comments (metrics.rs:450-451, http.rs:598-599, metrics/process.rs:1-6, :20-30, runtime.rs:189-190, :2189-2190) and test comments (metrics.rs:1678-1679, phase_tests.rs:4604-4605, :4486-4487) state invariants and reasons, with no chronology, no lifecycle labels, and no requirement on conversation history; no new prose adds defect reports or run journals to the repository.

#9 [medium] Nits at a34c4d06: lead-in verb, abandoned stream, "nothing about serving changes", evidence references

Prose nits, PR #548 head a34c4d06.

  1. docs/api.md:303 "The HTTP histograms observe delivery." uses the implementation verb as the lead-in and then the paragraph 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; the two paragraphs are otherwise well matched. Prose-skill lead-in rule, low impact.

  2. docs/api.md:304-306 "for a stream it is observed when delivery completes, which requires the client to drain the body". Exact but delicate: the observation now runs in the same poll that yields the terminal item (helios/src/server/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. "requires the client to drain the body" covers it; a half-clause naming the abandoned-stream case would remove doubt for someone reading the number.

  3. Description, "Claimed result": "Observability only: … nothing about serving changes." In the same diff, each submitted step reads one monotonic clock (helios/src/server/runtime.rs:2189-2203) and each committed token performs two stores (:1774-1775), so a reader can take "nothing … changes" as "no cost". The sentence is about serving behavior and is defensible, but one clause ("no serving behavior changes; each submitted step adds a clock read and each completed request a handful of counters") would keep it from being read as a cost claim.

  4. Description, "Evidence": "this commit was cherry-picked onto it" and the measured tree is described as fork commit 5ffe4d54 plus "this commit", while the branch now has three commits. AGENTS.md:122-128 (resolve references where they are needed) and the prose skill (durable identifier on first reference) both want either the SHA that was built or "the branch head". Reproducibility of the numbers, not their accuracy, is what suffers.

#10 [medium] Nit: decode and per-token histograms include preemption stalls, undocumented

Candidate prose finding verified in the code at a34c4d06, not raised in the earlier rounds.

docs/api.md:312-313: "flare_request_decode_seconds and flare_time_per_output_token_seconds are recorded only for requests with at least two generated tokens". Literal endpoints are stated exactly, but neither the docs nor the description's RequestTimes bullet says that a preempted request keeps its stamps, so the parked interval falls inside the decode span and inside the per-token quotient.

Verified path:

Consequence for a reader: a "decode rate" or p95 tail derived from these two histograms includes scheduler/preemption stalls, which the surrounding sentences ("decode rate", "tail latency") do not suggest. Fix is one clause, e.g. after "at least two generated tokens": "A request that is preempted and readmitted keeps its stamps, so a pause between those two tokens is included."

Severity: nit. The sentence is not false; the missing caveat only affects interpretation of queued-under-pressure numbers.

#11 [medium] Nit: evidence reports 6 TTFR observations vs 5 runtime observations with no reconciliation

PR #548 head a34c4d06, description "Evidence", live-scrape paragraph.

Nit — the scrape deltas are not reconciled. The paragraph reports "Counts gained 5 for each runtime histogram and 6 for the first-response histogram" for the same window, then says only that "the deltas include them and exceed the three requests below". A reader cannot tell why flare_time_to_first_response_seconds_count exceeds flare_requests_completed_total by one.

The gap is explicable and the code supports the explanation:

Why it matters (prose lens). AGENTS.md:103-112 requires explaining differences between observations and keeping measurement limitations visible; a bare pair of numbers 6 and 5 in the same window reads as an error in the instrument. One clause fixes it, e.g. "the extra first-response observation is a session stream that delivered text and was then cancelled, which the runtime histograms exclude."

Severity: nit. The numbers themselves are honest and the caveat about the agent session's own traffic is present.

#14 [medium] Correction to #11: the 6-vs-5 gap is explained by in-flight requests, not only cancellations

Correction to entry #11's explanation, keeping the nit itself.

Nit (stands): the Evidence section reports "Counts gained 5 for each runtime histogram and 6 for the first-response histogram" for one window and explains only that the instance "also served this agent session's own requests". A reader cannot tell why the first-response count exceeds the runtime count by one; the two instruments are observed at different points, so the gap is expected and the description should say so once (AGENTS.md:103-112: explain differences when observations would otherwise appear contradictory).

Correct explanation (two mechanisms, either sufficient):

  1. A request in flight that has already offered answer or reasoning text has a first-response observation and no completion yet: FirstResponse::output observes at the first text frame (helios/src/server/latency.rs:116-127, called from helios/src/server/http.rs:614), while the runtime histograms are observed only in Metrics::request_completed (helios/src/server/metrics.rs:452-480, called at helios/src/server/runtime.rs:1841-1846 and :1996-2001). Since the scrape was taken while the agent session's own traffic was live, this is the most likely source of the extra observation.
  2. A stream that delivers text and is then cancelled records a first-response observation and no runtime one (helios/src/server/runtime.rs:1317/:1338/:1360/:1407 bump cancelled only).

So entry #11's claim that the extra "can only be" a cancelled stream is too strong; an in-flight request explains it equally well, and my suggested wording should be neutral: "the extra first-response observation belongs to requests that had offered text but had not completed when the scrape was taken, which the runtime histograms exclude."