#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:
docs/api.md:305-313claims "one observation per completed generation" forflare_request_decode_secondsandflare_time_per_output_token_seconds, which are observed only whengenerated_tokens > 1(metrics.rs:470-479), contradicting the HELP strings the same PR adds (metrics.rs:1398-1422).docs/api.md:288-290keeps "Counter and gauge names start withflare_", falsified by the newprocess_*paragraph at:315-318.flare_request_e2e_secondsis documented as counting "each successful generation from admission to the completed response", but the observation is made atDelivery::Completeinside 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 (headebecef1has no checks), and the commit-body four-part scheme plusDesign-Signed-Off-Bytrailer, which onlygit show ebecef1can 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:
Incoming.timessurvives preemption: park moves Incoming into the parked list (helios/src/server/runtime.rs:2094-2121); readmission reuses it (:1553-1575).Worker::reserve_and_packstamps first scheduled step (runtime.rs:2187-2201);Worker::completestamps first/last committed token (runtime.rs:1774-1775).- The two
request_completedcall sites replace the direct increments: runtime.rs:1841-1846 (user/text stop) and runtime.rs:1993-1998 (natural finish).completed.fetch_addnow exists only at helios/src/server/metrics.rs:459. count_tokensexcluded from e2e: guardsif !countat helios/src/server/http.rs:615 and :632.- Non-Linux process metrics write nothing: helios/src/server/metrics/process.rs:8-16 (
#[cfg(not(target_os = "linux"))]arm). - Docs claim that histograms appear only in Prometheus text and not in JSON is true: the JSON branch at helios/src/server.rs:645-659 never renders them; text branch renders at :671 and :709.
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):
- The decode/time-per-output-token eligibility is now stated (
docs/api.md:312-314, matchinghelios/src/server/metrics.rs:470-479and the HELP strings atmetrics.rs:1406-1418). - The naming rule now carries its exception (
docs/api.md:290: "except the standardprocess_*series described below"), so the sixprocess_*series atdocs/api.md:318-321no longer falsify it. - The e2e sentence now ends at delivery with the drain caveat (
docs/api.md:303-306), and the code was actually moved to match: one observation beforeyield Delivery::Complete(helios/src/server/http.rs:598-606), guarded by!count && !encoder.tool_limit_reached; the old post-hoc observations in the SSEfilter_mapand the non-streaming arm are gone (http.rs:621,http.rs:635-645).flare_request_queue_secondsis now documented as possibly starting at a vision step (docs/api.md:309-311), which matches the stamp before theGraphKind::Visionsplit (helios/src/server/runtime.rs:2189-2203vs:2208).
Should fix (one):
- The PR description is stale on exactly the point the follow-up commit added. "What changed → HTTP" still says
flare_request_e2e_seconds"is observed when delivery completes a successful response, except for/v1/messages/count_tokens", but the code also excludes tool-limit cancellations (helios/src/server/http.rs:598-600), and the new test pins it (helios/src/server/runtime/phase_tests.rs:4604-4613). A reader comparing the description withflare_request_e2e_seconds_countagainstflare_requests_completed_totalwill look for a gap the description says cannot exist. Fix: add the tool-limit exclusion to that bullet, asdocs/api.md:303-306now does implicitly via "successful generation". This is the before/after completeness rule (AGENTS.md:88-94,docs/design-review.md:143-145).
Nits:
docs/api.md:303"The HTTP histograms observe delivery" uses the implementation verb as the lead-in and then switches subject to the runtime group at:309; naming the two groups (HTTP-level response timing versus runtime per-request timing) would read better, though the paragraphs now do it well enough.docs/api.md:304-306is technically exact but delicate: because the observation now runs in the same poll that yields the terminalDelivery::Completeitem, a client that reads every data frame and disconnects before requesting the next item records nothing. "which requires the client to drain the body" covers it; a half-clause naming the abandoned-stream case would remove the doubt.- The two new commit subjects ("Hoist completion values and tighten stat parsing", "Exclude cancelled responses and reuse host helpers") are change-log shorthand that only reads against the diff;
docs/design-review.md:139-145requires the four-part scheme in the commit body, which the history view does not expose.
Open, not findings (cannot be settled from what I can read):
- "CI covers the first two" in the Evidence section still refers to the Windows build and the full helios suite, but the head commit carries no checks; naming the job or dropping the sentence would make it verifiable (
AGENTS.md:108-109). - The Evidence paragraph still leaves the reader to determine whether the measured tree equals the branch head (it is
5ffe4d54plus "this commit", and there are now three commits).
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)
- 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. - 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. - 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::Completeat helios/src/server/http.rs:598-606, guarded by!count && !encoder.tool_limit_reached; old post-hoc arms removed (http.rs:621Delivery::Complete(_) => None, and http.rs:635-645 no longer observes). - 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.
- "cumulative since server start" added — docs/api.md:297-298.
Should fix (1)
- PR description, "What changed → HTTP" bullet: still says
flare_request_e2e_seconds"is observed when delivery completes a successful response, except for/v1/messages/count_tokens". The code also excludes tool-limit cancellations (helios/src/server/http.rs:598-600, comment at :598-599: "a tool-limit cancellation reaches this point but the runtime counts it as cancelled, so it is excluded"), pinned by helios/src/server/runtime/phase_tests.rs:4604-4613 (assertsflare_request_e2e_seconds_count 0on the parallel-tool-limit path). Requirement: before/after must be explicit and complete (AGENTS.md:88-94; docs/design-review.md:143-145). Fix: add the tool-limit exclusion to that bullet.
Nits (3)
- docs/api.md:303 "The HTTP histograms observe delivery" — implementation verb as lead-in; sentence then switches subject to the runtime group at :309. Naming the two groups explicitly would read better.
- docs/api.md:304-306 — exact but delicate: the observation now runs in the same poll that yields
Delivery::Complete, so a client that reads every data frame but disconnects before requesting the next item records nothing. "requires the client to drain the body" covers it; naming the abandoned-stream case would remove doubt. - Commit subjects of the two follow-ups ("Hoist completion values and tighten stat parsing", "Exclude cancelled responses and reuse host helpers") are change-log shorthand readable only against the diff; docs/design-review.md:139-145 wants the four-part scheme in the commit body (not observable in the history view).
Open, not findings
- "CI covers the first two" (Windows build, full helios suite) — the head commit carries no checks; name the job or drop the sentence (AGENTS.md:108-109).
- Evidence paragraph still leaves the reader to decide whether the measured tree equals the branch head (now three commits on top of fork commit 5ffe4d54).
Checked and sound
- Four-part order and "Observability only ... claims no performance or memory improvement ... does not report cancelled or failed requests" still present.
- New code comment helios/src/server/http.rs:598-599 and helios/src/server/metrics.rs:450-451 ("so the two cannot diverge") state invariants, not chronology; process module doc helios/src/server/metrics/process.rs:1-6 states source, degradation rule, non-Linux behaviour.
- Comment at helios/src/server/metrics/process.rs:24-25 explains the state-character guard; helios/src/server/metrics/process.rs:29-30 documents the field-3 offset.
- Test comment at helios/src/server/metrics.rs:1678-1679 ("A zero-token completion reaches no model step ...") matches RequestTimes::default() usage.
- Discord line present.
- Non-Linux path writes nothing (helios/src/server/metrics/process.rs:8-14); JSON branch still never renders histograms (helios/src/server.rs:645-659 vs text at :660, :671, :709).