Architecture & scope review — PR #560, head 046aaef
Verdict: one blocking compatibility break, one should-fix scope/authorization finding, two nits. The change's mechanism is correct and belongs in the right layer; what blocks it is not the design but the fact that its documented configuration key lands in a file shared with a strict second reader that does not know it.
Key findings
- Blocking —
[server] per_request_metrics, as documented indocs/api.md:1007anddocs/cli-design.md:1317-1318,:1349, is outside Ignition's hardcoded config schema, so following the new docs breaks every Ignition command for that user (ignition/cli/config.py:23-24,:113-114). The repo's own rule atdocs/cli-design.md:1385states exactly why this cannot stand. - Should fix — No maintainer request, roadmap item, or measured defect authorizes the feature; the only stated requirement is issue #551, opened by the same non-maintainer author with no maintainer reply (
AGENTS.md:165-169,:188-193,:201-207; charter "What gets merged"). - Nits (2) —
mean_itl_ms's divisor disagrees with the recorded interval count on speculative cores; and the branch is stacked on the still-open #548, so most of the stated diff is #548's.
Everything else in this lens — layer roles, off-by-default, placement/null rules, absence of per-model special cases, honest limitation docs — is sound and is listed below so it is not re-litigated.
Blocking: the documented [server] per_request_metrics key breaks every Ignition command
What the PR documents. docs/api.md:1007-1008 — "flare run --enable-per-request-metrics, or [server] per_request_metrics = true in the host configuration"; docs/cli-design.md:1317-1318 lists per_request_metrics among the native [server] keys, and docs/cli-design.md:1349 puts it in the sample block a user copies:
[server]
host = "127.0.0.1"
port = 8000
api_key = ""
# thinking_token_budget = 1536
# scheduler_checkpoint_extra_work_fraction = 0.05
# per_request_metrics = false # Add vLLM's per-request `metrics` to OpenAI output.
Why that file is shared. docs/cli-design.md:1313: "Ignition and native Flare read this file; --config PATH selects another file." Both readers use the same default: ignition/cli/config.py:19 DEFAULT_PATH = Path("~/.config/flare/config.toml (not opened)") and flare-cli/src/main.rs:83 home.join(".config/flare/config.toml (not opened)").
Why it breaks. Ignition validates strictly against a hardcoded schema:
ignition/cli/config.py:23-24—_SECTIONS["server"] = {"host": str, "port": int, "api_key": str, "thinking_token_budget": int, "scheduler_checkpoint_extra_work_fraction": (int, float)}. Noper_request_metrics.ignition/cli/config.py:113-114—if key not in schema: raise UsageError(f"{path}: unknown key {key} in [{section}]").
Every Ignition command loads the file, so all of them fail on that key: ignition/cli/serve.py:127 (export), :174 (_export_hosts), :264 (_prepare), :431 (debug-serve), :590 (join); ignition/cli/bench.py:144; ignition/cli/publishing.py:31,73,174,194 (convert/edit/sign/combine).
Net effect: a user who enables the feature the way the PR tells them to loses ignition export, ignition bench, ignition debug-serve, ignition join, and the publishing commands with "unknown key per_request_metrics in [server]" — i.e. the documented "prepare with ignition, serve with flare" workflow, including cross-node preparation, stops working.
The repo says so itself. docs/cli-design.md:1385-1387: "Ignition rejects any section or key outside its schema. Native Flare ignores keys it does not use, except in [prefix_cache], where it accepts only memory, disk_limit, drain_on_shutdown, max_age, and compression." The two readers are deliberately asymmetric — Rust lenient (flare/src/configuration.rs:26-35, #[serde(default)] Server with the new per_request_metrics: Option<bool> at :34), Python strict. A key only native Flare consumes therefore cannot be documented inside the shared [server] block without breaking the strict reader. That is a documented compatibility break, introduced by this PR.
The invariant was intact before this PR. The two schemas were identical except for this one key: flare/src/configuration.rs:29-34 (host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction, per_request_metrics) against ignition/cli/config.py:23-24 (same list minus the last). The sibling key this PR was modelled on is mirrored into Ignition: schema at ignition/cli/config.py:24, built-in default at :40, range validation at :119-120, forwarding into server options at ignition/cli/serve.py:487, and test rows at tests/cli/test_config.py:228-237. The new key has none of that, and no row was added to tests/cli/test_config.py (its [server] valid/invalid tables at :151-161, :226-237 cover only the older keys).
Severity: blocking for this lens. It is user-visible, it is caused solely by this PR's documentation, and it hits a supported, documented workflow. Charter "Code Review Standards → Supported matrix & compatibility" requires checking interactions across supported workflows; this one is broken by the PR's own text.
Fixes (either is acceptable; the first is smaller).
- Add
"per_request_metrics": boolto_SECTIONS["server"]inignition/cli/config.py:23-24, plus atests/cli/test_config.pyrow, and state in the docs that Ignition accepts but does not use the key. This introduces the first[server]key Ignition accepts without consuming (the existing ones are consumed atserve.py:439-440,:486,:487,:66), so it needs a sentence saying so — but it keeps one shared file and one documented key, which is the designdocs/cli-design.md:1313describes. - Keep the key native-only: document it outside the shared sample block (the
[prefix_cache]-style splitdocs/cli-design.md:1385already contemplates) and narrowdocs/api.md:1007's "in the host configuration" claim accordingly.
Blast radius note: Configuration.write_initial (ignition/cli/config.py:183-215) does not write the new key, so first-run export/bench without user edits are unaffected; only a user who sets the key as documented is hit.
Corroboration: the flare-autobot review on 2026-11-28 05:42 reached the same break from the mechanism side ("the documented [server] per_request_metrics key is outside Ignition's config schema, which breaks every Ignition command", its single blocker); I verified it independently from the docs/scope side and it stands.
Should fix: no authorization in the project's own terms
What the rules require. AGENTS.md:165-169: "Every contribution must address an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation… Hypothetical future consumers, agent-generated suggestions, and lint findings alone do not establish a need for a change." AGENTS.md:188-193: "Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement." AGENTS.md:201-207: "A feature request, passing tests, or a performance gain does not waive an architectural invariant." The charter's "What gets merged" list is the same gate: "PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs."
What the PR offers.
- Issue #551, "Report per-request timings on final responses so llama-swap can show prompt and decode rates", opened 2026-11-27 by the same author (GitHub association NONE) with zero comments. It is a genuine integration defect — llama-swap v250's
buildMetricsreads only body/SSEtimingsormetrics— but it is not a maintainer request. - The maintainer-side issue in this area, #536, asks for request latency histograms and
process_*collectors for monitoring parity; #548 answers it. #536's list contains no response-body object. - The charter's roadmap (in-process Rust SDK #6, Engram tables #267, FlashInfer fix #215) does not include response-body metrics. The charter lists vLLM under "Alternatives / Competitors", so "vLLM has it" is not by itself a merge reason.
- Both predecessors were stopped on charter grounds: #553 ("Review Stopped — It is low value or does not align with the project charter", 2026-11-27) and #552 the same day; #553 was closed by the author as superseded by this PR.
How to settle it (no code change): a maintainer comment on #551 or #536 accepting a response-body per-request metrics object; or reframing the PR around the reproducible llama-swap defect rather than vLLM field parity. Either converts this from an unsolicited flag to an authorized one. Absent that, AGENTS.md:171-174's "reject unapproved scope expansion" reading applies by analogy even though this is not one of the enumerated expansions.
Nits
mean_itl_msdivisor.helios/src/server/protocol/encode.rs:266-268computesgeneration / (generated - 1), i.e. first-to-last divided by the token count after the first.docs/api.md:1025-1026documents why that is not an interval mean on speculative cores: "A step's completion instant is read once when the worker processes that step's results, so tokens committed by one speculative step share it." A step committing k tokens adds one interval but k−1 to the divisor, so the field understates mean ITL there. The true interval count already exists:RequestRecord::tokens_committed(helios/src/server/metrics.rs:348-362) observes exactly one interval per committing step, called fromhelios/src/server/runtime.rs:1795-1802. Carrying that count inRequestTimes(metrics.rs:326-330) would make the field exactly vLLM's rather than approximately so.- Scope hygiene / stack. The branch sits on the still-open #548, so the reported diff (22 files, +1757/−77) is mostly #548's runtime work (
helios/src/scheduler.rs,runtime.rs,metrics.rs,phase_tests.rs— e.g.cache_lookup_tokensatscheduler.rs:113-115). #560's own delta is the encoder, the fourFinishedsites, the config chain and the docs. Merge order must be #548 first; the description says so, which is the right disclosure.
What is right, and should not be changed in review
- Layers stay in their roles. The worker owns every instant; the HTTP encoder only places them.
enable_request_metrics/record_times/metrics_valueathelios/src/server/protocol/encode.rs:232-275, gated athelios/src/server/http.rs:387-389; no clock is read in the HTTP layer. That directly answers the defect that stopped the closed #553, whose HTTP-layer clocks could not report queue time. - Placement is one readable switch, not scattered special cases.
encode.rs:233-240: Messages → never; unplaced or multi-prompt → omitted;n > 1→Suppressed→ JSONnull; else timing. All six keys always present with per-field nulls (:261-274). - Off by default and wire-identical when off, as
docs/api.md:1009-1011claims; one boolean onServerConfig(helios/src/server.rs:127-129,:148,:333) plusHttpState(:174). - Config chain is complete and type-checked, just in the wrong file (see the blocking finding):
helios/src/server/config.rs:353-357;flare/src/settings.rs:32,224;flare/src/controller.rs:2566;flare-cli/src/config.rs:73-75with test:222-234; flag atflare-cli/src/cli.rs:646-649,:863, forwarded to rank zero at:698-700with test:1378-1402;docs/cli-design.md:170-174notes the rank-zero behaviour under Orbit. - No per-model special cases, no env vars, no model-specific branches — complies with the charter's "No per-model special cases or flags" and
AGENTS.md:446-456. The runtime stays model-agnostic, which is the charter's "Keep the runtime small and model-agnostic". - Limitations documented rather than hidden: the
include_usagegap and the missing--enable-force-include-usageequivalent (docs/api.md:1031-1038), the queue-time origin including the channel send (:1025-1029), the null rules (:1040-1043), andperformance.first_scheduled_nson the token-timestamp origin (:1045-1050). This meetsAGENTS.md:194-199("Identify missing hardware, inputs, and unrun checks explicitly") and the charter's "Bring real evidence" in spirit, subject to the authorization point above.
Findings from earlier reviews of this branch that are now resolved (do not re-raise)
- Private
RequestTimesleaking into the publicGenerationEvent— fixed: exported besideSnapshotathelios/src/server.rs:33, declared public athelios/src/server/metrics.rs:326. - Flag-only configuration — fixed:
[server] per_request_metricsexists inflare/src/configuration.rs:34, reads throughflare/src/settings.rs:32,224andflare/src/controller.rs:2566, with a CLI test atflare-cli/src/config.rs:222-234. The remaining problem is not its absence but where it was documented (blocking finding). - Unmeasured option-off cost — withdrawn from this PR's ledger: the accumulation in question (
tokens_committed,metrics.rs:348-362) comes from #548, which owns that evidence.
Open questions and what could not be verified here
- The live evidence in the description — 40/40 request-matrix checks, llama-swap showing prompt and generation rates, 15.4–15.9 s vs 16.0–16.3 s CPU per 16×512-token run — needs the RTX PRO 6000 Blackwell host and llama-swap v250; not verifiable in this review. The author also reports Windows and multi-GPU cores unrun, correctly disclosed.
- Whether a maintainer considers the vLLM field names themselves the requested outcome: that decides the should-fix finding and cannot be settled from the code.
- Whether #548's own open should-fix items would move these fields (
first_scheduled_nsorigin,last_token_nson reasoning-close): if so, #560 should follow #548's revisions. The forced reasoning-close token being counted without an instant is already disclosed in the description.