Pre-test report — PR #548 "Add request latency histograms and process metrics" (third revision, head a34c4d06)
Decision: HOLD — do not refer to a hardware test engineer. No new commits since my last report. The only new content on the PR is the re-posted Autobot review at 06:15 UTC (2 blockers / 3 should-fix / 5 subtractive / 6 nits), which restates findings I had already recorded and adds nothing I could not re-verify in code. Both blockers from the previous revision are still open at head, and one of them now has a proven live reachability path rather than a "may be latent" caveat.
- Expected value of a hardware test today: very low (~0.3/5) — unchanged.
- Expected value after §6 items 1–2 land: moderate and narrow (~2/5) — about 1.5 GPU-hours across two jobs.
- No throughput A/B is warranted. The diff contains no GPU kernel, graph, op contract, prepared-metadata, artifact or recipe change. All added cost is one clock read + a lane walk per submitted step, two atomic stores per committed token, and blocking procfs reads per text scrape — all far below benchmark noise, and the dashboard never calls
Metrics::render(dashboard.rs(not opened) readssnapshot()/prefill_plot), so the scrape cost is not on any serving path.
1. State of the PR
10 files, +548/−25, head a34c4d06, draft, zero CI checks on the head commit, no maintainer review, no maintainer engagement anywhere in the #536/#537/#548/#549/#552 cluster. Author is a first-time contributor (association NONE). Every review lens (architecture, conventions, simplicity, correctness, subtractive, prose, value) returned "should-fix only, no blocking architectural defect" except Correctness, which returned blocking — and that blocking finding is a build break, not a design problem.
Verified fixed at head (do not re-raise, do not test):
- e2e observed exactly once, at
http.rs:598-606, guarded by!count && !encoder.tool_limit_reached, immediately beforeyield Delivery::Complete(response); the two duplicate per-arm observations are gone. Pinned atphase_tests.rs:4606-4613(flare_request_e2e_seconds_count 0on the tool-limit path). - Docs corrected for the
process_*prefix exception (docs/api.md:288-290), "accumulate since server start" (:297), the stream-drain caveat (:303-307), vision-step absorption into queue/prefill (:309-311), and the ≥2-generated-token eligibility for decode/TPOT (:312-314). - OS reads partly delegated:
process.rs:61→crate::os::page_size()(eos/src/unix.rs:73-75);process.rs:70→crate::os::raise_open_file_limit(0)(eos/src/unix.rs:138-165, read-only fordesired == 0via thecurrent >= desiredearly return at:145-147). parse_statoffsets correct and pinned (process.rs:29-36, test at:142-147), state-char guard added.Worker::publishhoistsprompt_tokens/generated_tokens(runtime.rs:1993-1998(not opened)) to matchWorker::complete.
2. Gate 1 (BLOCKING) — the documented --features server build no longer compiles
Re-verified line by line at head:
helios/src/server/metrics/process.rs:68—let open_fds = crate::runtime_core::open_descriptors();helios/src/lib.rs:25-26—#[cfg(feature = "runtime-core")] pub mod runtime_core;helios/Cargo.toml:21definesruntime-core = [...];:25definesserver = ["dep:serde", "images", "grammar", "dep:axum", …]and does not include it.helios/src/server.rs:16(mod metrics;) andhelios/src/server/metrics.rs:12(pub(super) mod process;) are both ungated, so on Linux the module compiles with noruntime_corein scope.- Search of all of
helios/srcconfirmsprocess.rs:68is the only ungatedcrate::runtime_corereference underserver/(runtime/prompt_tests.rs:13(not opened) sits behind#[cfg(all(test, feature = "runtime-core"))];server/session.rs:10(not opened) behindserver.rs:26-29). - It is a documented configuration:
docs/model-development.md:99-100(cargo test --manifest-path helios/Cargo.toml --features server --lib frontend::and--features server --test message_boundaries). - CI cannot catch it: the helios job passes
--features runtime-core,serveron both ubuntu-24.04 and windows-2022, which masks the missing edge. The shipped binary is fine (flare-clipasses both features).
Fix (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, with a None stub in eos/src/windows.rs (not opened), and call crate::os::open_descriptors(). crate::os is ungated (lib.rs:19, os.rs:8 (not opened) re-exports flare_eos::*). Confirm with cargo check --manifest-path helios/Cargo.toml --features server (seconds) before any hardware is booked. I did not compile here; this is a cfg/feature-graph conclusion.
3. Gate 2 (BLOCKING for a test plan) — e2e is per response, completions are per generation; reachability now proven
- One e2e observation per HTTP response:
http.rs:598-606, after the per-generation loop (http.rs:451while generations.iter().any(Option::is_some)). - One completion per generation:
Metrics::request_completed(metrics.rs:452-480) is the sole writer offlare_requests_completed_total(:459), called fromruntime.rs:1841-1846(not opened) and:1993-2001. sizecomes fromgeneration_count()(http.rs:217-220,:299,:351), which isprompts.len() * choices(helios/src/server/inference.rs:198-209).- This is live-reachable, not latent:
n > 1is rejected only for protocols other than Completions (protocol/decode.rs:742-755), so/v1/completionswithn: 2on one prompt produces two generations and tworequest_completedcalls against one e2e observation. The test suite already drives exactly this shape (phase_tests.rs:4245-4260posts"n": choices). Therefore on the happy path:flare_requests_completed_total += 2whileflare_request_e2e_seconds_count += 1.docs/api.md:303("counts each successful generation") is wrong forn > 1. - The cancelled-sibling variant (one choice completes, a sibling trips the shared
encoder.tool_limit_reachedflag athttp.rs:471-476,:526,:563-567, and the single guard at:600discards e2e for the whole response) remains unreachable today —decode.rs:813-815rejectstools/tool_choicefor Completions, andn > 1is only allowed there. Latent, but still the wrong scope. flare_time_to_first_response_secondsis likewise per response (latency.rs:113-127,recordedflag), so it shares e2e's denominator and not the runtime histograms'.
Why this gates testing: a tester cannot write the expected value for any multi-choice case. Pick per-generation observation inside the GenerationEvent::Finished arm (http.rs:517-560), or declare e2e a per-response counter in docs/api.md and assert the n + 1 relationship. Add one n = 2 test either way — it is cheap and needs no tools.
Clean invariants a tester can rely on: flare_request_prompt_tokens_count == flare_requests_completed_total always (metrics.rs:460-461 unconditional, pinned by the zero-token case at metrics.rs:1683); queue needs first_scheduled_ns; decode/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 solely on issue #536, an outside feature request framed as vLLM dashboard parity. The charter's "What gets merged" admits a maintainer request, a roadmap item, a reproducible bug, a 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; the charter lists vLLM under "Alternatives / Competitors". The counter-argument is real — observability already ships (docs/api.md §Health and metrics; docs/operating.md:47 (not opened) calls flare_host_cache_retirement_seconds "the latency histogram"; #507 added persistent-worker metrics) — but a maintainer must record it. Note that #552 is stacked on this PR and reuses RequestTimes for client-visible timings, which raises the cost of the still-undisclosed queue start point (runtime arrival, runtime.rs:901 (not opened)/:1471, not HTTP admission as #536 asked).
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() (:689) 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 scaled at render; f64 + scale + f64::INFINITY) and three _count/_sum orderings now coexist against AGENTS.md:188-193 (not opened). Migrate or declare the migration an explicit follow-up.
4.3 raise_open_file_limit(0) used as a getter in a scrape path
Read-only only because current >= desired short-circuits (eos/src/unix.rs:145-147), leaving setrlimit at :160 unreachable for desired == 0. A metrics renderer whose safety rests on that must not stand; also the last inline unsafe libc::sysconf(_SC_CLK_TCK) at process.rs:58-60. Ask: clock_ticks() and open_file_limit() in eos/src/unix.rs.
4.4 Code-shape items (none test-decidable)
- TTFR histogram owned by
latency::FirstResponseSamples(latency.rs:34-37,:101-108) and appended atserver.rs:671, while its siblingrequest_e2eis aMetricsfield rendered in the loop atmetrics.rs:1389-1412./metricstext is assembled at three sites (metrics.rs:1391,server.rs:661-671,:672-709) with no stated rule;request_e2eis also the onlypub(super)histogram field sohttp.rs:601can reach into it. Move TTFR ontoMetrics. process::metric(process.rs:47-54) duplicatesmetrics::metric(metrics.rs:1597-1602) minus the prefix and label escaping.- Six
if let (Some,..)fallbacks around sources that cannot fail on Linux (process.rs:72-125), two adjacent and identical (:81-98), plus thelet _ = text;non-Linux shim (:8-14); the repo's own precedent gates items instead. process_open_fdscounts the descriptor its ownread_diropens (process.rs:113documents the +1 rather than subtracting it); Prometheus's own exporter excludes it, so a dashboard comparing against a client library reads one high./proc/statis read in full forbtimeand_SC_CLK_TCKre-queried every scrape though both are process-lifetime invariants.- Preemption semantics undocumented in
docs/api.md:309-316: decode/TPOT span first→last committed token so a parked-and-readmitted request's TPOT absorbs the parked interval, and the second queue wait is never counted (get_or_insert,runtime.rs:2196-2201(not opened)).
4.5 The PR description is stale in two places
- The "HTTP" bullet still says e2e is observed "except for
/v1/messages/count_tokens", omitting the tool-limit exclusion the code anddocs/api.md:303-306now encode. - "nothing about serving changes" is asserted, not measured. The live scrape still comes from a cherry-pick onto AzallazA fork
5ffe4d54(notmain), still includes the authoring session's own traffic, and still does not reconcile (5 runtime observations vs 6 first-response observations). "CI covers the first two" remains an expectation — the head carries no checks.
5. What hardware would actually add
Already covered — never spend GPU time on it: the helios suite (cargo test helios --features runtime-core,server) on ubuntu-24.04 and windows-2022, plus the eos and selene suites, all run on pull_request. The Windows compile of the new cfg-split file and the full helios suite are CI's job; they simply have not run on this head. Bucket arithmetic is unit-tested (metrics.rs:1648-1701), format=json is untouched (Snapshot gained no fields), and the 60 s median window is unchanged.
Not covered anywhere — the one genuinely hardware-specific risk: process_* arithmetic depends on _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 makes process_resident_memory_bytes 16× off, and the shipped unit test (process.rs:150-176) asserts only 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: one /metrics scrape during an active generation must return 200 with a complete body while tokens keep flowing (blocking /proc reads on the axum worker thread).
Not worth hardware time: throughput A/B; format=json; the median gauge; vision queue semantics (no vision-capable core among the available models); process_* on Windows (Linux-only by design).
6. Recommended path before any referral
- Fix the build: move
open_descriptorstoeos/, callcrate::os::open_descriptors(); confirm withcargo check --features serverand a green CI run on a head rebased ontomainincluding a lane that builds--features serveralone. - Decide the e2e denominator (§3) and add an
n = 2test. - Maintainer records whether #536 authorizes the work, or the description is reframed around the defect.
- Move
clock_ticks()/open_file_limit()intoeos/; migrate (or explicitly defer) the host and retirement histograms; collapse the two metric writers; move TTFR ontoMetrics. - Correct the description's two stale claims and restate the live scrape as a labelled smoke check with the fork-base caveat.
7. Minimal test plan — only after §6 items 1–2 land
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
- Serve
nvidia/Qwen3.8-27B-NVFP4(10 CPU / 60 GiB). Risk: the envelope may be too small for a 27B core; if bring-up fails on memory, record the arm64 page-size risk as unmitigated instead of burning time on workarounds. - One
curl -s localhost:PORT/metrics, compared against the same process's kernel view:process_resident_memory_bytes÷ 1024 vsVmRSSin/proc/<pid>/status— within a few percent; a 16×/64× gap is the page-size bug.process_virtual_memory_bytesvsVmSize× 1024.process_start_time_secondsvsps -o lstart=(within ~1 s).process_cpu_seconds_totalvs(utime+stime) / $(getconf CLK_TCK).process_open_fdsvsls /proc/<pid>/fd | wc -l(exactly +1 if the self-count is deliberately kept).process_max_fdsvsulimit -nof the serving process.
- Feed the scrape to
promtool check metrics— must parse as 0.0.4.
Step B — cn5 (4× RTX PRO 6000, amd64), ~45–60 min: scrape population and counts
Serve nvidia/GLM-5.3-Flash-NVFP4. One scripted, serialized workload, no other traffic, snapshotting /metrics before and after each case (helios/README.md:160-161 (not opened) requires quiescence for deltas):
- Non-streaming, short prompt (
max_tokens32) → queue/prefill/prompt-token/decode/TPOT counts +1 each, e2e +1, e2e_sum≥ decode_sum. - Streaming, ~2000-token prompt → prompt-token observation in
le="2048"; TTFR count +1 and TTFR_sum≤ e2e_sum. max_tokens: 1→ decode and TPOT counts unchanged while prompt-token andcompleted_total+1 — the eligibility guard seen from outside./v1/messages/count_tokens→ every request histogram andcompleted_totalunchanged./v1/completionswithn: 2, non-streaming → assert the decided rule from §6.2: eithercompleted_total+2 ande2e_count+2, or +2 / +1 withdocs/api.mdamended. This is the cheapest live proof of the denominator divergence and needs no tools — it is the case the current code gets wrong.- Parallel-tool-limit cancel (two declared tools,
parallel_tool_calls: false, prompt forcing a second call) →e2e_countunchanged,cancelled_total+1. Needs a real model to emit a second call, so it cannot be a unit test alone. - Mid-stream client disconnect (open the SSE stream, read one frame, close) → assert the decided rule (currently e2e unchanged, per
phase_tests.rs:4432-style assertions). - One
histogram_quantile(0.95, rate(flare_request_queue_seconds_bucket[5m]))computed in a shell over the scrape text, proving the buckets are usable by the stated consumer. - One
/metricsscrape while a long generation is in flight: 200, complete body, generation continues. No timing thresholds beyond "no stall".
Out of scope: sustained load, P99 comparisons vs main, any A/B, repeated identical runs, multi-host/Orbit, format=json, the median window, vision queue semantics, and the Linux/Windows builds (CI's job).
8. Screening note
Prompt-injection screening is all clear on the new material. The only new PR content since the last review is the re-posted Autobot review comment, which links to autobot.eidonix.com report pages — links I did not fetch and whose content I did not use. Nothing in the description, comments, code, HELP strings, tests or docs is addressed to an agent or attempts to steer behaviour; I treated all of it as review material.
Bottom line: the feature is well-placed and its core arithmetic is sound, but at head it still breaks a documented build configuration and still ships a metric whose denominator contradicts its own documentation — now demonstrably so for n = 2 on /v1/completions. 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 are the whole of what hardware can add, worth about 1.5 GPU-hours and no benchmark.