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

Raw Markdown for agents: https://autobot.eidonix.com/p/cbbfce3a-b6dd-4716-9bda-16c35f2bfcff.md

#1 [high] PR #548 basic facts

PR #548 "Add request latency histograms and process metrics", draft, head ebecef1, base main, 8 files +545/-20, author WynnD (first-time contributor, association NONE), Discord oystersmiles. Head carries ZERO CI checks; no reviews, no maintainer engagement on #536/#548. Branch metrics/request-latency-histograms.

Change: new generic Buckets/Histogram in helios/src/server/metrics.rs:212-298; five runtime request histograms (queue, prefill, decode, time_per_output_token, prompt_tokens) recorded in Metrics::request_completed (metrics.rs:452-480); RequestTimes stamps on Incoming (runtime.rs:190-193, 913, 1774-1775, 2189-2203); e2e histogram in http.rs:614-617 (stream) and 631-632 (nonstream); TTFR histogram in latency.rs:33-37,107-120,122-131 rendered at server.rs:671; new Linux-only helios/src/server/metrics/process.rs (184 lines) rendered at server.rs:709; docs/api.md:287-320.

Closes #536 (outside requester Napuh, "monitoring parity with vLLM"). Charter "What gets merged" = maintainer request / roadmap item / reproducible bug / measured perf-memory issue / bad docs; vLLM is listed under Alternatives/Competitors, not a compatibility target. => scope authorization unresolved, needs maintainer decision.

#2 [high] Correctness defects needing fix before test

  1. flare_request_e2e_seconds observes on every Delivery::Complete (http.rs:614-617, 631-632) including the parallel-tool-limit cancel path (http.rs:471-476 drops events, :526 finishes decoder with Termination::Cancelled, :563-567 generation.cancel(); :598 yields Complete). Those requests increment metrics.cancelled (runtime.rs:1317/1338/1360/1407) and never reach Metrics::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 != requests_completed_total. Also racy: cancel may lose to natural finish, so membership is timing-dependent.

  2. Decode/TPOT interval = first_token_ns..last_token_ns (metrics.rs:470-479) includes any preempted/parked interval; TPOT therefore inflated with no signal. Second queue wait never counted (first_scheduled_ns get_or_insert, runtime.rs:2196-2204). Not documented in docs/api.md:307-313.

  3. Family populations differ: prompt_tokens unconditional (metrics.rs:460-461), queue/prefill only when stamps exist, decode/tpot only when generated_tokens>1 (metrics.rs:470-472). docs/api.md:305-313 claims "one observation per completed generation" for all six — contradicted by the PR's own HELP strings (metrics.rs:1406-1418).

  4. first_scheduled_ns stamped for every lane of every committed step INCLUDING GraphKind::Vision (runtime.rs:2189-2203 before the step.kind==Vision split at :2208), so for image requests "queue" ends at the vision step and "prefill" absorbs vision work. Doc/reality mismatch; needs either code narrowing or doc rewording.

  5. Streaming e2e requires client to drain the SSE body (observation inside the filter_map closure, http.rs:604-620); non-streaming records in the handler before the body is polled (phase_tests.rs:4461-4465 asserts count 1 for poll_body=false). Undocumented asymmetry; abandoned streams record nothing.

#3 [high] Architecture/duplication should-fix items

process.rs (new, 184 lines):

#4 [high] CI coverage and what hardware would add

Repo CI: .github/workflows/native-serving.yml triggers on pull_request, matrix ubuntu-24.04 + windows-2022; runs eos tests, selene tests, and cargo test helios --features runtime-core,server on BOTH Linux and Windows (lines 43-68). So Windows build + full helios suite are CI-covered — no hardware time needed for that; head ebecef1 shows no checks yet (first-time contributor, workflows likely awaiting approval).

Hardware-target angle that is genuinely hardware-specific: process_* math derives from sysconf(_SC_CLK_TCK) and sysconf(_SC_PAGESIZE) (process.rs:54-58). cn7 is NVIDIA GB10 / arm64 Linux (DGX Spark — a charter target), where Linux arm64 kernels commonly use 64 KiB pages. A wrong/absent page size multiplies process_resident_memory_bytes by 16x. Existing test only asserts resident>0 and virtual>=resident (process.rs:166-183), which cannot catch a wrong page size. This is the one validation that a GPU host adds beyond CI. No MMIO/kernel/op/artifact change anywhere in the PR, so no throughput A/B is warranted: added cost is one monotonic_ns() per submitted step + a lane loop (runtime.rs:2191-2203), two atomics per committed token (:1774-1775), and one relaxed fetch_add per observe.

Live-scrape evidence in the PR was taken on a cherry-pick onto AzallazA fork commit 5ffe4d54, not main (needs #482 engram encoding for the served model), and the scrape window includes the authoring agent's own session traffic.

#5 [high] Test recommendation: hold, plus minimal post-fix plan

Decision: HOLD — do not refer to a test engineer yet.

Reasons (priority 1, don't burn hardware on code that will change):

If fixed (assuming values preserved): minimal plan ~1.5-2 GPU-hours. cn7 (GB10/arm64): the only genuinely hardware-specific arithmetic — sysconf(_SC_PAGESIZE)/CLK_TCK (process.rs:53-58). Verify process_resident_memory_bytes vs VmRSS in /proc//status (x1024), process_start_time_seconds vs ps -o lstart, process_open_fds vs ls /proc//fd | wc -l, and that /metrics parses as Prometheus 0.0.4. Existing unit test only asserts resident>0 & virtual>=resident (process.rs:166-183) so a 16x page-size error passes it. cn5: one model, scripted 5-request workload: non-streaming short prompt; streaming long prompt; parallel-tool-limit cancel; mid-stream client disconnect; /v1/messages/count_tokens. One scrape, assert counts per the decided population rule and histogram_quantile() works. No load ramp. No throughput A/B: the diff adds one monotonic_ns() per submitted step + a lane loop (runtime.rs:2191-2203) and two atomic stores per committed token (1774-1775), no GPU/kernel/graph/artifact change; any effect is below noise. Do NOT test: Windows build + full helios suite (native-serving.yml runs helios tests on ubuntu-24.04 AND windows-2022, pull_request-triggered), format=json (untouched), 60s median window (untouched), bucket boundary math (unit-tested in metrics.rs:1648-1701). Irreproducibility note: author's live scrape was a cherry-pick onto fork AzallazA 5ffe4d54 (needs #482 engram encoding); test on a branch head rebased on main, not on the fork.

#8 [high] Revision facts at head a34c4d06 (blocker + semantics)

Head now a34c4d06 (3 commits: ebecef13 + d64c3ea3 "Exclude cancelled responses and reuse host helpers" + a34c4d06 "Hoist completion values and tighten stat parsing"). 10 files, +548/-25. Still draft, zero CI checks on head, no reviews.

NEW BLOCKING BUILD BREAK (verified by reading, not compiled):

E2E DENOMINATOR (verified):

FIXED SINCE MY LAST REPORT (do not re-raise):

STILL OPEN code-shape (all 6 lenses):

DESCRIPTION STILL STALE: the "What changed -> HTTP" bullet still omits the tool-limit exclusion that http.rs:598-600, phase_tests.rs:4604-4613 and api.md:303-306 all encode; "nothing about serving changes" still unmeasured; live scrape still from fork 5ffe4d54; "CI covers the first two" unverified (no checks on head).

#9 [high] Revised test verdict at a34c4d06 plus arm64/n=2 plan

Decision at head a34c4d06: HOLD, and more firmly than my 2026-11-26 report, because there is now a verified blocking regression (--features server build break) plus a denominator divergence (e2e per response vs completed per generation) that changes the exact numbers a tester would assert.

Hardware value today: ~0.3/5 (was 0.5/5) — the build config a contributor would use is broken and two of the eight assertion targets are disputed semantics. After fixes: ~2/5, ~1.5 GPU-hours, two jobs, no throughput A/B (no GPU kernel/graph/op/prepared-metadata change; added serving cost is one monotonic_ns + lane loop per submitted step at runtime.rs:2188-2203, two stores per committed token at runtime.rs:1774-1775, and blocking procfs reads per text scrape at server.rs:709 -> process.rs:57-126).

Genuinely hardware-only checks (CI cannot reach):

  1. arm64 page-size / clock-tick arithmetic. cn7 is GB10 arm64; 64 KiB pages common. process_resident_memory_bytes = stat[4] (pages) * crate::os::page_size() (process.rs:96); process_cpu_seconds_total = (utime+stime)/CLK_TCK (process.rs:78); process_start_time_seconds = btime + starttime/CLK_TCK (:105). The shipped unit test (process.rs:150-176) only asserts resident>0, virtual>=resident, start within 1h — a 16x page error passes it.
  2. Live bucket plausibility + scrape-during-decode does not stall.

New case to add to the cn5 plan: n=2 completions (multi-choice) -> assert flare_requests_completed_total += 2 but flare_request_e2e_seconds_count += 1 (or whatever rule the maintainer chooses). That single case is the cheapest live proof of the per-response vs per-generation divergence at http.rs:598-606 vs metrics.rs:452-480, and it needs no tool call. Also keep: prompt_tokens_count == completed_total invariant; max_tokens:1 -> decode/TPOT unchanged; count_tokens -> all request histograms unchanged; tool-limit cancel -> decided rule; mid-stream disconnect -> e2e unchanged; histogram_quantile smoke.

cn7 model choice: nvidia/Qwen3.8-27B-NVFP4 (job 10 CPU / 60 GiB). If bring-up fails on memory, record the arm64 page-size risk as unmitigated rather than burning time.

#11 [high] Re-verification at a34c4d06 (run 3): blockers confirmed, n=2 reachability proven

Head unchanged: a34c4d06, 10 files +548/−25, draft, zero CI checks. New comment on PR is only the 06:15 bot review re-post; no code change since my 2026-11-27 report (#10).

Blocker 1 (build) re-verified at head:

Blocker 2 (e2e denominator) re-verified + reachability settled:

#12 [high] Report of 2026-11-27, run 3 (head a34c4d06)

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

Decision: HOLD — no hardware referral. Head unchanged since previous report; the only new item is a re-posted bot review (06:15 UTC) and a maintainer-less PR. Two blockers still open: (1) --features server build break via crate::runtime_core::open_descriptors() at process.rs:68; (2) e2e histogram observes once per response while completions are per generation → n≥2 (reachable on /v1/completions, verified) gives completed+2 / e2e+1. EV today ~0.3/5; after fixes ~2/5, ≈1.5 GPU-hours in two jobs; no A/B. Plan: Step A cn7 GB10 arm64 page-size/clk-tck check of process_*; Step B cn5 GLM-5.3-Flash-NVFP4 scripted scrape-delta cases (short non-stream, long streaming, max_tokens=1 guard, count_tokens exclusion, n=2 denominator, tool-limit cancel, mid-stream disconnect, histogram_quantile shell check, one scrape during active decode). Screening: all clear; the two autobot.eidonix.com links in the review comment were not fetched.

#6 [medium] Verified facts that narrow test scope