Pre-test report — PR #548 "Add per-request histograms and vLLM-parity request metrics" (fourth revision, head 055663a)
Decision: REFER TO HARDWARE TESTING — but only to cn5, and only for the scrape-population checks (Step B).
This reverses my previous HOLD. Both blockers from my last report are genuinely gone at this head, and the one item that was genuinely hardware-specific (arm64/GB10 page-size arithmetic in process.rs (not opened)) was deleted along with the module. What remains are code-shape concerns that do not destabilize the numbers a tester would assert.
- Expected value of a hardware test today: moderate (~2.5/5) — up from ~0.3/5.
- Budget: ≈1 GPU-hour, one job on cn5. No cn7 job (see §5). No throughput A/B.
- Confidence: high on the numbers, because they are now documented from the code; the residual risk is that a post-test histogram-consolidation commit changes exposition text (mitigated in §6).
1. What changed since my last report — both blockers resolved
Six commits landed (54e06b30, 10c0b937, 01f1e92b, 15018689, 49373bc5, 055663a7). Head is 9 files, +1016/−51. I re-verified every prior finding in code rather than carrying it forward.
Prior Gate 1 (BLOCKING — --features server build break): GONE. Confirmed, not assumed:
helios/src/server/metrics/process.rs(not opened) is deleted;list_filesunderhelios/src/server/metrics*returns onlymetrics.rsandmetrics/scheduler.rs(not opened).search_codeforprocess_|sysconf|/proc/acrosshelios/srcreturns no hits underhelios/src/server(only pre-existing procfs use incore/,runtime_core/).search_codeforcrate::runtime_coreunderhelios/src/serverreturns exactly one hit,runtime/prompt_tests.rs:13(not opened), which is inside a#[cfg(all(test, feature = "runtime-core"))]module.- The
pub(crate) use protection::open_descriptorsre-export was removed andopen_descriptorsis private again. server.rsno longer callsmetrics::process::render, so the scrape is now purely atomic reads — the "blocking/procreads on the axum worker thread" concern is also void.
Prior Gate 2 (BLOCKING — e2e denominator contradicted its own documentation): RESOLVED as documented design. docs/api.md:311-318 now states it explicitly:
"It is observed once per delivered response, while the runtime counts one completion per model request, so a multi-choice response adds fewer observations than completions, and a stream the client abandons before draining adds none."
The tester now has a written rule for n > 1, which was the thing that previously made expected values unwritable. The untested-but-now-documented relationship is completed_total +Δn vs e2e_count +1 per response.
Also newly documented, closing my prior §4 items: queue starts at model-scheduler arrival and can be a vision step (docs/api.md:328-331); zero-token completions enter the token histograms but no time histogram (:334-336); decode/TPOT only at ≥2 generated tokens (:340-341); inter-token is one observation per committing step and includes a preemption wait (:342-346); flare_request_max_tokens is first-admission with reasoning deferral (:355-358); admission rejection reasons and their HTTP statuses (:377-382).
2. What I verified sound at head (do not spend test time re-deriving)
- Counter and histograms cannot diverge.
metrics.rs:558is the onlycompleted.fetch_addunderhelios/src;request_completed(:545-603) is called fromruntime.rs:1875and:2038. - Populations match the docs, read line by line (
metrics.rs:562-601):prompt_tokensunconditional;request_max_tokensonly whenrecord.max_tokens > 0;preemptionsalways; inter-token merged viaabsorb; TTFT gated onfirst_token_ns; queue onfirst_scheduled_ns; inference on both; decode and TPOT only whenfirst_token_ns && generated_tokens > 1. - One e2e observation,
http.rs:604-612, guarded by!count && !encoder.tool_limit_reached, immediately beforeyield Delivery::Complete. - Admission rejections wired at exactly the three documented sites:
server.rs:816(HttpSlots, middleware),http.rs:240(HttpSlots, batch path),runtime.rs:869(GenerationCapacity),runtime.rs:945(RequestQueue). Both 503 paths return before any counter (server.rs:805-813). - Preemption counting is narrow:
record.preemptions += 1sits only inpark_if_preempted(runtime.rs:2108-2111), not the reasoning-budget park, so a budget cut is not miscounted. - Inter-token is per committing step:
tokens_committedis gated onposition == 0(runtime.rs:1803), so a speculative round committing several tokens yields one interval. absorbis correct: per-bucketfetch_addplus a sumfetch_add, so a completed request's intervals fold into the shared histogram without loss.- Render math:
observeusesexposed <= boundwithunwrap_or(N-1); everyboundsarray ends atf64::INFINITY; cumulative_countequals the+Infline. - JSON snapshot untouched — the new families are Prometheus-text only, as documented.
3. Remaining findings — none of which justify withholding hardware time
3.1 Histogram triplication (should-fix, all six lenses). The new Buckets/Histogram (metrics.rs:211-322) coexists with the untouched HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS (:199-209), host_cost_sums (:475) with an unchecked .position().unwrap() at :838, its 37-line render loop (:1178-1214), and host_retirement_buckets (:468).
Why it does not block testing: the 17 new request series already use the new type, so their values are unaffected by a future migration. Only the four pre-existing host histograms would change text (they would gain # HELP lines and reorder _sum/_count). Handled by §6's assertion rule.
3.2 Scope authorization on #536 (merge gate, not a code defect). The justification is an outside feature request framed as vLLM parity; the charter's "What gets merged" names maintainer request / roadmap / bug / measured problem / bad docs. Closes #536 now over-claims, since the process_* half was deliberately dropped with no follow-up issue. This is a maintainer decision and cannot be settled by hardware — it is the one thing that could still sink the PR, so flagging it once more below.
3.3 Latent scope bug: response-wide tool-limit gate. http.rs:606 gates on the response-wide encoder.tool_limit_reached, while completions are per choice, so a sibling choice that the runtime counted as completed loses its e2e/choice observations. Unreachable today: n > 1 is accepted only for Completions (decode.rs:754) and tools/tool_choice are rejected for Completions (decode.rs:814). A fix would change exactly those numbers — therefore §5 explicitly forbids testing that combination.
3.4 Minor code shape (nits, not test-relevant): TTFR histogram rendered outside Metrics::render via render_histogram (latency.rs:101-108, called at server.rs:671); the model_step gate at runtime.rs:1721-1732 re-spells GraphKind::samples() (manifest.rs:90); generated[] in http.rs duplicates per-choice counts the Encoder already holds; admission-rejection labels are positionally zipped against the AdmissionLimit enum.
ASSESSMENT: none of 3.1, 3.2 or 3.4 changes a value the test plan asserts; 3.3 is explicitly out of scope for testing. Testing now is not wasted — the risky, likely-to-be-rewritten part (process.rs (not opened)) is already gone.
4. What hardware adds that CI cannot
CI (.github/workflows/native-serving.yml:18-21 (not opened), :63, :68) runs the helios suite with --features runtime-core,server on ubuntu-24.04 and windows-2022. No job builds server alone — which is precisely why the now-deleted break was uncatchable. No CI check has ever run on any head of this PR.
Hardware uniquely supplies: (a) a real model producing real token streams so the per-phase populations can be observed end-to-end; (b) a live scrape proving the new exposition parses and is consumable by histogram_quantile; (c) confirmation that a scrape during active decode does not perturb generation. None of these are reachable from unit tests, because they depend on a real generation completing with real timings.
Hardware no longer supplies anything unique for process_* — that module is deleted. This is why cn7 is dropped.
5. Minimal test plan (referral scope)
One job, cn5 (4× RTX PRO 6000, amd64). ≈1 GPU-hour. No A/B, no load ramps, no repeated runs, no cn7.
Serve nvidia/GLM-5.3-Flash-NVFP4. Run one scripted, serialized workload with no other traffic, snapshotting GET /metrics before and after each case (the README's own rule that deltas need quiescence). /metrics is unauthenticated (docs/api.md:235), so no key handling is needed.
| # | Case | Assertion | Minutes |
|---|---|---|---|
| 1 | Non-streaming, short prompt, max_tokens 32 |
queue/prefill/TTFT/inference/prompt-token/generated-token/decode/TPOT counts each +1; completed_total +1; e2e count +1; e2e _sum ≥ decode _sum |
10 |
| 2 | Streaming, ~2000-token prompt | prompt-token observation in le="2048"; TTFR count +1; TTFR _sum ≤ e2e _sum |
10 |
| 3 | max_tokens: 1 |
decode and TPOT counts unchanged while prompt-token and completed_total +1 — the ≥2-token guard seen from outside (metrics.rs:593) |
10 |
| 4 | /v1/messages/count_tokens |
every request histogram and completed_total unchanged |
5 |
| 5 | /v1/completions with n: 2, non-streaming |
completed_total +2 and e2e_count +1; request_choices count +1 and _sum +2 — this is the now-documented per-response denominator (docs/api.md:314-326) |
10 |
| 6 | Mid-stream disconnect: open SSE, read one frame, close | e2e_count unchanged (the drain rule, docs/api.md:316-318) |
5 |
| 7 | histogram_quantile(0.95, rate(flare_request_queue_seconds_bucket[5m])) computed in a shell over the scrape |
returns a plausible finite value; proves the buckets are usable by the stated consumer | 5 |
| 8 | One /metrics scrape during a long in-flight generation |
HTTP 200, complete body, tokens keep arriving; no timing threshold beyond "no stall" | 5 |
Explicitly out of scope — do not test:
- Any multi-choice request that also declares tools (§3.3): unreachable through the public API today, and a pending fix would change the expected numbers. Nothing is learned by testing it.
process_*series — deleted from the PR.- cn7 / GB10 / arm64 — its sole justification (64 KiB page-size scaling) went with
process.rs(not opened). - Throughput A/B, P99 comparisons against
main, sustained load,format=json, the 60 s median window, bucket-boundary math (unit-tested atmetrics.rs:1888+), vision queue semantics (no vision-capable core among the available models). - Windows/Linux builds — CI's job; they still need to actually run.
6. Resource-efficiency and re-test rules
- Assert only the 17 new request-histogram families and the new counters/gauges, never the four pre-existing
host_*histograms or their# HELP/_sum/_countordering. Those are the ones a post-test consolidation (§3.1) would legitimately change; pinning them would force a re-run. - Assert deltas, not absolute totals, and snapshot immediately before and after each case — the server's own traffic otherwise contaminates totals, which is exactly what went wrong with the author's fork-based scrape.
- If §3.1's migration or §3.3's per-choice fix lands before the job runs, case 5's expected values must be re-read from
docs/api.mdbefore executing; if either lands after, only cases 5 and the host-histogram text are affected — no full re-run. - Do not re-test after a history failing-test fix. The one failing test the author reports (
native_prompt_tests::messages_image_hints_end_after_expansion_for_text_and_segmented_templates) needsFLARE_TEST_TEMPLATE_DIR, which CI prepares (.github/workflows/native-serving.yml:28-31(not opened)); it is a fixture-availability issue, not a code defect.
7. Recommended sequencing
- Maintainer records whether #536 authorizes this work (or the description is reframed around the observability defect). This is the only remaining item that could sink the PR — do it before, not after, hardware time.
- Get CI to actually run on the head (no check has ever run). The deleted break hid behind CI's feature flags; a green run is cheap insurance.
- Run the cn5 plan in §5 (≈1 GPU-hour).
- Defer the histogram consolidation (§3.1) and the per-choice e2e fix (§3.3) to follow-up — neither is validated by hardware, and §6 keeps their landing cheap.
Bottom line: the deletion of process.rs (not opened) removed both the build regression and the entire hardware-specific risk surface, and the docs now state every population and denominator a tester needs, including the multi-choice relationship that previously made expected values unwritable. The remaining should-fix items are code-shape and authorization questions that hardware cannot settle. Refer to a test engineer for the cn5 scrape-population plan above — one GPU-hour, no A/B, no cn7.
Screening note: no injected instructions in the PR body, comments, code, HELP strings, tests or docs; the only non-technical comments are the automated case-file notices and the author's one-line re-review request. All PR content was treated as review material, and the autobot.eidonix.com links in the bot comments were not fetched.