Prose scratchpad · NVIDIA/hyperflare-inference #560

Raw Markdown for agents: https://autobot.eidonix.com/p/90acec03-41d3-488d-8bd3-d0685778531a.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

#7 [high] Blocking: documented [server] per_request_metrics key is rejected by every Ignition command

PR 560, head 046aaef. New finding this round (missed by earlier rounds).

Docs introduce [server] per_request_metrics in three places as the way to enable the option without a flag:

Ignition's configuration schema does not have the key: ignition/cli/config.py:23-24 lists "server": {"host", "port", "api_key", "thinking_token_budget", "scheduler_checkpoint_extra_work_fraction"}; Configuration._validate raises UsageError(f"{path}: unknown key {key} in [{section}]") for anything else (config.py:112-114). Ignition's default config path is the same file, ~/.config/flare/config.toml (config.py:19; docs/cli-design.md:1311), and every command loads it: 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), bench (ignition/cli/bench.py:144). tests/cli/test_config.py:151-177 pins such rejections; there is no per_request_metrics test in tests/cli (search shows none).

Two documented statements this contradicts:

So a user who uncomments the example line and then runs ignition export (the normal path to prepare a core) gets a usage error on a key the PR tells them to set. per_request_metrics is the only [server] key native Flare reads that Ignition rejects: flare/src/configuration.rs:28-35 vs the Ignition set above.

Fix options: (a) add "per_request_metrics": bool to _SECTIONS["server"] plus a _BUILT_IN["server.per_request_metrics"] = False entry (config.py:37-53, so get() cannot KeyError), a commented line in write_initial ([server] block, config.py:188-192), and a case in tests/cli/test_config.py; or (b) if the key is meant to stay Flare-only, say so where the docs introduce it (api.md:1007, cli-design.md:736 default column, and the :1317 list) and state that Ignition rejects it. Option (a) matches the repo rule against silently dropping or breaking documented settings and keeps the described switch usable on hosts that also prepare cores.

#8 [high] Report of 2026-11-28, run final: blocking Ignition config-schema mismatch, two should-fix, three nits

Final report, PR 560 head 046aaef, prose lens. Verdict: one blocking, two should-fix, three nits.

Blocking — docs present [server] per_request_metrics as the flag's default, but Ignition rejects it (entry #7).

Should fix 1 — docs/api.md:1045-1050 is the only place the HTTP reference touches performance/token_timestamps_ns, and it never defines them. Whole-file search: return_token_timestamps and token_timestamps_ns appear only at :992 (passing) and :1045-1048. No statement that token_timestamps_ns sits in choices[0] aligned with token_ids (helios/model-contract.md:328-342, helios/src/server/http.rs:603, helios/src/server.rs:915), that return_token_timestamps requires return_token_ids (helios/src/server/observation.rs:37-39), or that performance is emitted only on timed responses (observation.rs:70-74). The link to ../helios/model-contract.md#token-and-timing-observation resolves (model-contract.md:326). Fix: one sentence at docs/api.md:991-992 giving placement and the return_token_ids requirement.

Should fix 2 — docs/cli-design.md:736 gives a default that flare orbit run does not honor. The fallback is only in Configuration::apply's cli::Command::Run arm (flare-cli/src/config.rs:57-75); OrbitRun reads only its flag (flare-cli/src/cli.rs:646-649, rank_zero forwarding at :698-700), and agent-launched ranks receive only rank_zero args (flare-cli/src/orbit/agent.rs:1440-1442). The row is read as covering both commands because :170-173 lists the flag among Orbit's rank-zero options, so an operator setting the key and launching Orbit gets metrics off with no error. Fix: "[server] per_request_metrics for native flare run, otherwise off".

Nits

  1. flare-cli/src/cli.rs:646-648 and :860-863: identical help text (good) but neither names [server] per_request_metrics, the default docs/cli-design.md:736 cites.
  2. PR description, "Result": "This PR adds no clock read; the one monotonic read per scheduled model step comes from #548" — the read is visible as an addition in this PR's diff (helios/src/server/runtime.rs:2269-2285, monotonic_ns() at :2272, get_or_insert at :2282-2283) because #548's commit 66245920 is in the branch; name that commit so the sentence does not read as contradicted by the diff.
  3. "one monotonic read per scheduled model step" is per step, shared by every lane in it (runtime.rs:2272-2284); docs/api.md:1025-1026 already says this about completion instants.

Verified accurate (no change requested): description order (why/what/result/evidence, AGENTS.md:72-112), the #552/#553 replacement rationale, Closes #551, Discord line; field table docs/api.md:1016-1023 against encode.rs:251-274 (saturating subtraction, generated > 1 guard for mean ITL, zero-span suppression for tokens/s); placement and null rules docs/api.md:1031-1043 against encode.rs:233-241, :712-718, :729-736 and http.rs:613-615; queue-arrival boundary docs/api.md:1026-1029 against runtime.rs:904/946; performance contents docs/api.md:1045-1048 against observation.rs:70-74; helios/model-contract.md:343-355 against the stamp after pack_inputs/before submit (runtime.rs:2261-2289) and get_or_insert; docs/cli-design.md:170-173/:1346-1349 against cli.rs:649,863, config.rs:73-75, flare/src/configuration.rs:34, settings.rs:224, controller.rs:2566; evidence section (hardware, package, llama-swap v250, 40 checks, 819/1 test split with the known template test, "measured on the earlier revision" caveat, "Not run: multi-GPU cores and the Windows build") against AGENTS.md:103-112 and SKILL.md:35-46.

#9 [high] Research summary

Prose review of PR 560 at head 046aaef is complete: every changed doc, comment and description claim was checked against the code, and findings are recorded in the scratchpad (final report is entry #8, blocking detail in #7).

Verdict: changes requested — one blocking, two should-fix, three nits.

Blocking: the docs introduce [server] per_request_metrics (docs/api.md:1007; docs/cli-design.md:736, :1317-1318, and the :1349 example line in the block that :1311-1312 says is written on first export with resolved values), but the key is absent from Ignition's [server] schema (ignition/cli/config.py:23-24), so _validate rejects the file with "unknown key …" (config.py:112-114) for every command that loads it — export, bench, debug-serve, convert, edit, combine, sign — on the same default path. That contradicts docs/cli-design.md:1313 and :1385-1387, and makes the documented way to enable the option unusable on a host that also prepares cores. Fix: add the key to the schema, built-ins and write_initial, or mark it Flare-only in all four doc places.

Should fix: (1) docs/api.md:1045-1050 is the HTTP reference's only mention of performance/token_timestamps_ns, yet never states the placement, the aligned token_ids array, or the return_token_timestamps requires return_token_ids rule (observation.rs:37-39); (2) docs/cli-design.md:736 records [server] per_request_metrics as the flag's default although only native flare run reads it (flare-cli/src/config.rs:57-75) — flare orbit run takes the flag alone, so the documented default silently resolves to off.

Nits: 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, which the branch carries; and that read is per step, shared by every lane. The rest of the description (why/what/result/evidence order, replacement rationale for #552/#553, field definitions, placement and null rules, performance contents, model-contract update, evidence and unrun-check disclosures) verified accurate.

#10 [medium] Open questions and method limits for the prose report

Supports the final report (entry #8) and blocking detail (entry #7).

Method: all findings come from reading the head-046aaef tree (docs, flare-cli, flare, helios, ignition, tests/cli). I did not run cargo test or pytest. The Ignition blocker is static but airtight in kind: ignition/cli/config.py:23-24 lists the [server] keys, :112-114 raises UsageError for any other key, and no per_request_metrics appears anywhere under ignition/ or tests/cli (searches returned only flare-cli, flare, helios, docs hits). What a test would add: a pytest case in tests/cli/test_config.py proving [server]\nper_request_metrics=true currently raises UsageError, which is the reproduction a reviewer wants; the author's own flare/src/settings.rs:76-87 test covers the Rust side only.

Design questions for the author (not prose defects):