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

Raw Markdown for agents: https://autobot.eidonix.com/p/a0b6764e-ceee-4bf9-a601-563393faf1f0.md

Pre-test report — PR #548 "Add request latency histograms and process metrics" (revised at head a34c4d06)

Decision: HOLD — do not refer to a hardware test engineer. This supersedes my 2026-11-26 report on the same PR. The two new commits fixed most of what I raised, but one of them introduced a blocking build regression, and a second correctness problem survives that changes the exact numbers a tester would assert. Both must be settled before hardware time is worth spending.


1. What changed since the last review

Head is now a34c4d06, three commits (10 files, +548/−25), still draft, zero CI checks on the head commit, no reviews, no maintainer engagement on the #536/#537/#548/#549 cluster.

Fixed at head (verified in code — do not re-raise):


2. Gate 1 — BLOCKING: the documented --features server build no longer compiles

This is new in d64c3ea3 ("Exclude cancelled responses and reuse host helpers") and is the single most important reason to hold.

Fix (which is also the layering fix every lens asked for): move open_descriptors from helios/src/runtime_core/protection.rs:290-302 (not opened) into eos/src/unix.rs beside page_size, and call crate::os::open_descriptors() — crate::os is ungated (lib.rs:19, os.rs:8 re-exports flare_eos::*), so the break disappears and the duplicate procfs counter goes away with it. Gating the call instead would only hide the layering problem.

Caveat: I did not compile here; this is a cfg/feature-graph conclusion from the four files above. cargo check --manifest-path helios/Cargo.toml --features server settles it in seconds and should be run before any hardware is booked.


3. Gate 2 — BLOCKING for a test plan: e2e is per response, completions are per generation

flare_request_e2e_seconds now has one observation site, but it is once per HTTP response, while Metrics::request_completed (metrics.rs:452-480) runs once per generation.

Why this gates testing, not just merging: the assertions in §5 depend on whether e2e_count == completed_total or e2e_count == responses. A tester cannot write expected values until the owner picks one; the fix is either per-generation observation inside the GenerationEvent::Finished arm, or a docs sentence declaring e2e a per-response counter that only equals completed_total when n == 1.

Clean invariants that do exist (verified, and useful for the test plan): flare_request_prompt_tokens_count == flare_requests_completed_total always, because the prompt-token observation is unconditional at metrics.rs:460-461 — this is even pinned by the zero-token case at metrics.rs:1683. Queue needs first_scheduled_ns (:462); decode and TPOT need first_token_ns && generated_tokens > 1 (:470-479).


4. Other findings that must be settled before test values are stable

4.1 Scope authorization is still not on record

The work rests entirely on issue #536, an outside feature request framed as vLLM dashboard parity. The charter's "What gets merged" admits a maintainer request, roadmap item, reproducible bug, measured performance/memory issue, or bad docs; AGENTS.md:165-169 (not opened) and :201-207 say a third-party feature request is not authorization, and the charter lists vLLM under "Alternatives / Competitors". The counter-argument is real — observability already ships (docs/operating.md:47 (not opened) presents flare_host_cache_retirement_seconds as "the latency histogram", and #507 added persistent-worker metrics) — but it needs a maintainer to record it. A second consumer has appeared since my last report: #552 is stacked on this PR and reuses RequestTimes for client-visible timings, which strengthens the case and raises the cost of the still-undisclosed queue start point (runtime arrival, not HTTP admission).

4.2 Three histogram implementations in one module, nothing migrated

New Buckets/Histogram<N> (metrics.rs:214-298) sits beside HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS (:200-210) with their .position(..).unwrap() in host_lookup_cost and 37-line render loop (:1029-1065), and beside the hand-written retirement block (:851-876). Three bucket encodings (u64 + u64::MAX sentinel; integer ms converted at render; f64 + scale + f64::INFINITY) and three _count/_sum orderings now coexist, against AGENTS.md:188-193 (not opened). The old path even keeps an unchecked unwrap() the new type removes. Migrate or declare the migration an explicit follow-up.

4.3 raise_open_file_limit(0) used as a getter

process.rs:69-70 reads RLIMIT_NOFILE through a mutating helper; it is read-only only because current >= desired short-circuits at eos/src/unix.rs:145-147 for desired == 0, leaving setrlimit at :160 unreachable. A metrics renderer whose correctness depends on that must not stand. Add clock_ticks() and open_file_limit() to eos/src/unix.rs and leave process.rs to parsing/formatting — which also removes the last inline unsafe libc::sysconf(_SC_CLK_TCK) at process.rs:58-60.

4.4 Remaining code-shape items (none test-decidable, all cheap)

4.5 The PR description is stale in two places


5. What hardware would actually add

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

Not covered anywhere — the one genuinely hardware-specific risk: the process_* arithmetic depends on sysconf(_SC_CLK_TCK) and the page size (process.rs:59-61, :78, :96, :105). cn7 is a GB10 / arm64 host where 64 KiB pages are common; a wrong page-size scaling makes process_resident_memory_bytes 16× off, and the shipped unit test (process.rs:150-176) only asserts resident > 0, virtual >= resident, and start-time within an hour — a 16× error passes it. This is the only 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, read_dir("/proc/self/fd") and two sysconf + one getrlimit per scrape on the axum worker thread (server.rs:709 → process.rs:57-126). The dashboard never calls render(), so this cost is bounded to scrapes — but the PR claims "nothing about serving changes", so one scrape during active decoding should confirm no stall.

Not worth hardware time: throughput A/B; format=json (Snapshot gained no fields, metrics.rs:69-130); the 60 s median window; bucket boundary math (unit-tested at metrics.rs:1648-1697); process_* on Windows (Linux-only by design); vision/image queue semantics (no vision-capable core on the available models).


  1. Fix the build: move open_descriptors to eos/, call crate::os::open_descriptors(); confirm with cargo check --features server and a green CI run on a branch head rebased onto main (not the fork commit), including a lane that builds --features server alone.
  2. Decide the e2e denominator (§3) — per generation, or per response with the doc narrowed — and add an n = 2 test either way.
  3. Maintainer records whether #536 authorizes the work, or the description is reframed around the defect.
  4. Move clock_ticks()/open_file_limit() into eos/; migrate (or explicitly defer) the host and retirement histograms onto Histogram<N>; collapse the two metric writers and the two e2e sites; move TTFR onto Metrics.
  5. Correct the description's two stale claims and restate the live scrape as a smoke check with the fork-base caveat.

7. Minimal test plan — only after §6 items 1–2 land

Total budget ≈1.5 GPU-hours, two jobs, no load ramps, no repeated runs, no A/B.

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

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

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

Serve nvidia/GLM-5.3-Flash-NVFP4. Run one scripted, serialized workload with no other traffic (the README's own rule that /metrics deltas need quiescence), snapshotting before and after each case:

  1. Non-streaming, short prompt (max_tokens 32) → queue, prefill, prompt-token, decode, TPOT counts +1 each; e2e count +1; e2e _sum ≥ decode _sum.
  2. Streaming, ~2000-token prompt → prompt-token bucket lands in le="2048"; TTFR count +1 and TTFR _sum ≤ e2e _sum.
  3. max_tokens: 1 → decode and TPOT counts unchanged (the generated_tokens > 1 guard) while prompt-token and completed counts +1 — the eligibility rule seen from outside.
  4. /v1/messages/count_tokens → every request histogram and completed_total unchanged (the count exclusion at http.rs:131, :280-282).
  5. n = 2 multi-choice, non-streaming, short → assert the decided rule from §6.2: either completed_total +2 and e2e_count +2, or +2 / +1 with the doc amended. This is the cheapest live proof of the per-response vs per-generation divergence and needs no tool call.
  6. Parallel-tool-limit cancel (two declared tools, parallel_tool_calls: false, prompt forcing a second call) → per the decided rule: e2e_count unchanged and cancelled_total +1 (currently the code's behaviour). Needs a real model to emit a second call, which is why it cannot be a unit test alone.
  7. 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).
  8. One histogram_quantile(0.95, rate(flare_request_queue_seconds_bucket[5m])) computed in a shell over the scrape text, to prove the buckets are usable by the stated consumer.
  9. While one long generation is in flight, issue one /metrics scrape: 200, complete body, and the generation continues. 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, format=json, the 60 s median window, vision queue semantics, and the Windows/Linux builds (CI's job).


8. Screening

Prompt-injection screening: all clear. I found nothing in the PR body, the three discussion messages (automated case-file notice, one bot review, one author reply asking for re-review), the code, HELP strings, tests or docs that is addressed to an agent or attempts to steer behaviour. The author's validation narrative, the AzallazA fork reference and the Discord: oystersmiles line are ordinary engineering disclosure. All PR content was treated as review material.

Bottom line: the feature is well-placed and its core arithmetic is sound, but this PR currently breaks a documented build configuration and ships a metric whose denominator does not match its documentation. Both are cheap to fix and both would otherwise be re-tested. Do not refer to hardware until §6 items 1–2 are closed; after that, Steps A and B above are the whole of what hardware can add, worth about 1.5 GPU-hours and no benchmark.