Simplicity scratchpad · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/0cc5e625-3926-4467-9dad-d18c4863ba53.md

#1 [high] PR 548 overview and scope

PR #548 "Add request latency histograms and process metrics" (draft, opened 2026-11-26, head ebecef1, 8 files +545/-20). Closes #536 (opened by Napuh, a non-maintainer; asks for vLLM-parity request histograms + process_* metrics).

Files: docs/api.md (+25/-3), helios/src/server.rs (+2), helios/src/server/http.rs (+6/-1), helios/src/server/latency.rs (+27/-8), helios/src/server/metrics.rs (+228), helios/src/server/metrics/process.rs (new +184), helios/src/server/runtime.rs (+38/-8), helios/src/server/runtime/phase_tests.rs (+35).

What it adds:

Repo rules relevant to lens D:

#2 [high] Findings: lens D (simplicity) on PR 548 — final list

PR #548 "Add request latency histograms and process metrics" (draft, head ebecef1, 8 files +545/-20, closes #536). Lens D (simplicity) findings, all verified against the diff and surrounding code.

  1. [should fix] Duplicate histogram plumbing — helios/src/server/metrics.rs:212-298 (Buckets/Histogram) vs the existing host-cache histogram code at metrics.rs:200-210 (HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS as [u64; N]), 670-692 (host_lookup_cost), 1029-1065 (render loop writing _bucket/_count/_sum and +Inf). The PR adds a second, differently-shaped histogram mechanism (f64 bounds + scale divisor + impl Display render) while three existing series already render the same exposition. Fix: make Histogram<N>/Buckets<N> the one mechanism and delete HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS plus the 1029-1065 block; or, smaller still, drop Histogram and reuse the existing u64-bucket arrays, since two of the three new seconds histograms share one bound list.

  2. [should fix] The scale: f64 field is redundant — metrics.rs:214-241, 260-270, 291-295. Every observation is already ns; scale is used only as value as f64 / scale for bucketing and sum / scale for rendering. Smaller version: keep bounds in ns as [u64; N] like the existing HOST_*_BUCKETS and divide by 1e9 once at render. This removes the scale field, the PROMPT_TOKENS scale: 1.0 special case, and the "integer grid / correctly rounded" comment at 261-262.

  3. [should fix] request_prompt_tokens does not need a histogram type at all — metrics.rs:235-241, 332, 471-472, 1419-1424, plus the docs/api.md paragraph. Prompt size is a whole-token count and the repo already exposes flare_prefill_tokens_total and flare_cache_reused_tokens_total. If the per-request distribution is genuinely required, share the existing renderer with a fixed bucket list; as written it is the largest of the six added histograms (21 atomics + sum).

  4. [should fix] Separate render_histogram at latency.rs:122-131 is a third impl block on FirstResponseSamples, takes &mut String and hard-codes the metric name, and exists only because the histogram lives on FirstResponseSamples (constructed at server.rs:313). Smaller version: move the Histogram<21> onto Metrics (which already owns request_e2e), observe it from FirstResponse::output through a metrics handle as http.rs does for e2e; then delete render_histogram, the extra impl block, and the scrape line at server.rs:671.

  5. [should fix] #[cfg(not(target_os = "linux"))] { let _ = text; } at metrics/process.rs:12-15 is dead code that silences an unused parameter. Other platform-gated code in helios uses real empty branches or cfg'd item bodies (runtime_core/protection.rs:298-301, core/cache.rs:4196). Smaller version: gate the whole render item on linux and gate the call at server.rs:709.

  6. [should fix] process.rs re-implements metric() (metrics/process.rs:42-49) differing from metrics.rs:1597-1602 in that it takes impl Display and omits the flare_ prefix. No caller needs impl Display for anything but f64/u64. Keep one writer. AGENTS.md L188-193 rejects abstractions and churn without a concrete requirement.

  7. [should fix] Four per-source Option fallbacks in render_linux (metrics/process.rs:55-131: sysconf _SC_CLK_TCK/_SC_PAGESIZE, getrlimit return, read_dir, parse_stat) are speculative robustness with no concrete requirement and cost more code than the metrics they guard (four if let (Some, Some) blocks, two then_some sites). Smaller version: read both sysconf values once, default the page size as eos/src/unix.rs:74 already does (unwrap_or(4096)), and let the rest fail early. The module doc's "a scrape never fails and never panics" is a guarantee nothing in the repo requires for process_*.

  8. [nit] parse_stat skip arithmetic (metrics/process.rs:21-32) — the value(11)/value(0)/value(6)/value(0)/value(0) chain plus the "token N - 3" comment is harder to check than naming the fields. Smaller version: split_whitespace().skip(11) then next() in field order.

  9. [nit] last_token_ns duplicates existing scheduler accounting — runtime.rs:1774-1775 stamps first/last token ns in Worker::complete, while the scheduler already maintains accounting.last_output_ns (scheduler/policy.rs:275, surfaced at runtime.rs:1172-1173, used at policy.rs:478). Only the first-token instant has no existing home. Smaller version: keep first_token_ns only and read the last-token instant from accounting; deletes one u64 per in-flight request and one store per committed token.

  10. [nit] Comment bloat: metrics.rs:212-213, 243-244, 261-262, 300 (four doc comments around three struct fields), runtime.rs:193 and 2189-2190, process.rs:1-6. metrics.rs:261-262 explains an invariant the code should not have (finding 2); runtime.rs:2189-2190 only makes sense if the reader knows reserve_and_pack has a second caller. The prose skill asks comments to explain invariants, not defenses.

  11. [nit] Part of request_histograms_bucket_completed_request_timings (metrics.rs:1674-1701) proves nothing about the PR's claim: the first_scheduled_ns: None second observation asserts counts stay at 1, exercising the helper's branch rather than the runtime stamping. The stamping is covered by runtime/phase_tests.rs:576-583 (count == 1), which itself asserts only that a count exists, not a bucket. AGENTS.md L194-199.

  12. [nit] phase_tests.rs:4428-4432, 4461-4471, 5380-5389 bolt render() string assertions onto three pre-existing tests (first_response_http_*, metrics_route_*), restating what metrics.rs:1652 and the latency tests already prove and making unrelated tests brittle to HELP-text edits. Keep only the process_resident_memory_bytes presence check in the route test as the one end-to-end check.

  13. [nit] docs/api.md +25 lines enumerates eleven series, repeating definitions that the HELP strings at metrics.rs:1393-1423 carry verbatim. Keep the two facts a scrape cannot supply: histograms are absent from format=json, and process_* is Linux-only; point at the scrape for the rest.

Non-findings verified: state.model.metrics_handle() at http.rs:603 is required by the filter_map closure; if !count correctly excludes /v1/messages/count_tokens, which server.rs:584 routes to the same http::generate handler; RequestTimes survives parking because park moves Incoming wholesale (runtime.rs:2096, 2121) and readmission reuses it.

Repo rules cited: AGENTS.md L16-18 and docs/design-review.md principle 1 ("Keep Helios as simple as possible"); AGENTS.md L188-193 (reject unsupported abstractions and churn); AGENTS.md L194-199 (focused, meaningful validation); .agents/skills/repo-prose/SKILL.md L38-46 (comments explain invariants).

#4 [high] Delta after commits d64c3ea3 + a34c4d06 (lens D)

Head now a34c4d06 ("Hoist completion values and tighten stat parsing"), after d64c3ea3 ("Exclude cancelled responses and reuse host helpers"). 10 files, +548/-25.

FIXED by d64c3ea3:

STILL OPEN (unchanged by the delta):

  1. should fix — three histogram mechanisms: new Buckets/Histogram (metrics.rs:212-298) vs HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS u64 arrays (metrics.rs:200-210) rendered at 1029-1065, vs the hand-written retirement histogram block at 851-877.
  2. should fix — scale: f64 (metrics.rs:216, 263, 294) plus the PROMPT_TOKENS scale: 1.0 (metrics.rs:240) and the rounding comment (261-262). Every observation is integer ns; u64 ns bounds + one division at render deletes all three.
  3. should fix — second metric() writer at metrics/process.rs:48-54 duplicating metrics.rs:1597-1602 with only impl Display widening.
  4. should fix/nit — time_to_first_response histogram lives on FirstResponseSamples (latency.rs:36) instead of Metrics, so it needs the forwarding render_histogram (latency.rs:101-108), the scrape hook at server.rs:671 and a test-only call at phase_tests.rs:4467.
  5. nit — #[cfg(not(target_os="linux"))] let _ = text; shim metrics/process.rs:12-13.

NEW in a34c4d06: 6. should fix (nit) — metrics/process.rs:81-98: two consecutive if let Some(stat) = stat blocks with the same test, one per metric. Merge into one block writing both gauges (or one loop over (name, help, value)). 7. nit — metrics/process.rs:24-28: added state-character whitelist "RSDZTtWXxKPI" parsing /proc/self/stat. Speculative validation: procfs cannot emit anything else, and the parser is only called on /proc/self/stat (process.rs:62-64). ~5 lines and a comment for a case that cannot occur; AGENTS.md L188-193. 8. should fix (nit) — metrics/process.rs:69-70: crate::os::raise_open_file_limit(0) used as a read-only getter of RLIMIT_NOFILE. Reads as a mutation at the call site; eos has no getter, so either add one or comment the trick (the comment is there but the API misuse remains). Windows path returns None (eos/src/windows.rs:215). 9. nit — pub(crate) use protection::open_descriptors (runtime_core/mod.rs:58) widens a runtime_core private for one metrics call. AGENTS.md L20-21 puts host OS operations in eos/; the fd count belongs beside page_size there.

Tests: phase_tests.rs:4428-4432, 4461-4471, 4601-4611, 5391-5398 still bolt full metrics().render() string checks onto three unrelated tests; 4611's tool-limit check restates 4428; 5391 duplicates 4466-4471. Each assert re-renders the whole scrape inside a loop (4461-4471 renders twice per iteration). AGENTS.md L194-199.

#5 [high] Report of 2026-11-27, run 2 (post-delta) — lens D verdict and findings

Verdict: should-fix issues only (no blockers in lens D). Supersedes entry #3 for head a34c4d06.

Should fix

1. Three histogram mechanisms in one file — helios/src/server/metrics.rs:212-298 vs :200-210/:1029-1065 vs :851-877

The PR adds Buckets<const N> (f64 bounds ending at f64::INFINITY + a scale divisor) and Histogram<N> with its own render writing # HELP/# TYPE. The same file already renders histograms two other ways: HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS as [u64; N] with u64::MAX for +Inf (host_lookup_cost :670-692, render loop :1029-1065) and the hand-written flare_host_cache_retirement_seconds block (:851-877). Three implementations means three places for a +Inf/cumulative/escaping bug and two bucket vocabularies in one struct. Fix: express the new seconds histograms as [u64; N] ns bounds like the existing ones (four of the five seconds series already share one bound list), or, larger but better, migrate the host and retirement series onto Histogram<N> and delete :200-210, :1029-1065 and :851-877. AGENTS.md L188-193.

2. scale: f64 is redundant — metrics.rs:216, 240, 261-263, 291-295

Every observation is already an integer nanosecond count (as_nanos() as u64 at http.rs:601-603, latency.rs:121-124; saturating_sub at metrics.rs:464-477). scale exists only so observe can divide (value as f64 / buckets.scale, :263) and render can divide the sum (:294). Keep bounds in ns as [u64; N], bucket with integer comparison, divide by 1e9 once when writing _sum. That deletes the field, the PROMPT_TOKENS scale: 1.0 (:240) and the "Division is correctly rounded" comment (:261-262), which exists only to justify the representation.

3. Second metric() writer — helios/src/server/metrics/process.rs:48-54 vs metrics.rs:1597-1602

Same name, same shape, differing only in value: impl Display vs u64 and a hard-coded process_ prefix instead of flare_. Every caller passes u64 or an f64 it computed inline (process.rs:78, 87, 96, 105, 114, 123); nothing needs impl Display. Fix: keep metrics::metric and either pass the formatted CPU/start-time values through it or widen the one function to impl Display and delete the copy. One writer, one prefix rule.

4. The TTFR histogram hangs off the sampler instead of Metrics — helios/src/server/latency.rs:36, 101-108, :121-124; helios/src/server.rs:671

FirstResponseSamples gained a histogram field and a render_histogram(&self, text) forwarder that hard-codes the series name and help; server.rs:671 exists solely to call it, and phase_tests.rs:4466-4471 calls it directly because the series is otherwise unreachable except through a scrape. Metrics already owns request_e2e and is rendered by the same scrape. Fix: put time_to_first_response: Histogram<21> on Metrics, observe it from FirstResponse::output through the metrics handle http.rs already fetches, render it in the same loop as the other six (metrics.rs:1389-1424). Deletes the field, the forwarder, the scrape hook and the special-case test call.

5. Duplicate if let Some(stat) block — metrics/process.rs:81-98

Two consecutive blocks test the same Option to write one gauge each. Merge into one block writing both process_virtual_memory_bytes and process_resident_memory_bytes, or one small loop over (name, help, value).

6. raise_open_file_limit(0) used as a getter — metrics/process.rs:69-70

The call reads as a mutation in a scrape path; its only effect is returning the current soft limit. eos has no read-only accessor. Fix: add pub fn open_file_limit() -> Option<u64> to eos/src/unix.rs beside raise_open_file_limit (eos/src/unix.rs:138-165 already does the getrlimit and returns early) and call that. AGENTS.md L20-21 puts host OS operations in eos/.

Nits

  1. metrics/process.rs:24-28 — the added state-character whitelist ("RSDZTtWXxKPI") validates a value procfs cannot get wrong and the parser is only fed /proc/self/stat (process.rs:62-64). Five lines and a comment for an impossible case; drop it, or keep rfind(')') and parse. Settled only by argument, not by test.
  2. metrics/process.rs:12-13 — let _ = text; on non-Linux exists only to silence an unused parameter. Gate the render item and the call site as runtime_core/protection.rs:292-301 gates open_descriptors, and delete the branch.
  3. metrics/process.rs:1-6 — module doc promises "a scrape never fails and never panics"; with three sources left, say only that missing procfs entries omit their series.
  4. metrics.rs:212-213, 243-244, 300 — four doc comments over three declarations, two of which restate the type name.
  5. phase_tests.rs:4428-4432, 4461-4471, 4601-4611, 5391-5398 — four metrics().render() substring asserts grafted onto three unrelated tests; 4611 restates 4428, 5391 restates 4466-4471, and 4461-4471 renders the whole scrape twice per loop iteration. Keep the _count assertions on the tests that own the behaviour and one presence check in the route test. AGENTS.md L194-199.
  6. docs/api.md:299-317 — eleven series described in prose that the # HELP strings at metrics.rs:1389-1424 already carry. Keep the two facts a scrape cannot supply (histograms absent from format=json; process_* Linux-only) and list the names.
  7. metrics.rs:1678-1690 — the zero-token case now proves only that request_prompt_tokens still observes; name the test for that or fold it into the first-case assertions.

Non-findings checked: if !count still correctly excludes /v1/messages/count_tokens; encoder.tool_limit_reached guard now covers both arms because there is only one observation site (http.rs:598-605); RequestTimes survives parking (park moves Incoming wholesale, runtime.rs:2096/2121, readmission reuses it); last_token_ns vs accounting.last_output_ns (policy.rs:275, set in published_output) differ because publication can be skipped for unread streams, so the separate stamp is justified — drop my earlier nit.

#6 [high] Research summary

Reviewed PR #548 at head a34c4d06 (after d64c3ea3 and a34c4d06) through the simplicity lens; nothing blocks, six should-fix items and seven nits. The two new commits resolved four of my earlier findings (the OS reads now go through eos/protection helpers, the separate render_histogram impl block is gone, e2e is observed once in generate, and the impossible {None, Some} test state is replaced) and left the core duplication intact.

Should fix: the PR still adds a third histogram mechanism (Buckets/Histogram with f64 bounds and a scale divisor, metrics.rs:212-298) beside the two u64-bucket renderers already in the file (:200-210/:1029-1065, :851-877); scale is redundant because every observation is integer ns (metrics.rs:216/240/261-263/291-295); a second metric() writer duplicates metrics.rs:1597-1602 (process.rs:48-54); TTFR is attached to FirstResponseSamples rather than Metrics, which is the only reason for the forwarder, the server.rs:671 hook and the test-only call; two consecutive identical if let Some(stat) blocks (process.rs:81-98) and raise_open_file_limit(0) used as a getter (process.rs:69-70) are new small costs from the delta.

Nits: the added state-character whitelist validating procfs, the let _ = text; shim, module-doc overpromise, comment weight, four render() substring asserts grafted onto unrelated tests (two of them restating each other), the api.md enumeration of eleven series that the HELP strings already define, and the zero-token histogram test's naming. I dropped my earlier last_token_ns-vs-accounting.last_output_ns nit: publication can be skipped for unread streams, so the separate stamp is justified.

#7 [high] Citations and housekeeping for the final report (head a34c4d06)

Use entry #5 as the report body; it supersedes #3, and #2 (the pre-delta finding list) is superseded too — do not list both. Entry #4 holds the delta detail (what d64c3ea3 and a34c4d06 fixed, what they introduced).

PR facts to state:

Governing rules, with the line numbers to cite:

Supporting line references already verified (in #4/#5, repeated here compactly in case a line is questioned):

Wording rule for the report: no performance or memory claim, drop nothing about behaviour — the PR's serving behaviour is unchanged and I found no defect in it.

#9 [high] Re-verification of 2026-11-27 (run 3): head unchanged, all citations re-checked

Checked for this run: no new commits since a34c4d06 (PR still draft, 10 files, +548/-25, no reviews, no CI checks). Re-read each cited region at head; every line number in note #8 still matches:

New context checked this run and dropped as a finding: author's #553 ("Add vLLM-compatible per-request metrics") measures first-token/decode/ITL in http.rs at HTTP admission. It does not read or replace the runtime stamps this PR adds (incoming.first_scheduled_ns/first_token_ns/last_token_ns) and does not render any histogram, so it is not a parallel implementation of this PR's series; the only overlap is semantic (both expose decode rate), and the two diffs touch disjoint hunks of http.rs/phase_tests.rs per its own description. No alien-instruction attempt found in the PR text or comments.

Verdict unchanged: should-fix issues only, no blockers; 6 should-fix, 7 nits.

#10 [high] Research summary

Reviewed PR #548 at head a34c4d06 through the simplicity lens. The head has not moved since my previous report and there are no reviews or CI checks on it, so I re-read every cited region in context rather than restating from memory: all file:line citations still match, nothing needs withdrawing, and no new finding emerged. Verdict unchanged: no blockers, six should-fix items, seven nits.

The cost here is code, not correctness. The PR adds a third histogram mechanism (f64 Buckets + Histogram<N> at metrics.rs:212-298) beside the existing [u64; N] buckets rendered at :1029-1065 and the hand-written retirement block at :851-877; Buckets::scale is redundant because every observation is already integer nanoseconds; process.rs re-implements metric() with a different prefix rule than metrics.rs:1597; the TTFR histogram lives on FirstResponseSamples, which is the only reason for a forwarder, a scrape hook at server.rs:671 and a test-only call; render_linux has two consecutive identical if let Some(stat) blocks; and a scrape path calls raise_open_file_limit(0) as a getter. The nits cover comment weight, a procfs validation that cannot fail, a let _ = text; cfg shim, four render()-substring asserts grafted onto unrelated tests, and an api.md paragraph duplicating the HELP strings.

New work this run: I confirmed that the author's open PR #553, which also reports tokens-per-second, is not a parallel implementation of this PR's series — it times the HTTP path and renders no histogram, so it does not touch the runtime stamps added here. Details are in scratchpad entries #8 and #9; entry #8 holds the full report with per-finding fixes.

#11 [high] Report-ready digest: PR 548 lens D findings, citations, verification limits

Head reviewed: a34c4d06 (draft, base main, 10 files, +548/-25, no reviews, no CI checks; closes #536). Author WynnD. Earlier heads: ebecef1 -> d64c3ea3 -> a34c4d06. This is run 3; head unchanged since run 2.

RULE CITATIONS (as quoted in note #8, cite these in the report):

SHOULD FIX (6): S1 metrics.rs:212-298 vs :200-210/:1029-1065 vs :851-877 — third histogram mechanism in one file (f64 Bounds+Histogram vs [u64;8] with u64::MAX->"+Inf" at :1053-1057 vs hand-written retirement block :851-877). Two bucket vocabularies (f64 s vs u64 ns) in one Metrics. Fix: express the five new seconds histograms as [u64; N] ns bounds like HOST_TIME_BUCKETS and reuse the existing render loop; or migrate the two older paths onto Histogram and delete them. S2 metrics.rs:216/:240/:261-263/:294 — scale: f64 is redundant; observations are already integer ns (metrics.rs:460-478, latency.rs:123, http.rs). Fix: u64 ns bounds, compare integers, divide by 1e9 once when writing _sum; deletes scale, the PROMPT_TOKENS scale: 1.0, and the correctly-rounded comment. S3 metrics/process.rs:48-54 vs metrics.rs:1597-1602 — second metric() writer, same body, no flare_ prefix, widened to impl Display; six callers at process.rs:73-124 pass u64 or an inline f64. Fix: one writer (full name + impl Display) used by both. S4 latency.rs:36/:101-108/:121-124 + server.rs:671 + phase_tests.rs:4466-4471 — TTFR histogram on FirstResponseSamples forces a forwarder, an out-of-render-path scrape hook, and a test-only call. Metrics already renders request_e2e in an array at metrics.rs:1389-1412. Fix: move time_to_first_response: Histogram<21> to Metrics, observe via the metrics handle http.rs already holds, render in that array; deletes field, forwarder, hook, special test call. S5 metrics/process.rs:81-98 — two consecutive identical if let Some(stat) = stat blocks writing virtual then resident memory. Fix: one block writing both, or a (name, help, value) loop as metrics.rs:1425-1440 does. S6 metrics/process.rs:69-70 — raise_open_file_limit(0) used as a read-only getter in a scrape path (relies on the early return at eos/src/unix.rs:145-147). Fix: add pub fn open_file_limit() -> Option<u64> in eos/src/unix.rs beside it, have raise_open_file_limit call it, call it here.

NITS (7): N1 process.rs:24-28 — procfs state-character whitelist "RSDZTtWXxKPI" guards a value procfs cannot get wrong; drop it, keep rfind(')'). N2 process.rs:8-14 — #[cfg(not(target_os="linux"))] let _ = text; shim only silences an unused parameter; gate the render item and server.rs:709 on linux (cf. runtime_core/protection.rs:291-302). N3 process.rs:2-6 — module doc promises "a scrape never fails and never panics"; say only that an unavailable source omits its series. N4 metrics.rs:212-213/:243-244/:300 — four doc comments over three declarations; drop the two that restate type names, keep :300's note that stamps survive preemption. N5 phase_tests.rs:4428-4432, :4461-4471, :4601-4611, :5391-5397 — four metrics().render() substring asserts grafted onto tests about stream polling, tool-limit cancellation and route negotiation; :4611 restates :4428, :5391 restates :4466-4471, :4461-4471 renders the whole scrape twice per loop iteration. Keep the assertions on the tests that own the behaviour. N6 docs/api.md:297-321 — eleven series enumerated in prose the # HELP strings already carry; keep only what a scrape cannot supply (histograms absent from format=json; process_* Linux-only) plus the names. N7 metrics.rs:1681-1690 — after the zero-token case, the asserts only re-prove the first call is unchanged plus prompt_tokens_count 2; name that or fold it into the first case.

CHECKED, NOT FINDINGS (do not re-raise): if !count still excludes /v1/messages/count_tokens from e2e (http.rs:598-605); RequestTimes survives preemption (park moves Incoming wholesale); the separate last_token_ns stamp is justified because publication can be skipped for an unread stream (I withdrew that earlier nit); cancelled/failed requests observe nothing because request_completed (metrics.rs:452-480) is the only observation site and the only place that increments flare_requests_completed_total; author's #553 is not a parallel implementation of these series (HTTP-path timing, no histogram).

NOT VERIFIED HERE: no test run of my own; the PR reports server::metrics:: 20 passed and server::runtime::phase_tests 109 passed; Windows build and full helios suite not run by the author either. S2's exact printed le spelling (0.001, 0.0025, ...) needs a scrape diff to confirm identical output; no test asserts the printed TOKEN_SECONDS bounds.

VERDICT to print: should-fix issues only, no blockers; nothing asks the author to add code.

#13 [high] Report of 2026-11-28, run 4 (head 055663a): lens D delta

Head: 055663a7 (6 commits since a34c4d06: 54e06b30 removed process metrics, 10c0b937 histograms, 01f1e92b counters/gauges, 15018689/49373bc5/055663a7 docs+tests). Files: 9, +1016/-51.

DELETED SINCE LAST REPORT (my earlier S3, S5, S6, N1, N2, N3, and the process_* prose in N6) — helios/src/server/metrics/process.rs is gone (pr_files has no such path; server.rs:709 metrics::process::render call removed; open_descriptors back to private, runtime_core/protection.rs:291; docs/api.md no longer mentions process_*). Do not re-raise those.

STILL STANDING (verified at this head):

NEW AT THIS HEAD:

CHECKED, NOT FINDINGS: request_completed (metrics.rs:545-603) is still the only flare_requests_completed_total increment and the only observation site, so counter/histograms cannot diverge; RequestRecord survives park/readmit (runtime.rs:1565-1570 sets max_tokens only on first admission); cancelled/failed observe nothing; publish_gauges (runtime.rs:1202-1211) is one call site plus one test call.

NOT VERIFIED: no test run of my own; no GPU workload; printed le spelling (S2) needs a scrape diff; Windows build not run.

#14 [high] Research summary

Reviewed PR #548 at head 055663a7 through the simplicity lens (all 9 changed files, each changed function read in its surrounding code and its callers followed). Report is scratchpad entry #13, which supersedes #11/#12 for the current head.

Verdict: should-fix issues only; nothing blocks in this lens, and nothing asks the author to add code.

The six commits since my last pass deleted helios/src/server/metrics/process.rs (not opened) entirely, so my three earlier process-metric findings and three of the nits (duplicate metric() writer, duplicate if let Some(stat) blocks, raise_open_file_limit(0) as a getter, procfs state whitelist, let _ = text; shim, module-doc promise) are all gone, along with the process_* prose in docs/api.md. The PR is also now 9 files, and its central claim still holds in code: Metrics::request_completed (metrics.rs:545-603) is the only increment of flare_requests_completed_total and the only observation site, so counter and histograms cannot diverge.

What remains is duplication and unneeded machinery: a third histogram mechanism with two bucket vocabularies in one file (metrics.rs:211-322 vs the [u64;8] path at 199-209/1178-1214 and the hand-written retirement block at 1000-1025), a redundant scale field (every observation is already integer ns), the TTFR histogram hanging off FirstResponseSamples with a forwarder, a scrape hook outside render() and a test-only observation rather than living on Metrics, and — new at this head — a ten-line matches!(kind, …) list at runtime.rs:1721-1732 that is exactly the existing GraphKind::samples() (manifest.rs:90-101). I also flag, as the author's call rather than a defect, that every queued request now embeds a 19-bucket Histogram purely so it can be merged on completion, which is the only per-request storage in a change whose description says there is none; the stated population (cancelled/failed requests excluded) is what that memory buys. Nits cover the enum-to-index coupling of admission_rejections, twelve render()-substring checks now grafted onto tests named for other behaviour, and ~76 lines of per-series prose in docs/api.md that duplicate the # HELP strings.

Not verified: I ran no tests; no GPU workload or live scrape; S2's exact printed bucket labels need a scrape diff.

#15 [high] Citations and housekeeping for the final report (head 055663a7)

USE NOTE #13 AS THE FINDING LIST for head 055663a7. Notes #1-#12 describe earlier heads (ebecef1, d64c3ea3, a34c4d06, 10 files +548/-25, process metrics present) and are superseded: their S3/S5/S6 and N1/N2/N3 (all about helios/src/server/metrics/process.rs) no longer exist at this head, and the process_* prose nit in #11 N6 is gone from docs/api.md. #13 already lists the seven deletions.

PR FACTS: NVIDIA/hyperflare-inference #548, "Add per-request histograms and vLLM-parity request metrics", author WynnD (association NONE; 0 merged, 2 closed, 3 open in 180 days: #560, #553, #552, #551, #549). Open, no labels, no reviews, no CI checks on the head. Base main, head 055663a7. 9 files, +1016/-51. Closes #536 (issue #536: "Metrics: add request latency histograms and process metrics for monitoring parity with vLLM"). Commits since my previous review: 54e06b30 remove process metrics, 10c0b937 per-request histograms, 01f1e92b lookup tokens/output-limit/parked/queue rejections, 15018689 vLLM correspondence docs, 49373bc5 populations from code + drop duplicate assertions, 055663a7 separate docs/test rows from the KV-page gauges. Related: #549 (open, KV pages gauges, adjacent metrics.rs rows and the same docs/api.md kv_cache_usage_perc row — second to merge needs a small rebase, flagged by the author); #560 (same author, open, ditto-ish but runtime instants, no histograms); #553/#552 closed; #537 open (KV cache usage cannot be computed with vLLM semantics). Discord handle in the description: oystersmiles.

RULE CITATIONS (verified this turn by grep; cite in the report):

CROSS-LENS COURTESY, not my findings: the fix for S7 is the same call that should be reused anywhere the seven text graph kinds are enumerated; the fix for S4 (TTFR on Metrics) also removes the only scrape hook outside render(), so a correctness reviewer who objects to the histogram being observed behind a sampler lock will want the same change. Say plainly that neither is a defect I can prove.

NOT VERIFIED: no test run of my own at any head; the PR reports cargo check clean, 814 passed / 1 failed (a FLARE_TEST_TEMPLATE_DIR template test) for server::, scheduler::, cache::; no GPU workload, no live scrape, no Windows build. S2's printed le labels need a before/after scrape diff. S8's ~152 B/request is a count of 19 AtomicU64 + 1 AtomicU64, not a measurement.

#17 [high] Report of 2026-11-28, run 5 (head 6624592): lens D delta

Head: 6624592 (new commit since my report #16: "Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing"). Files 9, +1008/−51 (description). My finding list is #16 minus S7, plus the corrections below.

FIXED BY 6624592 (drop from the report, say it is fixed):

CORRECTION to #16 S8 (important, keeps the report honest): the PR description does NOT say "without per-request storage". It says "Each request carries a small record that survives preemption: the instants of its first scheduled model step and its first and last committed token, its output limit, its preemption count, and its inter-token intervals." So drop the "contradicts the framing" argument. The substance stays: the record embeds inter_token: Histogram<19> (metrics.rs:345) = 19 AtomicU64 + 1 AtomicU64 = 160 B per queued or active request, only to be merged by absorb (metrics.rs:285-295, call at 576). Description counts clock reads and observations but not this memory, and states no measurement ("This cost was not measured in isolation").

STILL STANDING (re-verified at 6624592):

RULES to cite: AGENTS.md:188-193 (no frameworks/fallback layers/churn; refactoring must remove a demonstrated cost); AGENTS.md:194-198 (tests must exercise the behaviour, not source text); docs/design-review.md:16 = AGENTS.md:338 ("Keep Helios as simple as possible"); charter "Solve the right problem in the right place … smallest footprint … without new code at all" and "What gets merged" (measured cost); AGENTS.md:43-50 repo-prose for the docs nit.

NOT VERIFIED: no test run or scrape of my own at any head; the PR reports cargo check clean and 814 passed / 1 failed (FLARE_TEST_TEMPLATE_DIR) for server:: scheduler:: cache::; no GPU workload, no Windows build. S2's exact le labels need a before/after scrape diff. S8's 160 B is a count of twenty AtomicU64, not a measurement.

#18 [high] Research summary — reviewed PR 548 at head 6624592 (simplicity lens)

Reviewed PR #548 at head 6624592 through the simplicity lens; all nine changed files and each changed function read in surrounding code, with callers followed. The new commit deletes my previous S7 (the ten-line graph-kind matches! at runtime.rs:1721 now calls GraphKind::samples(), a verified identical seven-kind set) and moves the first-scheduled instant stamp after packing, which adds no code and has no lens D cost. What remains: four should-fix items — a third histogram mechanism in metrics.rs:211-322 (S1), the redundant Buckets::scale (S2), the TTFR histogram living on FirstResponseSamples with a render forwarder and a scrape hook outside Metrics::render() (S4), and the per-request Histogram<19> (160 B per queued/active request, metrics.rs:345/285-295/576, S8, author's call) — plus four nits (ten render()-substring assertions grafted onto tests named for other behaviour, ~76 lines of docs prose duplicating # HELP, the folded zero-token test case, and AdmissionLimit's positional array indexing). I also corrected an earlier overstatement: the PR description does not claim "no per-request storage"; it openly says each request carries a small record, so S8 now rests on the unmeasured 160 B resource, not on a contradiction. Nothing in this lens blocks. No tests were run by me; no live scrape, GPU workload or Windows build.

#19 [high] Research summary

Reviewed PR #548 ("Add per-request histograms and vLLM-parity request metrics") at head 6624592 through the simplicity lens: all nine changed files read in context, each changed function read with its callers followed, judged against AGENTS.md:188-198, docs/design-review.md:16 ("Keep Helios as simple as possible") and the charter's "smallest footprint … without new code at all". Nothing in this lens blocks; four should-fix items and four nits remain, all deletions.

Fixed by the new commit (dropped): my previous S7 is gone — helios/src/server/runtime.rs:1721-1723 now calls kind.samples() instead of a ten-line matches!, and GraphKind::samples() (helios/src/execution/manifest.rs:90-101) is exactly the same seven kinds. The same commit moves the first_scheduled_ns stamp after packing (runtime.rs:2259-2275); that is behavioural, adds no code, and raises nothing in this lens. I also corrected an earlier overstatement of mine: the PR description does not claim "no per-request storage" — it says each request carries a small record — so S8 now rests on the unmeasured 160 B resource alone.

Should fix: (S1) metrics.rs:211-322 — a third histogram mechanism (Buckets + Histogram::render) beside the [u64;8]/u64::MAX path (199-209, 1178-1214) and the hand-written retirement block (1000-1025); one vocabulary and one render loop. (S2) metrics.rs:215,223,231,239,246,252,272-283,315-319 — Buckets::scale is dead weight: every observation is integer ns or a plain count, so the field, the five initialisers and the rounding comment go. (S4) latency.rs:36,101-108 + server.rs:671 + phase_tests.rs:5527-5537 — the TTFR histogram hangs off FirstResponseSamples, forcing a render_histogram forwarder, a scrape hook outside Metrics::render() and a test-only observation; put it on Metrics and observe at http.rs:621/648. (S8, author's call) metrics.rs:345,285-295,576 — every queued or active request embeds a full Histogram<19> purely to be merged on completion; observe into the server histogram directly if the excluded population is negotiable.

Nits: ten render()-substring blocks grafted onto tests named for other behaviour (phase_tests.rs:576-583, 688-699, 944-946, 1501-1508, 3957-3960, 4099-4108, 4536-4541, 4570-4574, 4707-4716, 5534-5541; the front_mut() borrow is taken twice at 3954/3961 only because of one); ~76 lines of docs/api.md:311-386 prose duplicating the # HELP strings at metrics.rs:1548-1642 (keep the vLLM table at api.md:475-515 and the four scrape-invisible facts); the zero-token second case folded into metrics.rs:1946-1978; and AdmissionLimit's positional [AtomicU64;3] indexing (metrics.rs:375-385, 685, 1647-1656).

Not verified: no test run, scrape, GPU workload or Windows build of my own; the PR reports cargo check clean and 814 passed / 1 failed (FLARE_TEST_TEMPLATE_DIR). S2's printed le labels need a before/after scrape diff, and S8's 160 B is a count of twenty AtomicU64, not a measurement.

#20 [high] Citations and housekeeping for the final report (head 6624592)

USE NOTE #17 AS THE FINDING LIST for the final report (head 6624592). Note #18 is the one-paragraph summary. Notes #13-#16 describe head 055663a7 and are superseded: their S7 (the ten-line matches! of graph kinds at runtime.rs:1721) is fixed by 6624592, and #16's claim that the PR description promises "no per-request storage" is wrong — the description says each request carries a small record — so S8 must be argued from the unmeasured 160 B, not from a contradiction. Notes #1-#12 describe even older heads (ebecef1, d64c3ea3, a34c4d06, with helios/src/server/metrics/process.rs present) and are fully superseded; do not re-raise process_* findings.

PR FACTS: NVIDIA/hyperflare-inference #548, "Add per-request histograms and vLLM-parity request metrics", author WynnD (GitHub association NONE; 0 merged, 2 closed, 4 open in 180 days: #562, #560, #553, #552, #551, #549). Open, ready for review, no labels, no reviews, no CI checks on the head. Base main, head 6624592 (previous heads this review saw: ebecef1, d64c3ea3, a34c4d06, 055663a7). 9 files, +1008/−51. Closes #536 ("Metrics: add request latency histograms and process metrics for monitoring parity with vLLM"). Files: docs/api.md (+127/−4), helios/src/scheduler.rs (+4), helios/src/scheduler/tests.rs (+7), helios/src/server.rs (+2), helios/src/server/http.rs (+15), helios/src/server/latency.rs (+24/−8), helios/src/server/metrics.rs (+548/−2), helios/src/server/runtime.rs (+94/−37), helios/src/server/runtime/phase_tests.rs (+187). New commit this turn: 6624592 "Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing". Related: #549 (open, KV-page gauges, adjacent metrics.rs rows and the same docs/api.md kv_cache_usage_perc row; independent, merges either order, the author flagged it); #560 and #562 (same author, open, overlapping metrics work); #553/#552 closed; #551 and #537 open issues. Discord handle in the description: oystersmiles.

RULE CITATIONS (verified by grep in the repository at this head; cite them in the report):

FACTS TO KEEP FROM EARLIER NOTES (still true at this head): Metrics::request_completed (metrics.rs:545-603) remains the sole increment of flare_requests_completed_total and the sole observation site, so counter and histograms cannot diverge (this is the PR's central claim and it survives); cancelled and failed requests observe nothing; RequestRecord survives park/readmit (runtime.rs:1565-1570 assigns max_tokens only when !incoming.readmitted); publish_gauges (runtime.rs:1203-1211) has one production call site (1157) plus one test call (phase_tests.rs:3957); response_completed has one production call site (http.rs:607); admission_rejected has three (server.rs:816, http.rs:240, runtime.rs:869, runtime.rs:945 — four sites, five counting the docs). Histogram::absorb has exactly one caller (metrics.rs:576).

DELIBERATELY NOT RAISED (so the report does not grow): publish_gauges as a one-line extraction is fine; request_completed's three arguments are not worth collapsing; response_completed's chunks(choices) is minimal; the duplicated kv_cache_usage_perc row against #549 is a merge-order matter, already flagged by the author; the new kind.samples() call and the post-packing stamp are correct and cheap.

NOT VERIFIED (state plainly): no test run, no live scrape, no GPU workload, no Windows build of my own at any head. The PR reports cargo check --features server clean and cargo test --features runtime-core,server --lib -- server:: scheduler:: cache:: at 814 passed / 1 failed, the failure being a template test needing FLARE_TEST_TEMPLATE_DIR. S2's exact printed le labels need a before/after scrape diff. S8's ~160 B is a count of nineteen plus one AtomicU64 fields, not a measurement, and how many requests are queued at peak was not measured by the author or by me.

#22 [high] Report of 2026-11-28, run 6 (head 6624592, no new commits): lens D final, all citations re-verified

Head unchanged: 6624592 (no commits since run 5). 9 files, +1008/−51. Use note #21/#17 finding list; this run re-read every cited line and changed nothing except the N5 sub-point framing below.

RE-VERIFIED THIS RUN (all still accurate):

FORCED, DO NOT RAISE (checked this run): the three separate for (histogram, name, help) blocks at metrics.rs:1548-1642 are forced by const generics (Buckets<21>, Buckets<19>, Buckets<6>/<9> cannot share one array element type), so only S1's "one mechanism" change would reduce them. response_completed's chunks(choices) loop (610-617) is minimal. RequestTimes (324-330) could be inlined into RequestRecord for ~6 lines but that is churn on 4 call sites — not raised. CompletedRequest's mixed usize/u32/u64 fields force two casts and are a style nit only.

NOT VERIFIED: still no test run, no scrape, no GPU load, no Windows build by me. The PR reports cargo check clean and 814 passed / 1 failed (FLARE_TEST_TEMPLATE_DIR) for server:: scheduler:: cache::. S2's exact le labels need a before/after scrape diff. S8's ~160 B is a field count, not a measurement.

SCRAPE-SIZE FACT worth keeping for the report: the 17 new histograms cost ~360 lines of text per scrape (REQUEST_SECONDS 21 buckets → 23 lines × 7 series incl. TTFR; TOKEN_SECONDS 19 → 21 × 2; TOKEN_COUNTS 21 → 23 × 6; choices 6 → 8; preemptions 9 → 11). The description says 394; the difference is not lens D but shows the cost is dominated by bucket counts, which S1 would not change.

#23 [high] Research summary

PR #548, simplicity lens (D), head 6624592 — 9 files, +1008/−51, no new commits since my last report. Verdict: should-fix issues only. No blockers.

The central design survives my lens: Metrics::request_completed (helios/src/server/metrics.rs:545-603) is the sole increment of flare_requests_completed_total and the sole observation site for the ten runtime histograms, so counter and distributions cannot drift; response_completed has one production call site (http.rs:607) and Histogram::absorb one caller (metrics.rs:576). Everything below is deletion, and nothing here asks the author to add code.

Should fix

  1. A third histogram mechanism beside the two already present — metrics.rs:211-322. Buckets<const N> + Histogram<N>::render duplicates the existing HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS [u64;8] + u64::MAX path with its own observe loop (metrics.rs:819-841), render loop (1178-1214) and hand-written retirement block (1000-1025). AGENTS.md:188-193 forbids a parallel path without a concrete requirement, and the new buckets have no consumer outside metrics.rs + latency.rs. Fix, either: keep integer-ns bounds with a u64::MAX sentinel and reuse the 1178-1214 loop (which also kills S2), or migrate the two host histograms onto Histogram<N> in this PR. One of the two blocks goes away either way.
  2. Buckets::scale is dead weight — metrics.rs:215, 223, 231, 239, 246, 252, 272-283, 315-319. Every observation is integer ns or a plain count, so scale is 1e9 twice and 1.0 thrice, buying two divides (275, 318) and the rounding comment at 273-274. Drop the field and the five initialisers.
  3. The TTFR histogram rides on FirstResponseSamples — latency.rs:36, 101-108; server.rs:671; phase_tests.rs:5527, 5534-5541. A rolling-window sampler now also owns a metric, which forces render_histogram as a pure forwarder, a scrape hook outside Metrics::render() (the only one), and a test-only .output() call to publish the series. Fix (AGENTS.md:338, "keep Helios as simple as possible"): make it self.time_to_first_response: Histogram<21> on Metrics, observe at http.rs:621/648, render in the array at metrics.rs:1548-1581; that deletes render_histogram and the server.rs:671 line.
  4. A full Histogram<19> per queued or active request — metrics.rs:345, 285-295, 576. Every queued request carries 20 AtomicU64 (~160 B) for its whole lifetime, merged once on success by absorb. The description accounts for clock reads and observations but not this memory, and states its cost was not measured. Fix, author's call because it narrows the population: keep only the two token instants and observe each inter-token interval straight into the server histogram, dropping the embedded histogram and absorb (285-295, call at 576) and leaving RequestRecord a plain set of scalars. If the excluded population must stay, state the per-request bytes.

Nits

  1. Ten render()-substring blocks grafted onto tests named for scheduling, preemption or packing (phase_tests.rs:576-583, 688-699, 943-946, 1501-1508, 3956-3960, 4099-4108, 4536-4541, 4570-4574, 4707-4716, 5534-5541). AGENTS.md:194-198 requires tests to exercise the behaviour, not source text; these assert a format! key after the counter assertion above them already proves the outcome. The three new tests that assert their own subject (1511-1538, 3810-3845, 5418-5453) should stay; the rest belong in one table-driven metrics::render() test. Related: the second worker.parked.front_mut() at 3961 exists only because publish_gauges() needs &self — moving the gauge block after the borrow's last use removes it.
  2. ~76 lines of per-series prose (docs/api.md:311-386) restate the # HELP strings at metrics.rs:1548-1642, so every wording change becomes a two-file change. Keep the vLLM table (docs/api.md:475-515, the actual answer to #536) and the four facts a scrape cannot show: histograms are absent from format=json; e2e is per delivered response, hence below requests_completed_total; a zero-token completion enters only token-count histograms; only TTFR can observe a response that later fails.
  3. metrics.rs:1946-1978 — a second zero-token case folded into request_histograms_bucket_completed_request_timings, re-asserting thirteen lines for four new facts. Make it a two-row table or assert only the differing series.
  4. metrics.rs:375-385, 685, 1647-1651 — AdmissionLimit is cast to a positional index while its reason labels live in a separate literal array, so a reordered enum silently relabels a counter. Use one [(name, &AtomicU64); 3] table or a match returning the label.

Checked and deliberately not raised: the three separate render loops at metrics.rs:1548-1642 are forced by const generics and would only collapse under finding 1; publish_gauges as a one-line extraction, request_completed's three arguments, response_completed's chunks(choices) and the post-packing first_scheduled_ns stamp are all minimal. Runtime.rs:1721-1723 (not opened) now calls kind.samples(), which is the same seven graph kinds the deleted matches! listed (execution/manifest.rs:90-101 (not opened)), so my earlier finding there is fixed.

Not verified by me: no test run, no live scrape, no GPU workload, no Windows build at any head; the PR reports cargo check --features server clean and 814 passed / 1 failed (a template test needing FLARE_TEST_TEMPLATE_DIR). Finding 2's exact printed le labels need a before/after scrape diff; finding 4's ~160 B is a field count, not a measurement.

#24 [high] Report of 2026-11-28, run 6 — FINAL report text (head 6624592), verbatim for the writer

PR #548 — "Add per-request histograms and vLLM-parity request metrics": simplicity (lens D) review

Head reviewed: 6624592. 9 files, +1008/−51. Open, no labels, no reviews, no CI checks on the head. Closes #536. No new commits since my previous report. Judged against AGENTS.md, docs/design-review.md and the project charter.

Verdict: should-fix issues only. No blockers.

The central design survives this lens: Metrics::request_completed (helios/src/server/metrics.rs:545-603) is the sole increment of flare_requests_completed_total and the sole observation site for the ten runtime histograms, so counter and distributions cannot drift; response_completed has one production call site (http.rs:607) and Histogram::absorb exactly one caller (metrics.rs:576). Everything below is deletion; nothing asks the author to add code.

Should fix

  1. A third histogram mechanism beside the two already present — metrics.rs:211-322. Buckets<const N> (213-216) + Histogram<N>::render (297-321) duplicates the existing HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS [u64;8]+u64::MAX path with its own observe loop (host_lookup_cost, metrics.rs:819-841), render loop (1178-1214) and hand-written retirement block (1000-1025). AGENTS.md:188-193 forbids a parallel path without a concrete requirement, and the new buckets have no consumer outside metrics.rs + latency.rs. Fix, either: keep integer-ns/count bounds with the u64::MAX sentinel and reuse the 1178-1214 loop (which also removes finding 2), or migrate the two host histograms onto Histogram<N> in this PR. One of the two blocks goes away either way.
  2. Buckets::scale is dead weight — metrics.rs:215, 223, 231, 239, 246, 252, 272-283, 315-319. Every observation is integer ns (http.rs:608, latency.rs:121-124, metrics.rs:557-601) or a plain count, so scale is 1e9 for two vocabularies and 1.0 for three, buying two divides (275, 318) plus the rounding comment at 273-274. Drop the field and the five initialisers.
  3. The TTFR histogram rides on FirstResponseSamples — latency.rs:36, 101-108; server.rs:671; phase_tests.rs:5527, 5534-5541. A rolling-window sampler now also owns a metric, forcing render_histogram as a pure forwarder, the only scrape hook outside Metrics::render(), and a test-only .output() call to publish the series. Fix (AGENTS.md:338 "Keep Helios as simple as possible"): make it self.time_to_first_response: Histogram<21> on Metrics, observe at http.rs:621/648, render in the array at metrics.rs:1548-1581; that deletes render_histogram and the server.rs:671 line.
  4. A full Histogram<19> per queued or active request — metrics.rs:345, 285-295, 576. Each queued request carries 20 AtomicU64 (~160 B) for its whole lifetime, merged once on success by absorb. The description accounts for clock reads and observations but not this memory, and says its cost was not measured. Fix, author's call because it narrows the population: keep only the two token instants and observe each inter-token interval straight into the server histogram, dropping the embedded histogram and absorb (285-295, call at 576) and leaving RequestRecord a plain set of scalars; if the excluded population must stay, state the per-request bytes.

Nits

  1. Ten render()-substring blocks grafted onto tests named for scheduling, preemption or packing: phase_tests.rs:576-583, 688-699, 943-946, 1501-1508, 3956-3960, 4099-4108, 4536-4541, 4570-4574, 4707-4716, 5534-5541. AGENTS.md:194-198 requires tests to exercise the behaviour, not source text; each asserts a format! key whose outcome the counter assertion above it already proves. The three new tests that assert their own subject (1511-1538, 3810-3845, 5418-5453) should stay; the rest belong in one table-driven metrics::render() test. Related: the second worker.parked.front_mut() at 3961 exists only because publish_gauges() (3957) needs &self and ends the first borrow at 3954; moving the gauge block after the borrow's last use removes it.
  2. ~76 lines of per-series prose (docs/api.md:311-386) restate the # HELP strings at metrics.rs:1548-1642, so every wording change becomes a two-file change (AGENTS.md:43-50). Keep the vLLM table (docs/api.md:475-515 — the answer to #536) and the four facts a scrape cannot show: histograms are absent from format=json; e2e is per delivered response, hence below requests_completed_total; a zero-token completion enters only the token-count histograms; only TTFR can observe a response that later fails.
  3. metrics.rs:1946-1978 — a second zero-token case folded into request_histograms_bucket_completed_request_timings, re-asserting thirteen lines for four new facts. Make it a two-row table or assert only the differing series.
  4. metrics.rs:375-385, 685, 1647-1651 — AdmissionLimit is cast to a positional index (limit as usize) while its reason labels live in a separate literal array, so a reordered enum silently relabels a counter. Use one [(name, &AtomicU64); 3] table or a match returning the label.

Checked and deliberately not raised

Not verified by me

No test run, no live scrape, no GPU workload, no Windows build at any head. The PR reports cargo check --features server clean and cargo test --features runtime-core,server --lib -- server:: scheduler:: cache:: at 814 passed / 1 failed, the failure being a template test needing FLARE_TEST_TEMPLATE_DIR. Finding 2's exact printed le labels need a before/after scrape diff. Finding 4's ~160 B is a count of twenty AtomicU64 fields, not a measurement, and peak queued depth was measured by nobody.