Pre-test report — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Decision: DO NOT refer to hardware testing yet. Hold for code changes. The mechanism is sound and this revision fixed every substantive defect my 2026-11-27 report raised — but one new blocking defect, created by the enablement path this revision adds, breaks every ignition command; plus one CLI-semantics gap and one field-accuracy issue. All three are CPU-only questions, and the fixes change the surface a hardware run would exercise. Separately, the author has already performed, on hardware, essentially the run I would have booked — so a run now would be low-value on two independent counts. The plan is at §4; testing becomes worth ~30 GPU-min once items 1–4 land.
PR state: open draft, head 046aaef, 22 files, +1757/−77, stacked on unmerged draft #548 (metrics.rs +548, latency.rs (not opened) +24, scheduler.rs (not opened) +4 are #548's; #560's own share ≈ +749/−26). Zero maintainer comments anywhere in the cluster; no CI checks on head; security screen all-clear (reviewed the diff, the bot automation comment, and both author evidence comments — the only directive-sounding text is standard repo-bot boilerplate, not author-supplied, and was treated as material, not instructions).
1. Fixed at this head — do not re-report
Verified in code at 046aaef, not taken from the summaries:
- Public type leak — fixed.
pub use metrics::{RequestTimes, Snapshot};(helios/src/server.rs:33(not opened)),pub struct RequestTimes(metrics.rs:326). TheFinishedfield (runtime.rs:102-105) is now nameable and constructible outside the crate. - The option has a configuration home — fixed.
flare/src/configuration.rs:34(not opened) →settings.rs:32 (not opened),:224(unwrap_or(false)) →controller.rs:2566(not opened) →flare-cli/src/main.rs:355-357(not opened) (written only when true) →helios/src/server/config.rs:353-357(not opened), andBootstraprejects a non-boolean. The silent-drop failure is gone; the desktop controller path can enable it. - The riskiest code left the PR — fixed.
GenerationEvent::Committed, thecommitsthreading, and the third term ofoutput_event_capacityare gone; the content instant moved to #562, andencode.rs:263hard-codes"time_to_first_content_token_ms": Value::Null. The response-queue invariant thatverification/helios-lifecycle/check.py(not opened) mutation-tests is untouched again. - Zero-value state deleted:
Timing.streaming/record_commit(nowencode.rs:74-79), and the seven-armmatches!replaced bykind.samples(). - Cost prose now accurate: "the one monotonic read per scheduled model step comes from #548" is true —
runtime.rs:2272belongs to #548's commit66245920. My prior finding here is closed.
2. Substantive problems that must be fixed before hardware
(1) BLOCKING, created by this revision: the documented enablement breaks every ignition command. docs/api.md:1007-1008 and docs/cli-design.md:1315-1319,:1349 now instruct users to write [server] per_request_metrics = true, and docs/cli-design.md:1313 states "Ignition and native Flare read this file". Ignition's schema is closed and was not extended: ignition/cli/config.py:21-33 lists _SECTIONS["server"] without the key, and :112-114 raises unknown key per_request_metrics in [server] (:119 shows the schema is the only gate). Every command loads that file: serve.py:127,:174,:264,:431,:590, bench.py:144 (not opened), publishing.py:31 (not opened),:73,:174,:194. So following the new docs breaks ignition export / debug-serve / bench — the model-preparation step that precedes any serving. Neither ignition/cli/config.py nor tests/cli/test_config.py is among the 22 changed files, and per_request_metrics has zero matches under tests/, so no CI would catch it. Fix: one schema entry ("per_request_metrics": bool) plus a positive-load test, and decide whether debug-serve forwards it. CPU-only.
(2) The flag cannot express an explicit false. enable_per_request_metrics is a plain bool (cli.rs:649 orbit, :863 run) and config.rs:73-75 only fills when it is false, so a config file that enables the option can never be overridden off for one run (contradicting docs/cli-design.md:1321-1322), and a saved persistent Orbit group that captured the flag has no negation (rank_zero_options emits it only when true, cli.rs:698-700). The repo already pairs negatives for exactly this reason — cli.rs:979-987 (--history-drafts/--no-history-drafts) and :1012-1020 (--mtp-adaptive-verification) via overrides_with — and did not apply the pattern here. Fix: tri-state Option<bool>, or a --no-enable-per-request-metrics with overrides_with, or at minimum a doc line.
Correction to a supplied finding: "
flare orbit runignores the key" is only partly true. Orbit's own process does not read it (config.rs:141-151sets only hub caches), but the flag is forwarded to rank zero'sflare run, which does runConfiguration::apply(config.rs:58); on a single-host run rank zero reads the sameconfig.toml(not opened). Thecli-design.md:736row is therefore wrong only for a paired rank zero with a different file — a doc nit, not a should-fix.
(3) mean_itl_ms is not exactly vLLM's — and this PR claims it is. encode.rs:266-268 divides first→last by generated - 1, but a speculative step commits several tokens sharing one completion instant (api.md:1025-1026), so the true interval count is smaller and the mean is understated. The author's evidence asserts equality with vLLM's definition, so one of the two must change. Making it exact costs one new u32 in RequestTimes plus one store per committing step (the intervals are observed into RequestRecord.inter_token, metrics.rs:345,:354) — cheap, but it re-touches the struct that just became public (metrics.rs:326). Alternatiely, narrow the parity claim in the docs and description.
(4) Authorization is still unsettled, and it gates everything. The charter merges PRs addressing "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". The only named requirement is #551, opened by the same outside contributor; the maintainer-authored issue in this area (#536) asked for Prometheus histograms, delivered by #548; #552/#553 were both stopped on charter grounds; per-request response metrics are not on the roadmap. This is a one-line maintainer decision — but spending hardware on a feature that may be declined on scope wastes the run outright.
(5) Closes #551 overstates delivery, and a test would confirm the gap. The motivating consumer reads rates from the response body: it gets them for Chat/Completions only when the client sends stream_options.include_usage (encode.rs:711-719 emits metrics only inside if self.include_usage), and for streamed Responses it gets nothing, because #560 nests the object inside response (encode.rs:731-743) while llama-swap reads metrics only at an event's top level — reported by the author himself. The include_usage gap is now documented (api.md:1031-1038); the Responses nesting gap is not, and belongs beside it before a test reports it as a failure.
Minor doc accuracy, worth folding in: api.md:1040-1041 calls every null "an unreached instant" while time_to_first_content_token_ms is permanently null; api.md:1042 states the n > 1 null generally although decode.rs:753-754 rejects n != 1 for every protocol except Completions, so only Completions can reach it.
Merge mechanics: #548 must land first and is still a draft with outstanding should-fix items (its 05:09 review: 0 blockers, 3 should-fix, 7 subtractive). The author's evidence image carries main + #548 + #549 + #560, so it is not a test of this PR alone.
Recorded so they are not re-raised: the per-step clock read is #548's; first_scheduled_ns folding is earliest-wins (http.rs:538); the stamp landing after vision packing (runtime.rs:2272, after the GraphKind::Vision branch at :2228-2259) is a one-clause doc question rather than a defect; nothing is cfg-gated, so the unrun Windows build is low risk.
3. Expected value if a hardware test were performed now
Low — and low for two independent reasons.
- The cheap behaviour is already pinned without a GPU. Placement, null rules and arithmetic are asserted with exact expected milliseconds at the encoder (
protocol/tests.rs:2346-2449(not opened)) and driven through a real step loop at the worker (runtime/phase_tests.rs:4690-4850(not opened), including that each instant falls inside the step that produced it). - The author already ran the GPU test. One RTX PRO 6000 Blackwell — the exact GPU model on cn5 — serving the prepared
local-inference-lab/Qwen3.8-Flash-Next-FLAREgb202 package behind llama-swap v250, option enabled through the[server]key: 40/40 request-matrix checks,tokens_per_second/mean_itl_msreconciling with vLLM's definitions,first_scheduled_nsbetweenenqueue_nsand the first token stamp, llama-swap showing prompt and generation rates for Chat and Completions, and no measurable CPU overhead (15.4–15.9 s on vs 16.0–16.3 s off over 16×512-token runs).
The residual value of an independent run is reproducibility from a build we control (this PR with #548 only), real-shape mean_itl behaviour on speculative cores, and confirmation of the two consumer gaps. That is worth ~30 GPU-minutes after the fixes — not before, when the documented enablement path is broken.
4. Minimal test plan (run only after items 1–3 land)
One GPU, one host. Nothing here touches TP>1, multi-host, KV pages, prefix cache, vision, or Windows.
Phase 0 — CPU, before booking (~15 min). Head has no CI: cargo check --features server (helios), cargo check (flare-cli, flare), cargo test --features runtime-core,server --lib -- server::, flare-cli cli:: config::, verification/helios-lifecycle/check.py (not opened); then ignition export + ignition serve with the documented [server] per_request_metrics = true line present — the regression test for item 1. One unrelated template test needs FLARE_TEST_TEMPLATE_DIR.
Phase 1 — GPU, cn5, one gb202 TP1 core, one server per option state (~20 min).
- Chat JSON → top-level
metrics, six keys, content instant null. - Chat stream with
stream_options.include_usage→ exactly one carrier,choices == [], six values populated. - Chat stream without
include_usage→ key absent (assert it; the #551 gap made explicit). - Completions
n = 2+include_usage→"metrics": null. - Completions two prompts → key omitted.
- Responses stream,
max_output_tokens = 1→response.incompletecarriesmetricsinsideresponse. - Messages stream and body → never carries it.
- Single-token Chat →
mean_itl_msnull,generation_time_ms0. - Option-off repeats of 1 and 2 → no
metricsanywhere;performance.first_scheduled_nsonly withreturn_token_timestamps. - In-script arithmetic:
tokens_per_second == generated / (last − scheduled),mean_itl_ms == generation / (n − 1), all fields non-negative,ttft ≤ generation + queue.
Phase 2 — ~10 min, highest value per minute. llama-swap v250 in front: streamed Chat/Completions with include_usage → non--1 prompt and generation rates; streamed Responses → confirm the documented absence. This is the only end-to-end evidence, from a build we control, that the shipped shape meets #551.
Deliberately not tested: GPU throughput A/B for the flag (no performance claim; the added work is copying a 17-byte RequestTimes per terminal event, and CPU overhead was already unmeasurable); TP>1/multi-host; KV/prefix cache; vision; Windows/WinUI (the desktop concern was config plumbing, now resolved in code).
Cost driver to check before booking: flare run needs a prepared/exported core and does not accept a recipe alias. Neither host caches a -FLARE core (cn5 holds dinov2/GLM/Qwen NVFP4 recipe checkpoints; cn7 similarly), so confirm a published gb202 TP1 -FLARE core is downloadable (flare download) or budget ignition export GPU time — that preparation, not the test, dominates the cost. cn5 is the right host (1 of its 4 RTX PRO 6000 Blackwells, the model the author validated on). cn7/GB10 adds nothing: nothing in the diff is arch-specific, and the desktop/config path is a code question, not a hardware one.
5. What turns this into "refer to testing"
ignition/cli/config.pyaccepts the key (with a positive-load test) — blocking.- The flag can express an explicit false, or the limitation is documented beside it.
mean_itl_mseither counts real inter-token intervals or the vLLM-parity claim is narrowed.- The streamed-Responses / llama-swap nesting gap added to
docs/api.mdnext to the include_usage caveat. - #548 merged and the branch rebased so the diff under review is #560's own (~+749/−26).
- A maintainer confirms per-request vLLM-shaped response metrics are wanted. If the answer is no, no hardware time should be spent at all.