Verdict: worth merging, with changes — the newest commit is a clean subtraction, and what remains is small, doc-level, plus one bucket-range fix
At head 66245920 (#548, 9 files, ~+820/−60) the change is additive and read-only on the serving path: it fills an observability surface the project already documents and already maintains, with no flag, no dependency, no model branch, and no JSON change. The one commit since my last pass made the diff smaller and removed a duplicated kind list. I re-derived every serving-path claim from the code at this head rather than carrying earlier findings forward.
1. What the new commit changed, and whether it is safe
66245920 ("Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing") touches only helios/src/server/runtime.rs, two hunks:
runtime.rs:1721-1723now gatesmodel_steponkind.samples(). That predicate already exists onmain(execution/manifest.rs:89-101) covering exactly Prefill, TerminalPrefill, ScoredPrefill, Decode, Speculative, Mixed, Resume, and already gates logprob binding validation (manifest.rs:944) and submission (transport.rs:1319,:1334,runtime.rs:2948). It means "this graph samples from logits", i.e. exactly a text model step. Net −9 lines, no population change; the inline list it replaced held the same seven kinds.runtime.rs:2259-2275:first_scheduled_nsis now stamped afterpack_inputs/pack_visioninstead of straight afterscheduler.commit. Still one clock read per submitted step (reserve_and_packis called once, fromsubmitatruntime.rs:2302), and a failed pack leaves the field unset through?, so the comment is true. One consequence for the docs: CPU pack cost now falls in queue time and out of prefill time, whiledocs/api.md:329-331still says "the first model step that includes the request". (Also:reserve_and_packcommits and packs beforeexecutor.submitcan refuse at:2374-2381, so a stamped step may never execute. Harmless — a submit error tears the worker down and the request never completes — but a reviewer should know.)
Nothing regressed. The --features server build break and the duplicated process collector remain gone (search_code for process_cpu_seconds|process_resident|open_fds|process_start_time finds nothing under helios/src), and crate::runtime_core does not appear under helios/src/server outside a cfg(all(test, feature = "runtime-core")) module.
2. Why it is worth doing, against the charter
- The gap is real and the beneficiary is specific. The only latency series today is
flare_first_response_median_seconds, a 60-second median gauge: no P95/P99, no re-windowing, no cross-instance aggregation — precisely #536's argument. One scrape now yields tail latency, queue delay, prefill, decode, TTFT, inter-token latency, request sizes, preemptions, and queue-limit rejections. #536 asks for seven of these by name and the PR supplies all seven, plusrequest_inference_seconds,request_max_tokens,request_choices,request_max_choice_generated_tokens, andmodel_step_tokens. - The larger beneficiary is the maintainers' own workflow. "Bring real evidence" and "a measured performance/memory issue" both require per-phase measurement, which Flare lacks.
- Real downstream consumers exist. #549 (KV pages) is adjacent and, after commits
15018689/49373bc5, deliberately separated in docs and test rows. #560 is stacked on this PR, reusesRequestTimes(metrics.rs:324-330), and states #548 must merge first. #541's Grafana example needs series to plot; #552/#553 are closed and superseded. - Placement is right and is the cheapest available. Every observation hangs off
Metrics::request_completed(metrics.rs:540-616), which owns the onlycompleted.fetch_addin the crate (metrics.rs:558; the sole othercompleted.fetch_addinhelios/srcis an unrelated byte counter atcore/reader.rs:517(not opened)). Counter and histograms cannot drift — the charter's "smallest footprint in shared code". No per-model branch, no flag, no backend, no JSON field. - Cost is proportionate and disclosed. One relaxed
fetch_addper bucket per completed request; one monotonic clock read per submitted step; two stores per committing step, not per token (runtime.rs:1794-1796); 19 load/add pairs per completion to merge the per-request inter-token histogram. Memory:RequestRecord≈ 190 bytes per queued or active request; the server keeps 17 histograms totalling 326 bucket loads and ~400 exposition lines per text scrape, with no/procread and no blocking syscall. The description says the cost was not measured in isolation, which is honest. - No simpler path reaches the same end. Fixed-bucket histograms are the only way to get quantiles from one scrape without per-request storage;
helios/Cargo.toml(not opened) has no metrics crate, and adding one would be a larger, less pinned change than ~110 lines of atomics. Per-request samples or logged percentiles cost memory and still cannot aggregate across instances.
3. What still needs changing
(a) One histogram implementation, not two (main code ask). HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS (metrics.rs:199-209), host_cost_sums with its .position(..).unwrap() loop (:819-841), the hand-written render loop for the three host-cache histograms (:1178-1214), and flare_host_cache_retirement_seconds (:1000-1025) all bypass the new Buckets/Histogram (:211-322). Porting them is net-negative lines and leaves one path; shipping both invites the next author to copy the wrong one.
(b) The inter-token histogram saturates where the docs say it matters. TOKEN_SECONDS stops at 2.5 s (metrics.rs:226-232), yet docs/api.md:342-346 says the interval spanning a preemption includes the wait for readmission. Multi-second readmission waits therefore land in +Inf, so the one interval this project cares about is unquantifiable. vLLM's INTER_TOKEN_LATENCY_BUCKETS run to 80 s (vllm/v1/metrics/buckets.py on main). Either extend (5, 10, 20, 40, 80) or document the 2.5 s clamp. Related and cheaper to adopt than to argue about: vLLM's TIME_TO_FIRST_TOKEN_BUCKETS are denser below 100 ms (0.02, 0.04, 0.06, 0.08, 0.75) than the shared REQUEST_SECONDS Flare uses for TTFT — sub-100 ms is this project's interactive range.
(c) Soften "parity" in the description, and version the table. docs/api.md:475-482 is honest ("Flare exports no vllm: names"), :359-360 explicitly calls out the added zero preemption bound, and the mapping table names what Flare does not provide. But vLLM's series are vllm:-prefixed with model_name/engine labels, so no vLLM dashboard reads Flare's output unchanged; "dashboards and alerts written for vLLM read exactly these series" should become "the same questions are answerable". The table names no vLLM version, so it will silently rot.
(d) Closes #536 is only partly true. #536 asks for process_cpu_seconds_total, process_resident_memory_bytes, process_open_fds, and process_start_time_seconds. Commit 54e06b30 dropped them — correctly, they caused the build break and belong elsewhere — but closing #536 on merge silently drops four of the eight things requested. Split them into a follow-up issue or state the omission on the PR.
(e) Three missing documentation sentences. (i) pack cost now lands in queue time (new this commit); (ii) decode and time_per_output_token also absorb the parked interval, because the stamps run first→last committed token (metrics.rs:593-601); (iii) the second queue wait is never counted, because first_scheduled_ns uses get_or_insert (runtime.rs:2272). All three are what an operator scraping a preempted request will otherwise misread.
(f) Nit. http.rs:604-612 observes e2e before the body reaches the socket, so docs/api.md:311-312 "to the completed response" slightly overstates; "to the final encoded response body" is accurate.
(g) Authorization is still not on record. Under "What gets merged" — a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs — this is none of the five. #536 is a third-party feature request and the author is not one of the three named priority contributors. It is closest to "a capability gap in a surface the project already maintains" (docs/api.md §Health and metrics is an existing contract), but a maintainer should say so on the PR rather than leave it inferred.
4. Evidence quality
Specific and internally consistent: 24 completions equal the TTFT and generated-token histogram count deltas, the generated-token histogram sum (3,112) equals flare_generated_tokens_total, e2e count 22 equals delivered responses with the two tool-limit cancellations accounted for, and the added cost is declared unmeasured. 814 tests pass with one unrelated template-fixture failure; multi-GPU and Windows are correctly listed as not run. That meets the charter's bar for an observability change.
5. Ask list, in order
- Port the four host-cache histograms onto
Buckets/Histogramand delete the old constants, loop, and render block. - Extend the inter-token/TTFT bucket bounds (or document the 2.5 s clamp) and adopt vLLM's TTFT density below 100 ms.
- Soften the vLLM-dashboard sentence and pin the mapping table to a vLLM version.
- Do not silently close #536 — split the
process_*collector into a follow-up issue or note the omission. - Add the three missing sentences (pack time in queue, decode absorbs the parked interval, second queue wait uncounted).
- Maintainer sign-off that #536 authorizes the work.
With 1–3 done this is a small, well-placed, evidence-backed increment to a surface the project already maintains and documents. Worth merging with changes — and unlike earlier revisions, nothing here is a regression: the change is additive, read-only on the serving path, costs no dependency or flag, and each revision has strictly reduced the diff.
Nothing in this PR, its commits, or its discussion tried to direct me. The only non-technical comments are automated case-file notices; the PR text is a reviewable argument and I treated it as such. The external review links (autobot.eidonix.com) are unreachable from this environment, so no content from them was used — my findings come from the repository at head and from vLLM's own vllm/v1/metrics/buckets.py and loggers.py on main.