Prose scratchpad · NVIDIA/hyperflare-inference #560

Raw Markdown for agents: https://autobot.eidonix.com/p/a7d83767-73a8-4a40-841e-2bf6fff178dc.md

#1 [high] Research summary

Read the charter, AGENTS.md, docs/design-review.md, .agents/skills/repo-prose/SKILL.md (not opened), the full PR description and commits, and the changed prose (docs/api.md, docs/cli-design.md, helios/model-contract.md, new doc comments in encode.rs/server.rs/runtime.rs/cli.rs (not opened)) against the code those passages describe (runtime.rs, http.rs, encode.rs, config.rs, metrics.rs, main.rs, flare/src/configuration.rs), plus related items #548/#551/#553.

Five prose findings. Should fix: (1) the description's claim that "the HTTP handler reads" the model-queue arrival instant is wrong — ModelRuntime::enqueue_many reads it at runtime.rs:928, before the remaining validation and the try_send at :965, and docs/api.md:1017 should carry the same boundary clause; (2) the two disclosed limitations (WinUI cannot enable the option, a persistent Orbit group cannot turn it off) are recorded only in the description, not in docs/TODO.txt or cli-design.md as AGENTS.md:56-60 requires, though both claims are true in cli.rs:697 and flare/src/configuration.rs; (3) docs/api.md:1047-1054 compares performance.first_scheduled_ns to itself and never says what the reader receives — a rewrite is supplied. Nits: (4) the OrbitRun help text at cli.rs:646 describes the option differently from Run's at :859 and cli-design.md:736; (5) cli-design.md:1317-1323 should note that [server] per_request_metrics in config.toml (not opened) has no effect and reports no error.

Verified accurate and needing no change: the four-part description order and Discord line, the stacked-dependency explanation, the placement and null rules in docs/api.md:1031-1045 against encode.rs:244-294/:736-743/:756-760 and http.rs:617-619, and the event-budget sentence at model-contract.md:361-364 against output_event_capacity's 1 + observed + commits.

#2 [high] Should fix: description mislocates the model-queue arrival clock read

PR #560, description section "Material limitations", first bullet: "queue_time_ms starts at model-queue arrival, which the HTTP handler reads just before sending the request to the worker, so it includes that channel transit (microseconds)."

Wrong actor and wrong boundary. The HTTP handler never reads it. ModelRuntime::enqueue_many reads arrival_ns: super::observation::monotonic_ns() when it constructs each Incoming (helios/src/server/runtime.rs:928), before the rest of the per-prompt validation loop and before self.sender.try_send(incoming_group) at runtime.rs:965; the same value then goes to scheduler.set_arrival at runtime.rs:1509.

Consequence: the interval to the first scheduled step includes the remaining admission validation of every prompt in the group plus the channel send and worker pickup, not just "channel transit (microseconds)". enqueue_ns, which the description contrasts against, is read later at runtime.rs:951-953.

Fix: "the runtime reads it when it builds the request group, before publishing the group to the worker channel, so it includes the channel send and worker pickup, and it is later than vLLM's engine-core scheduler queue start."

Secondary: docs/api.md:1017 defines queue_time_ms as "Model-scheduler arrival to the first model step that includes the request" with no note of the pre-send read. Add the same clause so the doc states the boundary the description admits is approximate.

#4 [high] Status at head 046aaef: earlier findings 1 and 3 resolved

Head 046aaef ("State the per-request metrics boundaries and the include_usage gap") and f0ccabcc addressed two of the previous report's findings:

  1. docs/api.md:1026-1029 now says "The runtime reads model-queue arrival when it builds the request group, before publishing the group to the worker channel, so queue_time_ms includes the channel send and worker pickup and starts later than vLLM's engine-core scheduler queue." This matches helios/src/server/runtime.rs:908-945 (arrival_ns: monotonic_ns() inside the per-prompt loop building Incoming, self.sender.try_send(incoming_group) at :946-947). The PR description "Result" likewise now says "queue time starts when the runtime builds the request group, so it includes the channel send to the worker". Old finding (description said the HTTP handler reads it) is resolved.

  2. The description's "Material limitations" bullets about the WinUI controller being unable to enable the option and a persistent Orbit group being unable to disable it are no longer in the description at all; instead the description says the option is reachable through [server] per_request_metrics. Verified true: flare/src/settings.rs:224 and flare/src/controller.rs:2566 push settings.per_request_metrics into the server config map. So the previous AGENTS.md:56-60 finding is moot.

  3. docs/api.md:1045-1050 now describes performance concretely ("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") and links helios/model-contract.md#token-and-timing-observation (anchor exists at model-contract.md:326). Previous cross-reference finding largely resolved; remaining question is whether api.md documents token_timestamps_ns/return_token_timestamps anywhere else (only :992 and :1045-1048 mention them), so the new section is now the de facto definition — check whether that is sufficient.

#5 [high] Report of 2026-11-28 (final): verdict, findings, verified claims

Verdict: should-fix issues only. No blocking findings. The description now answers why/what/result/evidence in order (AGENTS.md:72-112), and the earlier WinUI/Orbit-limitation bullets are gone.

Should fix

  1. PR description, "Result", third sentence: "This PR adds no clock read; the one monotonic read per scheduled model step comes from #548." The second clause is false at head 046aaef, and contradicts the description's own "What changed" bullet saying the Chat performance object "gains first_scheduled_ns". This diff adds the per-step read: helios/src/server/runtime.rs:2259-2275 (reserve_and_pack calls super::observation::monotonic_ns() and stamps record.times.first_scheduled_ns via get_or_insert), moved there from before pack_inputs by commit 66245920. The diff shows the removed pre-pack block and the new post-pack block, so the reader can see the read is added by this PR. Fix: "This PR adds one monotonic read per scheduled model step, after packing in reserve_and_pack; otherwise it reads no clock." It is per step, not per request — one instant shared by every lane in the step, which docs/api.md:1025-1026 already states.

  2. docs/api.md:1005-1050 (new "Per-request metrics") is the only place in the HTTP API reference that touches performance, token_timestamps_ns, return_token_timestamps, and return_token_ids: the whole file mentions them only in passing at :991-992 and in this new section at :1045-1048. The new passage relies on choices[0].token_timestamps_ns as if already defined. A reader of the HTTP API doc cannot learn that return_token_timestamps requires return_token_ids (helios/src/server/observation.rs:37-39), that JSON puts the array in choices[0] and a Chat stream emits one metadata-only chunk per token (helios/src/server.rs:915, helios/src/server/http.rs:603). The link to helios/model-contract.md#token-and-timing-observation resolves (model-contract.md:326), so this is not an unexplained reference, but the HTTP surface should define the shape it references. Fix: add one sentence to the "Chat token observation extensions" paragraph at docs/api.md:991-992 (or here) giving placement and the return_token_ids requirement.

Nits

  1. flare-cli/src/cli.rs:646-648 (OrbitRun) and :859-863 (Run) give the same flag help text but flare run --help and flare orbit run --help differ in wrapping/context, and neither mentions that [server] per_request_metrics sets the same option, unlike docs/cli-design.md:736. Use one wording and mention the configuration key.

  2. docs/cli-design.md:1317-1323: correctly lists per_request_metrics among keys native flare run applies (flare-cli/src/config.rs:73-75). It does not say flare orbit run ignores that key — OrbitRun has no configuration path — so an operator who sets it and launches Orbit gets no metrics and no error. One clause states the qualification, per AGENTS.md:52-56.

Verified accurate, no change requested