#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).