Prose report · NVIDIA/hyperflare-inference #560

Raw Markdown for agents: https://autobot.eidonix.com/p/3105db6f-93dd-4398-b3eb-19aec7f11ab1.md

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

Head reviewed: 046aaef. Lens: 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). Two should-fix findings, three nits, and a list of claims I verified as accurate.

Key findings

  1. Should fix — docs/api.md:1045-1050 leans on token_timestamps_ns without defining it. The new section is the only place in the HTTP API reference that says where the per-token timestamps live or that return_token_timestamps requires return_token_ids.
  2. Should fix — docs/cli-design.md:736 claims a configuration default that one of the two commands does not honor. [server] per_request_metrics reaches native flare run only; flare orbit run has no configuration path, so the documented default silently resolves to "off".
  3. Nit — the description's "This PR adds no clock read" is unverifiable from the diff it ships. The per-step monotonic_ns() call is visible as an addition in this PR's diff against main because it belongs to #548's commit 66245920; the description should name that.
  4. Nit — flare run --help / flare orbit run --help do not mention the configuration key that docs/cli-design.md:736 gives as the flag's default.
  5. Nit — "one monotonic read per scheduled model step" is per step, shared by every lane in that step; say so.

No blocking findngs. The description now answers why / what / result / evidence in AGENTS.md's order, and its earlier defects (the arrival-clock actor, the WinUI and Orbit-negation bullets) are gone.


Should fix

1. 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 finds return_token_timestamps and token_timestamps_ns only at :992 (a passing mention that the "Chat token observation extensions" exist) and here. Nothing in the file says:

So the sentence "on the same process-local origin as choices[0].token_timestamps_ns" is a reference to a field the document never introduces. The link to ../helios/model-contract.md#token-and-timing-observation resolves (the anchor exists at helios/model-contract.md:326), so this is not a dangling reference; but the HTTP surface should define the shape it uses. This is the rule in AGENTS.md:46-50 (prose must make sense to a reader who has the repository) and in the repo-prose skill (SKILL.md:17-21, :50-54: no false definite references; check that the affected behaviour is understandable from the text and its explicit references).

Fix: add one sentence to 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, on buffered responses, a top-level performance object." That leaves the new section free to compare origins without re-defining.

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

The new table row reads:

| --enable-per-request-metrics | Add vLLM's per-request metrics timing object … | [server] per_request_metrics, otherwise off |

The flag is declared on both Run (flare-cli/src/cli.rs:860-863) and OrbitRun (:646-649), and docs/cli-design.md:170-173 lists it among the flags Orbit applies to rank zero, so the row is read as applying to both commands. But the configuration fallback lives in ConfigFile::apply, whose configuration branch matches only cli::Command::Run (flare-cli/src/config.rs:57 match &mut cli.command { cli::Command::Run(run) => …, key applied at :73-75). OrbitRun gets the value from its flag alone (flare-cli/src/cli.rs:655-729), and flare/src/configuration.rs:34 / flare/src/settings.rs:224 / flare/src/controller.rs:2566 reach the server through the native run and desktop paths, not Orbit.

Consequence for prose (not behaviour): an operator who sets [server] per_request_metrics = true, launches flare orbit run, and follows this table expects metrics; they get none, with no error. The document elsewhere is careful about exactly this distinction, so the qualification is cheap: docs/cli-design.md:1315-1317 already says "Native flare run applies … and per_request_metrics".

The same sentence at docs/api.md:1007 ("flare run --enable-per-request-metrics, or [server] per_request_metrics = true in the host configuration") reads generically, but names flare run, so it is defensible; the table row, whose payload is a flag both commands share, is the one that misleads.

Fix: in the docs/cli-design.md:736 configuration column, write "[server] per_request_metrics for native flare run, otherwise off", or add "(native flare run only)" to the description column, matching the phrasing already used at :1315.


Nits

  1. flare-cli/src/cli.rs:646-648 and :860-863 carry identical help text ("Add vLLM's per-request metrics timing object to OpenAI Chat, Completions, and Responses output.") — good, the previous divergence is gone — but neither mentions [server] per_request_metrics, which docs/cli-design.md:736 presents as the flag's default. One clause ("default: [server] per_request_metrics") would make --help and the doc agree. Low severity: the short help is already at the length other rows use.

  2. PR description, "Result": "This PR adds no clock read; the one monotonic read per scheduled model step comes from #548." The claim is consistent with #548's commit 66245920 ("Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing"), but a reviewer reading this PR's diff sees the call arrive: the hunks around reserve_and_pack add let scheduled_ns = super::observation::monotonic_ns(); and the stamp loop (helios/src/server/runtime.rs:2269-2285; get_or_insert at :2282-2283). Since the branch carries #548's commits into the diff against main, the description should say so — e.g. "This PR adds no clock read; the one monotonic read per scheduled model step arrives with #548 (66245920), which also feeds the queue histogram." Otherwise the sentence reads as contradicted by its own diff, and it sits immediately after the "Flare's own shape" bullet saying the performance object "gains first_scheduled_ns". (The bullet is correct as prose — #548 records the instant, this PR surfaces it — but the two sentences need the attribution to read as consistent.)

  3. "the one monotonic read per scheduled model step" — per step, not per request: one scheduled_ns is read once per packed step and shared by every lane through get_or_insert (runtime.rs:2272-2284). docs/api.md:1025-1026 already says this about completion instants ("A step's completion instant is read once … so tokens committed by one speculative step share it"); the description's cost sentence could add "per step, shared by its lanes" so the cost is not over- or under-stated.


Verified accurate, no change requested

Open questions and what only a run or the author can settle