#2 [high] Run 2 findings — #548 at a34c4d06 (2026-11-27)
#548 head a34c4d06, 10 files, +548 -25 (was +560 -25 at ebecef1).
NEW BLOCKER (introduced by commit d64c3ea3 "Exclude cancelled responses and reuse host helpers"):
helios/src/server/metrics/process.rs:68 calls crate::runtime_core::open_descriptors().
helios/src/lib.rs:25-26 gates pub mod runtime_core; behind #[cfg(feature = "runtime-core")].
Cargo.toml:25 server = [...] does NOT imply runtime-core (only serde/images/grammar/axum/tokio/...).
server.rs:16 mod metrics; and metrics.rs:12 pub(super) mod process; are ungated.
=> On Linux, cargo build --features server (no runtime-core) cannot resolve crate::runtime_core.
Before d64c3ea3, process.rs used only crate::os (lib.rs:19, ungated) and an inline read_dir, so that config built.
Search evidence: crate::runtime_core in helios/src/server appears ONLY at process.rs:68 and runtime/prompt_tests.rs:13 (the latter is gated by #[cfg(all(test, feature = "runtime-core"))] at runtime.rs:3983).
Affected documented configs: docs/model-development.md:99-100 (--features server --lib frontend::), docs/scheduling-runtime-design.md:735-737 (--features server --lib scheduler:: / server::runtime::phase_tests::).
CI will NOT catch it: .github/workflows/native-serving.yml:63,68 both use --features runtime-core,server (Linux + Windows).
Fix: move open_descriptors into eos/ (eos/src/unix.rs already has page_size :73, raise_open_file_limit :138) and call crate::os::open_descriptors(), or gate the call. Note runtime_core/protection.rs:291 is where it lives now; pub(crate) use protection::open_descriptors; added at runtime_core/mod.rs:58 is itself gated.
FIXED since last report:
- B1 tool-limit e2e: http.rs:598-605 observes once before
yield Delivery::Complete, guarded!count && !encoder.tool_limit_reached; the duplicate observations in both delivery arms are gone (:621, :635). Test phase_tests.rs:4604-4613 asserts e2e count 0 for the tool-limit path. - Docs: process_* exception to the flare_ prefix (docs/api.md:288-290), "accumulate since server start" (:297), e2e drain caveat (:303-307), >=2 generated tokens for decode/tpot (:312-314), vision step absorbed by queue/prefill (:310-311), process_* list (:318-321).
- OS reads delegated: process.rs:61
crate::os::page_size()(eos/src/unix.rs:73), :70crate::os::raise_open_file_limit(0)(eos/src/unix.rs:138;current >= desiredreturns early so desired=0 never calls setrlimit). - parse_stat hardened: process.rs:26-28 requires the state char in "RSDZTtWXxKPI" after the last ')'; offsets utime=value(10), stime(0), starttime(6), vsize(0), rss(0) are correct (tokens 11,12,19,20,21).
- Worker::publish hoisted prompt/generated tokens (runtime.rs:1993-1999), matching complete.
- Histogram arithmetic/tests sound: 21/19/21 bounds match the const generics;
exposed <= boundis inclusivele; sum rendered /scale; only one bucket incremented per observe, so cumulative render is correct. metrics.rs:1648-1697 test covers buckets + the excluded queue/decode case.
STILL OPEN:
- Duplicate histogram impl: HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS (metrics.rs:200-210), host_cost_sums +
.position(..).unwrap()(metrics.rs:670-692), hand-rolled render loop for the 3 host_cache histograms (:1029-1065), and flare_host_cache_retirement_seconds (:851-876) all bypass the new Histogram. Porting them would be net-negative lines. - process_open_fds still counts the read_dir descriptor (protection.rs:294-296); process.rs:113 now documents the +1 instead of subtracting it.
- /proc/stat fully re-read per scrape for btime (process.rs:65-67), sysconf ticks per scrape (:59) — btime and ticks are process-lifetime invariants; a OnceLock removes it.
- Preemption semantics undocumented: decode/tpot span first→last committed token, so a parked interval inflates tpot, and the second queue wait is never counted (first_scheduled_ns uses get_or_insert, runtime.rs:2196-2201). The description advertises stamp preservation across parking but docs/api.md says nothing about it.
- No maintainer authorization for #536 (third-party request; author WynnD/oystersmiles is not a named priority contributor).
- Description still says "nothing about serving changes" and "CI covers the first two"; live scrape still from fork 5ffe4d54 + cherry-pick, not main; Windows build still not run.
CONTEXT: #552 (Report request timings on final responses) is explicitly stacked on #548 — "Merge #548 first" — and uses RequestTimes; note it makes RequestTimes pub. So #548 is load-bearing for #552's llama-swap benefit. #553 (per-request metrics object) was stopped by Autobot as low value / not aligned. #549 is independent (KV page gauges).
#4 [high] Run 3 (2026-11-27, post-autobot-comment) — #548 unchanged at a34c4d06; final verdict
No new commits since run 2; the only new discussion item is the automated flare-autobot review comment (2026-11-27 06:15) pointing at an external case file that is not fetchable from this environment (autobot.eidonix.com is a private address).
Re-verified at head a34c4d06:
- Blocker stands: helios/src/server/metrics/process.rs:68
crate::runtime_core::open_descriptors(); helios/src/lib.rs:25-26 gatespub mod runtime_core; helios/Cargo.toml:21 server does not imply runtime-core; server.rs:16 / metrics.rs:12 ungated; the only other crate::runtime_core use inside server is session.rs:10 (gated at server.rs:26) and runtime/prompt_tests.rs:13 (gated at runtime.rs:3983). Documented configs that break: docs/model-development.md:99-100, docs/scheduling-runtime-design.md:735-737. CI (.github/workflows/native-serving.yml:63,68) always passes runtime-core,server so it cannot catch it. - Fix shape: move open_descriptors to eos/src/unix.rs beside page_size:73 / raise_open_file_limit:138 (+ windows.rs stub None), call crate::os::open_descriptors() from process.rs:68 and from runtime_core/protection.rs:354; crate::os is ungated (helios/src/os.rs:8 re-exports flare_eos::*).
- process_open_fds self-counts: protection.rs:294-296 read_dir includes its own dirfd; Prometheus procfs FileDescriptorsLen uses os.Stat(fd) on Linux >=6.2 so it does not self-count.
- Two histogram implementations coexist in the same file (new Buckets/Histogram metrics.rs:212-298 vs pre-existing HOST_*_BUCKETS :200-210, host_cost_sums loop :670-692, render loop :1029-1065, retirement histogram :851-876).
- Per-scrape invariants re-read: whole /proc/stat for btime (process.rs:65-67) and _SC_CLK_TCK (:59).
- e2e excluded correctly for tool-limit cancellation (http.rs:598-605) and for count_tokens; non-streaming e2e is recorded before the body is polled (phase_tests.rs:4464-4469 asserts count 1 irrespective of poll_body) while streaming requires draining — docs scope the drain note to streams, so this is accurate but worth one clause.
- Vindicated placement: metrics.rs:452-480 request_completed is the only place flare_requests_completed_total is incremented (metrics.rs:459; runtime.rs:1841, :1996) — no divergence possible.
- #552 (stacked, "Merge #548 first") reads RequestTimes for llama-swap timings; #541 (Grafana example) and #549 (KV gauges) are neighbours; #536 is the third-party request.
Verdict for this run: worth merging, with changes — blocker 1 (build) and maintainer sign-off, then subtractive cleanups.
#6 [high] Run 4 (2026-11-27/28) — #548 at new head: blocker fixed, verdict worth merging with minor changes
New commits since last turn: 10c0b937, 01f1e92b, 15018689, 49373bc5, 055663a7, 54e06b30. Files now 9 (process.rs deleted), metrics.rs +548/-2.
VERIFIED FIXED:
- heios/src/server/metrics/process.rs deleted entirely; no
process_*series anywhere (search_code on main+head: no matches).crate::runtime_corereference gone from server/ (only runtime/prompt_tests.rs:13, gated at runtime.rs:4018-4019 by runtime-core). open_descriptors is private again (runtime_core/protection.rs:291,354). => previous blocker (--features server build break) is FIXED. - Single completion counter: metrics.rs:558 is the only
.completed.fetch_add; runtime.rs:1875 and :2038 call request_completed. - e2e once at http.rs:606-612, guarded
!count && !encoder.tool_limit_reached; cancellation keyed same flag http.rs:532. - Inter-token one per committing step:
position == 0guard runtime.rs:1803. - preemptions +=1 only in park_if_preempted (runtime.rs:2109-2111), not the reasoning-budget park (runtime.rs:2000) — matches docs.
- max_tokens stamped only at first admission (runtime.rs:1566-1570), not readmission.
- publish_gauges (runtime.rs:1203-1211) stores pending+parked; called only when progress (runtime.rs:1156-1158) and shutdown zeroes both (:749-750).
- admission_rejections: http_slots server.rs:816 + http.rs:236-240; generation_capacity runtime.rs:865-869; request_queue runtime.rs:941-945. 503 paths not counted (server.rs:805-813).
- cache_lookup_tokens computed scheduler.rs:1601, accumulated :1802, skipped for prompt_logprobs.
- model_step_tokens runtime.rs:1721-1732 includes Prefill/TerminalPrefill/ScoredPrefill/Resume/Decode/Speculative/Mixed, excludes Vision/Init/Restore/Snapshot.
- output_limit from reason=="length" runtime.rs:2037-2046; budget_stop makes user_stop true => reason "stop", so budget cuts are not output-limited.
- docs/api.md:305-386 rewritten with populations; :475-515 new vLLM mapping table; :408 pending row "for their first admission". n>1 only on Completions confirmed decode.rs:753.
- Tests present: metrics.rs:1889, :1982; phase_tests.rs:1512, 3814, 5419, 4630.
REMAINING ISSUES:
- Two histogram implementations coexist: HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS (metrics.rs:199-209), host_cost_sums with
.position(..).unwrap()(metrics.rs:819-841), hand-rolled render loop (metrics.rs:1178-1214), plus flare_host_cache_retirement_seconds. Should be ported to Buckets/Histogram (net-negative lines). Main remaining code-quality ask. - vLLM parity overstated. Verified vLLM main (vllm/v1/metrics/buckets.py + loggers.py): REQUEST_LATENCY_BUCKETS starts 0.3 -> 7680; TTFT family 0.001..2560; INTER_TOKEN 0.01..80; ITERATION_TOKENS 1..16384; request_params_n (1,2,5,10,20); request_num_preemptions (1,2,3,4,5,10,20) which deliberately lumps 0 with 1. Flare uses REQUEST_SECONDS 0.001..2560 (metrics.rs:218-224), TOKEN_SECONDS 0.001..2.5 (:226-232), TOKEN_COUNTS 1..2097152 (:234-240), PREEMPTION_COUNTS with added 0 bound (:242-247). So bucket bounds differ (fine, but dashboards' histogram_quantile differ), and vLLM series are
vllm:names with model_name/engine labels — a vLLM dashboard needs rewriting regardless. Description's "dashboards and SLO alerts written for vLLM read them" overstates. - "Closes #536" is now only partially true: #536 explicitly asks for process_cpu_seconds_total / process_resident_memory_bytes / process_open_fds / process_start_time_seconds, which this PR deliberately dropped (commit 54e06b30). Needs issue split or maintainer note; do not silently close.
- Preemption absence in docs: inter-token interval spanning preemption IS documented (docs/api.md:345-346) but the second queue wait is not counted (get_or_insert runtime.rs:2225-2237) and docs don't say so.
- Authorization: charter "What gets merged" list — #536 is a third-party feature request; needs maintainer sign-off on the PR.
- Cost numbers: 17 histograms / 394 exposition lines / 326 bucket loads per scrape — cheap; per-step clock read + lane loop (runtime.rs:2225-2237). Unmeasured. Related: #549 (KV gauges, overlapping metrics.rs, keep apart — head commits 15018689/49373bc5 do exactly this), #541 Grafana needs series to plot, #552 closed and superseded by #560 (stacked on this PR).