PR #560: Emit vLLM-compatible per-request metrics from runtime instants

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/0eee5683-497b-4172-bbaf-67ed18107a5b

Opened by a workflow run, Nov 27, 2026 9:09 PM EST.

screen malicious

Screen Result: All Clear

Evidence: PR #560 ("Emit vLLM-compatible per-request metrics from runtime instants", open draft, head 037b9d5, 18 files +1898/−123) contains no prompt injection or other content aimed at steering an agent.

The PR's only notable deviations are design/policy choices the author discloses openly (flag-only enablement with no [server] per_request_metrics config key; flag applies to rank zero and is forwarded to rank zero's flare run; WinUI cannot enable it; a persistent Orbit group cannot negate it). Those are review concerns, not security findings.

Open questions / not found: Nothing was found that could not be explained; no GPU/live-server validation was attempted because it is irrelevant to injection screening.

Full report · Notes decide malicious: all_clear (100%): No malicious content found

explore

Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles) Motivation: Flare answers only report aggregate /metrics, so a proxy such as llama-swap cannot tell how fast one request prefilled or decoded; it reads llama.cpp (not opened) timings or vLLM metrics out of the response body, finds neither, and shows −1 for both rates (#551). This PR emits vLLM's six-field metrics object from instants the model worker already records, behind an opt-in flag. Scale: +1898 / −123 in 18 files (published diff against main; roughly +880/−72 is this PR's own, the rest is the unmerged stacked base #548) Proposal:

Full report · Notes

Value Proposition

Verdict: worth it with changes — but only after a maintainer decision and with a narrower first cut

The change is well built, honestly described, and aimed at a real user-visible gap. It is also, so far, demand that comes from the contributor only, it is one of four PRs carrying the same idea, and it puts a new public runtime event on the path that the repo mutation-tests for response-queue safety. Merge it, but as a smaller first cut and after a maintainer says the shape is wanted. Do not merge it as the stacked 18-file / +1,900-line branch.

What is good, and matches the charter

Why I am not voting "worth merging" outright

  1. Authorization is missing (AGENTS.md:165-169, 201-207). The only demand is #551, filed by the same author whose #548/#549/#560/#552 are the whole cluster; "hypothetical future consumers … do not establish a need". The author is also not one of the named priority contributors. Concretely: #553 — the same metrics object — was auto-reviewed twice with "Review Stopped: … low value or does not align with the project charter". The charter's counterweight is real (docs/api.md:973 mirrors --enable-prompt-tokens-details, cli-design.md:475 mirrors --language-model-only, server/models.rs:72 (not opened) mirrors vLLM ModelCard fields), but docs/core-design.md:210-219 (not opened) says Flare "does not aim for vLLM's feature matrix". A maintainer has to pick a side of that line before the code lands; that is a two-line decision, and everything below is conditional on it.

  2. The stated benefit is not delivered for the default streaming client. llama-swap only receives metrics if the SSE final usage chunk carries it, and Flare only emits that chunk when the client sends stream_options.include_usage (docs/api.md:1031-1034, encode.rs:735-743). Most SDK streams don't. vLLM closes the same hole with --enable-force-include-usage; Flare has no equivalent and this PR does not add one or say so against #551. Either force usage while the flag is on, or state plainly in docs/api.md and the description that streamed rates stay -1 unless the client opts in.

  3. The riskiest part of the diff buys the least. time_to_first_content_token_ms is why this PR needs GenerationEvent::Committed (runtime.rs:109-114), the commits flag threaded through generate_observed/generate_many_observed/enqueue_many (runtime.rs:847-880), the third term of output_event_capacity (runtime.rs:62-80), and per-step record_commit/step_ns/content_ns in the encoder (encode.rs:255-262, :546-551). That event-capacity invariant is exactly what verification/helios-lifecycle/check.py:218-224 mutation-tests ("response queue must cover its complete output allowance"). llama-swap never reads the field, and vLLM itself permits it to be null when unavailable. Cutting it from v1 removes the new public event, the threading, and the budget change, at zero cost to the motivating workflow.

  4. The flag plumbing contradicts the charter's own "don't silently ignore / be explicit" rule. Bootstrap accepts per_request_metrics (config.rs:353-357), but flare's typed Configuration.server (flare/src/configuration.rs:26-34) has no such field and no deny_unknown_fields, so [server] per_request_metrics = true in ~/.config/flare/config.toml (not opened) parses and is silently dropped (flare-cli/src/config.rs:33-37; main.rs:355 sets it only from the flag). Same consequence for the WinUI controller: flare/src has zero references, so the desktop cannot enable it — while the PR's own analogy, --verify-weights, is in RuntimeSettings (flare/src/runtime_settings.rs:21) and in the WinUI toggle/bridge. Separately, orbit run --persistent saves the flag with no negating switch (cli.rs:697-699). Both consequences live only in the PR description; nothing in docs/ mentions them. Adding the five-line config field fixes the first two and makes the desktop path work; the persistent-group one needs either a real flag or a doc line.

  5. Bundling hides the cost. Of +1,900 lines, most is the unmerged #548 (metrics.rs +548, docs/api.md +178, phase_tests.rs +559). The "option off costs one branch" claim is scoped to #560's own diff; the combined branch also adds an unconditional per-step monotonic_ns() read in reserve_and_pack (runtime.rs:2255-2270) and a RequestRecord per request from #548. That is fine, but it should be reviewed as one decision about two PRs, not two independent polish passes.

  6. Evidence for the claim that matters is unrun. No GPU, no live server, no llama-swap check on this code path ("Not run here: a GPU, an exported core, a live server, a llama-swap or gateway check"). The only live gateway numbers in the cluster are from #553 (HTTP-clock) and #552 (llama.cpp (not opened) timings), neither of which is this code. The charter asks for real evidence (#210, and its bar for behaviour claims). One live llama-swap row showing non--1 rates from this branch would settle both points 2 and 6 at once.

Simpler path to the same end

What would make me vote "worth merging"

  1. A maintainer decision on the PR that per-request vLLM-shaped response metrics are wanted (answers AGENTS.md:201).
  2. First cut without time_to_first_content_token_ms / Committed, or an argument for why the streaming content instant is needed by a real consumer.
  3. per_request_metrics as a [server] configuration key in flare/src/configuration.rs (making the WinUI controller path work), and either a negating flag or a docs/api.md note for persistent Orbit groups.
  4. One live llama-swap (or equivalent gateway) row, and the stream-without-include_usage limitation written into docs/api.md next to #551's use case.
  5. Merge order: #548 first, as stated; keep #552/#553 closed — consolidating on one wire shape was the right call (the double cache_n subtraction in #552 is a real reason not to emit both).

Nothing in the design struck me as wrong for this project. What is missing is permission, a smaller first footprint, and one piece of live evidence — all cheap, none requiring new code beyond what the PR already contains.

Full report · Notes Decide Value: yes (90%): This change is worth reviewing: it provides value to the project in line with its charter.

Conventions

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 2

Everything else in the lens checked out: the commits flag rides the existing observation: Option<bool> pipeline, Committed/Finished follow existing GenerationEvent conventions, the flag reaches rank zero exactly like --api-key-file, and per_request_metrics follows the thinking_token_budget path one-for-one with no [server] config-file key, as the description states. Read from code only; no GPU, live server, or Windows build was run, and CI on ce44060 reports no checks.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Architecture

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: None. Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Simplicity

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 2 — tests.rs:2444 asserts a literal six-key count that duplicates the key list at :2353-2360; encode.rs:238-243 restates the placement/null rules that docs/api.md's new section already documents.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Prose

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 2 — the OrbitRun help text at flare-cli/src/cli.rs:646 differs from Run's at :859-860 for the same flag; docs/cli-design.md:1317-1323 should say a [server] per_request_metrics key has no effect.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Correctness

Verdict: should-fix issues only

Blocking:

Should fix:

Should fix (verification note):

Nits: 3 — first_scheduled_ns is last-writer-wins in the HTTP handler (helios/src/server/http.rs:542), latent only if Chat admits n > 1; the first-scheduled stamp precedes a submission that can fail (runtime.rs:2254-2314), so a never-executed step can be timed; metrics null vs absent across protocols is documented but differs from vLLM.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Subtractive

Verdict: make it smaller first The change: +1898 / -123 Could remove: about 155 lines, in 6 places Biggest subtractions:

Full report · Notes

code review summary

Recommendation: Changes Requested

The mechanism is right-sized and correct — worker owns the instants, encoder owns placement, nothing requested or emitted when the option is off — but merge needs a named requirement plus an honest cost section, which currently claims a per-step clock read does not exist.

Full report · Notes

Pre Test Report

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 change is a sound design in the right layer, but five substantive issues need to be settled first, several of which change exactly the behaviour a hardware run would exercise — so a GPU test now would either be invalidated by the fixes or would burn hardware time confirming a wire shape that is likely to move. A minimal plan is given at the end so testing can start within a turn of the fixes landing.

PR state: open (intake reports draft), head ce44060, 18 files, +1898/−123, authored by an outside contributor with no merged PRs, stacked on unmerged draft #548, which is itself still "Changes Requested" after three review rounds. The PR carries no CI checks on head, no comments, and — critically — no live, GPU, gateway, Windows, or overhead evidence at all (its own "Not run here" list says so). The security screen is all-clear; I found no instruction-like or injected content anywhere in the PR body or diff.


1. Substantive issues that must be fixed before any hardware test

These are not nits. Each was verified in the code at head, not taken from the reviews.

(a) Public API leak — the new event field's type cannot be named outside the crate. GenerationEvent::Finished gained times: super::metrics::RequestTimes (helios/src/server/runtime.rs:97-108). RequestTimes is declared pub at helios/src/server/metrics.rs:326, but mod metrics; is private (helios/src/server.rs:16; only pub use metrics::Snapshot; at :33), while GenerationEvent is re-exported (helios/src/server.rs:34) from a pub mod server (helios/src/lib.rs:29). An out-of-crate consumer — the charter's roadmap in-process Rust SDK (#6) is exactly that surface — can neither read the field nor construct the variant. Before this PR Finished was all primitives. Fix is one line (re-export the type) or moving the instants off the public enum, but which one is chosen is an API decision that must precede testing, since the tests would be written against the resulting shape.

(b) The option has no configuration home, and the key it does accept is silently dropped. helios/src/server/config.rs:353-357 accepts per_request_metrics as a boolean, but flare/src/configuration.rs:26-34 (Server = host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction) has no such field, and [server] derives #[serde(default)] without deny_unknown_fields (only PrefixCache denies, :48-56). So [server] per_request_metrics = true in config.toml (not opened) parses and is discarded with no error and no effect. That is the charter's rule broken one layer down ("Don't silently ignore API fields… Never accept it and quietly drop it") and AGENTS.md (not opened)'s "a setting has one of three homes". Consequence: the flare library and the WinUI desktop controller cannot enable the feature at all (grep confirms zero references to per_request_metrics in flare/src), and the two disclosed limitations live only in the PR description, not in docs/cli-design.md. Reviewers must pick a fix — add the config key, or reject the key explicitly — because either way the reachable surface changes, and a hardware test would currently have to enable the flag on the command line only.

(c) A stated cost claim is false. The PR says "No clock read is added in either state." reserve_and_pack adds super::observation::monotonic_ns() unconditionally per scheduled step, for every lane, in both option states (helios/src/server/runtime.rs:2253-2270). That block belongs to the stacked #548, but this description's Cost section owns the combined claim, and reviewers use that section to judge hot-path impact. Magnitude is trivial; the statement is checkable and wrong. Prose fix.

(d) Duplicated mechanisms and dead state — convention violations with silent-drift failure modes. helios/src/server/runtime.rs:1746-1757 re-spells GraphKind::samples() (helios/src/execution/manifest.rs:90-101, already consumed at runtime.rs:2988), so a future sampling graph kind would silently stop being counted by metrics.model_step. Timing.streaming (helios/src/server/protocol/encode.rs:80, set :250, guard :257) duplicates Encoder.streaming (:97) and its guard is provably unreachable, because http.rs:363 sets commits only when enable_request_metrics(streaming) returned true. A third redundant abstraction, generate_observed (runtime.rs:847-849), is generate_many_observed with a one-element vec whose only real caller immediately re-wraps the result (http.rs:368-372). None of these is a served-output defect; all three are the kind of "second spelling of an existing mechanism" the project's own rules reject, and two of them touch code the tests would cover.

(e) Authorization and evidence. 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 consumer is #551, filed by the same author; the only maintainer issue in the cluster (#536) asked for Prometheus histograms, delivered by #548. Two predecessors (#552, #553) were stopped on precisely this ground. Combined with (f) below, there is a live question about whether this is the wanted shape at all. A maintainer statement is a two-line decision and gates everything.

(f) The motivating use case is not actually served for the default streaming client — my addition, and the most decision-relevant finding. #560 says "Closes #551", but #551 asks for a llama.cpp (not opened) timings object on Chat/Completions/Messages/Responses, streaming and non-streaming, placed on the chunk that completes the last choice when include_usage is absent. #560 instead ships vLLM's metrics, never on Messages, and in a stream only on the final usage chunk, which exists only when the client sends stream_options.include_usage (helios/src/server/protocol/encode.rs:736-744; docs/api.md:1031-1036). #551 itself notes that a stream without include_usage leaves llama-swap's prompt rate "zero". So for the ordinary SDK streaming client the motivating -1 rates stay -1, and there is no --enable-force-include-usage equivalent (grep: no such flag anywhere). Testing this branch end-to-end against llama-swap would legitimately report the gap as a failure. Note also that the field the PR takes the most risk for — time_to_first_content_token_ms, which is the only reason GenerationEvent::Committed, the commits threading, and the event-budget change exist — is not read by llama-swap at all, and vLLM itself permits it to be null.

2. What is sound and does not need re-litigating

3. Expected value if a hardware test were performed now

Low, and mostly negative. The behaviour on the GPU path is largely undetermined by the GPU: every placement, null, and arithmetic rule is unit-tested at the encoder (helios/src/server/protocol/tests.rs:2350-2491) and phase-tested through a step-driven worker (helios/src/server/runtime/phase_tests.rs:4616-4871); the only things a real GPU adds are (i) that the instants are ordered sensibly on real steps, and (ii) that a real gateway sees the fields. (ii) would currently fail by design (finding f), and (i) would hold unless the clock-read claim in finding (c) hides something — which the GPU cannot settle anyway, since measuring it is a CPU/throughput question the PR explicitly declines to make.

4. Conditional minimal test plan (run only after fixes land)

One GPU, one host. Nothing in the diff touches TP>1, multi-host, KV pages, prefix cache, vision, or Windows.

Phase 0 — CPU, before booking hardware (~15 min). Head has no CI, so the author's "clean" claims are unverified: cargo check --features server (helios), cargo check (flare-cli), cargo test --features runtime-core,server --lib -- server::, and verification/helios-lifecycle/check.py. Expected one known failure needing FLARE_TEST_TEMPLATE_DIR.

Phase 1 — GPU, cn5, one gb202 TP1 core, one flare run per flag state (~20 min of GPU). Two servers (flag off / flag on), ten scripted requests:

  1. Chat body → metrics at top level, six keys, content instant null.
  2. Chat stream with stream_options.include_usage → one carrier frame, choices == [], all six non-null where reachable.
  3. Chat stream without include_usage → key absent (this is the #551 gap; assert it so the limitation is documented and tested).
  4. Completions stream n = 2 + include_usage → "metrics": null in both body and stream.
  5. Completions with two prompts → key omitted.
  6. Responses stream, max_tokens=1 → response.incomplete carries metrics.
  7. Messages stream → never carries it.
  8. Chat with a reasoning model (enable_thinking) → time_to_first_content_token_ms strictly greater than time_to_first_token_ms.
  9. Single-token request → mean_itl_ms null.
  10. Flag-off repeats of 1 and 2 → no metrics key anywhere, and performance.first_scheduled_ns absent unless return_token_timestamps is set. Plus in-script arithmetic: generation_time_ms == last − first, tokens_per_second ≈ generated / (last − scheduled), all fields non-negative, time_to_first_token_ms ≤ generation + queue.

Phase 2 — optional, 10 min, highest information per minute. llama-swap in front of the branch: one streamed request without include_usage (expect -1) and one with (expect real rates). That single row is the evidence that decides whether the shipped shape meets #551 — and it is the only evidence the PR family has ever had for this code path.

Deliberately not tested: throughput A/B for the flag (no performance claim is made; the added work is one u64 store plus one event per committing step), TP>1/multi-host (unchanged), Windows/WinUI (no code path changed — the enablement gap is finding (b), a code decision, not a hardware question), KV/prefix-cache behaviour, and vision.

Cost caveat that must be checked before booking: flare run requires an exported core and does not accept a recipe alias (docs/cli-design.md:1330-1335). Neither host's cached-model list contains a prepared core — the cached names (nvidia/Qwen3.8-Flash-Next-FP4-Local, nvidia/GLM-5.3-Flash-FP4-Local, etc.) are recipe checkpoints per docs/mtp-design.md:4-5 (not opened). So either confirm a published -FLARE gb202 TP1 core is downloadable (flare download, docs/cli-design.md:878-899) or budget ignition export GPU time; that preparation, not the test itself, dominates the cost. cn5 fits (1 of its 4 RTX PRO 6000 Blackwells; the author's own #548 live evidence used the same GPU family), and cn7/GB10 is only useful if the desktop/config path (finding b) is being validated — which is code review, not hardware.

5. What would turn this into a "refer to testing"

  1. A maintainer statement that per-request vLLM-shaped response metrics are wanted (finding e).
  2. A decision on #551: keep vLLM metrics and either force usage in streams or document the include_usage limitation against llama-swap; or drop time_to_first_content_token_ms/Committed from v1 for a much smaller footprint (finding f).
  3. RequestTimes re-exported or kept off the public event (finding a).
  4. per_request_metrics given a [server] configuration home or explicitly rejected, with the two limitations added to docs/cli-design.md (finding b).
  5. Findings (c) and (d) fixed — one prose correction and three small deletions.
  6. #548 merged, and the branch rebased so the diff under review is #560's own (~+880/−72), not #548's.

Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.

screen malicious

Screen Result: All Clear

Evidence:

Nothing malicious or agent-directing was found. The one URL-bearing automation comment is a legitimate, repo-wide bot convention; it was treated as reviewable material, not instructions, and its links were not fetched or followed.

Open questions: none that would change the verdict. The bot's linked external review pages (autobot.eidonix.com) were deliberately not opened, and AGENTS.md (not opened) was not opened; CI has not run on head 046aaef (no checks), so nothing here is a statement about code correctness — only about hostile/agent-directing content.

Full report · Notes decide malicious: all_clear (100%): No malicious content found

explore

Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles) Motivation: Clients and gateways such as llama-swap cannot get one request's prompt and decode speed out of Flare, because /metrics only aggregates. vLLM returns a per-request metrics object that gateways already read, so this PR builds the same object from instants the model worker already records. Scale: +1757 / −77 lines in 22 files (head 046aaef0; the diff also carries all of stacked #548, so #560's own share is ≈ +749/−26) Proposal:

Full report · Notes

Value Proposition

Verdict: worth merging — with three small fixes and one maintainer sign-off

My previous verdict was "worth it with changes, but only after a maintainer decision and with a narrower first cut." Revision 046aaef (four commits since I last reviewed) satisfies four of my five conditions on its own: the content-instant half of the diff is gone, [server] per_request_metrics is a real configuration key, the include_usage limitation is written into the repo's docs, and live llama-swap evidence is on the PR. What remains is not design work — it is one permission question (charter, AGENTS.md:165-169, :201-207), one one-line API-hygiene fix, and two documentation/flag gaps.

What got fixed, checked against the branch

  1. The riskiest code left this PR. time_to_first_content_token_ms is now always null (helios/src/server/protocol/encode.rs:251-275, docs/api.md:1020), and GenerationEvent::Committed no longer exists in this branch; the streaming content instant moved to the stacked draft #562. output_event_capacity is back to its two-argument form (helios/src/server/runtime.rs:62-82), so this PR no longer touches the invariant that verification/helios-lifecycle/check.py (not opened) mutation-tests for response-queue safety. This was my single largest objection and it was answered exactly as asked. llama-swap never reads that field and vLLM permits null, so nothing was lost.
  2. The flag now works everywhere it should. flare/src/configuration.rs:34 adds per_request_metrics: Option<bool>, flare/src/settings.rs:32,224 resolves it, flare/src/controller.rs:2566 pushes it into rank zero's server config, and flare-cli/src/config.rs:73-75 applies it only when the flag is absent (flag > config > off). Bootstrap rejects 1, "true" and null (helios/src/server/config.rs:719-741 (not opened)), and there are precedence tests in all three crates. The silent-drop behaviour I flagged previously is gone, and the desktop controller path now has a real setting to read.
  3. The consumer gap is documented in-tree. docs/api.md:1031-1038 now says plainly that a Chat/Completions stream carries metrics only on the usage chunk, that gateways which read rates from the body (llama-swap named) show none for those streams, and that Flare has no --enable-force-include-usage equivalent. That is the honest-docs resolution I asked for (the alternative — forcing usage under the flag — remains vLLM's better long-term answer, and would be a separate small PR).
  4. Live evidence exists. WynnD's 2026-11-28 comments report an RTX PRO 6000 Blackwell serving the gb202 Qwen3.8-Flash package behind llama-swap v250: 40/40 request-matrix checks, tokens_per_second and mean_itl_ms reconciling with vLLM's definitions, performance.first_scheduled_ns between enqueue_ns and the first token stamp, llama-swap showing prompt and generation rates for Chat and Completions, and CPU 15.4–15.9 s with the option on vs 16.0–16.3 s off over 16×512-token streams (no measurable overhead). Re-validated through the configuration key rather than the flag. This clears the charter's "bring real evidence" bar (#210) for the claim that actually matters.
  5. The four-way fork is resolved. #552 and #553 are closed as "Superseded by #560"; #562 is now a draft stacked on top. One wire shape, one implementation on main, no double-emission (the double cache_n subtraction that motivated the consolidation is real).

Why it fits the charter

What still needs to happen before merge

  1. A maintainer decision on the PR that per-request vLLM-shaped response metrics are wanted (AGENTS.md:165-169, :201-207). The only request is #551, filed by the same author whose #548/#549/#560/#562 are the whole cluster; llama-swap appears nowhere in Flare's documented deployment story except the docs this PR adds; #536 is about histograms, not response bodies. The charter's counterweight is real — Flare already mirrors vLLM flags and wire fields — but docs/core-design.md (not opened) also says Flare "does not aim for vLLM's feature matrix". That is a two-line decision, and one auto-review already called the same idea low value (that review was on #553, the weaker HTTP-clock version). Nothing else below matters if the answer is no.
  2. One line of API hygiene. RequestTimes is now exported (helios/src/server.rs:33 (not opened)) as a plain struct with three public fields, no #[non_exhaustive], and it appears inside the public GenerationEvent::Finished (runtime.rs:102-105). With the in-process Rust SDK (#6) on the roadmap, add #[non_exhaustive] now — vLLM is already growing this object (metrics.speculative_decoding), so a future field should not be a breaking change.
  3. Do not leave persistent Orbit groups unable to turn it off. --enable-per-request-metrics is saved into a group's rank_zero options (cli.rs:698-700, orbit/controller.rs:691-692, :846-850), there is no negating flag, and the config key cannot override a saved flag (config.rs:73-75), so the only way off is editing orbit.toml (not opened). Either add --no-enable-per-request-metrics (the repo pairs negatives for --history-drafts and --mtp-adaptive-verification) or add one sentence to the docs/cli-design.md:736 row.
  4. One more doc line. docs/api.md:1031-1038 covers the include_usage gap but not the second consumer gap the author found live: for streamed Responses, vLLM nests the object in response, while llama-swap reads metrics only at an event's top level, so it sees nothing there. That belongs beside the existing caveat — it is the same class of "the motivating workflow stays broken in this case" honesty.

Simpler alternative, and why I am not pressing it

Chat already exposes the same instants in Flare's own vocabulary via return_token_timestamps → performance{ingress_ns, enqueue_ns, first_scheduled_ns} plus choices[0].token_timestamps_ns, so the new value here is specifically the vLLM wire shape that body-parsing gateways already read. That argues for keeping the object minimal — which this revision now is: six fields, no new event, no new clock read, one flag, and placement the encoder already has hooks for. I see no cheaper route to a llama-swap that shows real prompt and decode rates. Two things I would watch rather than block on: this is a frozen snapshot of a moving vLLM object (worth one sentence saying so), and queue_time_ms/time_to_first_token_ms are systematically slightly larger than vLLM's because the queue clock starts at request-group construction and TTFT ends at step completion — fine for a hobby-scale engine, but people may bill on these numbers, so the definitions in docs/api.md:1016-1029 are load-bearing and should stay accurate.

Cost summary

Dimension Assessment
Users helped Anyone fronting Flare with llama-swap or a similar body-parsing gateway, plus billing/SLA tooling: real rates where there were -1s. Modest audience, but that audience is the charter's local-workstation user.
Complexity ~185 production lines, one enum field pair on the terminal event, one encoder-owned struct, one config key, one flag on run/orbit run. No new event, no new clock read, no runtime state.
Maintenance The vLLM contract can drift (spec-decode acceptance already exists there). One flag added to three surfaces (flag, config, controller) that must stay in sync — currently the persistent-group negation is the weak link.
Performance Not measurable in the author's CPU runs; one copy of ~32 bytes per request when off, one JSON object when on. The per-step monotonic_ns() belongs to #548, not here.
Risk Low. Everything is behind one flag, null/omitted rules match vLLM, and the previously riskiest mechanism (the Committed event and the output-event budget) is no longer in this PR.

Bottom line: the engineering is now proportionate and the evidence is real. Merge it once a maintainer confirms Flare wants vLLM's per-request metrics object on the response, with #[non_exhaustive] on RequestTimes, a way to negate the saved flag (or a doc line saying there isn't one), and the streamed-Responses/llama-swap caveat added to docs/api.md. #548 must land first, as stated; #552/#553 correctly stay closed; #562 should be judged separately on whether the streaming content instant has a consumer that wants it.

Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.

Conventions

Verdict: clean Blocking:

Full report · Notes

Simplicity

Verdict: should-fix issues only Blocking:

Reviewed at head 046aaef against the charter (focused changes, no speculative switches), AGENTS.md:188-199 (reject churn, wrappers and non-exercising tests) and docs/design-review.md:16 (keep Helios as simple as possible). Nothing blocks: the feature is one opt-in path, adds no clock read, and introduces no second mechanism into the scheduler or worker. Two items from the earlier head are resolved — Timing::streaming and its unreachable record_commit guard are gone (encode.rs:74-79), and the magic six-key count is now one key list (tests.rs:2354-2363).

Each remaining item has a smaller version. (1) At http.rs:339-340 call generate_many_observed(vec![prompts.remove(0)], observation.timestamps), delete generate_observed, and inline enqueue into generate; the two test call sites (phase_tests.rs:3748, :3802) follow. (2) metered_generation needs only start(), one Content("answer"), record_times(1_000_000, times, 4) and finish(...): every assertion is about the carrier frame or metrics_value(), which depends only on times and generated = 4. (3) Keep the uniquely-HTTP assertions — the option-off half (:4782-4794, proving state.per_request_metrics gates http.rs:387-389), response.incomplete (:4764), and step-bound provenance (:4717-4726); delete the carriers.len() == 1 / choices == [] pair and the n = 2 block, or route the latter through served_through_worker in ~8 lines.

Nits are copy-editing: the placement and null rules now exist three times (docs/api.md:1005-1043, encoder comments, encoder code), and a test closure clones frames for two fields that references serve.

Open question: whether :4759-4762 were added deliberately as an end-to-end guard against encoder/handler drift; a comment stating that intent would settle it and shrink finding 3. Checked and not reported: the RequestMetrics enum, metrics_value's pure Option maps, the flare-cli flag plumbing (mirrors --bypass-performance-check), and GraphKind::samples(). enable_request_metrics(streaming) duplicates Encoder::streaming, but folding it in would couple placement to a field set_logprobs writes — the explicit parameter is the safer form.

Full report · Notes

Correctness

Verdict: blocking issues

Blocking:

Should fix:

Nits: 2 (ignition debug-serve and write_initial ignore the new key; cli-design.md:1385-1387's unknown-key sentence is stale).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Architecture

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 2

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Detail:

Layering is right. The worker owns every instant and the encoder owns placement (encode.rs:232-275, gated at http.rs:387-389); no HTTP clock read, which is exactly what made the closed #553 unable to report queue time. Off by default with no key emitted (api.md:1009-1011); Messages never carries it, n > 1 gives null, multi-prompt omits it (encode.rs:233-241); no per-model special cases; limits documented honestly including the include_usage gap (api.md:1031-1038).

Two earlier findings are fixed at this head: RequestTimes is now exported beside Snapshot (server.rs:33, metrics.rs:326), so the public Finished field is nameable; and the option now has a [server] key reaching Settings, the desktop controller, and the CLI with flag precedence, while Bootstrap rejects a non-boolean (config.rs:353-357) — the silently-dropped-key problem is gone.

One earlier finding is withdrawn. I had attributed the per-committing-step tokens_committed, model_step, and the per-step monotonic_ns() stamp to this PR. They already exist at the still-open pr/548 (verified there), and this branch is stacked on it, so that delta is #548's. The description's "no clock read; only copying instants when off" is accurate.

Nits: mean_itl_ms divides by generated - 1 rather than recorded intervals, so it understates ITL on speculative cores where a step commits several tokens at one instant (encode.rs:266-268, api.md:1025-1026); the count already exists in RequestRecord (metrics.rs:343-362). Second: the diff carries unmerged #548, so review and merge order depend on it landing first.

Open questions: whether #551 authorizes the work; whether a response-body object is in remit at all given #536 asked for scrapeable series; whether to make mean_itl_ms exactly vLLM's. Not verifiable here: the live 40/40 matrix and CPU numbers, Windows/multi-GPU, and whether #548's own open should-fix items would move these fields.

Full report · Notes

Prose

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 3 — both help strings (flare-cli/src/cli.rs:646-648, :860-863) omit the configuration key the docs table names; the description's "This PR adds no clock read" is true only because the read belongs to #548's commit 66245920, which appears in this PR's diff against main, so a diff reader is misled; "one monotonic read per scheduled model step" is per step, shared by every lane (runtime.rs:2272-2284).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Subtractive

Verdict: make it smaller first The change: +1757 / −77 lines (22 files) Could remove: about 160 lines, in 6 places (≈125 of them this PR's own; ≈35 shared with stacked #548) Biggest subtractions:

Full report · Notes

Pre Test Report

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:

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 run ignores the key" is only partly true. Orbit's own process does not read it (config.rs:141-151 sets only hub caches), but the flag is forwarded to rank zero's flare run, which does run Configuration::apply (config.rs:58); on a single-host run rank zero reads the same config.toml (not opened). The cli-design.md:736 row 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 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).

  1. Chat JSON → top-level metrics, six keys, content instant null.
  2. Chat stream with stream_options.include_usage → exactly one carrier, choices == [], six values populated.
  3. Chat stream without include_usage → key absent (assert it; the #551 gap made explicit).
  4. Completions n = 2 + include_usage → "metrics": null.
  5. Completions two prompts → key omitted.
  6. Responses stream, max_output_tokens = 1 → response.incomplete carries metrics inside response.
  7. Messages stream and body → never carries it.
  8. Single-token Chat → mean_itl_ms null, generation_time_ms 0.
  9. Option-off repeats of 1 and 2 → no metrics anywhere; performance.first_scheduled_ns only with return_token_timestamps.
  10. 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"

  1. ignition/cli/config.py accepts the key (with a positive-load test) — blocking.
  2. The flag can express an explicit false, or the limitation is documented beside it.
  3. mean_itl_ms either counts real inter-token intervals or the vLLM-parity claim is narrowed.
  4. The streamed-Responses / llama-swap nesting gap added to docs/api.md next to the include_usage caveat.
  5. #548 merged and the branch rebased so the diff under review is #560's own (~+749/−26).
  6. A maintainer confirms per-request vLLM-shaped response metrics are wanted. If the answer is no, no hardware time should be spent at all.

Full report · Notes

code review summary

Recommendation: Changes Requested

The mechanism is right-sized and correct — worker owns the instants, encoder owns placement, nothing emitted when the option is off — but the documented [server] per_request_metrics key is outside Ignition's config schema, which breaks every Ignition command, and about 180 lines (most in one test file) duplicate rules and plumbing already pinned elsewhere.

Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.

screen malicious

Screen Result: All Clear

Evidence:

Full report · Notes decide malicious: all_clear (100%): No malicious content found

explore

Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles) Motivation: Flare's OpenAI-compatible responses can optionally carry vLLM's per-request metrics timing block so gateways like llama-swap can show prompt and generation rates. It does this by reusing instants the model worker already records, gated behind a new opt-in [server] per_request_metrics key. Scale: +1757 / −77 lines in 22 files (head 046aaef0; ≈+749/−26 is #560's own, the rest is the stacked #548) Proposal:

Full report · Notes

Value Proposition

Verdict: worth it with changes — one hard blocker (a config-schema break I reproduced), a maintainer sign-off, and three small fixes

The revision I re-checked is still 046aaef (five commits, no push since my last report), and the newest auto-review at 05:42 raises a blocker I had missed. I verified it in the tree and it is real. Everything I flagged as fixed last round is still fixed; everything I flagged as open is still open; and the gap the auto-review found is on a shared surface the charter cares about, so it moves from "nit" to "must fix before merge."

The one thing that stops the merge: the documented opt-in breaks every Ignition command

docs/api.md:1007 and docs/cli-design.md:736,1349 tell users to set [server] per_request_metrics = true. Ignition's Python reader validates the same file with a closed schema:

Concretely: a user who follows the new documentation to enable the feature, then runs ignition export or ignition debug-serve to prepare a model, gets a usage error. The Rust side is permissive (flare/src/configuration.rs:26-28 has no deny_unknown_fields); only the Python side is closed. per_request_metrics is the first [server] key in this situation — every other key in configuration.rs:28-35 also exists in _SECTIONS, which is why precedent did not catch it. And tests/cli/test_config.py:151-177 has unknown-key cases but no row for this key, so CI could not see it.

The fix is small and belongs in this PR: add "per_request_metrics": bool to _SECTIONS["server"], a _BUILT_IN default, a commented line in write_initial (config.py:183-213, which currently never offers the key), and one parametrized row in tests/cli/test_config.py. Related and cheap: ignition/cli/serve.py:486-487 forwards only thinking_token_budget and scheduler_checkpoint_extra_work_fraction into the native options dict, so ignition debug-serve cannot turn the object on at all — one line, same file.

This is exactly the charter's "solve the right problem in the right place": a public configuration key is shared property of two readers, and only one of them learned about it.

Why the change is still worth making

Remaining fixes besides the schema (all small)

  1. Maintainer sign-off on the feature itself. The only request is #551, filed by the author whose #536/#548/#549/#560/#562 cluster this is; docs/core-design.md (not opened) says Flare "does not aim for vLLM's feature matrix," while docs/api.md:472-514 now carries a large vLLM correspondence table. Two lines from an owner settle it. Nothing else matters if the answer is no.
  2. #[non_exhaustive] on RequestTimes. Exported at helios/src/server.rs:33 and embedded in public GenerationEvent::Finished (runtime.rs:102-105). search_code for non_exhaustive over the whole tree returns nothing, so the attribute is not in use anywhere yet, but with the in-process SDK (#6) on the roadmap (and vLLM already growing this object) a future field would otherwise be a breaking change. One line now.
  3. Persistent Orbit groups cannot turn it off. flare-cli/src/cli.rs:643-649 / 857-863 declare only the positive flag; cli.rs:698-700 pushes it into a group's rank_zero options; orbit/controller.rs:691-692 and :846-850 save it; flare-cli/src/config.rs:73-75 applies the config value only when the flag is absent. So the only exit is editing orbit.toml (not opened). Repo precedent pairs negatives (docs/cli-design.md:199,741,742). Either add --no-enable-per-request-metrics or say in the docs/cli-design.md:736 row that there is no negation.
  4. One missing caveat in docs/api.md:1031-1038. The include_usage gap is now documented — good. Not documented: for streamed Responses the object sits inside response (encode.rs:729-734), while llama-swap reads metrics only at an event's top level, so Responses streams still show no rates. WynnD's own live table says so. It is the same class of "the motivating workflow stays broken here" honesty the include_usage paragraph establishes.

Cost, and the one number I would change

Dimension Assessment
Users helped People fronting Flare with llama-swap or any body-parsing gateway, plus billing/SLA tooling. Modest, but exactly the charter's local-workstation user.
Complexity ~200 production lines in 560's own commits: one enum field pair on the terminal event, one encoder-owned struct, one config key, one flag on run/orbit run, one config-file schema (once fixed). No new event, no new clock read, no runtime state.
Maintenance The vLLM contract is an unpinned snapshot (worth one sentence naming the version); one boolean wired through four places (CLI flag, flare/src/configuration.rs:34, flare/src/settings.rs:32,224, flare/src/controller.rs:2566) that must stay in sync — the Ignition schema is the fifth place that was missed.
Performance Not measurable in the author's runs; per-request work off is one copy of ~32 bytes, on is one JSON object. The per-step monotonic_ns() belongs to #548.
Risk Low once the schema is fixed: everything behind one flag, null/omitted rules match vLLM, tests assert instants fall inside the step that produced them.

Review-shape problem worth naming: because #548 has not merged, this PR's diff against main currently carries ~1,760 added lines (metrics.rs +548, phase_tests.rs +535, latency.rs +24, scheduler.rs +4, most of runtime.rs +104 and docs/api.md +174 are #548's). A reviewer cannot see what 560 actually changes. Land #548 first, then re-review 560 as a ~250-line diff — that alone removes most of the auto-review's "~180 duplicated lines" complaint, which is really #548's tests being reviewed twice in one diff. Within 560's own tests, four sites for one boolean (flare-cli/src/config.rs:219-234, flare/src/settings.rs:75-87, helios/src/server/config.rs:727-740, plus the CLI test) is more than the rule needs; two would do.

Simpler alternative, and why I am not pressing it

Chat already exposes the same instants in Flare's own vocabulary via return_token_timestamps → performance{ingress_ns, enqueue_ns, first_scheduled_ns} plus token_timestamps_ns (this PR adds first_scheduled_ns there, observation.rs:58-75, model-contract.md:343-356). The new value is specifically the vLLM wire shape that body-parsing gateways already read, so the object should stay minimal — and it is: six fields, no new event, no new clock read. A gateway-side patch would mean changing llama-swap for one engine, which is strictly more work than emitting the shape llama-swap already understands.

Bottom line

Worth merging with changes. Do not merge at 046aaef: the documented [server] per_request_metrics key makes ignition export, debug-serve, bench, join, and publishing fail with "unknown key," which the docs themselves invite. Add the key to ignition/cli/config.py (schema, built-in, write_initial, test row) and forward it in ignition/cli/serve.py:486, put #[non_exhaustive] on RequestTimes, either add a negation flag or document its absence, add the streamed-Responses/llama-swap caveat to docs/api.md, and get a maintainer's yes. #548 must land first; #552/#553 stay closed; #562 is judged separately on whether the streaming content instant has a consumer.

Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.

Simplicity

Verdict: should-fix issues only Blocking:

Full report · Notes

Correctness

Verdict: blocking issues

Blocking:

Should fix:

Nits: 3 (Ignition debug-serve and the generated template ignore the key; stale "native Flare ignores keys" sentence at cli-design.md:1385; the vision-packing note that first_scheduled_ns is stamped after image conditioning, matching model-contract.md:349-352).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Architecture

Verdict: blocking issues

Blocking:

Should fix:

Nits: 2 — mean_itl_ms divides first→last by generated - 1 (helios/src/server/protocol/encode.rs:266-268) instead of the recorded intervals, understating ITL on speculative cores; the branch is stacked on the still-open #548, so most of the +1757/−77 diff is #548's work.

The mechanism itself is right-sized: the worker owns every instant, the encoder owns placement (encode.rs:232-275, gated at http.rs:387-389), no clock is read in HTTP, and nothing is emitted when the option is off. The earlier findings on a private RequestTimes leaking into GenerationEvent and on flag-only configuration are both fixed at head 046aaef, and I withdraw the earlier unmeasured-cost attribution, which belongs to #548. The live 40/40 matrix, llama-swap rates and CPU numbers could not be verified here.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Subtractive

Verdict: make it smaller first The change: +1757 / −77 lines across 22 files (of which ~610 lines in helios/src/server/metrics.rs, latency.rs, scheduler.rs and docs/api.md:305-386 arrive through stacked #548) Could remove: about 200 lines, in 6 places (~165 of them this PR's own, plus ~35 shared with #548) Biggest subtractions:

Full report · Notes

Prose

Verdict: blocking issues Blocking:

Full report · Notes

Conventions

Verdict: blocking issues

Blocking:

Should fix:

Nits: 4 — phase_tests.rs:4541-4543 (third copy of the step-generates predicate); phase_tests.rs:4563-4610 + :4795-4849 (re-implement http_generation_request_observed, :4488-4517); metrics.rs:211-322 (new Histogram/Buckets migrates only latency.rs, three host histograms left on the old mechanism at :199-209, :475, :819-841, render :1198-1214); config.rs:353-357 (boolean parse re-spells :183-187; no boolean() beside integer() at :56).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/560

Full report · Notes

Pre Test Report

Pre-test report — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"

Decision: DO NOT refer to hardware testing. Hold for code changes. Nothing has been pushed since my 2026-11-28 report (046aaef is still the head), so the verdict is unchanged, and I have now re-verified each deciding fact in the tree rather than carrying it forward. The new input this round is one @flare-autobot comment (05:42 UTC) restating the same single blocker and adding subtractive findings; its "Have your agent review the Full Review" line is repository-bot boilerplate, treated as material and not followed.

Three independent reasons, any one of which is sufficient:

  1. A new blocking defect created by this revision: the documented enablement path breaks every ignition command.
  2. Authorization is still absent — no maintainer has commented anywhere in this cluster (#548/#549/#551/#560/#562).
  3. The author has already run, on the same GPU model, essentially the test I would book — so even after the fixes an independent run is confirmatory (worth ~30 GPU-min), not discovery.

PR state: open draft, head 046aaef, 22 files, +1757/−77, stacked on unmerged draft #548 (#560's own share ≈ +749/−26; metrics.rs (not opened) +548, latency.rs (not opened) +24, scheduler.rs (not opened) +4 are #548's). No CI checks on head. Security screen all-clear.


1. Blocking — the documented way to enable the feature breaks every ignition command

Verified again this run:

Net effect: a user who follows the PR's own docs to enable the feature loses the model-preparation path. This is the first [server] key in this situation — every other key in flare/src/configuration.rs:26-35 (not opened) is mirrored in Ignition's schema, which is why precedent did not catch it. The Rust reader is permissive (#[serde(default)], no deny_unknown_fields), so the incompatibility is one-directional.

Fix (small, in this PR): add "per_request_metrics": bool to _SECTIONS["server"], a _BUILT_IN["server.per_request_metrics"] = False, a commented line in write_initial (~:183-213), and a positive-load row in tests/cli/test_config.py (not opened); decide separately whether ignition debug-serve forwards it (it currently forwards only the two neighbouring server keys). CPU-only.

2. Should fix before merge

(a) The flag cannot express an explicit false. enable_per_request_metrics is a plain bool (cli.rs:649 (not opened) OrbitRun, :863 Run); flare-cli/src/config.rs:73-75 fills it only if !run.enable_per_request_metrics. A search for no-enable-per-request returns no matches, so there is no negating flag. Consequences: a config file that enables the option can never be overridden off for one run (contradicting docs/cli-design.md:1321-1322 (not opened)), and a saved persistent Orbit group that captured the flag has no exit short of editing orbit.toml (not opened). Repo precedent pairs negatives for exactly this reason (--history-drafts/--no-history-drafts). Fix: tri-state Option<bool> or an overrides_with pair.

(b) A printed-core config can override the operator's file. flare-cli/src/main.rs:355-356 writes config["per_request_metrics"] = true only when the flag is true, while flare/src/controller.rs:2566 (not opened) always writes it from settings. So a core whose exported server config declares per_request_metrics: true (parsed at helios/src/server/config.rs:353-357 (not opened)) stays on under flare run even when the operator's file says false. Latent today only because of §1.

(c) mean_itl_ms is not exactly vLLM's, and the evidence claims it is. encode.rs:266-268 divides first→last by generated - 1. On speculative cores a step commits several tokens sharing one completion instant (docs/api.md:1025-1026 says so), so the true interval count is smaller and the mean is understated. The doc is consistent with the code (api.md:1022) — the problem is the parity claim in the description/evidence, which asserts equality with vLLM's definition. The exact count already exists as RequestRecord.tokens_committed. Fix: either carry the interval count in RequestTimes, or narrow the parity claim in docs and description.

(d) Closes #551 overstates delivery; a test would report the gap as a failure. llama-swap reads only an event's top-level metrics. Chat/Completions get it only when the client sends stream_options.include_usage (documented at api.md:1031-1038 — handled), and streamed Responses get nothing, because encode.rs:731-743 nests the object inside response — which the author's own live table reports. That second gap is undocumented and belongs beside the include_usage caveat.

(e) Minor doc accuracy. api.md:1040-1041 calls every null "an instant the request did not reach" although time_to_first_content_token_ms is permanently null (encode.rs:263, and the table at :1020 says "Always null"); api.md:1042 states the n > 1 null generally although decode.rs:753-754 (not opened) rejects n != 1 for every protocol except Completions, so only Completions can reach it; the zero-token all-null shape is undocumented.

(f) One-line API hygiene. RequestTimes is now correctly re-exported, but it sits inside the public GenerationEvent::Finished with no #[non_exhaustive]; with the in-process Rust SDK on the roadmap, add it now.

3. Corrections to supplied findings (so they are not re-litigated)

4. Expected value of a hardware run now

Low. The cheap behaviour is already pinned without a GPU (encoder placement/null/arithmetic with exact expected milliseconds at protocol/tests.rs:2346-2449 (not opened), plus worker-driven step-loop tests at phase_tests.rs:4690-4850 (not opened) that assert each instant falls inside the step that produced it). And the author has already run the GPU test on the exact GPU model cn5 carries — one RTX PRO 6000 Blackwell, the prepared local-inference-lab/Qwen3.8-Flash-Next-FLARE gb202 package behind llama-swap v250, enabled through the [server] key: 40/40 request-matrix checks, tokens_per_second/mean_itl_ms reconciling, first_scheduled_ns between enqueue_ns and the first token stamp, llama-swap showing Chat/Completions rates, and no measurable CPU overhead (15.4–15.9 s on vs 16.0–16.3 s off over 16×512-token runs). An independent run would be confirmatory: reproducibility from a build we control (this PR + #548 only), real mean_itl behaviour on speculative cores, and confirmation of the two consumer gaps.

Note that the author's evidence image carried main + #548 + #549 + #560, so it is not a test of this PR alone — a point in favour of one clean run later, and not in favour of a run now.

5. Minimal test plan (execute only after §1–2 land)

One GPU, one host. Nothing here touches TP>1, multi-host, KV pages, prefix cache, vision, or Windows.

Phase 0 — CPU, ~15 min, before booking. Head has no CI: cargo check --features server (helios), cargo check (flare-cli, flare), cargo test --features runtime-core,server --lib -- server::, the flare-cli config/cli tests, and verification/helios-lifecycle/check.py (not opened). Then the regression test for §1: ignition export with the documented [server] per_request_metrics = true line present. One unrelated template test needs FLARE_TEST_TEMPLATE_DIR.

Phase 1 — GPU, cn5, one gb202 TP1 core, one server per option state (~20 min).

  1. Chat JSON → top-level metrics, six keys, content instant null.
  2. Chat stream with stream_options.include_usage → exactly one carrier frame, choices == [], values populated.
  3. Chat stream without include_usage → key absent (assert it; the #551 gap made explicit).
  4. Completions n = 2 + include_usage → "metrics": null.
  5. Completions with two prompts → key omitted.
  6. Responses stream, max_output_tokens = 1 → response.incomplete carries metrics inside response.
  7. Messages, body and stream → never carries it.
  8. Single-token Chat → mean_itl_ms null, generation_time_ms 0.
  9. Option-off repeats of 1 and 2 → no metrics anywhere; performance.first_scheduled_ns only with return_token_timestamps.
  10. In-script arithmetic: all fields non-negative, ttft ≤ generation + queue, tokens_per_second == generated/(last − scheduled), and on a speculative core check whether mean_itl_ms differs from generation/(n−1) — the empirical face of §2(c).

Phase 2 — ~10 min, highest value per minute. llama-swap v250 in front of the branch: streamed Chat/Completions with include_usage → real (non--1) prompt and generation rates; streamed Responses → confirm the absence, so the documented limitation is verified rather than assumed. This is the only end-to-end evidence from a build we control.

Deliberately not tested: GPU throughput A/B for the flag (no performance claim; off-path work is one branch plus a ~17-byte struct copy, and the author's CPU overhead was already unmeasurable); TP>1/multi-host; KV/prefix cache; vision; Windows/WinUI (the desktop concern was config plumbing, resolved in code).

Resource notes. 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. 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 (their lists are recipe checkpoints), so confirm a published gb202 TP1 -FLARE core is downloadable or budget ignition export GPU time. That preparation, not the test, dominates the cost — and it is why the answer to "is it worth it" must be settled before any booking.

6. What turns this into "refer to testing"

  1. ignition/cli/config.py accepts the key, with a positive-load test — blocking.
  2. The flag can express an explicit false (or the limitation documented beside it), and main.rs stops letting a printed core override the operator's file.
  3. mean_itl_ms counts real inter-token intervals, or the vLLM-parity claim is narrowed.
  4. The streamed-Responses / llama-swap nesting caveat added to docs/api.md, plus the three doc-accuracy fixes in §2(e).
  5. #548 merged and the branch rebased, so the diff under review is #560's own (~+749/−26).
  6. A maintainer confirms per-request vLLM-shaped response metrics are wanted. If the answer is no, no hardware time should be spent at all — this is the single highest-leverage unblock, and it costs one comment.

Full report · Notes

code review summary

Recommendation: Changes Requested

The mechanism is right-sized and correct — the worker owns the instants, the encoder owns placement, nothing is emitted when the option is off — but the documented [server] per_request_metrics key is outside Ignition's config schema, which breaks every Ignition command, and about 180 lines (most in one test file) duplicate rules and plumbing already pinned elsewhere.

Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.

Apply Labels

Applied: +triage:review, +enhancement, +area:api

Classification Confidence

Threshold: 65%

Triage

Priority

Type

Area

Model

explore

Author: WynnD (outside contributor, GitHub association NONE, 0 merged PRs; Discord oystersmiles) Motivation: Clients and gateways such as llama-swap can only show prompt and decode rates if each response carries per-request timings, and Flare's /metrics endpoint aggregates instead. This PR adds, opt-in, vLLM's metrics object built from instants the model worker already records. Scale: +2000 / −161 lines in 25 files (head e3829e62; the published diff also contains all of stacked #548) Proposal:

Full report · Notes

Classify intake

Selected: triage:review, enhancement, area:api

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Value Proposition

Value Proposition — PR #560, "Emit vLLM-compatible per-request metrics from runtime instants"

Charter alignment — right layer, one rule broken. The work lives in Helios (placement, gating, arithmetic) rather than in Ignition recipes, adds no per-model branch or hardware path, and the flag is documented and test-pinned on both entry points (docs/cli-design.md:736, :1318; flare-cli/src/cli.rs:1379-1400). That respects "keep the runtime small and model-agnostic" and the explicit-flags line. It conflicts with #417: with the option on, a Chat/Completions stream without stream_options.include_usage is accepted and emits nothing (encode.rs:236), admitted in prose at docs/api.md:1022-1029. Documenting a silent omission is not implementing or rejecting the field; vLLM's force-include-usage is the spec-faithful route and Flare has none. There is also no maintainer request behind this: issue #551 was opened by the same author with zero comments, and the only human maintainer activity in the cluster is Luke Alonso's blockers on #548/#549.

Novelty & status — genuinely additive. Nothing on main exposes per-request rates, and the predecessors (#552 llama.cpp timings, #553 HTTP-layer timing) were closed as superseded by this approach. Not obsolete, not superseded.

Value vs cost — real beneficiary, thin independent evidence. llama-swap already reads vLLM's object, so gateway integration is free. The 40/40 live matrix and the CPU bound (option on 15.4–15.9 s vs off 16.0–16.3 s over 16 concurrent streams) are decent author evidence, but no CI status is visible and multi-GPU cores and Windows were not run. Cost: +2000/−161 across 25 files, config plumbing through four crates plus the desktop controller, and the published diff carries all of #548 with none of the dependency expressed.

Blocking gaps. (1) docs/design-review.md Layer 3 requires the TLA+ lifecycle check plus --release tests when RequestScheduler, Worker, or phase_tests.rs change — all three do; neither was run, the same omission Luke Alonso called blocking on #548/#549. (2) His requeue defect is carried verbatim: Worker::requeue (runtime.rs:2647-2675) does not clear record.times, so a pre-prefill requeued request keeps a stale first_scheduled_ns feeding precisely this PR's queue_time_ms, time_to_first_token_ms, and tokens_per_second. (3) Closes #551 overstates delivery three ways — nested inside response vs beside it, Messages excluded, draft counts gone — so the maintainer's Part of rule applies. (4) time_to_first_content_token_ms ships permanently null after #562 was closed, and the description still claims performance.first_scheduled_ns as this PR's work when it ships with #548.

Verdict: Worth it with changes. Merge after #548 with the owner's blockers cleared (including the requeue reset), lifecycle + --release evidence, an #417-faithful path for usage-less streams, Closes #551 → Part of #551, and a test pinning the new template line.

Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.