Pre test report report · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/463a22ef-ea59-4581-abe1-d085ed9f3fd2.md

Pre-test report — PR #548 "Add per-request histograms and vLLM-parity request metrics"

Decision: REFER TO HARDWARE TESTING — cn5 only, one job, ≈40 minutes, 6 cases. No cn7. No throughput A/B.

Head is unchanged at 6624592 (9 files: docs/api.md +127/−4, metrics.rs +548/−2, runtime.rs +94/−37, phase_tests.rs +187, latency.rs +24/−8, http.rs +15, scheduler/tests.rs (not opened) +7, scheduler.rs (not opened) +4, server.rs (not opened) +2). The only new material is one @flare-autobot review comment at 2026-11-28 05:09. It is stale: it quotes "~235 of the 1,016 added lines", and 1,016 was the 055663a diff size — the current head is ~1,008. Its three should-fix items (Closes #536, unpinned vLLM table, response-wide tool-limit gate) are findings already recorded and adjudicated here. It adds nothing testable and does not move the verdict.

1. Why refer rather than hold

No blocking defect at this head under any review lens; both former blockers are resolved and now documented:

Design strength holds: every observation is inside Metrics::request_completed (metrics.rs:545-603), which owns the crate's only completed.fetch_add (:558), so counter and distributions cannot drift. Re-derived observation order at this head: prompt_tokens unconditional (:562) · prefill_computed (:564) · generated (:568) · max_tokens only when >0 (:570) · preemptions (:574) · inter-token via absorb (:576) · TTFT only if first_token_ns (:577) · queue only if first_scheduled_ns (:581) · prefill+inference only if both (:584-591) · decode+TPOT only if first_token_ns && generated_tokens > 1 (:593-602). observe increments exactly one bucket plus sum (:272-283); render emits HELP/TYPE, cumulative buckets, _sum = sum/scale, _count = cumulative (:297-321) — valid Prometheus 0.0.4.

The author's 2026-11-28 scrape already showed the positive arithmetic (completions 24, e2e 22, generated-token histogram sum 3,112 = flare_generated_tokens_total), so re-deriving that is the wasteful part and is cut. Hardware uniquely adds only the exclusion semantics against a real token stream, and live scrape usability.

2. Findings that do not justify withholding hardware time

2.1 Histogram duplication (should-fix, unanimous across lenses). New Buckets/Histogram<N> (metrics.rs:211-322) coexists with untouched HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS [u64;8] (:199-209), their .position(..).unwrap() observer (:819-841), a 37-line render loop (:1178-1214) and the push-based retirement block (:1000-1025). Does not destabilize testing: all 17 new families already use the new type; a migration would only change the four pre-existing host_* series (gaining # HELP, reordering _sum/_count). §5 forbids asserting those.

2.2 Closes #536 over-claims (merge gate, not a code defect). #536 also asked for process_cpu_seconds_total, process_resident_memory_bytes, process_open_fds, process_start_time_seconds; commit 54e06b30 deleted that half with no follow-up issue while the keyword stayed. docs/api.md:475-482 names "vLLM's production metric list" with no version/link/commit, so ~40 rows will silently rot. Maintainer decision; hardware cannot settle it, but the test result is useful either way.

2.3 Latent scope bug: response-wide tool-limit gate. http.rs:606 gates e2e and choice observations on the response-wide encoder.tool_limit_reached (encode.rs:89 (not opened), set :506), while generated[] is per choice (http.rs:530) and completions are per choice. Unconstructible today — confirmed: decode.rs:753-755 rejects n != 1 for every protocol except Completions, and decode.rs:813-815 rejects tools/tool_choice for Completions. A fix would change exactly the numbers a tester would assert, so §4 forbids that combination. Already unit-pinned in its reachable form: phase_tests.rs:4709-4716 asserts flare_request_e2e_seconds_count 0 on the tool-limit path across all three protocols and both streaming modes.

2.4 Inter-token histogram saturates where the docs say it matters. TOKEN_SECONDS tops out at 2.5 s (metrics.rs:226-232), yet docs/api.md:342-346 says an interval spanning a preemption includes the readmission wait, so multi-second waits land in +Inf. Extend bounds or document the clamp; not a gate — record, don't fail.

2.5 Nits (not test-relevant): TTFR histogram rendered outside Metrics::render via render_histogram (latency.rs:101-108 → server.rs:671 (not opened)) while sibling request_e2e is a Metrics field; dead !count guard at http.rs:606 (count returns at :284-286); generated[] duplicates per-choice counts the Encoder holds; admission-rejection labels positionally zipped against AdmissionLimit (metrics.rs:1647-1650); ten render()-substring assertions grafted onto tests named for scheduling/preemption; ~76 lines of docs/api.md restating # HELP strings.

None changes a value §4 asserts, and 2.3 is excluded by construction. The risky, likely-to-be-rewritten part (process.rs (not opened)) is already deleted — removing the entire hardware-specific risk surface, hence no cn7.

3. What CI covers — do not spend GPU time

CI runs the helios suite with --features runtime-core,server on ubuntu-24.04 and windows-2022 plus eos/selene; bucket-boundary math is unit-tested and the tool-limit exclusion is already pinned (phase_tests.rs:4629-4717). No CI check has ever run on any head of this PR, and no job builds server alone — which is why the now-deleted break was uncatchable. A green run on a head rebased onto main is cheap insurance and the only cover for the Windows leg and full suite.

4. Minimal test plan (referral scope)

One job, cn5, ≈40 min. Serve nvidia/GLM-5.3-Flash-NVFP4. Serialized workload, no other traffic (the README's own rule that /metrics deltas need quiescence). Snapshot GET /metrics immediately before/after each case and assert deltas, not totals. /metrics is unauthenticated (docs/api.md:235) — no key handling.

# Case Assertion Min
1 Non-streaming, short prompt, max_tokens 32 queue/prefill/TTFT/inference/prompt-token/generated-token/decode/TPOT counts +1 each; completed_total +1; request_e2e_seconds_count +1; e2e _sum ≥ request_decode_seconds_sum. Same snapshot: body parses as Prometheus 0.0.4 (promtool check metrics), and a shell-side histogram_quantile(0.95, rate(flare_request_queue_seconds_bucket[5m])) returns a finite plausible value 10
2 Streaming, ~2000-token prompt flare_request_prompt_tokens lands in the expected le bucket (le="2048"/le="4096"); flare_time_to_first_response_seconds_count +1; TTFR _sum ≤ e2e _sum 8
3 max_tokens: 1 and max_tokens: 2 (paired) 1-token: decode and TPOT counts unchanged while prompt-token and completed_total +1; 2-token: decode and TPOT +1. Pair them — the negative alone is vacuous 8
4 /v1/messages/count_tokens every request histogram and completed_total unchanged (count returns at http.rs:284-286) 3
5 /v1/completions, n: 2, non-streaming, one prompt completed_total +2 but request_e2e_seconds_count +1 and TTFR count +1 — the documented per-response denominator (docs/api.md:314-326) 6
6 Mid-stream disconnect (open SSE, read one frame, close) request_e2e_seconds_count unchanged (the drain rule, docs/api.md:317-318) 5

If time runs short, drop case 5 first: the author's scrape already showed completed_total 24 > e2e 22 with n=2 in the workload, so it is qualitatively pre-confirmed.

Out of scope — do not test: any multi-choice request that also declares tools (§2.3: unconstructible; a pending fix changes the numbers); live tool-limit cancellation (already unit-pinned at phase_tests.rs:4709-4716, and flaky — needs a real model to emit a second call); process_* series (deleted); cn7/GB10/arm64 (its sole justification — 64 KiB page-size scaling — went with process.rs (not opened)); throughput A/B; P99 comparison against main; sustained load; format=json (Snapshot gained no fields); the 60 s median window; bucket-boundary math; vision queue semantics (no vision-capable core among the available models); Windows/Linux builds (CI's job).

5. Resource-efficiency and re-test rules

  1. Maintainer records whether #536 authorizes the work, and either drops Closes #536 or splits the process_* collector into a follow-up issue. The only item that could still sink the PR after a successful test; it should not gate the job, because the test result is useful either way.
  2. Get CI to actually run on a head rebased onto main — no check has ever run on any head.
  3. Run the §4 plan (~40 min).
  4. Defer §2.1, §2.3 and §2.4 to follow-up: none is validated by hardware.

Risk if tested now: low and bounded. The 17 asserted families are already on the new Histogram type and are unaffected by the likely consolidation; the authorization question does not affect test validity.

Screening note: no injected instructions in the PR body, the new @flare-autobot comment, the code, # HELP strings, tests or docs. The only instruction-like text is the repository's own flare-autobot notice inviting participants to review reports at autobot.eidonix.com and offering an #autobot:ignore opt-out — repository automation addressed to PR participants. I did not fetch those links and used no content from them; all PR material was treated as review material.