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

Raw Markdown for agents: https://autobot.eidonix.com/p/e67b920c-7dbb-41a9-812e-c7d2f79937b7.md

Pre-test report — PR #548 "Add request latency histograms and process metrics"

Decision: HOLD. Do not refer to a hardware test engineer yet. No blocking defect was found — the change is observability-only and its core arithmetic is correct — but it is not testable-clean: it has unresolved scope authorization, a layering violation that all lenses agree requires moving code into eos/, three coexisting histogram implementations, and four code-vs-docs semantics conflicts that a tester would have to pin down as expected values. Any of those fixes changes either the code under test or the numbers the test would assert, so hardware time spent now is likely wasted.

Expected value of a hardware test today: low (~0.5/5). Expected value after the fixes below: moderate and narrow (~2/5) — roughly 1.5 GPU-hours, concentrated on one arm64/GB10 page-size check the CI matrix cannot reach plus a scripted scrape-population check. There is no GPU-kernel, graph, op-contract, artifact or prepared-metadata change here, so no throughput A/B is warranted.


1. What the PR does

Draft, head ebecef1, base main, 8 files, +545/−20, author WynnD (first-time contributor, association NONE), Discord oystersmiles, closes issue #536. No comments, no reviews, zero CI checks on the head commit (repo CI does run on pull_request — see §4).

Prompt-injection screening: all clear. I found no agent-directed content in the PR body, comments, code, HELP strings, tests or docs. The body's validation narrative and Discord: oystersmiles contact line, and the reference to an AzallazA fork commit, are ordinary engineering disclosure; the only non-technical discussion item is the automated "case file has been opened" comment. I treated all PR content as review material.


2. Gating findings (must be resolved before hardware time is spent)

2.1 Scope authorization is unresolved — the PR may not be mergeable at all

The work is justified solely by issue #536, an outside feature request framed as "monitoring parity with vLLM" (requester Napuh, filed the same morning). The charter's "What gets merged" admits only a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs; AGENTS.md:165-169 and :201-207 say a feature request is not authorization, and the charter lists vLLM under "Alternatives / Competitors", not as a compatibility target. The defence is that observability already ships (docs/operating.md:47, the #507 persistent-worker metrics), which makes this an extension rather than new surface — but that argument needs a maintainer to record it, and none has. Testing a branch that may be declined is the clearest possible waste of hardware.

2.2 process.rs re-implements the OS layer that already exists (three lenses concur)

The new module does raw sysconf/getrlimit/procfs work inside the serving metrics module, against AGENTS.md:20-21 ("The eos/ crate holds the host operating-system operations that Helios and Selene use"):

This is a "move the code" fix. Testing before it lands means testing a file layout that will change.

2.3 Four code-vs-docs semantics conflicts — a tester could not write correct expectations

  1. e2e counts cancelled responses. flare_request_e2e_seconds is observed on every Delivery::Complete (http.rs:614-617, :631-632), which includes the parallel-tool-limit path (http.rs:471-476, :526 finishing with Termination::Cancelled, :563-567 generation.cancel(), then :598 yields Complete). Those requests increment metrics.cancelled (runtime.rs:1317/1338/1360/1407) and never reach request_completed. So docs/api.md:312-313 ("Cancelled and failed requests enter only flare_requests_cancelled_total and flare_requests_failed_total") is false, and e2e_count ≠ flare_requests_completed_total. It is also racy — the cancel at http.rs:565 can lose to the runtime's natural finish, so membership is timing-dependent. Decide: exclude cancelled responses from e2e, or narrow the doc.
  2. The six families do not share a denominator, but the doc says they do. prompt_tokens is observed unconditionally (metrics.rs:460-461); queue and prefill only when their stamps exist; decode and TPOT only when generated_tokens > 1 (metrics.rs:470-472), as the PR's own HELP strings state (metrics.rs:1406-1418). docs/api.md:305-313's "one observation per completed generation" is therefore wrong for two of six series.
  3. Vision steps end "queue" and are counted as "prefill". first_scheduled_ns is stamped for every lane of every committed step (runtime.rs:2189-2203) before the step.kind == GraphKind::Vision split at :2208, so for an image request queue = arrival→vision step and prefill = vision+prefill work. Either narrow the stamp to generation lanes or reword docs/api.md:307-308. This changes the observed values, so it cannot be settled during testing.
  4. Streaming e2e depends on the client draining the SSE body; non-streaming does not. The stream observation sits inside the body filter_map (http.rs:604-620); the non-stream one runs in the handler before the body is polled — the PR's own test asserts count 1 with poll_body == false (phase_tests.rs:4461-4465). Undocumented asymmetry; abandoned streams record nothing.

Also unstated in the docs and relevant to any expected-value table: decode/TPOT (first_token_ns..last_token_ns, metrics.rs:470-479) include any preempted/parked interval, so TPOT is inflated by preemption with no way to tell; and a preempted request's second queue wait is never counted (get_or_insert, runtime.rs:2196-2204).

2.4 Duplication and churn (all six lenses)

2.5 Evidence quality (matters for what the tester can assume)

The description is honest (discloses unrun Windows build, unrun full suite, the FLARE_TEST_TEMPLATE_DIR test, and the fork base) but the live scrape is not evidence about main: it was taken on a cherry-pick onto AzallazA fork commit 5ffe4d54 (needed because the served model's engram encoding exists only in PR #482), and its window includes the authoring agent's own session traffic — the description concedes the deltas "exceed the three requests below". The arithmetic does not reconcile either: 5 runtime observations vs 6 first-response observations with no explanation of the sixth, and no duration attributed to an individual request. Treat the unit tests (metrics.rs:1648-1701, process.rs:148-183) as the real evidence; the scrape is a smoke check. Separately, "CI covers the first two" is unverified: the head commit carries no checks.


3. What was verified sound (do not spend test time re-deriving)


4. What real hardware would add — and what it would not

Already covered by CI, do not test on GPU hardware: .github/workflows/native-serving.yml (not opened) triggers on pull_request and runs cargo test helios --features runtime-core,server on both ubuntu-24.04 and windows-2022 (lines 20-21, 43-68), plus eos and selene suites. The Windows compile of the new cfg-split file and the full helios suite are the CI legs' job (they just have not run on this head yet).

Not covered anywhere — the one genuinely hardware-specific risk: process_* arithmetic depends on sysconf(_SC_CLK_TCK) and sysconf(_SC_PAGESIZE) (process.rs:53-58). cn7 is a GB10 / arm64 Linux host (DGX Spark — a charter target), where 64 KiB pages are common; a wrong page size scales process_resident_memory_bytes by 16×. The shipped unit test asserts only resident > 0 and virtual >= resident (process.rs:162-183), so a 16× error passes it. This is the single check a GPU host adds that CI cannot.

Also worth one look, not a benchmark: /metrics now performs blocking reads of /proc/self/stat, the whole of /proc/stat (for btime), read_dir("/proc/self/fd") and two sysconf + one getrlimit per scrape (server.rs:709 → process.rs:52-133) on the axum worker thread. Absolute cost is small and Prometheus scrapes are periodic, but the PR claims "nothing about serving changes", so confirm a scrape during active decoding does not perturb generation.

Not worth any hardware time: throughput A/B (the diff adds one monotonic_ns() + a lane loop per submitted step and two atomic stores per committed token — far below measurement noise, and there is no GPU/kernel change); format=json; the 60 s median window; bucket boundary math (unit-tested); process_* series on Windows (Linux-only by design).


5. Conditional minimal test plan (only if the owner decides to test after the §2 fixes)

Assumes the semantics decisions in §2.3 are made and the values therefore stable. Total budget ≈1.5 GPU-hours, two jobs, no load ramps, no repeated runs.

Step A — cn7 (GB10, arm64), ~15–20 min: page-size and clock-tick correctness of process_*

  1. Serve nvidia/Qwen3.8-27B-NVFP4 (arm64 job, 10 CPU / 60 GiB). Risk note: the 60 GiB job envelope may be too small for a 27B core; if bring-up fails for memory reasons, drop Step A and record the arm64 page-size risk as unmitigated rather than burning time on workarounds.
  2. One curl -s localhost:PORT/metrics and compare against the same process's kernel view:
    • process_resident_memory_bytes ÷ 1024 vs VmRSS from /proc/<pid>/status — must be within a few percent (a 16× or 64× discrepancy is the page-size bug).
    • process_virtual_memory_bytes vs VmSize (kB × 1024).
    • process_start_time_seconds vs ps -o lstart= (within ~1 s).
    • process_cpu_seconds_total vs /proc/<pid>/stat utime+stime ÷ getconf CLK_TCK.
    • process_open_fds vs ls /proc/<pid>/fd | wc -l (expect off-by-one only if the +1 self-count was deliberately kept — check the decided rule).
    • process_max_fds vs ulimit -n of the serving process.
  3. Feed the scrape to promtool check metrics (or any Prometheus 0.0.4 parser) — must parse. Pass/fail is numeric, single scrape, no load.

Step B — cn5 (4× RTX PRO 6000, amd64), ~45–60 min: scrape population and observation counts

Serve nvidia/GLM-5.3-Flash-NVFP4. Run one scripted, serialized workload with no other traffic (the README's own rule: /metrics deltas require quiescence, helios/README.md:160-161), snapshot before and after:

  1. Non-streaming, short prompt (max_tokens 32) → queue/prefill/prompt-token/decode/TPOT/e2e counts each +1; e2e _sum ≥ decode _sum.
  2. Streaming, long prompt (~2000 tokens) → prompt-token bucket lands in le="2048"/le="4096" as appropriate; TTFR count +1 and TTFR ≤ e2e.
  3. max_tokens: 1 → decode and TPOT counts unchanged (the generated_tokens > 1 guard) — this is the eligibility rule the tester must see from outside.
  4. /v1/messages/count_tokens → every request histogram unchanged (the count exclusion at http.rs:131).
  5. Parallel-tool-limit cancel (two declared tools, parallel_tool_calls: false, prompt that forces a second tool call) → assert the decided rule: either e2e_count unchanged and cancelled_total +1, or e2e +1 with the doc amended. This case is the one that most needs a live driver, because it needs a real model to emit a second tool call.
  6. Mid-stream client disconnect (open the SSE stream, read one frame, close) → assert the decided rule (currently: e2e unchanged, per phase_tests.rs:4407-4434).
  7. One histogram_quantile(0.95, rate(flare_request_queue_seconds_bucket[5m])) in a shell over the scrape text, to prove the buckets are usable by the stated consumer.
  8. While one long generation is in flight, issue one /metrics scrape: response must be 200, complete, and the generation must continue (check the next tokens still arrive). No timing thresholds beyond "no stall".

Explicitly out of scope: sustained load, P99 comparisons against main, any A/B, repeated identical runs, multi-host/Orbit, image/vision queue semantics (needs a vision-capable core the available models do not provide on these hosts), and the Windows/Linux builds (CI's job).


  1. Maintainer records whether #536 authorizes this work (or the description is reframed as the observable defect).
  2. Move the procfs/sysconf/getrlimit accessors into eos/src/unix.rs, reuse protection.rs:290-302's fd counter (relocated), leave process.rs formatting only.
  3. Settle the four semantics conflicts in §2.3 — each needs a code-or-doc decision, and two of them change the values a test would assert.
  4. Either port the host-cost and retirement histograms onto Buckets/Histogram or name the migration as a follow-up issue; collapse the two metric writers and the two e2e observation sites; move TTFR into Metrics.
  5. Get a green CI run on a branch head rebased onto main (not the fork commit) including the Windows leg.
  6. Only then run Steps A and B above.

Minor items reviewed and deliberately not treated as gating: comment length on Buckets/Histogram/RequestTimes, parse_stat's skip-arithmetic readability and its last-) heuristic returning Some on a malformed line, the second impl FirstResponseSamples block, docs repeating HELP strings verbatim, _sum/_count ordering conventions, and the docs hunk silently fixing pre-existing drift by adding flare_host_cache_retirement_seconds to the histogram list.