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:
- A new blocking defect created by this revision: the documented enablement path breaks every
ignitioncommand. - Authorization is still absent — no maintainer has commented anywhere in this cluster (#548/#549/#551/#560/#562).
- 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:
docs/api.md:1007-1008tells users to set[server] per_request_metrics = true;docs/cli-design.md(not opened) repeats it at the flag table, the[server]key list, and inside the generated sample block.ignition/cli/config.py:21-24—_SECTIONS["server"]is exactlyhost,port,api_key,thinking_token_budget,scheduler_checkpoint_extra_work_fraction. Noper_request_metrics.ignition/cli/config.py:112-114—_validateraisesUsageError(f"{path}: unknown key {key} in [{section}]")for anything outside the schema;:116-120are the only other gates (type check, and range validation forscheduler_checkpoint_extra_work_fraction).ignition/cli/config.py:19—DEFAULT_PATH = Path("~/.config/flare/config.toml (not opened)"), the same file native Flare reads;docs/cli-design.md:1313(not opened) says so outright.Configuration.loadruns for every command (ignition/cli/serve.py:127 (not opened),174,264,431,590;bench.py:144(not opened);publishing.py:31 (not opened),73,174,194), soignition export,debug-serve,join,bench,convert,edit,combine,signall fail on that key.- CI-blind: a repository search for
per_request_metricsreturns no matches underignition/and no matches undertests/. Neither file is among the 22 this PR changes.
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)
- "
flare orbit runignores the[server]key" is only partly true. Orbit's own process does not read it, but the flag is forwarded to rank zero'sflare run, which does runConfiguration::apply(flare-cli/src/config.rs:57-58); on a single-host run rank zero reads the sameconfig.toml(not opened). The doc row is wrong only for a paired rank zero using a different file — a doc nit, not a should-fix. - "The per-step clock read contradicts the PR body" — withdrawn:
runtime.rs:2272(not opened) belongs to #548's commit, and the description now attributes it correctly. - "Public
RequestTimesleak" — fixed: exported besideSnapshot. - "
Timing.streaming/ unreachablerecord_commitguard", "seven-armmatches!vsGraphKind::samples()" — fixed. - "Source comment says it does not report the content instant" (
encode.rs:248-250) — stale: that comment was rewritten; at this head it says "Flare does not report the content instant."
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).
- Chat JSON → top-level
metrics, six keys, content instant null. - Chat stream with
stream_options.include_usage→ exactly one carrier frame,choices == [], values populated. - Chat stream without
include_usage→ key absent (assert it; the #551 gap made explicit). - Completions
n = 2+include_usage→"metrics": null. - Completions with two prompts → key omitted.
- Responses stream,
max_output_tokens = 1→response.incompletecarriesmetricsinsideresponse. - Messages, body and stream → 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: all fields non-negative,
ttft ≤ generation + queue,tokens_per_second == generated/(last − scheduled), and on a speculative core check whethermean_itl_msdiffers fromgeneration/(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"
ignition/cli/config.pyaccepts the key, with a positive-load test — blocking.- The flag can express an explicit false (or the limitation documented beside it), and
main.rsstops letting a printed core override the operator's file. mean_itl_mscounts real inter-token intervals, or the vLLM-parity claim is narrowed.- The streamed-Responses / llama-swap nesting caveat added to
docs/api.md, plus the three doc-accuracy fixes in §2(e). - #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 — this is the single highest-leverage unblock, and it costs one comment.