#1 [high] PR #560 verified code citations
PR #560 head ce44060, base main, 18 files, +1898/-123. Verified at head:
ENCODER (helios/src/server/protocol/encode.rs)
- 68-72
enum RequestMetrics { Suppressed, Single(Timing) } - 73-85
struct Timingwithstreaming: boolat :80,step_ns,content_ns,times: RequestTimes - 86-110
struct Encoderwith ownstreaming: boolat :97 (initialised false :150, written only by set_logprobs :190-193) - 238-243 doc comment restating docs/api.md placement/null rules
- 244-253
enable_request_metrics(&mut self, streaming: bool) -> bool, sets Timing{streaming,..} at :250; returnsstreaming && matches!(..Single(_)):252 - 255-261
record_commit, guardif let Some(Single(timing)) = &mut self.metrics && timing.streaming(:256-258) — unreachable-false (see below) - 262-267
record_times; 270-294metrics_value(six keys, ms closure :275) - 541-551
apply: ToolChoice::Named continue precedes content latch;timing.content_ns = timing.content_ns.or(timing.step_ns):550 - 168
choices_per_promptstored; 249>1 => Suppressed
HTTP (helios/src/server/http.rs)
- 349-353 set_logprobs(..., decoded.stream); 361-363
let commits = state.per_request_metrics && encoder.enable_request_metrics(decoded.stream); - 364-375 four-arm submit: generate_many_observed / generate_observed(prompts.remove(0),..).map(|g| vec![g]) at :368-372 / generate_many_observed
- 527-530 Committed => encoder.record_commit; 531-543 Finished =>
first_scheduled_ns = times.first_scheduled_ns;at :542 (assign, not min), record_times :543 - 559-573 Chat streaming observation.finish uses
times.first_scheduled_nsdirectly (:568) - 600-619 body: Chat-only observation.finish (ingress, enqueue, first_scheduled_ns) at :609-615;
if !streaming && let Some(metrics) = encoder.metrics_value() { response["metrics"] = metrics }:617-619
RUNTIME (helios/src/server/runtime.rs)
- 62-84
output_event_capacity(minimum, observed, commits),tokens.checked_mul(1 + usize::from(observed) + usize::from(commits)):72 - 97-108
Finishedvariant;arrival_ns: u64:105,times: super::metrics::RequestTimes:107 - 109-114
Committed { at_ns: u64 } - 843-869: generate -> enqueue(prompt,None,false); generate_observed :847-849;
enqueue:851-854 = enqueue_many(vec![prompt]).map(remove(0)); generate_many :856-858; generate_many_observed :862-869 (pure pass-through to enqueue_many) - 926-950 Incoming built;
arrival_ns: super::observation::monotonic_ns()at :928 inside per-prompt loop, before :965self.sender.try_send(incoming_group); enqueue_ns read later at :951-953 - 1591-1594 record.max_tokens set only at first admission
- 1746-1757 inline
matches!(kind, Prefill|TerminalPrefill|ScoredPrefill|Resume|Decode|Speculative|Mixed)thenmetrics.model_step(...)— duplicates GraphKind::samples() - 1826-1833 at position==0:
record.tokens_committed(completed_at_ns)unconditional,if incoming.commits { emit(Committed{at_ns}) } - 2253-2270
reserve_and_pack: scheduler.commit, thenlet scheduled_ns = super::observation::monotonic_ns();:2257 + per-lanetimes.first_scheduled_ns.get_or_insert(scheduled_ns):2258-2270, BEFORE pack_inputs/pack_vision (:2271-2315) which can Err - 2988 precedent
if !step.kind.samples() { return Ok(()); }
MANIFEST: helios/src/execution/manifest.rs:90-101 GraphKind::samples() = Prefill|TerminalPrefill|ScoredPrefill|Decode|Speculative|Mixed|Resume (exactly the inline list)
SERVE VISIBILITY: helios/src/server.rs:16 mod metrics; (private), :33 pub use metrics::Snapshot;, :34 pub use runtime::{Generation, GenerationEvent, ModelRuntime, Prompt}; -> GenerationEvent::Finished's times: super::metrics::RequestTimes type is not nameable outside the crate. metrics.rs:326 pub struct RequestTimes. No private_interfaces/deny attrs anywhere (search returned no matches), so cargo check is clean and the PR's claim holds — the lint does not fire for pub-in-private-module.
DECODE: helios/src/server/protocol/decode.rs:742-755 — n parsed; if protocol != Protocol::Completions && choices != 1 { return Err("n must be 1") } => Chat/Responses/Messages always one choice, so http.rs:542 last-writer-wins is latent (Completions never emits performance, http.rs:609 is Chat-only).
#2 [high] Config/CLI reachability + docs state (verified)
- flare-cli/src/cli.rs:646-648 OrbitRun
--enable-per-request-metricshelp "in rank zero's OpenAI responses"; :859-862 Run help "in OpenAI Chat, Completions, and Responses output" (two-line). No negating--no-form on either. :671-701 rank_zero_options forwards it. - flare-cli/src/main.rs:353-357:
config["api_key"]=key, thinking_token_budget, thenif args.enable_per_request_metrics { config["per_request_metrics"] = true.into(); }— written only when true, into the same JSON object Bootstrap::load parses. - helios/src/server/config.rs:343-357:
per_request_metrics: match object.get("per_request_metrics") { None=>false, Some(Value::Bool(v))=>*v, Some(_)=>Err("server configuration per_request_metrics must be a boolean") }. Reachable (per Subtractive's withdrawal, confirmed: main.rs writes the key) — NOT dead. - flare/src/configuration.rs:26-34
Server { host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction },#[serde(default)], no deny_unknown_fields (contrast PrefixCache :48-56 which does deny). flare/src/settings.rs:19-34 has no per_request_metrics (thinking_token_budget at :30, :157, :208). =>[server] per_request_metrics = truein config.toml is silently ignored; the flare library (WinUI controller / embedding SDK) cannot enable the option. - docs/cli-design.md:1317-1323 enumerates the
[server]keys nativeflare runapplies (host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction) — no per_request_metrics; :1342-1348 sample config omits it; :1384-1386 "Native Flare ignores keys it does not use, except in [prefix_cache]"; :736 is the flag row; :173 the rank-zero forwarding row. per_request_metricsappears in docs only at docs/api.md:1007, docs/cli-design.md:173,736. Neither WinUI limitation nor the missing negating flag is recorded in the repo — only in the PR body.- AGENTS.md:452-456 "A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag."
- Charter "What gets merged" (read via read_charter): merges PRs addressing a maintainer request, roadmap item, reproducible bug, measured perf/memory issue, or bad docs; "Bring real evidence" for perf PRs; roadmap #6 in-process Rust SDK is the surface GenerationEvent belongs to.
- #553 (closed, closed 2026-11-28 02:05 by author as superseded): two automated "Review Stopped — low value or does not align with the project charter" (2026-11-27 05:17, 06:40). #553 did add flare/src/configuration.rs (+5), controller.rs (+1), settings.rs (+20) — i.e. the flare-library surface #560 drops. #552 closed likewise.
- #551 open, by the same author, is the requirement (llama-swap reading vLLM
metrics); it is neither a maintainer request nor a roadmap item. #536 asks for Prometheus histograms (#548 delivers).
#3 [high] Docs gaps, cost-claim falsity, test duplication
COST CLAIM (false): PR "Claimed result" says "No clock read is added in either state"; "Cost / Option off: no commit events, unchanged event capacity, and one branch per committing step at position zero." Verified: runtime.rs:2253-2270 adds monotonic_ns() per scheduled step unconditionally (both states, and for SDK generate/generate_many callers) plus a per-lane get_or_insert; runtime.rs:1829 record.tokens_committed(completed_at_ns) also runs unconditionally at position 0. The stamp serves first_scheduled_ns for #548's histograms AND this PR's performance.first_scheduled_ns (observation.rs:70-74). Fix is wording + a measurement of the option-off path; magnitude is one clock_gettime-class read per step (trivial), so no code change required.
QUEUE_TIME BOUNDARY (misdescribed): description says "the HTTP handler reads [model-queue arrival] just before sending the request to the worker, so it includes that channel transit (microseconds)". Verified false actor/order: arrival_ns is read in ModelRuntime::enqueue_many at runtime.rs:928, inside the per-prompt build loop, before the rest of the group's admission work and before try_send at :965; enqueue_ns (observation) is read LATER at :951-953. So queue_time_ms (encode.rs:284, scheduled - arrival) includes the remaining group validation + channel send + worker pickup, and the described order of the two instants is reversed. docs/api.md:1017 defines queue_time_ms without stating where arrival is read.
DOCS CROSS-REFERENCE UNREADABLE: docs/api.md:1047-1054 introduces performance.first_scheduled_ns and per-token timestamps; a search of docs/api.md shows performance, ingress_ns, enqueue_ns, reused_prompt_tokens, token_timestamps_ns occur NOWHERE else in the file (only :1051 and a passing return_token_timestamps at :992). The authoritative description is helios/model-contract.md:344-355 (top-level performance with ingress_ns, enqueue_ns, first_scheduled_ns, reused_prompt_tokens; same monotonic origin as choices[0].token_timestamps_ns; first_scheduled_ns - enqueue_ns = wait for first step). Anchor #token-and-timing-observation resolves (model-contract.md:326 region).
TEST DUPLICATION (verified spans):
- New encoder tests: helios/src/server/protocol/tests.rs:2318-2332 (
metered), 2334-2347 (metered_generation), 2349-2453 (per_request_metrics_follow_vllm_placement_and_null_rules— exact values, single carrier, choices==[], usage, missing include_usage, Messages, n>1, several prompts, single token, unrecorded), 2455-2490 (content_instant_excludes_reasoning_tool_calls_and_suppressed_text). Magic literalassert_eq!(unrecorded.as_object().unwrap().len(), 6)at :2451. - New phase tests: phase_tests.rs:4616-4647 (
performance_reports_the_first_scheduled_model_step— keep, unique), 4693-4743 (per_request_metrics_report_the_runtime_instants_of_a_stopped_reasoning_answer— keep, unique provenance incl. within() checks :4728-4737), 4745-4797 (per_request_metrics_reach_completions_and_responses_where_vllm_places_them— carrier["choices"]==[] :4778, response.incomplete :4780, content==ttft :4791-4794 all re-proved by the encoder test; keep only the response.incomplete arm), 4799-4872 (..._absent_without_the_option_and_null_for_several_choices— flag-off loop :4802-4815 duplicates presence; n=2 block :4816-4871 hand-drives the worker for"metrics": null, re-proving protocol/tests.rs:2420-2432). - Phase-tests file grew +559 lines; api.md +178.
- config.rs:727-739 bootstrap test: absent/true/false plus rejecting 1/"true"/null loop (:734-739); only writer emits a literal (main.rs:355-357).
#4 [high] Research summary
Full Review — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Head ce44060, base main, 18 files, +1898/−123. Stacked on #548 (must merge first). Reviewed as the layer above #548, per the description.
Recommendation: request changes before merge. No serving defect was found — the layering is right (the worker owns the instants, the encoder owns placement, no HTTP clock reads), the event budget matches the worst case added, and with the option off nothing is requested or emitted. Two blockers are scope/evidence: no named requirement authorizes the change, and the Cost section claims "No clock read is added in either state", which runtime.rs:2257 contradicts.
Key findings
- No maintainer request, roadmap item, bug or measurement authorizes this PR (charter "What gets merged"). The requirement is a third-party gateway reading vLLM's
metrics, argued by the same author in #551; #552 and #553 were both halted by review on exactly this ground. - The stated cost is wrong:
reserve_and_packreadsmonotonic_ns()for every scheduled step, in both flag states (helios/src/server/runtime.rs:2257-2270), andtokens_committedruns unconditionally at position zero (:1829). The magnitude is oneclock_gettime-class read per step, so the fix is wording plus a measurement, not code. - A public enum gained a field whose type cannot be named outside the crate (
GenerationEvent::Finished.times: super::metrics::RequestTimes, private module) —helios/src/server/runtime.rs:107vshelios/src/server.rs:16,33-34. - The option has no configuration-file home, and the key it does accept is silently dropped by
flare/src/configuration.rs:26-34(nodeny_unknown_fields), so[server] per_request_metrics = trueis accepted with no error and no effect — and the two consequences the description admits are recorded nowhere in the repository. - ~140–175 added lines can go with no behaviour lost, almost all in
phase_tests.rs(+559) anddocs/api.md(+178), plus one dead encoder field, one redundant admission wrapper and one duplicatedGraphKindpredicate.
Verified sound and needing no change: event-budget arithmetic (runtime.rs:62-84); Committed emitted at position 0 before the step's tokens so the content instant can never latch from a later step (runtime.rs:1826-1833); request times survive preemption (Incoming.record moves with the request; record.max_tokens set only at first admission, runtime.rs:1591-1594); option-off wiring (http.rs:363); the content instant skips reasoning, tool-call output, empty text and named-tool-choice-discarded text (encode.rs:541-551); the six field definitions against encode.rs:275-293; the metrics: null vs absent divergence (disclosed in description and docs/api.md:1038-1045); flag forwarding parity with --api-key-file (flare-cli/src/cli.rs:671-701, port-style block per struct); flare_arc/CLI test for rank zero's re-parse.
Blockers
1. Authorization and evidence for a runtime-touching, third-party-motivated feature
Where: charter "What gets merged" and "Bring real evidence"; AGENTS.md:188-193,201-205; PR "Cost" and "Claimed result"; #551, #552, #553.
What is wrong: the charter merges PRs that address "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". Here the requirement is llama-swap reading vLLM's metrics object; the only issue stating it, #551, is open and authored by the same person — neither a maintainer request nor a roadmap item. #553 records two automated "Review Stopped — low value or does not align with the project charter" (2026-11-27 05:17 and 06:40) and was closed as superseded; #552 is closed likewise. AGENTS.md:188-193 is explicit that new switches need "a concrete requirement" and that hypothetical consumers do not establish one. Separately, the change adds work to the worker hot path in both states (see Blocker 2), and the description states "CPU overhead under load was not measured", while the charter asks runtime changes to "bring real evidence".
Why it matters: this is the exact ground the two predecessors were stopped on, so merging without it repeats a rejected decision. The engineering is good; the question is whether the feature is wanted.
What settles it: a maintainer statement on #551 or in the PR that per-request response metrics are wanted (plus, for a roadmap link, entry under charter roadmap #6 in-process Rust SDK, whose public surface item 3 repairs), and a before/after option-off throughput/latency number on a served workload against main.
2. "No clock read is added in either state" is false, and the option-off branch count understates the diff
Where: helios/src/server/runtime.rs:2253-2270 (read at :2257, per-lane stamp :2258-2270), :1826-1833; PR description Claimed result and Cost.
What is wrong: reserve_and_pack calls super::observation::monotonic_ns() for every scheduled step, unconditionally, and stamps record.times.first_scheduled_ns per lane. That read runs with the flag on and off, and for SDK callers of generate/generate_many that never reach HTTP. record.tokens_committed(completed_at_ns) at :1829 is likewise unconditional. The stated "only added work is one predictable branch per committing step at position zero" and "No clock read is added in either state" are therefore both wrong for the code at head.
The instant serves two consumers — #548's request histograms and this PR's own client-visible performance.first_scheduled_ns (helios/src/server/observation.rs:70-74, helios/src/server/http.rs:609-615) — so it is mandatory, but it is a new per-step read introduced by the change set and the claim is checkable and false.
Why it matters: reviewers judge hot-path impact from the Cost section; a cost claim that the code contradicts is worse than a disclosed cost. The magnitude itself is trivial (one clock read beside a kernel launch).
Requested change: in Claimed result and Cost, state that one monotonic read per scheduled model step is added (serving first_scheduled_ns for both the histograms and performance.first_scheduled_ns) and that Committed adds no read of its own because it reuses the instant the histogram path already took; and record the option-off measurement under Blocker 1 rather than asserting "unchanged cost". No code change requested.
Should Fix
1. GenerationEvent::Finished.times has a type no out-of-crate consumer can name
Where: helios/src/server/runtime.rs:104-108 (field times: super::metrics::RequestTimes at :107), helios/src/server/metrics.rs:324-330 (pub struct RequestTimes), helios/src/server.rs:16 (mod metrics; private), :33 (pub use metrics::Snapshot;), :34 (pub use runtime::{Generation, GenerationEvent, ModelRuntime, Prompt};).
What is wrong: GenerationEvent is re-exported publicly, but Finished's new field is typed with a type from a private module. An out-of-crate consumer of flare_helios::server::GenerationEvent cannot name it, so it can read the instants only by destructuring other fields, and it cannot construct a Finished event in a test or a substitute runtime. Before this PR Finished was all primitives. docs/api.md and helios/model-contract.md now describe the field as contract. I confirmed no private_interfaces/deny/warn attribute exists in the tree, so cargo check --features server being clean is consistent — the lint simply does not fire for pub-in-private-module.
Why it matters: the charter roadmap's in-process Rust SDK (#6) is the consumer of this public enum; publishing an unnameable field is a permanent wart in that surface.
Requested change (either): re-export alongside Snapshot (pub use metrics::RequestTimes; at helios/src/server.rs:33), or keep the instants off the public event — they are consumed only by the HTTP encoder, so exposing them via Incoming/Generation would leave the public enum's shape unchanged. The primitive arrival_ns: u64 at runtime.rs:105 is fine.
2. Flag-only home plus a silently ignored configuration key, and the admitted limitations exist only in the PR body
Where: flare-cli/src/cli.rs:646-648 (Orbit), :859-862 (run), :697-699 (forwarding); flare-cli/src/main.rs:353-357; helios/src/server/config.rs:353-357; flare/src/configuration.rs:26-34; flare/src/settings.rs:30,157,208; docs/cli-design.md:1317-1323,1342-1348,1384-1386,736; AGENTS.md:452-456; description "Material limitations".
What is wrong: two holes.
flare/src/configuration.rs:26-34andflare/src/settings.rs:19-34carry noper_request_metrics, so theflarelibrary path (WinUI controller, embedding SDK) cannot enable the option at all. #553 did add that surface (flare/src/configuration.rs,controller.rs(not opened),settings.rs); this PR drops it.ServerderivesDeserializewith#[serde(default)]and nodeny_unknown_fields(contrastPrefixCache,configuration.rs:48-56, which denies), so an operator writing[server] per_request_metrics = truegets no error and no effect — the same "accept it and quietly drop it" failure the charter forbids for API fields, one layer down, and consistent withdocs/cli-design.md:1384-1386.- The two consequences the description admits ("the WinUI controller reads only configuration settings and cannot enable the option"; "a persistent Orbit group that saves the flag cannot turn it off without a negating flag") are true — no negating flag exists in
cli.rs:646,859and no configuration mapping exists — but neither appears anywhere in the repository.per_request_metricsoccurs indocs/only atdocs/api.md:1007anddocs/cli-design.md:173,736.AGENTS.md:57-60forbids leaving durable limitations in the PR body.
Why it matters: AGENTS.md:452-456 gives a setting exactly one home; the PR picks the flag but leaves the runtime accepting a key no front end can supply, and hides the consequence in a description that will not be read next month.
Requested change (either):
- add
per_request_metrics: Option<bool>toflare/src/configuration.rs::Server, thread it throughSettingsintoServerConfigas #553 did, and add the key todocs/cli-design.md:1317-1319and the sample at:1342-1348; or - keep the flag as the only home and make the miss explicit — reject
[server] per_request_metricswhere the configuration is parsed (or add the key to adeny_unknown_fieldsset) — and record both limitations in thedocs/cli-design.md:736row ("no[server]configuration key and no negating flag; saved Orbit groups must be recreated to disable it") plus a line near:1317-1323.
3. queue_time_ms's boundary is described with the wrong actor and the wrong order
Where: description "Material limitations" bullet 1; docs/api.md:1017; helios/src/server/runtime.rs:926-953,965; helios/src/server/protocol/encode.rs:284.
What is wrong: the description says the HTTP handler "reads [model-queue arrival] just before sending the request to the worker, so it includes that channel transit (microseconds)". The HTTP handler never reads it. ModelRuntime::enqueue_many reads arrival_ns while building Incoming, inside the per-prompt loop (runtime.rs:928), before the rest of that group's admission work and before self.sender.try_send(incoming_group) at :965; the observation enqueue_ns is read later, at :951-953. So queue_time_ms (scheduled − arrival, encode.rs:284) covers the remaining group validation plus channel send plus worker pickup — more than "channel transit", and the order the text implies for arrival vs enqueue is reversed.
Why it matters: the bullet exists precisely to tell a reader how far queue_time_ms sits from vLLM's engine-core scheduler queue; it understates the gap and asserts an unmeasured magnitude (microseconds).
Requested change: description — "queue_time_ms starts at model-queue arrival, which the runtime reads when it builds the request group, before publishing the group to the worker channel; it therefore includes the channel send and worker pickup, and starts later than vLLM's engine-core scheduler queue." docs/api.md:1017 — append the same clause so the document states the boundary rather than only the interval.
4. docs/api.md refers to a performance shape it never documents
Where: docs/api.md:1047-1054; helios/model-contract.md:344-355; helios/src/server/observation.rs:70-74.
What is wrong: the new passage says "Chat token observation reports the same first scheduled step as performance.first_scheduled_ns, beside per-token timestamps; the prepated model contract defines those fields." A search of docs/api.md shows performance, ingress_ns, enqueue_ns, reused_prompt_tokens and token_timestamps_ns appear nowhere else in the file (only this line, plus a passing return_token_timestamps at :992). A reader of the HTTP API reference therefore cannot learn that performance is a top-level object on timed Chat responses only, which four fields it holds, that they are absolute nanoseconds on a process-local monotonic origin shared with choices[0].token_timestamps_ns, or that token_timestamps_ns aligns with choices[0].token_ids. The description's claim that "a client can compute the same intervals from Flare's own shape" is supported only from the component contract.
Why it matters: AGENTS.md:46-50 and the repo-prose skill require prose that a reader with the repository can act on; a self-comparison is not a definition.
Requested change: replace the paragraph's second half with one sentence stating the shape — "A Chat request with return_token_timestamps: true also receives the same first scheduled step as performance.first_scheduled_ns, a top-level object emitted on timed responses beside ingress_ns, enqueue_ns and reused_prompt_tokens; these are absolute nanoseconds on the same process-local origin as choices[0].token_timestamps_ns, so first_scheduled_ns - enqueue_ns is the wait for the first model step" — and keep the existing link to helios/model-contract.md (anchor resolves, model-contract.md:326).
Subtract / Simplify
Net: about 140–175 of +1898 lines (≈8%) removable with no behaviour lost. Ranked by lines saved.
X1. Delete Timing::streaming and the record_commit guard — ~10–12 lines (should fix)
helios/src/server/protocol/encode.rs:79-80 (field), :250 (Timing { streaming, .. }), :255-261 (guard). enable_request_metrics returns streaming && matches!(self.metrics, Some(Single(_))) (:252), and http.rs:363 passes that result as commits, so every record_commit call reaches a Single timing whose streaming was set from the same streaming == true. The && timing.streaming clause at :257 is unreachable-false, and step_ns has no other reader (:543-551). Delete the field and the clause:
pub fn record_commit(&mut self, at_ns: u64) {
if let Some(RequestMetrics::Single(timing)) = &mut self.metrics {
timing.step_ns = Some(at_ns);
}
}
Do not also drop enable_request_metrics's streaming parameter in favour of Encoder::streaming (:97): that field is written only by set_logprobs (:190-193), which needs a Frontend, and the new encoder tests construct encoders through metered() (tests.rs:2318-2332) without ever calling it. Keep the parameter; delete only the duplicate field. (The Conventions lens proposed reading self.streaming; that change would break those tests.)
X2. Collapse generate_observed and enqueue into the existing enqueue_many — ~12 lines (should fix)
helios/src/server/runtime.rs:843-854: generate_observed (:847-849) → enqueue (:851-854) → enqueue_many, a third admission spelling for one prompt. Its only non-test caller, helios/src/server/http.rs:368-372, immediately re-wraps the result in vec![g]. Call state.model.generate_many_observed(vec![prompts.remove(0)], Some(observation.timestamps), commits) there instead; then enqueue has one caller left (generate, :843-845) and can be inlined:
pub fn generate(&self, prompt: Prompt) -> Result<Generation> {
self.enqueue_many(vec![prompt], None, false).map(|mut group| group.remove(0))
}
Delete generate_observed and enqueue, and the two test call sites that exist only to exercise them (runtime/phase_tests.rs:3749,3803). Keep generate, generate_many (option-off paths, protocol/decisions/mod.rs:838 (not opened), response_lifecycle_tests.rs:122 (not opened)) and generate_many_observed (two real call sites, http.rs:367,374). Note this supersedes the Subtractive lens's weaker variant ("delete generate_many_observed"): that wrapper is reached twice and removing it saves only its signature, whereas generate_observed/enqueue disappear entirely.
X3. Delete the phase tests that re-prove the encoder's placement and null rules — ~90–100 of +559 lines (should fix)
helios/src/server/protocol/tests.rs:2349-2453 already pins, in one place: exact values per protocol, the single carrier frame, choices == [], usage presence, missing include_usage, Messages omitted, n > 1 → null, several prompts → omitted, single-token null, and the all-null shape. helios/src/server/runtime/phase_tests.rs re-proves the same rules through full worker runs:
:4745-4797re-assertscarrier["choices"] == json!([])(:4778) and content-TTFT == TTFT (:4791-4794) — both strictly weaker than the encoder assertions. Keep the uniqueresponse.incompleteoutput-limit arm (:4780) and the instant reconciliation (:4783-4789); drop the rest.:4799-4815the flag-off loop duplicates presence/absence coverage; the only new fact is thatstate.per_request_metricsreacheshttp.rs:363and the runtimecommitsflag. Replace both loops with one ~20-line test that serves once with the flag on and once off and asserts presence/absence pluscommits.:4816-4871(56 lines) hand-drives the worker channel to observe"metrics": nullforn = 2— already covered byprotocol/tests.rs:2420-2432.
Keep per_request_metrics_reach…'s remaining assertions and, above all, performance_reports_the_first_scheduled_model_step (:4616-4647) and per_request_metrics_report_the_runtime_instants_of_a_stopped_reasoning_answer (:4693-4743) — those prove the instants land inside the right worker step (within() checks at :4728-4737), which nothing else does. Also fold the redundant :4741 into :4641.
X4. Cut the docs/api.md histogram prose that restates the Prometheus HELP strings — ~35–40 of +178 lines (should fix)
Each population is stated three times: the HELP string shipped with the series (helios/src/server/metrics.rs:1548-1600, e.g. request_queue_seconds at :1554-1558, inter_token_latency_seconds at :1588-1592), the prose at docs/api.md:305-386, and the vLLM correspondence table at :475-517. Compare docs/api.md:328-346 with metrics.rs:1554-1577: near-identical wording. Reduce docs/api.md:311-386 to the facts only the prose can carry — which histograms pair, that they accumulate since server start, and the cancelled/failed exclusion — and let the table at :475-517 tie a vLLM name to a Flare series. This block arrives through #548; agree the cut with that PR rather than duplicating it in both.
X5. Trim the "Per-request metrics" section's restatements — ~25–30 lines (nit)
docs/api.md:1038-1045 restates null rules the table directly above (:1015-1022) already defines and that metrics_value computes (encode.rs:270-293); two sentences suffice: "all six keys are always present; a field is null when the request did not reach the instants it spans (content: bodies and non-text streams; itl: a single token; token fields: no generation)". docs/api.md:1047-1050 restates the event-budget/cost statement that helios/model-contract.md:361-364 carries normatively and links to in the same paragraph. Keep the table, the placement paragraph (:1031-1036), the two-sentence null rule, the shortest form of Should Fix 4, and the model-contract link.
X6. Replace the inline GraphKind list with GraphKind::samples() — ~9 lines (should fix)
helios/src/server/runtime.rs:1746-1757 spells seven graph kinds inline to decide metrics.model_step(...). That is exactly the predicate helios/src/execution/manifest.rs:90-101 defines as samples() (same seven variants, different order), and the same file already consumes it at runtime.rs:2988. A seventh spelling is a second source of truth: a future sampling kind updates samples() and every consumer except this one, and flare_model_step_tokens then silently stops counting it — a drift no test pins. Change to if kind.samples() { self.metrics.model_step(prefill + generated.len() as u64); }. It also expresses the docs sentence added at docs/api.md:383-386, since !samples() is precisely "initialization, restore, vision, and snapshot graphs".
X7. Delete the config bootstrap strict-type loop — ~14 lines (nit, marginal)
helios/src/server/config.rs:734-739 rejects 1, "true" and null. The key's only writer emits a literal (flare-cli/src/main.rs:355-357), and the shipped CLI test per_request_metrics_flag_is_off_by_default_and_reaches_rank_zero (flare-cli/src/cli.rs:1378-1401) covers the flag. Keep the absent/true/false assertions (:727-733); drop the rejecting loop. Least certain of the seven cuts.
Nits
N1. first_scheduled_ns is last-writer-wins in the HTTP handler
helios/src/server/http.rs:542 assigns (first_scheduled_ns = times.first_scheduled_ns;) and :609-615 builds the body's performance from it. With several Finished events the reported value is the last request's, not the earliest. Latent today — helios/src/server/protocol/decode.rs:742-755 rejects n != 1 for every protocol except Completions, and performance is Chat-only (http.rs:609) — so fold anyway: first_scheduled_ns = match (first_scheduled_ns, times.first_scheduled_ns) { (Some(a), Some(b)) => Some(a.min(b)), (a, b) => a.or(b) };.
N2. The first-scheduled stamp precedes a submission that can fail
helios/src/server/runtime.rs:2257-2270 stamps after self.scheduler.commit(step, fence)? and before pack_inputs/pack_vision (:2271-2315), which can return Err. A request whose packing fails keeps a scheduled instant for a step that never executed, and queue_time_ms then describes a step that never ran. Only reachable on the failed-request path (excluded from the histograms, error response), so cosmetic — stamp after a successful pack, or clear the field on the error path.
N3. Magic key count in the encoder test
helios/src/server/protocol/tests.rs:2451 asserts unrecorded.as_object().unwrap().len() == 6, a literal that must track the six keys spelled at :2357-2366. Build the all-null object once from the same key list and compare whole values, so adding a field breaks one place.
N4. The doc comment restates docs/api.md
helios/src/server/protocol/encode.rs:238-243 enumerates placement for all four protocols, the multi-prompt omission and the several-choice null — all stated again in docs/api.md:1031-1045 and partly again in enable_request_metrics's own body. AGENTS.md:190-192 does not count comment expansion as a contribution. Keep only what the code cannot show: "Places vLLM's per-request metrics (see docs/api.md) and returns whether the content instant applies, i.e. whether the worker must send Committed events."
N5. The same flag is described two ways
helios/src/server/../flare-cli/src/cli.rs:646 (Orbit) says "in rank zero's OpenAI responses"; :859-860 (run) says "in OpenAI Chat, Completions, and Responses output" over two lines. Use the run wording in both so flare run --help and flare orbit run --help agree, and align with docs/cli-design.md:736.
Open questions / not verified
- Whether the duplicated HTTP-level carrier assertions in
phase_tests.rs:4778,4791-4794were added deliberately as an end-to-end guard against encoder/handler drift. If a maintainer wants that guard, X3 shrinks to theprotocol/tests.rs-adjacent half; a comment on the test stating the intent would settle it. - Whether the WinUI controller's persisted server-configuration object could carry
per_request_metricsfrom a file the application writes — the Windows source is not in this tree; Should Fix 2 is stated from theflare::configurationschema only. - Whether
queue_time_ms's extra span (group validation + channel send + worker pickup) is materially more than "microseconds" — a measurement question; Should Fix 3 asks only that the text stop asserting an unmeasured magnitude. - Not re-run: the test suites and both
cargo checkcommands reported in the description; no GPU, live server, llama-swap, gateway or Windows verification exists for this PR, per its own Evidence section.#548remains open, so the histogram half of the diff (and thedocs/api.mdblock X4 cuts) cannot be judged independently.
#5 [high] Subtraction inventory with line savings (final X1–X7)
Net ≈140–175 of +1898 lines (≈8%) removable, no behaviour lost. Ranked:
X1 (should fix, ~10–12 lines, encode.rs): delete Timing::streaming (encode.rs:79-80, set :250) and the && timing.streaming clause in record_commit (:255-261). Unreachable-false because :252 returns streaming && matches!(..Single(_)) and http.rs:363 feeds that to commits. Replacement body:
pub fn record_commit(&mut self, at_ns: u64) {
if let Some(RequestMetrics::Single(timing)) = &mut self.metrics {
timing.step_ns = Some(at_ns);
}
}
RECONCILIATION: Conventions lens proposed reading self.streaming (Encoder field :97) instead — REJECT that: Encoder::streaming is written only by set_logprobs (:190-193) which requires a Frontend; encoder tests build via metered() (tests.rs:2318-2332) and never call it, so they could not set streaming. Keep the parameter, delete only the duplicated field.
X2 (should fix, ~12 lines, runtime.rs): delete generate_observed (:847-849) and enqueue (:851-854). Caller http.rs:368-372 becomes state.model.generate_many_observed(vec![prompts.remove(0)], Some(observation.timestamps), commits); generate (:843-845) inlines self.enqueue_many(vec![prompt], None, false).map(|mut g| g.remove(0)). Drop test call sites runtime/phase_tests.rs:3749,3803. Keep generate, generate_many (decisions/mod.rs:838, response_lifecycle_tests.rs:122) and generate_many_observed (two call sites, http.rs:367,374).
RECONCILIATION: Subtractive lens proposed deleting generate_many_observed (weaker, ~12 lines of signature only). SUPERSEDED — delete generate_observed/enqueue instead.
X3 (should fix, ~90–100 of phase_tests.rs +559): delete the phase assertions re-proving encoder rules — phase_tests.rs:4778 (choices==[]), :4791-4794 (content==ttft), the flag-off loop :4802-4815 (replace with one ~20-line on/off test), and the 56-line n=2 worker-drive block :4816-4871 (covered by protocol/tests.rs:2420-2432). KEEP phase_tests.rs:4616-4647 (performance_reports_the_first_scheduled_model_step), :4693-4743 (stopped reasoning provenance, within() at :4728-4737), :4780 (response.incomplete), :4783-4789. Fold :4741 into :4641.
X4 (should fix, ~35–40 of docs/api.md +178): histogram populations are stated 3×: HELP strings metrics.rs:1548-1600 (request_queue_seconds :1554-1558, inter_token_latency_seconds :1588-1592), prose docs/api.md:305-386 (near-identical wording to :328-346), vLLM table docs/api.md:475-517. Cut :311-386 to the facts only prose carries (which histograms pair, accumulate since server start, cancelled/failed exclusion); let the table at :475-517 map vLLM names. Arrives via #548 — agree the cut with that PR.
X5 (nit, ~25–30 lines): docs/api.md:1038-1045 restates the null table at :1015-1022 and encode.rs:270-293 → two sentences; :1047-1050 restates the budget/cost statement carried normatively by helios/model-contract.md:361-364 and linked in the same paragraph.
X6 (should fix, ~9 lines, runtime.rs): runtime.rs:1746-1757 inline 7-variant match → if kind.samples() { self.metrics.model_step(prefill + generated.len() as u64); }. GraphKind::samples() = manifest.rs:90-101 (same seven, different order); precedent in same file runtime.rs:2988; docs/api.md:383-386 sentence is exactly !samples().
X7 (nit, marginal, ~14 lines): delete config.rs:734-739 strict-type loop (rejects 1/"true"/null); keep :727-733 absent/true/false; covered by flare-cli/src/cli.rs:1378-1401.
#6 [high] Final report structure, counts, and reconciliation decisions
VERDICT: request changes before merge. No serving defect. Layering right; event budget matches worst case; option-off requests/emits nothing. Both blockers are scope/evidence.
COUNTS (must match summary): Blockers 2, Should fix 4, Subtract/Simplify 7, Nits 5.
BLOCKERS B1 Authorization + evidence: no maintainer request/roadmap item/bug/measurement (charter "What gets merged"); #551 open, same author; #552/#553 halted by review on that ground (#553 comments 2026-11-27 05:17, 06:40, closed 2026-11-28 02:05 as superseded); AGENTS.md:188-193,201-205; "CPU overhead under load was not measured". Settle: maintainer statement on #551 + option-off before/after on a served workload. B2 False cost claim: runtime.rs:2257 unconditional per-step monotonic_ns() + per-lane get_or_insert (:2258-2270), and :1829 tokens_committed unconditional — contradicts "No clock read is added in either state" and "one branch per committing step". Serves both #548 histograms and performance.first_scheduled_ns (observation.rs:70-74). Fix = wording + measurement, no code.
SHOULD FIX
S1 public GenerationEvent::Finished.times: private-module type (runtime.rs:107, server.rs:16,33-34). Fix: re-export pub use metrics::RequestTimes; at server.rs:33, or keep instants off the public enum. No private_interfaces/deny/warn attrs in tree → cargo check clean is consistent.
S2 flag-only home + silently ignored [server] key + limitations only in PR body. Fix: either add Option to flare/src/configuration.rs::Server + Settings + docs/cli-design.md:1317-1319,1342-1348 (as #553 did), or reject the key and record both limitations at cli-design.md:736 + near :1317-1323.
S3 queue_time_ms boundary misdescribed (wrong actor, reversed order). Prose lens finding 1; verified against runtime.rs:928 vs :951-953 and :965. Fix description + docs/api.md:1017.
S4 docs/api.md:1047-1054 references a performance shape the file never documents (search: only :1051, plus return_token_timestamps :992). Fix: state the four-field top-level shape + shared monotonic origin + derive first_scheduled_ns - enqueue_ns; keep model-contract.md#token-and-timing-observation link (anchor resolves at model-contract.md:326).
NITS: N1 http.rs:542 last-writer-wins → min-fold (latent: decode.rs:742-755 rejects n≠1 except Completions; performance is Chat-only http.rs:609). N2 first_scheduled stamp precedes fallible pack (runtime.rs:2257-2270 vs :2271-2315). N3 magic 6 at tests.rs:2451 (key list at :2357-2366). N4 encode.rs:238-243 doc comment restates docs/api.md. N5 help-text asymmetry cli.rs:646 vs :859-860.
RECONCILIATION CALLS
- Combined prose-only items (S3/S4 description+docs wording) into Should fix rather than Blockers, per instruction 3; no "Discord:" omission exists (description has it) — nothing to report there.
- Paths: merged and re-derived → B2, S3, S4 (not separate).
- Conventions #2 (
Timing.streaming→self.streaming) overridden by X1 (keeps tests working). Conventions #1 (GraphKind list) = X6. Conventions nit 4 (boolean() helper) DROPPED as addition, not subtraction (X7 preferred). Conventions nit 3 (host-cache histograms onto Histogram) reported only as follow-up, not a finding. - Subtractive #5 (delete generate_many_observed) superseded by X2. Subtractive #1 folds into X3; #2 into X4; #3 into X5; #4 into X1; #6 = X7.
- Correctness "investigated and dropped" items (config key reachable; mean_itl token-vs-step) NOT re-reported as findings — recorded as verified-sound.
- Architecture finding on GenerationEvent → S1; its config finding → S2; its scope finding → B1.
VERIFIED SOUND (state briefly, no action): event budget runtime.rs:62-84; Committed at position 0 before tokens runtime.rs:1826-1833; times survive preemption (Incoming.record, runtime.rs:1591-1594); option-off wiring http.rs:363; content instant skips reasoning/tool-call/empty/named-tool-choice (encode.rs:541-551); six field definitions vs encode.rs:275-293 and docs/api.md:1015-1022; metrics null-vs-absent disclosed (docs/api.md:1038-1045, http.rs:617-619); flag forwarding parity cli.rs:671-701,697-699 + cli.rs:1378-1401; flare-cli/src/main.rs:353-357 literal write; Slack — none.
#9 [high] Round 2 (head 046aaef) verified facts and final counts
HEAD 046aaef, base main, 22 files, +1757/-77; stacked on open #548.
NEW VERIFIED (this round, by me):
- BLOCKER: docs tell users to write
[server] per_request_metrics = true(docs/api.md:1007; docs/cli-design.md:1318, sample :1349) but Ignition validates the same file with a closed schema: ignition/cli/config.py:21-33 (_SECTIONS["server"]= host,port,api_key,thinking_token_budget,scheduler_checkpoint_extra_work_fraction) and :112-114 raisesunknown key {key} in [{section}]. Loaders: ignition/cli/serve.py:127,174,264,431,590; bench.py:144; publishing.py:31,73,174,194. docs/cli-design.md:1311-1313 "Ignition and native Flare read this file", :1385 "Ignition rejects any section or key outside its schema"._BUILT_IN(config.py:37-53) lacks the key too, so anyconfiguration.get("server.per_request_metrics")would KeyError.write_initial(config.py:183-215) omits it though :1311 says the file is written "with the resolved values present as comments". Existing negative coverage tests/cli/test_config.py:152-171. Fix: add"per_request_metrics": boolto _SECTIONS["server"] + _BUILT_IN default False + template line + one positive load test. - WITHDRAWN last round's B2 ("false cost claim"): commit 66245920 "Reuse GraphKind::samples ... stamp scheduled time after packing" is in pr/548 history AND in this branch; description says "the one monotonic read per scheduled model step comes from #548" -> accurate. Now only a nit (name the commit; say per step, shared by lanes).
- FIXED since ce44060 (do not re-raise): RequestTimes pub (metrics.rs:326, re-exported server.rs:33);
Timing::streaming+record_commitdeleted (Timing = {arrival_ns, times, generated}, encode.rs:73-79; record_times encode.rs:243-247 only writer);kind.samples()reused at runtime.rs:1727-1729; config key plumbed (flare/src/configuration.rs:34; settings.rs:32,:224 unwrap_or(false); controller.rs:2566; flare-cli/config.rs:73-75; main.rs:355-357; Bootstrap parse config.rs:353-357 rejecting non-bool, test :727-739); literal six-key count in encoder test replaced by one key list (protocol/tests.rs:2354-2363). - OUT OF SCOPE (pre-existing on main, drop as finding):
generate_observed/enqueue(main runtime.rs:828-835 == head :837-844) - no hunk in pr_diff; the earlier token of same shape was withdrawn for this reason. n > 1only exists for Completions: decode.rs:753-755if protocol != Protocol::Completions && choices != 1 { Err("n must be 1") }-> api.md:1042 overstates.return_token_timestampsrequiresreturn_token_ids(observation.rs:37-39); api.md mentions the options only at :992 and token_timestamps_ns only at :1048.- Stamp after packing: runtime.rs:2269-2285 (read :2272), submit guards that can still fail at :2289-2299; vision pack/conditioned_inputs_ready at :2228-2268.
- mean_itl divides by generated-1 (encode.rs:266-268); step commit count is
record.tokens_committedat runtime.rs:1798-1802 (position==0). - phase tests: timed_pass :4526-4559 (predicate :4541-4543, 3rd copy of :452-454 and :5028-5030); served_through_worker :4563-4610; kept tests :4613 performance..., :4685 stopped-reasoning provenance; redundant :4731-4777 and :4780-4850 (~110 lines) re-assert encoder rules (protocol/tests.rs:2346-2449, :2381-2389, :2416-2430) and hand-roll plumbing.
- protocol/tests.rs:2334-2344
metered_generationemits Reasoning + empty Content no assertion reads (content instant moved to #562); carriers closure clones whole frames :2366-2374; keeps key list :2354-2363. - config.rs strict-type rejection loop for the new key: helios/src/server/config.rs:727-739 (marginal subtraction, ~12 lines).
- Authorization: #551 opened by WynnD (association NONE) 2026-11-27, zero comments; charter merge gate "maintainer request, roadmap item, reproducible bug, measured perf/memory issue, or bad docs"; roadmap = Rust SDK #6, Engram #267, FlashInfer #215; #536 (maintainer) asks for Prometheus histograms -> delivered by #548; #553/#552 halted by review engine on charter grounds (2026-11-27 05:17, 06:40). Now evidenced live (40/40 matrix, llama-swap rates) so reframed as Should fix, not blocker.
FINAL COUNTS: Blockers 1, Should fix 6, Subtract/Simplify 6, Nits 5. SF1 authorization ack from maintainer; SF2 explicit false impossible (cli.rs:646-649/:860-863 bool; config.rs:73-75; rank_zero main.rs:528; promise docs/cli-design.md:1321-1322,:1337-1338); SF3 cli-design.md:736 orbit default has no config path (config.rs:57 only Command::Run); SF4 ignition debug-serve ignores key + template + stale :1385-1387 sentence; SF5 api.md null paragraph (permanently-null content key, n>1 overstated, zero-token all-null shape); SF6 api.md:1045-1050 references undefined token_timestamps_ns/performance -> define once at :991-992 with return_token_ids requirement, trim to pointer. SUB1 phase_tests ~110 lines; SUB2 docs/api.md:305-386 histogram prose ~30 (shared with #548); SUB3 api.md:1040-1050 trim ~10; SUB4 protocol/tests.rs dead fixture + carriers clones ~7; SUB5 config.rs:727-739 ~12; SUB6 RequestMetrics::Suppressed flatten ~9 (optional, Conventions prefers enum). NITS: cost attribution/step-per-lane; stamp vs submit failure + vision conditioning in queue_time; mean_itl vs interval count; encoder doc comments restate api.md; timed_pass predicate third copy.
#10 [high] FINAL FULL REPORT — PR #560 at 046aaef
Full Review — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Head 046aaef, base main, 22 files, +1757/−77. Stacked on the still-open #548 (its commits are in this branch, so the diff against main mixes both). Reviewed as the layer above #548, as the description instructs.
Recommendation: changes requested. Counts: 1 Blocker, 6 Should fix, 6 Subtract/Simplify, 5 Nits.
The mechanism is right-sized and in the right place: the worker owns every instant, the encoder owns placement, no HTTP-layer clock is read, and with the option off nothing is emitted or requested. Two findings from the previous head are fixed and are not re-reported (RequestTimes is exported; Timing::streaming/record_commit are gone), and the previous round's "false cost claim" blocker is withdrawn because commit 66245920 ("…stamp scheduled time after packing") belongs to #548, exactly as the description states. What remains is one user-facing break of the documented enable path (the Blocker), reachability/doc gaps, and roughly 180 removable lines, most of them in one test file.
Key findings
- Blocker — the documented way to enable the feature fails every Ignition command.
docs/api.md:1007anddocs/cli-design.md:1318,1349tell users to write[server] per_request_metrics = true, butignition/cli/config.py:23-24has no such key and:112-114raisesunknown key per_request_metrics in [server]. Every Ignition command loads that file through_validate. - Should fix — authorization is still unconfirmed, though the evidence gap is now closed.
#551is a reproducible defect report (llama-swap-1rates), and the PR now carries live evidence, so the charter's "reproducible bug" gate is plausibly satisfied; but #551 is authored by the same contributor with no maintainer reply, and #552/#553 were stopped by review on charter grounds. One maintainer line settles it. - Should fix — the flag cannot express an explicit false, so a
[server] per_request_metrics = truefile or a saved Orbit group cannot be overridden for one run, contrary todocs/cli-design.md:1321-1322and:1337-1338. - Should fix — three documentation claims are wrong or unreachable from the document that makes them: the
cli-design.md:736default for a flag shared byflare orbit run(which has no configuration path), theapi.md:1040-1043null paragraph (a permanently-null field described as an unreached instant,n > 1null overstated), andapi.md:1045-1050referencing aperformanceshape the file never defines. - ~180 lines removable with no behaviour lost, ~110 of them in
phase_tests.rs(+535): two new HTTP-level tests re-assert encoder rules and hand-roll plumbingserved_through_workeralready provides. - Verified sound: placement for all four protocols, the
first_scheduled_nsearliest-value fold,RequestTimeslifetime through preemption,GraphKind::samples()equivalence, the option-off wiring, and the event-budget/Finished-only event change.
Blockers
B1. The documented [server] per_request_metrics key is rejected by the Ignition schema, breaking every Ignition command
Where: docs/api.md:1007-1009; docs/cli-design.md:1318 (native flare run key list), :1349 (sample config); ignition/cli/config.py:21-33 (_SECTIONS["server"]), :108-120 (_validate), :183-215 (write_initial); loaders ignition/cli/serve.py:127,174,264,431,590, ignition/cli/bench.py:144, ignition/cli/publishing.py:31,73,174,194.
What is wrong.
docs/api.md:1007says the option is enabled by "flare run --enable-per-request-metrics, or[server] per_request_metrics = truein the host configuration", anddocs/cli-design.md:1349puts an uncommented-from-exampleper_request_metrics = falseline in the[server]sample of the file Ignition writes.ignition/cli/config.py:23-24defines_SECTIONS["server"]as exactly{host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction}. There is noper_request_metrics.ignition/cli/config.py:112-114iterates every key and raisesUsageError(f"{path}: unknown key {key} in [{section}]")for anything outside the schema.:116-118would also demand a type entry (bool)._BUILT_IN(:37-53) has no default either, so aconfiguration.get("server.per_request_metrics")would raiseKeyErroruntil both are added.docs/cli-design.md:1311-1313states "Ignition and native Flare read this file", and:1385"Ignition rejects any section or key outside its schema". So the file the new docs tell the user to edit is the same file Ignition validates, and the key is outside its schema.- Every Ignition command loads it:
serve.py:127,174,264,431,590(export, bench/convert paths, debug-serve),bench.py:144,publishing.py:31,73,174,194. Following the new documentation therefore makesignition export— the model preparation step that precedes any serving — fail withUsageError: unknown key per_request_metrics in [server].write_initial(config.py:183-215) omits the key even thoughdocs/cli-design.md:1311-1312says the file is generated "with the resolved values present as comments".
Why it matters. This is not a doc typo: the enable path the PR documents is unusable for anyone who also runs Ignition, which is the supported way to prepare a core. The PR touched neither ignition/cli/config.py nor tests/cli/test_config.py, and tests/cli/test_config.py:152-171 already parametrizes unknown-key rejection, so CI would catch it the moment the key is added without the schema entry — and catches nothing today.
Requested change. Add "per_request_metrics": bool to _SECTIONS["server"] (ignition/cli/config.py:23-24) and "server.per_request_metrics": False to _BUILT_IN (:37-53), add the commented line to write_initial (:188-192), and add one positive load test beside the existing negatives in tests/cli/test_config.py:152-171. Reproduce with one ignition export while ~/.config/flare/config.toml carries the documented line.
Should Fix
S1. A maintainer still has to confirm that per-request response metrics are in scope
Where: charter "What gets merged"; AGENTS.md:188-193, :201-205; #551; #536; #552; #553.
The charter merges PRs that address "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". #551 is a reproducible defect — llama-swap v250 reads prompt_per_second/predicted_per_second from a response-body object and shows -1 for Flare — and the PR now carries a 40-check live matrix plus llama-swap rates, so the evidence half of the gate is met. What is missing is authorization: #551 was opened by the same contributor (WynnD, no association) on 2026-11-27 with zero comments, and the maintainer-authored issue in this area (#536) asks for Prometheus histograms, delivered by #548, not for a response-body object. Both predecessors were halted by review on exactly this ground (#553: "Review Stopped … low value or does not align with the project charter", 2026-11-27 05:17 and 06:40; #552 likewise). vLLM is listed under "Alternatives / Competitors", so "vLLM has it" is not itself a merge reason. Requested change (no code): a maintainer comment on #551 or in the PR confirming the scope, and a description that leads with the llama-swap defect rather than with vLLM parity.
S2. The flag cannot express an explicit false
Where: flare-cli/src/cli.rs:646-649 (Orbit) and :860-863 (run) — plain bool; flare-cli/src/config.rs:73-75; flare-cli/src/cli.rs:698-700 (rank_zero_options only emits when true); docs/cli-design.md:1321-1322, :1337-1338.
if !run.enable_per_request_metrics {
run.enable_per_request_metrics = self.server.per_request_metrics.unwrap_or(false);
}
With per_request_metrics = true in a node's file there is no flag that turns it off for one run, and because rank_zero_options only re-emits the flag when true, an Orbit group that ever captured --enable-per-request-metrics keeps it. This contradicts the documented precedence ("Flags override these defaults, including explicit zero limits and values equal to the built-in defaults"; "saved group options and explicit flags take precedence"). The mechanism already exists next door: --kv-cache-limit memory is re-emitted when matches.value_source("kv_cache_limit") == Some(CommandLine) (cli.rs:662-667). Fix: tri-state (Option<bool> via num_args(0..=1)) or --no-enable-per-request-metrics with overrides_with, forwarded to rank zero; at minimum document the limitation beside the flag, and extend the config test (flare-cli/src/config.rs:222-233 alone asserts ""/true/false in the file with the flag turning it on).
S3. docs/cli-design.md:736 claims a configuration default that flare orbit run does not honor
The new row reads "--enable-per-request-metrics … | [server] per_request_metrics, otherwise off", and the flag is declared on both Run (cli.rs:857-863) and OrbitRun (:646-649), with docs/cli-design.md:170-173 listing it among the flags Orbit applies to rank zero. But the configuration fallback lives in Configuration::apply, whose branch matches only cli::Command::Run (flare-cli/src/config.rs:57-58, key applied at :73-75); OrbitRun gets the value from its flag alone. An operator who sets the key, launches flare orbit run, and follows the table expects metrics and silently gets none. Fix: write "[server] per_request_metrics for native flare run, otherwise off" in the configuration column, matching docs/cli-design.md:1317-1318. Secondary, same row: neither --help string mentions the configuration key (cli.rs:646-648, :860-862), so one clause ("default: [server] per_request_metrics") would make --help and the doc agree.
S4. ignition debug-serve and the generated template ignore the key, and one sentence is now stale
Where: ignition/cli/serve.py:485-487, ignition/cli/config.py:183-215, docs/cli-design.md:1385-1387.
debug-serve builds its bootstrap options from configuration.get("server.*") for the keys it knows — thinking_token_budget and scheduler_checkpoint_extra_work_fraction at serve.py:486-487 — and does not set per_request_metrics, so once B1 is fixed it will silently ignore a setting flare run honors while honoring its two neighbours. write_initial omits the key from the template that docs/cli-design.md:1311-1312 says carries "the resolved values present as comments". And docs/cli-design.md:1385-1387 ("Native Flare ignores keys it does not use, except in [prefix_cache]") gains a second exception once native flare run uses a key Ignition's schema previously rejected. Fix: add the key to serve.py's options dict and to the template, and update that sentence.
S5. docs/api.md:1040-1043 misdescribes a permanently-null field and overstates the n > 1 null
Three problems in one paragraph:
- "a field is null when the request did not reach the instants it spans, such as
mean_itl_msfor a single generated token" — buttime_to_first_content_token_msis documented at:1020as "Always null" and hard-coded athelios/src/server/protocol/encode.rs:263. A field that never has a value is not an unreached instant; telling llama-swap and billing clients (the audience the PR names) that it is a supported-but-unavailable measurement invites them to consume a value that will not arrive until #562. - "With
ngreater than onemetricsis null" —helios/src/server/protocol/decode.rs:753-755rejectschoices != 1for every protocol except Completions, so Chat/Responses/Messagesn > 1is a 400, never a null. Restrict the sentence to Completions, matching the encoder arm that produces the null (encode.rs:238,:252-253). - Only one null case is shown.
encode.rs:257-273nulls TTFT, generation, queue, tokens/s andmean_itl_mstogether whenfirst_scheduled_ns/first_token_nsare unset (notelet last = first.map(...)), andhelios/src/server/protocol/tests.rs:2445-2448pins that all-null object for a zero-token output-limited response. One clause documenting the zero-token shape closes it.
S6. docs/api.md:1045-1050 compares against a shape the HTTP API reference never defines
The new paragraph says the instants are "on the same process-local origin as choices[0].token_timestamps_ns", but a whole-file search finds token_timestamps_ns only at :1048 and return_token_timestamps only at :992. The file never states that the token instants sit beside choices[0].token_ids, that return_token_timestamps: true is rejected without return_token_ids: true (helios/src/server/observation.rs:37-39), or that performance is emitted only on timed responses. The link to ../helios/model-contract.md#token-and-timing-observation resolves (model-contract.md:326), so it is not dangling, but the HTTP reference should define the fields it uses. Fix: one sentence at docs/api.md:991-992 — "return_token_timestamps requires return_token_ids: true; it places per-token instants in choices[0].token_timestamps_ns, aligned with choices[0].token_ids, and, on buffered responses, a top-level performance object" — then let the new paragraph point at it (see SUB3).
Subtract / Simplify
Net ≈180 lines removable (~9% of the ~1,180 added source/test/doc lines once #548's contribution is set aside), ~110 of them in one test file. No finding asks to remove the option itself: #551 is a reproducible client gap and the charter merges PRs that fix one.
SUB1 — should fix, ~110 lines: helios/src/server/runtime/phase_tests.rs:4731-4850
Two new HTTP-level tests re-assert rules already decided and pinned at the encoder, and re-implement the plumbing.
- Already asserted by
per_request_metrics_follow_vllm_placement_and_null_rules(helios/src/server/protocol/tests.rs:2346-2449): the six exact values and the carrier frame (:2375-2389), top-level JSON placement (:2391-2398), no carrier withoutinclude_usage(:2400-2406), Messages omitted (:2408-2414),n>1→nulland several prompts → omitted (:2416-2430), single-token and no-instant nulls (:2432-2448). per_request_metrics_reach_completions_and_responses_where_vllm_places_them(:4731-4777) re-asserts the usage-chunkchoices == [](:4762),response.incomplete(:4764), body placement (:4765) and the content-TTFT null (:4774); its only timing claim,generation >= 3.0(:4771), is made rigorously by the kept test at:4719-4721.per_request_metrics_are_absent_without_the_option_and_null_for_several_choices(:4780-4850): the first loop (:4782-4794, ~13 lines) is the one genuinely new fact —state.per_request_metricsreachesEncoder::enable_request_metrics(http.rs:387-389). The second half (:4795-4849, ~55 lines) hand-buildshttp_state_forstate, acquires an ingress slot, spawnshttp::generate, receives the group, writesFinishedwith hand-madeRequestTimes, then splits SSE — all of whichserved_through_worker(:4563-4610) does, parameterised byper_request_metrics, path, body and samples — to re-prove theSuppressedarm.
Smaller version (~125 → ~25 lines): delete both tests and keep the flag's reach with one test over the existing helper:
#[tokio::test]
async fn per_request_metrics_reach_the_encoder_only_when_enabled() {
for enabled in [false, true] {
let (_, values) = served_through_worker(
|| Fixture::new().text_inputs(), enabled, "/v1/completions",
json!({"model":"qwen-worker-phases","prompt":"a","max_tokens":2}), &[1, 2]).await;
assert_eq!(values[0].get("metrics").is_some(), enabled);
}
}
Keep performance_reports_the_first_scheduled_model_step (:4613-4644) and per_request_metrics_report_the_runtime_instants_of_a_stopped_reasoning_answer (:4685-4728): those prove the instants land in the right worker step, which nothing else does. If an end-to-end drift guard for response.incomplete or the n = 2 null is wanted, route it through served_through_worker(..., true, "/v1/completions", body_with_n_2, &[1]) and assert only metrics.is_null() — ~8 lines instead of ~55. (Open question: nothing in the diff says the carrier assertions at :4759-4762 were added deliberately as a drift guard; a comment stating the intent would settle it, and if it is intended this cut shrinks to the n = 2 block.)
SUB2 — should fix, ~30 lines, shared with #548: docs/api.md:305-386
Four paragraphs walk every histogram series (flare_request_queue_seconds, flare_request_prefill_seconds, flare_request_inference_seconds, flare_inter_token_latency_seconds, the token histograms, flare_request_preemptions, flare_model_step_tokens, …) with the same populations the Prometheus HELP strings already ship on every scrape (helios/src/server/metrics.rs:1548-1642) and that the new correspondence table maps one-to-one (docs/api.md:475-517). Reduce to ~8-10 lines naming the groups plus the single exclusion rule ("successful completions only; only flare_time_to_first_response_seconds can observe a response that later fails"), and let the HELP strings and the table carry the per-series text. This block arrives through #548, so it is one cut for the stacked pair, not two.
SUB3 — nit, ~10 lines: docs/api.md:1040-1050
:1040-1043's first sentence restates the table rows at :1020 and :1022; keep only the placement sentences (several choices → null, several prompts → omitted) after fixing them per S5, ~3 lines. :1045-1050 re-describes performance fields defined normatively at helios/model-contract.md:344-355, which the same paragraph links; replace with one pointer sentence plus the S6 addition at :991-992, ~4 lines. The placement paragraph (:1031-1038) and the step/queue-arrival paragraph (:1025-1029) are the only place the docs state those boundaries — keep them.
SUB4 — nit, ~7 lines: helios/src/server/protocol/tests.rs:2334-2344, :2366-2374
metered_generation feeds a Reasoning event, an empty Content event and two more content events, but no assertion in per_request_metrics_follow_vllm_placement_and_null_rules reads the reasoning chunk, the empty chunk or the chunk count — every assertion is about the carrier frame's placement or about metrics_value(), which depends only on times and generated = 4. This is leftover setup from the content-instant work that moved to #562, and the doc comment describes behaviour the test does not check. Cut to one Content("answer") apply and /// Feed one generation of four tokens, then finish it. Separately, the carriers closure clones whole frames to read type/choices/usage; collect (&Value, &Value) (as phase_tests.rs:4751-4758 already does) and compare *metrics to &expected.
SUB5 — nit, ~12 lines, marginal: helios/src/server/config.rs:734-739
The for invalid in [json!(1), json!("true"), json!(null)] loop guards a key whose only writer passes a literal boolean (flare-cli/src/main.rs:355-357). Keep the absent/true/false assertions at :727-733; the error text is exercised nowhere else, so cut this only if the test file is being trimmed anyway.
SUB6 — optional, ~9 lines: helios/src/server/protocol/encode.rs:67-79, :232-241
Absent/suppressed/single are equally expressible as Option<Timing> plus a suppressed: bool, dropping RequestMetrics::Suppressed (:69-70) and both match arms (:244, :252-255); and enable_request_metrics(&mut self, streaming: bool) (:233) takes the value already passed at http.rs:378 and again at :388. Two lenses argue for the current shape (the three-state enum reads better than Option<Option<Timing>>; Encoder::streaming is written only by set_logprobs, so folding it in would couple placement to that field), so take this only if the maintainer wants the smaller surface. Do not delete generate_observed/enqueue (runtime.rs:837-844): they are pre-existing on main (main runtime.rs:828-835) and outside this diff.
Nits
N1. The Cost sentences should name #548's commit and say "per step, shared by its lanes"
The description's "This PR adds no clock read; the one monotonic read per scheduled model step comes from #548" is accurate — verified: commit 66245920 ("Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing") is in pr/548 history and in this branch, and helios/src/server/runtime.rs:2272 is its line — but a reviewer reading this PR's diff against main sees the call arrive. Name the commit, and say the read is per step, shared by every lane through get_or_insert (runtime.rs:2273-2285), so the cost is neither over- nor under-stated. docs/api.md:1025-1026 already says this about completion instants.
N2. mean_itl_ms is not exactly vLLM's on speculative cores
encode.rs:266-268 divides first→last by generated - 1. A speculative step commits several tokens that share one completion instant (docs/api.md:1025-1026), so the true interval count is smaller and the mean is understated relative to vLLM. The count already exists (RequestRecord::tokens_committed, helios/src/server/runtime.rs:1798-1802), but since the table row at docs/api.md:1022 already defines the field as the code computes it, the cheaper fix is one clause in that row ("intervals are counted per generating step, so a speculative step is one interval") rather than a new field.
N3. first_scheduled_ns now follows image conditioning, and still precedes a submission that can fail
The stamp moved after pack_vision/conditioned_inputs_ready (helios/src/server/runtime.rs:2228-2268, stamp at :2272), which is right for the failed-pack case but changes what the instant means on the vision path: queue_time_ms (encode.rs:265) now includes image conditioning, and time_to_first_token_ms (:262) starts after it — while docs/api.md:1018 defines queue time as "Model-queue arrival to the first model step that includes the request". The stamp also now precedes only submit's guards (runtime.rs:2289-2299), which can still fail for that step, so the comment at :2269-2271 covers the pack but not the submit. Either stamp before the vision pack (documenting that a failed pack leaves it null anyway) or say in api.md/model-contract.md that for image requests the instant follows image conditioning.
N4. Three copies of the placement/null rule, two of them in the encoder
encode.rs:232 (pointer), :242-243 (restates the signature) and :248-250 (restates placement, the six-key rule and the content null) repeat what docs/api.md:1015-1043 states and what enable_request_metrics states executably at :233-241. Keep one pointer line each — "The metrics object or its omission, per docs/api.md#per-request-metrics" — so the rule changes in one place.
N5. timed_pass adds a third copy of the step-generates predicate
helios/src/server/runtime/phase_tests.rs:4541-4543:
let generates = matches!(step.kind, GraphKind::Decode | GraphKind::Resume)
|| (step.kind == GraphKind::Prefill
&& lane.start_position + lane.tokens as u64 == live.prompt_tokens as u64);
The identical expression already exists at :452-454 (budget_pass) and :5028-5030. The authoritative semantics live in the scheduler, so if the sampling graph set changes, three test loops silently disagree with production — including the one this PR's evidence relies on. Extract one helper beside completion (:372) and call it from all three sites, or have timed_pass reuse budget_pass's predicate.
Verified sound (recorded so it need not be redone)
- Placement. Non-stream bodies get
response["metrics"]only when!streamingand the encoder has a value (helios/src/server/http.rs:606-615); Chat/Completions put it on the final usage chunk (encode.rs:712-719), Responses onresponse.completed/response.incomplete(encode.rs:731-744); Messages never, becauseenable_request_metricssetsself.metrics = NoneforProtocol::Messages(encode.rs:235-236). The gate ishttp.rs:387-389onstate.per_request_metrics, defaulting false (helios/src/server.rs:148,:333). first_scheduled_nsfold.http.rs:538isfirst_scheduled_ns.into_iter().chain(times.first_scheduled_ns).min()— earliest value, so the previous last-writer-wins concern is gone; the response-levelperformanceathttp.rs:605-611matchesObservationOptions::finish(observation.rs:58-74).- Lifetime through preemption.
RequestTimesispub(metrics.rs:326) and exported besideSnapshot(server.rs:33);recordtravels withIncomingthrough park/readmission (runtime.rs:196-198,:2116-2157), so instants survive preemption andlast_token_nsspans the park. - Option-off wiring.
http.rs:384-389:enable_request_metricsis never called,record_timesnever runs, and the only added work is copying aCopy17-byteRequestTimesand au64into the fourFinishedsites (runtime.rs:302-307,:1891-1899,:2070-2078). GraphKind::samples()(helios/src/execution/manifest.rs:90-101) reproduces the previous inline seven-variantmatches!exactly (Init,Restore,Snapshot,Visionexcluded in both) atruntime.rs:1727-1729.- Configuration plumbing.
[server] per_request_metricsfollowsthinking_token_budgetone-for-one:flare/src/configuration.rs:34,flare/src/settings.rs:32/:224,flare/src/controller.rs:2566,flare-cli/src/config.rs:73-75,flare-cli/src/main.rs:355-357, andBootstraprejects a non-boolean rather than dropping it (helios/src/server/config.rs:353-357, test:727-739) — the "accept and quietly drop" failure is gone. The stacked-diff attribution ofmetrics.rs/latency.rs/scheduler.rsand thedocs/api.md:305-386block to #548 is confirmed. - Event shape.
Finishedgains twoCopyfields rather than a new event variant, so the event budget (runtime.rs:62-84) andemit'spublishesclassification (:365-389) need no change. - Docs honesty.
docs/api.md:1025-1038records theinclude_usagegap, thatqueue_time_msincludes the channel send and worker pickup, and that Flare has no--enable-force-include-usagecounterpart — documenting a limitation rather than hiding it is whatAGENTS.md:57-60asks, and the description now carries it too.
Open questions / not verified
- Authorization (S1) — one maintainer line on #551 closes it.
- Whether Orbit should read
[server] per_request_metricsis a design call; the doc fix in S3 stands either way. - Whether the phase-test carrier assertions were deliberate end-to-end drift guards — settles the size of SUB1.
- Magnitude of the extra span in
queue_time_ms(group validation + channel send + worker pickup) is a measurement question; the docs now state the boundary without asserting a size. - Not verified by me: no GPU, no exported core, no live server, no llama-swap, no Windows or multi-GPU build, no
cargo test, noignitionrun; CI on head046aaefreports no checks. The PR's live matrix and CPU numbers are taken at face value. Every finding above is read from the code and docs at046aaef. - #548 remains open, so this PR's own delta is the encoder, the four
Finishedemit sites, the config chain and the docs; re-base and re-review after #548 lands.
#11 [high] Research summary
Full report written to scratchpad entry #10; counts-only summary prepared.
Verdict: Changes Requested — 1 Blocker, 6 Should fix, 6 Subtract/Simplify, 5 Nits.
Key reconciliation decisions this round:
- New Blocker (verified in code): the documented enable path
[server] per_request_metrics = true(docs/api.md:1007, docs/cli-design.md:1318,1349) is outside Ignition's closed schema (ignition/cli/config.py:23-24,_validateat:112-114), and every Ignition command loads that file (serve.py:127,174,264,431,590,bench.py:144(not opened),publishing.py(not opened)), so users following the docs breakignition export. Fix: schema +_BUILT_IN+ template + one positive load test. - Withdrawn from last round: the "false cost claim" blocker — commit
66245920belongs to #548, exactly as the description says; it is now only a nit asking the description to name that commit and say "per step, shared by its lanes". - Dropped as out of scope: the
generate_observed/enqueuedeletion both Simplicity and Subtraction proposed — verified identical onmain(runtime.rs:828-835), no hunk in the diff. - Scope/authorization demoted from Blocker to Should fix because the live 40-check matrix and llama-swap rates close the evidence half of the charter gate; only the maintainer acknowledgment is missing.
- Subtraction given its own section with line savings (SUB1 ~110 lines in phase_tests.rs, SUB2 ~30 histogram prose shared with #548, and four smaller cuts ≈180 total), and the subtractive fix is preferred wherever lenses conflicted (e.g. trim the duplicated HTTP tests rather than expand them; fix
mean_itlwith a doc clause rather than a new carried field).
Not verified: no GPU/live server/llama-swap/Windows build/cargo test/ignition run; CI on head 046aaef reports no checks. All findings are read from code and docs at 046aaef.
#12 [high] SUMMARY FIELD (counts-only, paste-ready) + full-report pointer
FULL REPORT = scratchpad entry #10 ("FINAL FULL REPORT — PR #560 at 046aaef"). Use it verbatim for the report field.
SUMMARY (use verbatim for the summary field; ~470 chars, no bullets, no code blocks):
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.
- Blockers: 1
- Should fix: 6
- Subtractive suggestions: 6
- Nits: 5
END SUMMARY.
Count check against entry #10's sections:
- Blockers: B1 only = 1
- Should Fix: S1 authorization / S2 explicit false / S3 cli-design.md:736 orbit default / S4 ignition debug-serve+template+stale sentence / S5 api.md null paragraph / S6 api.md performance+token_timestamps_ns undefined = 6
- Subtract / Simplify: SUB1 phase_tests ~110 / SUB2 api.md:305-386 ~30 / SUB3 api.md:1040-1050 ~10 / SUB4 tests.rs:2334-2344 + carriers ~7 / SUB5 config.rs:734-739 ~12 / SUB6 encode.rs RequestMetrics optional ~9 = 6
- Nits: N1 cost attribution "per step, shared by lanes" / N2 mean_itl vs interval count / N3 stamp vs submit + vision conditioning / N4 encoder doc comments restate api.md / N5 timed_pass third predicate copy = 5
Takeaway sentence must not repeat last round's "false cost claim" (withdrawn) nor claim 2 blockers.
#14 [high] Research summary
Full Review — PR #560 "Emit vLLM-compatible per-request metrics from runtime instants"
Full report (this is the text for the report field).
Full Report
Head 046aaef, base main, 22 files, +1757/−77. Stacked on the still-open #548 (its commits are in this branch, so the diff against main mixes both); reviewed as the layer above #548, as the description instructs.
Recommendation: changes requested. Counts: 1 Blocker, 6 Should fix, 6 Subtract/Simplify, 5 Nits.
The mechanism is right-sized and in the right place: the worker owns every instant, the encoder owns placement, no HTTP-layer clock is read, and with the option off nothing is emitted or requested. Two findings from the previous head are fixed and are not re-reported (RequestTimes is exported; Timing::streaming/record_commit are gone), and the previous round's "false cost claim" blocker is withdrawn because commit 66245920 belongs to #548, exactly as the description states. What remains is one user-facing break of the documented enable path (the Blocker), authorization plus reachability/doc gaps, and roughly 180 removable lines, most of them in one test file.
Key findings
- Blocker — the documented way to enable the feature fails every Ignition command.
docs/api.md:1007anddocs/cli-design.md:1318,1349tell users to write[server] per_request_metrics = true, butignition/cli/config.py:23-24has no such key and:112-114raisesunknown key per_request_metrics in [server]. Every Ignition command loads that file through_validate. - Should fix — authorization is still unconfirmed, though the evidence gap is closed. #551 is a reproducible defect report (llama-swap
-1rates) and the PR carries a live 40-check matrix, so the charter's "reproducible bug" gate is plausibly met; but #551 is authored by the same contributor with no maintainer reply, and #552/#553 were stopped by review on charter grounds. One maintainer line settles it. - Should fix — the flag cannot express an explicit false, so a
[server] per_request_metrics = truefile or a saved Orbit group cannot be overridden for one run, contrary todocs/cli-design.md:1321-1322and:1337-1338. - Should fix — three documentation claims are wrong or unreadable from the document that makes them: the
docs/cli-design.md:736default for a flag shared byflare orbit run(which has no configuration path), thedocs/api.md:1040-1043null paragraph (a permanently-null field described as an unreached instant; then > 1null overstated), anddocs/api.md:1045-1050referencing aperformance/token_timestamps_nsshape the file never defines. - ~180 lines removable with no behaviour lost, ~110 of them in
phase_tests.rs: two new HTTP-level tests re-assert encoder rules and hand-roll plumbingserved_through_workeralready provides. A further ~37 lines are available if the maintainers prefer the other consistent state for the config key (see B1). - Verified sound: placement for all four protocols, the
first_scheduled_nsearliest-value fold,RequestTimeslifetime through preemption,GraphKind::samples()equivalence, the option-off wiring, and theFinished-field-only event change.
Blockers
B1. The documented [server] per_request_metrics key is rejected by the Ignition schema, breaking every Ignition command
Where. docs/api.md:1007-1009; docs/cli-design.md:1318 (native flare run key list), :1349 (sample config block); ignition/cli/config.py:21-33 (_SECTIONS, server entry at :23-24), :37-53 (_BUILT_IN), :108-120 (_validate), :183-215 (write_initial). Loaders: ignition/cli/serve.py:127 (not opened),174,264,431,590; ignition/cli/bench.py:144 (not opened); ignition/cli/publishing.py:31 (not opened),73,174,194.
What is wrong.
docs/api.md:1007: "flare run --enable-per-request-metrics, or[server] per_request_metrics = truein the host configuration".docs/cli-design.md:1343-1349puts# per_request_metrics = falseinside the[server]sample of the file thatdocs/cli-design.md:1311-1313says is the shared config.ignition/cli/config.py:23-24defines_SECTIONS["server"]as exactly{host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction}. Verified: noper_request_metrics.ignition/cli/config.py:112-114raisesUsageError(f"{path}: unknown key {key} in [{section}]")for any key outside the schema;:116-118would also require a type entry._BUILT_IN(:37-53) has no default, soconfiguration.get("server.per_request_metrics")wouldKeyErroruntil both are added.docs/cli-design.md:1313states "Ignition and native Flare read this file";:1385states "Ignition rejects any section or key outside its schema". The file the new docs tell the user to edit is the file Ignition validates.- Every Ignition command loads it (
serve.py:127 (not opened),174,264,431,590— export,_export_hosts,_prepare, debug-serve, join;bench.py:144(not opened);publishing.py:31 (not opened),73,174,194— convert/edit/sign/combine). Following the new documentation therefore makesignition export, the model-preparation step that precedes any serving, fail withUsageError: unknown key per_request_metrics in [server].
Why it matters. The enable path the PR documents is unusable for anyone who also prepares cores with Ignition, which is the supported workflow (docs/cli-design.md:1311-1313). The neighbouring key shows the required chain: thinking_token_budget spans schema :23, built-in :39, validator, serve.py:486 (not opened) and template :192; scheduler_checkpoint_extra_work_fraction spans schema :24, built-in :40, validator, serve.py:487 (not opened) and docs/cli-design.md:1348. The new key copies only the Rust half. tests/cli/test_config.py:152-171 (not opened) already parametrizes unknown-key rejection and would catch the omission the moment the key is added without the schema entry — and catches nothing today. No test in tests/cli/ mentions the key, and the head commit reports no CI checks.
Requested change (one of two consistent states; the first is smaller in effort, the second in code).
- Add
"per_request_metrics": boolto_SECTIONS["server"](ignition/cli/config.py:23-24),"server.per_request_metrics": Falseto_BUILT_IN(:37-53), the commented line towrite_initial(:188-192),options["per_request_metrics"] = ...besideignition/cli/serve.py:486-487(not opened), and one positive load test beside the existing negatives (tests/cli/test_config.py:152-171(not opened)). Reproduce with oneignition exportwhile the config carries the documented line. - Or delete the file key instead of extending the strict reader: drop
flare/src/configuration.rs:34(not opened),flare/src/settings.rs:32(not opened) and:224(plus its test),flare/src/controller.rs:2566(not opened),flare-cli/src/config.rs:73-75(plus its test), thedocs/cli-design.md:736,1318,1349rows and thedocs/api.md:1007clause, keepingflare-cli/src/main.rs:355-357(not opened) andhelios/src/server/config.rs:353-357(not opened) (the flag still writes the value the runtime reads). That is ~37 fewer lines and also dissolves the file-override half of S2, but it removes the only non-CLI path, the desktop controller throughflare settings, which the description names — hence a product call, not a pure simplification.
Should Fix
S1. A maintainer still has to confirm that per-request response metrics are in scope
Where: charter "What gets merged"; AGENTS.md:165-169 (not opened), :188-193, :201-205; #551; #536; #552; #553.
The charter merges PRs that address "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". #551 describes a reproducible defect — llama-swap v250 reads prompt/decode rates from a response-body object and shows -1 for Flare — and the PR now carries a 40-check live matrix plus llama-swap rates, so the evidence half of the gate is met. What is missing is authorization: #551 was opened by the same contributor (no GitHub association) on 2026-11-27 with zero comments, and the maintainer-authored issue in this area (#536) asks for Prometheus histograms, delivered by #548, not for a response-body object. Both predecessors were halted by review on this ground (#553: "low value or does not align with the project charter", 2026-11-27; #552 likewise). vLLM is under "Alternatives / Competitors", so "vLLM has it" is not itself a merge reason. Requested change (no code): a maintainer comment on #551 or in the PR confirming the scope, and a description that leads with the llama-swap defect rather than vLLM field parity.
S2. The flag cannot express an explicit false
Where: flare-cli/src/cli.rs:646-649 (not opened) (Orbit) and :860-863 (run) — plain bool; flare-cli/src/config.rs:73-75;
if !run.enable_per_request_metrics {
run.enable_per_request_metrics = self.server.per_request_metrics.unwrap_or(false);
}
flare-cli/src/cli.rs:698-700 (not opened) re-emits the flag only when true; docs/cli-design.md:1321-1322 and :1337-1338 promise that flags override the file and saved group options.
With per_request_metrics = true in a node's file there is no flag that turns it off for a run, and an Orbit group that ever captured --enable-per-request-metrics keeps it. Fix: tri-state (Option<bool> via num_args(0..=1)) or --no-enable-per-request-metrics with overrides_with, forwarded to rank zero — the neighbouring --kv-cache-limit already re-emits on matches.value_source(...) == Some(CommandLine). At minimum document the limitation; flare-cli/src/config.rs:222-234 tests only omission, true, and false-in-file-turned-on. If B1's option 2 is taken, the file half disappears and only the Orbit-group half remains.
S3. docs/cli-design.md:736 claims a configuration default that flare orbit run does not honor
The row reads "--enable-per-request-metrics … | [server] per_request_metrics, otherwise off", and the flag is declared on both Run (cli.rs:857-863 (not opened)) and OrbitRun (:646-649), with docs/cli-design.md:170-173 listing it among the flags Orbit applies to rank zero. But the configuration fallback lives in Configuration::apply, whose branch matches only cli::Command::Run (flare-cli/src/config.rs:57-58, key applied at :73-75); OrbitRun gets its value from the flag alone. An operator who sets the key, launches flare orbit run, and trusts the table gets no metrics and no error. Fix: write "[server] per_request_metrics for native flare run, otherwise off", the phrasing :1317-1318 already uses. Secondary, same row: neither --help string names the configuration key (cli.rs:646-648 (not opened), :860-862); one clause makes --help and the table agree.
S4. ignition debug-serve and the generated template ignore the key, and one sentence is now stale
Where: ignition/cli/serve.py:485-487 (not opened), ignition/cli/config.py:183-215, docs/cli-design.md:1385-1387.
debug-serve forwards thinking_token_budget and scheduler_checkpoint_extra_work_fraction from the config into the runtime options (serve.py:486-487 (not opened)) and does not set per_request_metrics, so once B1 is fixed it will silently ignore a setting flare run honors while honoring its two neighbours. write_initial omits the key from the template that docs/cli-design.md:1311-1312 says carries "the resolved values present as comments". And docs/cli-design.md:1385-1387 ("Native Flare ignores keys it does not use, except in [prefix_cache]") gains a second exception — native Flare uses a key Ignition's schema otherwise rejects. Fix: add the key to serve.py (not opened)'s options dict and to the template, and update that sentence (or, under B1 option 2, drop the sentence's premise instead).
S5. docs/api.md:1040-1043 misdescribes a permanently-null field and overstates the n > 1 null
- "a field is null when the request did not reach the instants it spans, such as
mean_itl_msfor a single generated token" — buttime_to_first_content_token_msis "Always null" in the table at:1020and hard-coded athelios/src/server/protocol/encode.rs:263. A field that never has a value is not an unreached instant; telling llama-swap and billing clients that it is invites them to wait for a value that will not arrive before #562. - "With
ngreater than onemetricsis null" —helios/src/server/protocol/decode.rs:753-755(not opened) rejectschoices != 1for every protocol except Completions, so Chat/Responsesn > 1is a 400, never a null. Restrict the sentence to Completions, matchingencode.rs:238,:252-253. - The zero-token shape is undocumented:
encode.rs:257-273(notelet last = first.map(...)) nulls TTFT, generation, queue, tokens/s andmean_itl_mstogether when no instants were recorded, andhelios/src/server/protocol/tests.rs:2445-2448pins that all-null object. One clause closes it.
S6. docs/api.md:1045-1050 compares against a shape the HTTP API reference never defines
The paragraph says the instants are "on the same process-local origin as choices[0].token_timestamps_ns", but a whole-file search finds token_timestamps_ns only at :1048 and return_token_timestamps only at :992. The file never states that the instants sit beside choices[0].token_ids, that return_token_timestamps: true is rejected without return_token_ids: true (helios/src/server/observation.rs:37-39 (not opened)), or that performance accompanies only timed responses (observation.rs:70-74 (not opened)). The ../helios/model-contract.md (not opened)#token-and-timing-observation anchor resolves (model-contract.md:326 (not opened)), so nothing dangles, but the HTTP reference should define the fields it uses. Fix: one sentence at docs/api.md:991-992 — "return_token_timestamps requires return_token_ids: true; it places per-token instants in choices[0].token_timestamps_ns, aligned with choices[0].token_ids, and adds a top-level performance object on buffered responses" — and let the new paragraph point at it (see SUB3).
Subtract / Simplify
Net ≈180 lines removable (~9% of the ~1,180 source/test/doc lines once #548's contribution is set aside), ~110 of them in one test file. No item asks to remove the option itself: #551 is a reproducible client gap and the charter merges PRs that fix one. (A further ~37 lines are available through B1 option 2, deleting the config-file key path; that is counted under B1 because it is a choice between two consistent states, not a pure simplification.)
SUB1 — ~110 lines: helios/src/server/runtime/phase_tests.rs:4731-4850
Two new HTTP-level tests re-assert rules already decided and pinned at the encoder, and re-implement plumbing that served_through_worker (:4563-4610) already provides.
- Already asserted by
per_request_metrics_follow_vllm_placement_and_null_rules(helios/src/server/protocol/tests.rs:2346-2449): the six exact values and the carrier frame (:2375-2389), top-level JSON placement (:2391-2398), no carrier withoutinclude_usage(:2400-2406), Messages omitted (:2408-2414),n>1→nulland several prompts → omitted (:2416-2430), single-token and no-instant nulls (:2432-2448). per_request_metrics_reach_completions_and_responses_where_vllm_places_them(:4731-4777) re-asserts the usage-chunkchoices == [](:4762),response.incomplete(:4764), body placement (:4765) and the content-TTFT null (:4774); its timing claim (:4771) is made rigorously by the kept test at:4719-4721and:4722-4726.per_request_metrics_are_absent_without_the_option_and_null_for_several_choices(:4780-4850): the first loop (:4782-4794, ~13 lines) is the one genuinely new fact —state.per_request_metricsreachesEncoder::enable_request_metrics(helios/src/server/http.rs:387-389(not opened)). The second half (:4795-4849, ~55 lines) hand-builds state withArc::get_mut, acquires an ingress slot, spawnshttp::generate, receives the group, fabricatesRequestTimesin aFinishedevent, then splits SSE — all of whichserved_through_workerdoes — to re-prove theSuppressedarm.
Smaller version (~125 → ~25 lines): delete both tests and keep the flag's reach with one test over the existing helper:
#[tokio::test]
async fn per_request_metrics_reach_the_encoder_only_when_enabled() {
for enabled in [false, true] {
let (_, values) = served_through_worker(
|| Fixture::new().text_inputs(), enabled, "/v1/completions",
json!({"model":"qwen-worker-phases","prompt":"a","max_tokens":2}), &[1, 2]).await;
assert_eq!(values[0].get("metrics").is_some(), enabled);
}
}
Nothing is lost: placement and the null rules stay tested where they are decided (helios/src/server/protocol/encode.rs:232-275), and the runtime-instant provenance stays in the two kept tests (:4613-4727 step-bound within(...) checks; :4685-4728 stopped-reasoning provenance).
SUB2 — ~30 lines, shared with #548: docs/api.md:305-386
Four new paragraphs (:305-309, :311-326, :328-346, :348-364) walk every histogram series with the same populations that the Prometheus HELP strings already ship on every scrape (helios/src/server/metrics.rs:1548-1642 (not opened)) and that the correspondence table maps one-to-one (docs/api.md:475-517). Reduce to ~8 lines naming the groups plus the one rule the HELP strings do not carry: successful completions only, and only flare_time_to_first_response_seconds can observe a response that later fails (:361-364). Agree the cut with #548, whose commits arrive here.
SUB3 — ~10 lines: docs/api.md:1040-1050
Once S5 and S6 are applied, :1040-1043's first sentence ("All six fields are always present…") restates the table rows at :1018-1022 and should keep only the n>1/several-prompts clause; :1045-1050 re-describes the performance fields whose normative definition it links (helios/model-contract.md:344-355 (not opened)), so it can shrink to a one-sentence pointer once :991-992 defines the shape. Keep :1025-1029 and :1031-1038: they are the only places stating the step-completion instant, the queue-arrival boundary and the include_usage gap.
SUB4 — ~7 lines: helios/src/server/protocol/tests.rs:2334-2344 and :2366-2374
metered_generation says "Feed one generation that reasons and then answers" and applies Event::Reasoning("think"), then Content(String::new()) + Content("answer"), then Content(" more"); every assertion reads only the carrier frame's type/choices/usage (:2381-2388, :2426) or metrics_value() (:2397, :2405, :2413, :2428), which depend only on times and generated = 4. The reasoning event, the empty chunk and the chunk count are assert-free leftovers from the content-instant work that moved to #562, and the comment claims coverage the test does not have. Keep start(), one apply(0, vec![Event::Content("answer".into())]), record_times, finish. The carriers closure (:2366-2374) also clones whole frames to read two fields; collect (&Value, &Value) as phase_tests.rs:4751-4758 does.
SUB5 — ~12 lines: helios/src/server/config.rs:727-739 (not opened)
The strict-type rejection loop for per_request_metrics (1, "true", null) guards a key whose only writer emits a literal true (flare-cli/src/main.rs:355-357 (not opened)). The absent→false assertion at :727 and the CLI test (flare-cli/src/cli.rs:1378-1401 (not opened)) already cover the behaviour; the loop tests a path no product reaches.
SUB6 — ~9 lines, optional: helios/src/server/protocol/encode.rs:67-72 and :232-241
RequestMetrics::Suppressed exists only so metrics_value can return Some(Value::Null) (:252-255); metrics: Option<Timing> plus a suppressed: bool removes the two-variant enum and its match. Likewise enable_request_metrics(&mut self, streaming: bool) (:233) takes a value already passed two lines earlier (helios/src/server/http.rs:378 (not opened), :388). Take this only if the maintainer wants the smaller surface — three lenses read the enum as the clearer spelling, and folding in Encoder::streaming would couple placement to a field only set_logprobs writes, so the parameter should stay. Do not delete generate_observed/enqueue (helios/src/server/runtime.rs:837-844 (not opened)): identical to main (runtime.rs:828-835 (not opened)), outside this diff.
Nits
N1. The Cost sentences should name #548's commit and say "per step, shared by its lanes"
"This PR adds no clock read; the one monotonic read per scheduled model step comes from #548" is accurate — commit 66245920 is in pr/548 history and in this branch, and helios/src/server/runtime.rs:2272 (not opened) is its line — but a reviewer reading this PR's diff against main sees the call arrive. Name the commit, and say the read is per step, shared by every lane through get_or_insert (runtime.rs:2273-2285 (not opened)). docs/api.md:1025-1026 already says this for completion instants.
N2. mean_itl_ms is not exactly vLLM's on speculative cores
encode.rs:266-268 divides first→last by generated - 1, while a speculative step commits several tokens sharing one completion instant (docs/api.md:1025-1026), so the true interval count is smaller and the mean is understated. The count exists (record.tokens_committed, helios/src/server/runtime.rs:1798-1802 (not opened), one interval per committing step); since docs/api.md:1022 defines the field as the code computes it, the cheaper fix is one clause in that row ("intervals are counted per generating step") rather than a new field.
N3. first_scheduled_ns now follows image conditioning and still precedes a submission that can fail
The stamp sits after pack_vision/conditioned_inputs_ready (helios/src/server/runtime.rs:2228-2268 (not opened), stamp at :2272), which is right for a failed pack but means queue_time_ms (encode.rs:265) includes image conditioning and time_to_first_token_ms (:262) starts after it, while docs/api.md:1018 defines queue time as arrival to "the first model step that includes the request". It also precedes submit's guards (runtime.rs:2289-2299 (not opened)), which can still fail for that step. Either say so in docs/api.md/model-contract.md (not opened) or stamp before the vision pack.
N4. Three copies of the placement/null rule, two of them in the encoder
encode.rs:232 (pointer), :242-243 (restates the signature) and :248-250 (restates placement, the six-key rule and the content null) repeat what docs/api.md:1015-1043 says and what enable_request_metrics says executably at :233-241. Keep one pointer line each so the rule changes in one place.
N5. timed_pass adds a third copy of the step-generates predicate
helios/src/server/runtime/phase_tests.rs:4541-4543 repeats the expression already at :452-454 (budget_pass) and :5028-5030:
let generates = matches!(step.kind, GraphKind::Decode | GraphKind::Resume)
|| (step.kind == GraphKind::Prefill
&& lane.start_position + lane.tokens as u64 == live.prompt_tokens as u64);
If the sampling graph set changes, three test loops silently disagree with production, including the one this PR's evidence relies on. Extract one helper beside completion (:372) and call it from all three sites.
Verified sound (recorded so it need not be redone)
- Placement. Non-stream bodies get
response["metrics"]only when!streamingand a value exists (helios/src/server/http.rs:606-615(not opened)); Chat/Completions carry it on the final usage chunk (encode.rs:712-719), Responses onresponse.completed/response.incomplete(encode.rs:731-744); Messages never (encode.rs:235-236). The gate ishttp.rs:387-389(not opened) onstate.per_request_metrics, default false (helios/src/server.rs:148(not opened),:333). first_scheduled_nsfold.http.rs:538(not opened) isfirst_scheduled_ns.into_iter().chain(times.first_scheduled_ns).min()— earliest value, so the previous last-writer-wins concern is gone; the response-levelperformanceat:605-611matchesObservationOptions::finish(observation.rs:58-74(not opened)).- Lifetime through preemption.
RequestTimesispub(metrics.rs:326(not opened)), exported besideSnapshot(server.rs:33(not opened)); the record travels withIncomingthrough park/readmission (runtime.rs:196-198(not opened),:2116-2157), so instants survive preemption andlast_token_nsspans the park. - Option-off wiring.
http.rs:384-389(not opened) never callsenable_request_metrics,record_timesnever runs, and the only added work is copying aCopyRequestTimesand au64into the terminal event atruntime.rs:298-307(not opened),:1884-1896,:2057-2072. GraphKind::samples()(helios/src/execution/manifest.rs:90-101(not opened)) reproduces the previous inline seven-variantmatches!exactly atruntime.rs:1727-1729(not opened).- Configuration plumbing follows
thinking_token_budgetone-for-one:flare/src/configuration.rs:34(not opened),flare/src/settings.rs:32(not opened)/:224,flare/src/controller.rs:2566(not opened),flare-cli/src/config.rs:73-75,flare-cli/src/main.rs:355-357(not opened), andBootstraprejects a non-boolean rather than dropping it (helios/src/server/config.rs:353-357(not opened), test:727-739). The complaint is only where the key is documented, not that it is absent. - Event shape.
Finishedgains twoCopyfields rather than a new variant, so the event budget (runtime.rs:62-84(not opened)) andemit's classification need no change. - Docs honesty.
docs/api.md:1025-1038records theinclude_usagegap, thatqueue_time_msincludes the channel send and worker pickup, and that Flare has no--enable-force-include-usagecounterpart.
Editorial reconciliation (which lens finding won)
- Subtraction preferred where lenses conflicted. The two HTTP-level phase tests are deleted in favour of one helper-driven test (SUB1), which takes precedence over the Conventions lens' proposal to factor them into a third harness, over Simplicity's finding 3 and over Correctness' request to keep the
n = 2end-to-end guard. Correctness'api.mditems are kept but expressed as trims in SUB3, not as more prose. - Additions dropped as additions. Conventions'
fn boolean()helper besideinteger(), and its suggestion to migrate the three host-cache histograms onto the newHistogram<N>/Buckets<N>, are not requested: both add code, andmetrics.rs(not opened) carrying two histogram mechanisms is a follow-up, not a defect. Likewise Simplicity's proposal to foldEncoder::streamingintoenable_request_metricsis rejected (it would couple placement to a field onlyset_logprobswrites). - Out of scope, dropped as a finding.
generate_observed/enqueue(runtime.rs:837-844(not opened)) are identical tomain(runtime.rs:828-835(not opened)) with no hunk in this diff; the wrapper complaint belongs to whichever PR introduced them. - Prose-only items were combined, none promoted. No
Discord:omission exists. The--help/table wording and thecli-design.md:1385-1387staleness are folded into S3/S4 rather than given separate entries; Blockers stay reserved for the one real compatibility break. - Withdrawn from the previous round. The "false cost claim" blocker is gone: commit
66245920is #548's. It survives only as N1, which is advice for maintainers about how to read the diff summary.
Open questions / not verified
- Authorization (S1) — one maintainer line on #551 closes it.
- Whether the desktop controller needs the config key decides B1 option 1 versus option 2, and with it whether S2's file half exists at all.
- Whether Orbit should read
[server] per_request_metricsis a design call; the doc fix in S3 stands either way. - Whether the phase-test carrier assertions were deliberate end-to-end drift guards — settles the size of SUB1.
- Magnitude of the extra span in
queue_time_ms(group validation + channel send + worker pickup) is a measurement question; the docs state the boundary without asserting a size. - Not verified here: no GPU, exported core, live server, llama-swap run, Windows or multi-GPU build, no
cargo test, nopytest, noignitioninvocation; the head commit reports no CI checks. The PR's live matrix and CPU numbers are taken at face value. Every finding above is read from the code and docs at046aaef. - #548 remains open, so this PR's own delta is the encoder, the terminal-event sites, the config chain and the docs; re-review after #548 lands.
summary field
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.
- Blockers: 1
- Should fix: 6
- Subtractive suggestions: 6
- Nits: 5
(The full report is also saved at scratchpad entry #10 and the summary text at #12; counts in both match the sections above.)
#15 [high] FINAL REPORT v3 — verified deltas over entry #10 (use with #10)
The final report submitted this turn = scratchpad #10 with the following verified corrections/confirmations (all re-read at head 046aaef this turn). Apply these over #10's citations.
VERIFIED THIS TURN
- ignition/cli/config.py:19
DEFAULT_PATH = Path("~/.config/flare/config.toml"); :21-33_SECTIONSwith server entry at :23-24 = {host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction} (no per_request_metrics); :37-53_BUILT_IN(server.host/port/api_key/thinking_token_budget/scheduler_checkpoint_extra_work_fraction only); :112-114 unknown-key UsageError; :183-215 write_initial. Loaders serve.py:127,174,264,431,590; bench.py:144; publishing.py:31,73,174,194. - docs/api.md:1005-1050 exact text confirmed: :1007 "
flare run --enable-per-request-metrics, or[server] per_request_metrics = truein the host configuration"; :1016-1023 field table; :1020 "Always null" content instant; :1022 mean_itl definition; :1025-1029 step-instant + queue boundary; :1031-1038 include_usage gap; :1040-1043 null paragraph ("n greater than one"); :1045-1050 performance/token_timestamps_ns paragraph. Chat token observation extensions sentence is at :991-993. - docs/cli-design.md:1311-1313 shared-file sentence; :1317-1318 native run key list incl. per_request_metrics; :1321-1322 flags-override promise; :1337-1338 Orbit precedence; sample block :1342-1349 with
# per_request_metrics = falseat :1349; :736 table row. - docs/cli-design.md:305-386 histogram prose confirmed (four blocks :305-309, :311-326, :328-346, :348-364) — SUB2 target.
- encode.rs:232-275 confirmed: :233
enable_request_metrics(&mut self, streaming: bool); :234-240 placement arms; :243-247 record_times; :251-275 metrics_value, content instant hard Value::Null at :263, mean_itl :266-268, zero-token all-null vialet last = first.map(...)at :259. - phase_tests.rs confirmed spans: kept test block ends :4728 (within() checks :4719-4721, mean_itl :4724, tokens/s :4725); redundant test 1 :4730-4777 (choices==[] :4762, response.incomplete :4764, generation>=3.0 :4771, mean_itl==generation :4773, content null :4774); redundant test 2 :4779-4850 (flag-off loop :4782-4794; n=2 worker-drive :4795-4849 with Arc::get_mut :4798, fabricated RequestTimes :4830-4834, metrics null :4847, completion_tokens :4848).
- protocol/tests.rs confirmed: metered :2318-2332; metered_generation :2334-2344 (Reasoning/empty Content/" more"); carriers closure :2366-2374 clones frames; assertions :2375-2448; single-token :2432-2444; zero-token all-null pinned :2445-2448.
- flare-cli/src/config.rs:57-58 Command::Run arm, :73-75 file→flag fallback (excerpt verified verbatim).
- healios/server: Bootstrap parse config.rs:353-357; runtime.rs:1798-1802 tokens_committed; runtime.rs:2272 read, :2273-2285 get_or_insert; :2228-2268 vision pack; :2289-2299 submit guards; http.rs:387-389 gate, :538 min fold, :606-615 body placement; observation.rs:37-39 return_token_ids requirement, :70-74 performance.
EDITORIAL RECONCILIATION PARAGRAPH ADDED (new section in v3)
- Subtraction preferred where lenses conflicted: delete the two HTTP-level phase tests in favour of one served_through_worker test (SUB1) — beats Conventions' "factor into a third harness", Simplicity finding 3, and Correctness' request to keep the n=2 guard. Correctness' api.md items kept but expressed as trims (SUB3), not more prose.
- Additions dropped:
fn boolean()helper; migrating host-cache histograms onto Histogram/Buckets (follow-up, not a defect); folding Encoder::streaming into enable_request_metrics (couples placement to a field only set_logprobs writes). - Out of scope dropped: generate_observed/enqueue (runtime.rs:837-844 == main :828-835).
- Prose-only items combined, none promoted; no Discord omission exists; Blockers reserved for the one compatibility break.
- Previous round's "false cost claim" blocker withdrawn (commit 66245920 belongs to #548); survives only as N1.
- B1 now offers two consistent states (add key to Ignition schema + template + serve.py + test | or delete the file key, ~37 lines) — the second is counted under B1, not in the Subtract total.
COUNTS UNCHANGED: 1 Blocker, 6 Should fix, 6 Subtract/Simplify, 5 Nits. Verdict: Changes Requested.
#7 [medium] Nit-level citations and open questions not yet captured
NIT DETAILS
- N1: http.rs:542
first_scheduled_ns = times.first_scheduled_ns;; body built at :609-615; Chat-stream observation uses times.first_scheduled_ns directly at :568 (correct for one choice). Suggested fold:first_scheduled_ns = match (first_scheduled_ns, times.first_scheduled_ns) { (Some(a), Some(b)) => Some(a.min(b)), (a, b) => a.or(b) }; - N2: runtime.rs:2253-2254 scheduler.commit then :2257 stamp, then pack_inputs/pack_vision :2271-2315 (can Err). Cosmetic: failed path excluded from histograms and returns an error body.
- N3: protocol/tests.rs:2451
len() == 6vs key list :2357-2366expectedclosure. - N4: encode.rs:238-243 → proposed comment: "Places vLLM's per-request
metrics(see docs/api.md) and returns whether the content instant applies, i.e. whether the worker must sendCommittedevents." - N5: cli.rs:646 Orbit "in rank zero's OpenAI responses" vs cli.rs:859-860 Run "in OpenAI Chat, Completions, and Responses output" (2 lines). Align with docs/cli-design.md:736.
AGENTS.md QUOTES (verified): :46-50 read the repo-prose skill, prose must stand alone; :57-60 record unresolved defects/unrun checks/pending measurements in docs/TODO.txt, not design docs; :188-193 reject unsupported abstractions/churn, no switches without a concrete requirement, comment expansion not a contribution; :194-199 tests must exercise the affected behaviour, keep PRs focused; :201-205 explicit maintainer request is sufficient authorization; :452-456 a setting has exactly one of three homes.
OPEN QUESTIONS for the report: (a) were the phase-test carrier assertions added deliberately as an encoder/handler drift guard (shrinks X3 to the :4791-4794 half if so); (b) WinUI persisted config could in principle carry the key — Windows source not in tree; (c) how much more than "microseconds" queue_time_ms spans is a measurement; (d) #548 still open so the histogram half of the diff and the docs/api.md block X4 cuts cannot be judged independently; (e) not re-run: test suites, both cargo check commands, GPU, live server, llama-swap, gateway, Windows.
SUMMARY FIELD (compact, counts-only, <500 chars): recommendation + 1–2 sentence takeaway + Blockers 2 / Should fix 4 / Subtract 7 / Nits 5. No bullets, no code blocks.