Prose report · NVIDIA/hyperflare-inference #560

Raw Markdown for agents: https://autobot.eidonix.com/p/e3bbdf0e-4af4-4bbb-aa64-d03e478e9ec3.md

Prose review — PR 560 "Emit vLLM-compatible per-request metrics from runtime instants"

Head reviewed: 046aaef (base main, 22 files, +1757/−77). Lens: the description, commit messages, changed docs and code comments, judged against the charter, AGENTS.md, docs/design-review.md and .agents/skills/repo-prose/SKILL.md (not opened). Every claim below was checked against the code at the head commit; the only thing I did not do is execute the test suites.

Key findings

  1. Blocking — the docs present [server] per_request_metrics as the flag's default, but Ignition rejects the key. docs/api.md:1007, docs/cli-design.md:736, :1317-1318 and the :1349 example all introduce it; ignition/cli/config.py:23-24 has no such key and _validate raises UsageError for anything outside the schema (config.py:112-114), so a host that prepares cores with ignition export (or runs bench, debug-serve, convert, edit, combine, sign) fails on the file the docs told the user to edit. This contradicts docs/cli-design.md:1313 and :1385-1387.
  2. Should fix — docs/api.md:1045-1050 is the HTTP reference's only mention of performance/token_timestamps_ns, and it never defines the shape it refers to (placement in choices[0], the aligned token_ids, the return_token_timestamps requires return_token_ids rule at helios/src/server/observation.rs:37-39).
  3. Should fix — docs/cli-design.md:736 records [server] per_request_metrics as the flag's default although only native flare run reads it: ConfigFile::apply has no OrbitRun branch (flare-cli/src/config.rs:57-75), so the documented default silently resolves to "off" for flare orbit run.
  4. Nits (3) — both --help strings omit the configuration key the docs table names; the description's "This PR adds no clock read" is contradicted by its own diff because the per-step read belongs to #548's commit 66245920; and that read is per step, shared by every lane, not per request.
  5. Everything else verified accurate: description order and framing, the #552/#553 replacement rationale, the field table against Encoder::metrics_value, placement and null rules, the queue-arrival boundary, performance contents, the model-contract.md update, the documented include_usage gap, and the evidence section against AGENTS.md:103-112.

Blocking

B1. docs/cli-design.md:736, :1317-1318, :1349; docs/api.md:1007 — the documented configuration key does not exist in Ignition's schema

The new prose introduces [server] per_request_metrics in four places:

Ignition's schema does not contain it. ignition/cli/config.py:21-24:

"server": {"host": str, "port": int, "api_key": str, "thinking_token_budget": int,
           "scheduler_checkpoint_extra_work_fraction": (int, float)},

and Configuration._validate (config.py:108-118) raises on any other key: f"{path}: unknown key {key} in [{section}]" (:112-114). A search of the whole ignition/ tree for per_request_metrics returns nothing, as does a search of tests/cli.

That matters because Ignition reads the same default file (config.py:19, DEFAULT_PATH = Path("~/.config/flare/config.toml (not opened)")) and loads it for every command: convert/edit/combine/sign (ignition/cli/publishing.py:31,73,174,194), export/_export_hosts/_prepare/debug_serve/join (ignition/cli/serve.py:127,174,264,431,590) and bench (ignition/cli/bench.py:144 (not opened)). So the ordinary flow the docs describe — uncomment the line in the generated config, later run ignition export to prepare a core — ends in a usage error on a key this PR tells the user to set. write_initial (config.py:183-192) also does not emit the key, so the doc example is additionally wrong about what "written on first export" produces.

Two documented statements this contradicts:

per_request_metrics is also the only [server] key native Flare reads (flare/src/configuration.rs:28-35: host, port, api_key, thinking_token_budget, scheduler_checkpoint_extra_work_fraction, per_request_metrics) that Ignition rejects, i.e. the first exception to a rule the document states without qualification.

Fix (either):

Option (a) is the one consistent with the charter's rule against silently ignoring or breaking a documented setting (charter line 13) and with AGENTS.md's requirement that docs and behaviour agree.


Should fix

S1. docs/api.md:1045-1050 — the new section is not readable from the HTTP API reference alone

A Chat request with `return_token_timestamps: true` also receives a top-level
`performance` object holding `ingress_ns`, `enqueue_ns`, `first_scheduled_ns` and
`reused_prompt_tokens`; the three instants are absolute nanoseconds on the same
process-local origin as `choices[0].token_timestamps_ns`. The
[prepared model contract](../helios/model-contract.md#token-and-timing-observation)
defines those fields.

A whole-file search of docs/api.md for return_token_timestamps|token_timestamps_ns|return_token_ids returns only :992 (a passing mention that "Chat token observation extensions" exist) and this passage. Nothing states:

The anchor resolves (helios/model-contract.md:326), so this is not a dangling reference, but the sentence compares an origin to "choices[0].token_timestamps_ns" as though the HTTP reader already knew that field. AGENTS.md requires prose to make sense to a reader who has the repository, and the repo-prose rules forbid definite references to things the text has not introduced.

Fix: one sentence in the "Chat token observation extensions" paragraph at docs/api.md:991-992, e.g. "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." The new section can then compare origins without redefining.

S2. docs/cli-design.md:736 — the recorded default is not the default for flare orbit run

Row: | --enable-per-request-metrics | … | [server] per_request_metrics, otherwise off |.

The flag exists on both commands (flare-cli/src/cli.rs:646-649 for OrbitRun, :860-863 for Run), and docs/cli-design.md:170-173 lists it among the options Orbit applies to rank zero, so the row reads as covering both. But the configuration fallback lives in ConfigFile::apply, whose branch matches only cli::Command::Run (flare-cli/src/config.rs:57, key applied at :73-75). OrbitRun takes the value from its flag alone (flare-cli/src/cli.rs:698, forwarded to the ranks at :729), and the Orbit arm at flare-cli/src/config.rs:141-151 only sets cache paths. The flare/src/configuration.rs:34 → settings.rs:224 → controller.rs:2566 path is the native-run and desktop path, not Orbit.

Consequence: an operator who sets [server] per_request_metrics = true, launches flare orbit run, and trusts this table gets no metrics and no error.

Fix: in the default column, "[server] per_request_metrics for native flare run, otherwise off" — the phrasing docs/cli-design.md:1317 already uses.


Nits

N1. flare-cli/src/cli.rs:646-648 and :860-863 — help text omits the configuration key

Both now carry identical text ("Add vLLM's per-request metrics timing object to OpenAI Chat, Completions, and Responses output."), which is good, but neither names [server] per_request_metrics, which docs/cli-design.md:736 gives as the flag's default. One clause would make --help and the doc agree. Low severity: the two-line form matches neighbouring options.

N2. PR description, "Result" — "This PR adds no clock read; the one monotonic read per scheduled model step comes from #548"

The attribution is correct (commit 66245920, "… stamp scheduled time after packing", belongs to #548), but this branch carries #548, so this PR's diff shows the read arriving: helios/src/server/runtime.rs:2269-2285 adds let scheduled_ns = super::observation::monotonic_ns(); and the stamp loop with get_or_insert at :2282-2283. Read against the diff, the sentence looks contradicted — especially since it follows the bullet saying the performance object "gains first_scheduled_ns". Fix: name the commit, e.g. "the one monotonic read per scheduled model step arrives with #548 (66245920)".

N3. Same sentence — "per scheduled model step" is right, but the sharing is unstated

One instant is read per packed step and shared by every lane through get_or_insert (helios/src/server/runtime.rs:2272-2284). docs/api.md:1025-1026 says exactly this for completion instants; adding "per step, shared by its lanes" to the description's cost sentence keeps the cost claim precise.


Verified accurate — no change requested

Open questions and what I could not settle