#1 [high] Change: PR #548 shape, size and files
PR #548 "Add request latency histograms and process metrics", author WynnD (GitHub association NONE; Discord oystersmiles). Open as a DRAFT, opened 2026-11-26, last updated same day, base main, head ebecef1, branched from f377dc8. Size 8 files +545/−20. Labels: none. Reviews: none. CI on head commit: no checks. Closes #536.
Files:
- docs/api.md (+25/−3) — documents request histograms, host-cache retirement histogram, process_* series, states histograms are Prometheus-only, not in format=json.
- helios/src/server.rs (+2) — in the
/metricshandler:state.first_response.render_histogram(&mut text)andmetrics::process::render(&mut text). - helios/src/server/http.rs (+6/−1) — observes
flare_request_e2e_secondsin both the streamingDelivery::Completebranch and the non-streaming one, gatedif !count(count == the count_tokens request path). - helios/src/server/latency.rs (+27/−8) —
FirstResponseSamplesbecomes{window: Mutex<Samples>, histogram: Histogram<21>};FirstResponse::outputalso observesflare_time_to_first_response_seconds; addsrender_histogram. Median gauge and 60 s window unchanged. - helios/src/server/metrics.rs (+228) — new generic
Buckets<const N>+Histogram<const N>(per-bucket AtomicU64 + sum), bucket sets REQUEST_SECONDS(21), TOKEN_SECONDS(19), PROMPT_TOKENS(21),RequestTimesstruct, 6 new histogram fields onMetrics,Metrics::request_completed, render block, one new test. - helios/src/server/metrics/process.rs (new, +184) — Linux-only procfs reader for process_cpu_seconds_total, process_resident_memory_bytes, process_virtual_memory_bytes, process_start_time_seconds, process_open_fds, process_max_fds; non-Linux renders nothing. 2 tests.
- helios/src/server/runtime.rs (+38/−8) —
Incominggainstimes: RequestTimes;Worker::completestamps first/last committed token ns; both formermetrics.completed.fetch_addsites replaced bymetrics.request_completed(...);Worker::reserve_and_packstampsfirst_scheduled_nsfor each lane afterscheduler.commit. - helios/src/server/runtime/phase_tests.rs (+35) — 3 existing tests extended plus the fixture constructor.
Immutable/non-atomic note: last_token_ns: u64 is a plain field, not Option<> — 0 means none; Metrics::new uses Default for times.
#2 [high] Why: issue #536 is the direct driver, filed same day
Issue #536 "Metrics: add request latency histograms and process metrics for monitoring parity with vLLM", by Napuh, opened 2026-11-26 09:03, updated same minute, open, 0 comments. Environment: hyperflare-inference v0.3.2 (c0c4f79).
Missing-vs-vLLM table it builds: e2e latency (vllm:e2e_request_latency_seconds), queue time, time_per_output_token / inter_token_latency, prefill duration, decode duration, TTFT (only flare_first_response_median_seconds 60 s median gauge today), prompt tokens per request (vllm:request_prompt_tokens), process metrics (process_cpu_seconds_total, process_resident_memory_bytes, process_open_fds, process_start_time_seconds).
Motivation stated: the median gauge cannot give P95/P99, cannot be computed over other windows, cannot be aggregated across instances; histograms let users run histogram_quantile() over any window and alert on tail latency.
It proposed exactly the names PR #548 implements: flare_request_e2e_seconds, flare_request_queue_seconds, flare_request_prefill_seconds, flare_request_decode_seconds, flare_time_per_output_token_seconds, flare_time_to_first_response_seconds, flare_request_prompt_tokens, plus process_*. It also proposed keeping flare_first_response_median_seconds for compatibility (PR #548 does).
Difference vs the proposal: #536 asked for flare_request_queue_seconds = "admission to first scheduled step"; PR #548 measures "model-scheduler arrival to first model step" (docs/api.md wording) — i.e. it starts at runtime arrival, not HTTP admission. Also #536 did not list process_virtual_memory_bytes (PR adds it) and PR #548 does not add vLLM's flare_... equivalent of inter-token latency beyond time_per_output_token.
Filed by Napuh, 0 comments, 0 interest shown beyond the filing; the same day two PRs (#548, #549) close it and #537, all by WynnD, and #541 (jere357) builds a Grafana dashboard that mentions #536.
#3 [high] Change: what the new histograms measure, verified in code
Verified in code (PR head ebecef1):
-
Queue start = runtime arrival, not HTTP admission.
Incoming.arrival_nsis set insideModelRuntime::schedule(helios/src/server/runtime.rs:901) when the request is sent to the worker's queue;scheduler.set_arrival(handle, incoming.arrival_ns)at runtime.rs:1471. Soflare_request_queue_seconds= worker-queue + model-scheduler wait, excluding HTTP ingress, tokenization and framework preparation. docs/api.md (PR) says "from model-scheduler arrival"; issue #536 asked "admission to first scheduled step". The PR description says neither point explicitly, so a reader comparing to vLLM's queue-time (which starts at engine add_request) can mis-map it. E2e and TTFR, by contrast, start at HTTP admission (AdmittedAtinserted inadmit_http, helios/src/server.rs:828; read in http.rs:127). -
first_scheduled_nsis stamped inWorker::reserve_and_pack(runtime.rs:2186-2201) afterself.scheduler.commit(step, fence)and for every lane of the step, first-write-wins viaget_or_insert. So a request that is planned but whose step never commits gets no queue observation; and the stamp is the moment of reservation/packing, before the GPU replays. -
Both completion counter increments are now inside
Metrics::request_completed(metrics.rs:452-480): the user/text stop inWorker::complete(runtime.rs:1841) and the natural finish inWorker::publish(runtime.rs:1993). Cancelled (runtime.rs:1317,1338,1360,1407) and failed (runtime.rs:330) paths do not observe histograms, as documented. -
Decode/time-per-output-token are skipped unless
generated_tokens > 1;time_per_output_tokenuses integer divisiondecode / (generated_tokens - 1)so it truncates to whole nanoseconds before bucketing (metrics.rs:473-478) — harmless at 19 buckets. -
Prompt tokens observed =
carried.prompt_tokens.unwrap_or(live.prompt_tokens), i.e. the original prompt length carried across preemption, matching theFinishedevent's value — so prompt-token histogram agrees with per-responseusage.prompt_tokens. -
Histogram<N>::observeis a linear scan of the bounds per observation (21 comparisons) and usesOrdering::Relaxedatomics;sumstores nanoseconds and is printed assum as f64 / 1e9(metrics.rs:272-291). The ns sum exceeds f64's 2^53 exact-integer range only after ~104 days of accumulated request time in one counter, so a very long-lived, very busy server could print a_sumwith rounding (low risk, worth knowing).
#4 [high] Change: e2e is server-side only; TTFR needs a client poll, e2e does not
- e2e is observed in the
Delivery::Completearms ofhttp::generate: streaming at http.rs:614-617 (insidefilter_map, on the runtime's completion event, before the SSE body is drained) and non-streaming at http.rs:631-632 (before the JSON body is polled by the client).Delivery::Failed(http.rs:610,643) observes nothing, so failed/cancelled generations are absent from e2e — matches the description. - Asymmetry not stated anywhere:
flare_time_to_first_response_secondsis recorded only when the client actually polls the body (first_response.output()at http.rs:607/638, gated bystream_text/ non-empty chunk), whileflare_request_e2e_secondsis recorded as soon as the handler produces the completed response even if the client drops it. The phase testfirst_response_http_stream_excludes_pretext_failures_and_unpolled_bodies(phase_tests.rs:4406-4434) asserts e2e count stays 0 on failure;first_response_http_nonstream_records_only_when_completed_body_is_offered(phase_tests.rs:4436-4473) asserts e2e count is 1 whether or not the body is polled, while the TTFR histogram count followspoll_body. So e2e measures server-side handling only, not delivery to the client — a reader porting vLLM dashboards (where e2e is measured around the engine request) should know. /v1/messages/count_tokensis excluded from e2e vialet count = request.uri().path() == "/v1/messages/count_tokens"(http.rs:131). TTFR is not excluded explicitly, but a count_tokens response has no answer text, andresponse_text/stream_textwould not offer any, so it cannot be observed. Description states the e2e exclusion only.- The e2e histogram lives on the same runtime
Metricsstruct (pub(super) request_e2e: Histogram<21>), reached throughstate.model.metrics_handle()in the stream arm (http.rs:603) andstate.model.metrics()in the non-stream arm.
#5 [high] Change: process metrics are hand-rolled procfs, Linux only, no new dependency
helios/src/server/metrics/process.rs is a hand-written clone of the Prometheus client collector, not an added dependency. libc = "0.2.189" is already an unconditional dependency of the flare-helios crate (helios/Cargo.toml:50), so no new crate and no feature gate; the module is pub(super) mod process; in metrics.rs and is only reached from the /metrics text handler (server.rs:709). No Cargo.toml change in the PR (file list confirms). This satisfies the charter's "pin everything / no new dependencies" preference — the alternative (adding the prometheus crate) would have been a dependency change.
Platform behavior: render() is a no-op outside Linux (#[cfg(not(target_os = "linux"))] let _ = text;). Windows is a supported serving target (docs/windows.md; flare-winui; the native-serving CI matrix builds and tests on windows-2022, .github/workflows/native-serving.yml:17-21,64-68), so a Windows operator scraping /metrics sees no process_* series and generic Prometheus process dashboards stay empty there. docs/api.md (PR) says "Other platforms omit them", so it is documented but the PR description's framing ("generic Prometheus process dashboards have no process_* series to read") is only resolved on Linux.
Robustness choices: each source read is .ok()-guarded and a parse failure omits only the dependent metric (no unwrap in the render path); sysconf(_SC_CLK_TCK)/_SC_PAGESIZE and getrlimit(RLIMIT_NOFILE) are wrapped in unsafe with SAFETY comments; parse_stat splits after the last ) to survive a command name containing ) and spaces, and there is a unit test for that (parse_stat_reads_fields_after_a_parenthesized_command_with_a_paren).
process_open_fdscounts the entries of/proc/self/fd, which includes the directory handle opened for the read; the help string says so explicitly ("including the directory read that counts them"), so the value is off by one against the "true" count. Prometheus's own client_collector has the same artefact; worth knowing but declared.process_start_time_seconds=btimefrom /proc/stat + starttime ticks / CLK_TCK, the standard derivation.- There is no
process_threads, and no/proc/self/statmuse.
#6 [high] Related work: #536/#537/#541/#549 cluster and prior histogram code
All three come from the same request wave and are dated 2026-11-26:
- #536 (issue, Napuh, 09:03) — the feature request, vLLM monitoring parity. Closed by #548.
- #537 (issue, Napuh, 09:07) — companion KV-usage gap. Closed by #549.
- #548 (PR, WynnD) — this PR, closes #536, opened later the same day as a draft.
- #549 (PR, WynnD, 20:24) — sibling PR by the same author, closes #537, touches helios/src/server/metrics.rs and docs/api.md too; both PRs explicitly say the metrics.rs and docs/api.md hunks are in disjoint regions and "merge in either order". Verified plausible: #549 adds gauges near
cached_pages/SchedulerStatsand its own docs paragraph; #548 adds histograms besidecompletedand its own docs paragraphs; #549 also touches cache.rs, scheduler.rs, tests. - #541 (PR, jere357, 16:47, updated 19:21) — "Add a Prometheus and Grafana monitoring example": a docker-compose Prometheus+Grafana dashboard under examples/monitoring/. Its auto-review explicitly says "The only in-repo signal of Grafana interest is issue #536 (latency histograms, which Flare does not yet export)". So #541 is the consumer-side motivation for #548 and would be the first dashboard to actually use the new series — but #541's dashboard queries none of them yet (it predates the PR and its reviews flag missing/differently-named panels). Retitled by #541's review: DEPTH panels "belong with #536/#537".
- No competing or superseding PR exists for request histograms:
search_items histogram/prometheus/metricsreturns only #536, #548, #549, #541. - Prior metrics work that this extends: #507 (merged, lukealonso) persistent worker counter schema / Prometheus metrics / /v1/worker telemetry, and the host-cache histograms already in metrics.rs (flare_host_cache_missing_tokens / estimated_transfer_ns / estimated_prefill_ns / retirement_seconds, metrics.rs:851-890).
Histogramhere is a new generic type; the existing host-cache histograms keep their own[AtomicU64; 8]arrays +flare_selene::RETIREMENT_LATENCY_MSbounds, so the codebase now has two histogram implementations. PRIOR_ART_NOT_REFACTORED - a reviewer could ask why the host ones were not moved ontoBuckets/Histogram. - #78 (open issue, DS4.1 Flash disk Engram) asks "Would per-gather latency/miss-count histograms and explicit metric scope/rank labels be useful additions?" — evidence that request-level distributions have been wanted elsewhere too, though about a different subsystem.
- docs/TODO.txt:110-124 lists "Measure cross-host rank handoff ... request p99 ..." and "Qualify retained graph costs ... request latency measurements" — i.e. the project already tracks a TODO for request p99 latency measurement that this PR partially serves.
#7 [high] Claims and evidence: what is backed, what is not, CI has not run
- The PR is a draft with no CI checks on head ebecef1, no reviews, no labels, opened 2026-11-26 and updated the same day. Zero comments/reviews/reactions on the PR itself —
pr_commentsreturns "No comments". So no community engagement yet; the only external signal is the two issues it closes. - The author's own evidence claims:
--lib -- server::runtime::phase_tests: 109 passed;--lib -- server::metrics::: 20 passed. Those are two module-scoped subsets. He states explicitly "Not run here: the Windows build; the full helios suite; andmessages_image_hints_end_after_expansion_for_text_and_segmented_templates, which needs FLARE_TEST_TEMPLATE_DIR ... CI covers the first two."- Note the CI coverage: the
native-servingworkflow does build+test helios with--features runtime-core,serveron both ubuntu-24.04 and windows-2022 and sets FLARE_TEST_TEMPLATE_DIR fromtests/frontend/prepare_templates.py(.github/workflows/native-serving.yml:28-31,56-68). So the unrun Windows build and template-dependent test are genuinely covered once CI runs — but with no checks on the head commit, none of that has happened yet.
- Note the CI coverage: the
- Merge-logistics claim to verify at merge: description says the branch was cherry-picked onto the AzallazA fork commit
5ffe4d54and that the only conflict was context around the persistent-worker metrics function. That is the live-scrape base, not the PR base: onmain,helios/src/server/metrics.rsalready contains the persistent-worker render function from #507 (merged f646bebc, 2026-11-24). Nothing in the PR diff removes or relocates it, so the base merge is a clean add — the conflict story only affects reproducing the live numbers, not the merge. - The live evidence is on one two-GPU DeepSeek-V4.1-Flash instance, built with the repo Dockerfile, swapped into a llama-swap entry. The author states the instance also served the agent session's own requests, so the deltas exceed the three named requests ("Counts gained 5 for each runtime histogram and 6 for the first-response histogram" against 3 requests). Prompt-token buckets are used to attribute the extra observations: "le="64" gained exactly one observation ... le="2048" gained four, which are the two long prompts plus two session requests". That is a self-declared confound, not a controlled measurement; it is honest but the numbers cannot be read as a clean 3-request run.
- No performance claim is made ("Observability only ... nothing about serving changes", "claims no performance or memory improvement"). The only implicit cost not measured or mentioned: per-observation atomics in the decode loop (6 histogram fields, 1-2 atomic adds + a 21-entry linear scan per completed request, and one extra
monotonic_ns()per completion plus one per step inreserve_and_pack), and 6 new histograms of memory inMetrics(~63 AtomicU64 = ~500 B) times the number ofMetricsinstances. Not a plausible throughput risk, but is unmeasured and unstated.
#8 [high] People: first-time contributor; the area is owned by yatesdr and Luke Alonso
- Author: WynnD (git name Wynn Drahorad), GitHub association with the repo: NONE. In the last 180 days: 0 merged, 0 closed, 1 open PR before today — and that open one is #549, also opened today (2026-11-26 20:24). So #548/#549 are the author's first contributions to the repository; there is no merged history to weigh. Both close issues filed the same morning by Napuh; both carry
Discord: oystersmiles. - The issue filer, Napuh, is also new in this window: #536 and #537, both 2026-11-26, both 0 comments, both
Environment: hyperflare-inference v0.3.2 (c0c4f79). So the demand signal (two issues) and the supply (two PRs) all appeared within ~12 hours, from two accounts with no prior merged work in the last 180 days. That matters for "how long and how widely it has been wanted": by the local record, the ask is <1 day old and has one requester. - Who usually works in this area:
helios/src/server/metrics.rscommits in the last 180 days are dominated by yatesdr (host-cache/selene counters: #400, #415, #429, #358, #168, #141, #92), Luke Alonso (persistent worker schema #507, dashboard scaling, startup selection), Martin Vit (#504, #479, #298), jasonc (orbit/agent metric sampling), Eugene Rakhmatulin (KV capacity gauges). docs/ commits: Luke Alonso (367), Martin Vit (52), yatesdr (47). None of these people has engaged with #548. - Related consumer: #541 by jere357 (Discord cropinky) builds the Grafana example and is being actively auto-reviewed; it depends on the same metric names being right. jere357 has not commented on #548.
- Priority contributors named in the charter:
@voipmonitor,@original-el8,@lukealonso. Neither author of #548 nor #541 is one. docs/api.mdownership: Luke Alonso's commit 698ee450/543 and PCCessna's #538 landed in docs the same day; the api.md §Health and metrics table is maintained by Luke Alonso (author of the surrounding text and of #507's metric schema).
#9 [high] Reach: docs inconsistencies introduced or fixed by the change
- docs/api.md §Health and metrics was rewritten by this PR (docs/api.md:296-318 at PR head) to (a) move histograms into their own paragraph, (b) add the missing
flare_host_cache_retirement_secondsto the histogram list — an undeclared doc fix: the old text said "The only histograms describe host prefix-store lookups: missing_tokens, estimated_transfer_ns, estimated_prefill_ns", which was already stale because retirement_seconds shipped earlier (metrics.rs:851-890; docs/operating.md:47-50). So the PR's docs hunk also corrects pre-existing drift, which the description does not mention. - docs/api.md's JSON-contract section is not updated to say the new histograms are text-only in a way a JSON consumer sees: the PR writes "Histograms appear in the Prometheus format only" and the JSON snapshot is unchanged (verified: no new fields in
Metrics::snapshot, metrics.rs:488-526, andHttpState//metricsJSON path at server.rs:645-659 only insertsfirst_response, input counts andpersistent_worker). Soflare_helios::server::Snapshotconsumers see nothing new. Consistent with the description. - The metrics table at docs/api.md:338+ is not extended with the new series; they are described in prose paragraphs above it instead. Operator-facing consequence: the table remains the "field ↔ Prometheus name" map, and the new request series have no rows. #541's reviewer separately complained the table "lacks the *_kv_tokens gauges and requests_cancelled_total", so this is a known sore point in that area.
- No config, flag, default, or CLI change: nothing to enable or disable; the histograms are always on and always rendered. That means the
/metricsresponse body grows by ~6×(21 bucket lines + help/type/sum/count) ≈ 160 lines plus ~30 lines on Linux of process metrics — a permanent scrape-size increase with no opt-out. Not quantified by the author; Prometheus text for a scrape goes from a few KB to a few KB more, so it is small, but strictly monotone growth is a design choice a reviewer may comment on. flare_*naming overlaps:process_*is deliberately unprefixed to match the standard Prometheus collector names, so the docs' earlier claim "Counter and gauge names start withflare_" is now false. The PR does not amend that sentence (docs/api.md:288-289 still reads "Counter and gauge names start withflare_") while addingprocess_cpu_seconds_totaletc. That is an internal inconsistency introduced by the change.
#10 [high] Project fit: charter clauses on evidence, scope and what gets merged
Charter (read_charter) facts, stated as facts:
- "How We Work → Bring real evidence": "Performance PRs need benchmarks showing an actual speedup over
mainon a served workload". This PR claims no performance change, so that clause does not bite; it is observability-only. - "Keep the runtime small and model-agnostic": the change adds no per-model branch (scheduler/runtime only). It does add ~200 lines of generic histogram infrastructure plus ~184 lines of Linux procfs code inside
helios/src/server. The procfs code is arguably not hyperflare-specific and the charter's "smallest footprint ... or a way to solve it without new code at all" asks whether a dependency (theprometheuscrate's process collector) would be smaller — the author chose hand-rolled to avoid a dependency, which is the opposite trade of thelibc-free preference but matches "pin everything". - "What gets merged": "PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs." #548 addresses an issue filed by a non-maintainer (Napuh, association NONE per the record — the packet only gives association for the PR author WynnD; Napuh's association is not stated in what I read). The charter's authorization clause says "An explicit maintainer request covering the work is sufficient authorization"; a community issue is weaker. No maintainer has commented on #536/#537/#548/#549.
- AGENTS.md:165-169 "Every contribution must address an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation. ... Hypothetical future consumers, agent-generated suggestions, and lint findings alone do not establish a need for a change." The need here is stated as operator need (Grafana migration, SLO alerts) and the only consumer in-repo is #541, which is itself unmerged and has no maintainer approval.
- AGENTS.md:72-112 four-part PR description (why / what / claimed result / evidence). #548 has all four with headers, states what was not run, and distinguishes claimed from measured. It is unusually compliant on this axis.
- AGENTS.md:52-60 "State support as present qualification ... Record unresolved defects, unrun checks ... in docs/TODO.txt". The PR documents the Linux-only omission in docs/api.md rather than TODO.txt; acceptable as it is designed behavior, not an unresolved defect.
- Charter Non-Goals include "Broad production coverage across arbitrary models, GPUs, or deployment setups" and "general cluster orchestration". vLLM-parity Grafana/SLO tooling is closer to production monitoring framing than to the project's self-description ("a focused research prototype ... not trying to make it a general-purpose production server"). That is a tension a maintainer may weigh: the motivating issue is explicitly "monitoring parity with vLLM" and "move existing vLLM Grafana dashboards and SLO alerts to Flare".
- Reverse tension in the PR's favour: the project already ships a rich
flare_*metric surface, a terminal dashboard, anddocs/api.md§Health and metrics, so metrics work is established practice, not new scope.
#13 [high] Research summary
Case file for PR #548 "Add request latency histograms and process metrics" (WynnD, draft, +545/−20, 8 files, head ebecef1, no CI checks, no reviews) is gathered in the scratchpad across 12 entries, one per angle.
Key findings a reader could not get from the description:
flare_request_queue_secondsstarts at runtime arrival, not HTTP admission:Incoming.arrival_nsis set inModelRuntime::schedule(runtime.rs:901) and handed to the scheduler at runtime.rs:1471. Issue #536 asked for "admission to first scheduled step"; e2e and TTFR, by contrast, start at HTTP admission (AdmittedAt, server.rs:828). The description names neither start point, so a reader porting vLLM queue-time semantics can mis-map it. Prompt-token observation uses the preemption-carried original prompt length, so it agrees with per-responseusage.prompt_tokens.- Undeclared asymmetry in the HTTP observations:
flare_time_to_first_response_secondsis recorded only when the client actually polls the body, whileflare_request_e2e_secondsis recorded as soon as the handler produces the completed response even if the body is dropped (http.rs:614-617 vs :607/638; phase_tests.rs:4406-4473 pins both behaviours). e2e therefore measures server-side handling, not delivery. helios/src/server/metrics/process.rsis hand-written procfs code, Linux only;libcis already an unconditional dependency offlare-helios(Cargo.toml:50), so no Cargo change. Windows is a supported serving target and CI builds it, but a Windows scrape gets noprocess_*series — documented, yet it means the description's generic-dashboard motivation is resolved only on Linux.process_open_fdscounts its own directory read (declared in the help string).- The docs hunk also silently repairs pre-existing drift: the old text claimed host-prefix lookups were "the only histograms" while
flare_host_cache_retirement_secondsalready shipped. Conversely the change leaves "Counter and gauge names start withflare_" (api.md:288-289) standing while adding unprefixedprocess_*. - Process/community: the PR is a draft with zero checks, zero comments and no maintainer engagement anywhere in the cluster. The author has no merged contribution and GitHub association NONE; their other PR (#549) was opened the same day; both close issues (#536, #537) filed the same morning by one new filer, Napuh. So the demand is under a day old and one-requester wide — relevant to the charter's "explicit maintainer request" merger test.
- Evidence: the claimed test runs are two module subsets (
server::runtime::phase_tests109 passed;server::metrics::20 passed); Windows build, full helios suite and one template-dependent test are explicitly not run, and CI does cover the first two on both ubuntu and windows-2022 (native-serving.yml:56-68) but has not run. The live scrape is a single two-GPU DeepSeek instance whose deltas include the agent session's own traffic — self-declared confound, not a controlled three-request measurement. No performance claim is made and none of the added per-completion cost is measured. - Related work: nothing on main conflicts (no default-branch commit since f377dc8 touches these files);
metrics.rshas three open PRs in flight (#548, #549, #542) plus #334 touching it; #507 is the function the new code sits beside; #541 is the Grafana consumer whose own auto-review says the only in-repo Grafana signal is #536. The change leaves the four existing host-cache histograms on their older[AtomicU64; 8]implementation, so the file now holds two histogram implementations. - Charter fit: observability-only, no per-model branch, complete four-part description — but the motivating framing ("monitoring parity with vLLM", migrating SLO alerts) sits against the charter's "not a general-purpose production server" self-description, and no maintainer has authorized the work.
Angles with nothing found: community (no comments, reviews or reactions anywhere in the cluster).
#17 [high] AMENDMENT (2026-11-27): head d64c3ea — blocker 1 fixed, but the process refactor breaks a documented feature build
PR #548 head moved ebecef1 -> d64c3ea ("Exclude cancelled responses and reuse host helpers", 2026-11-26). Size is now +550/-20 in 10 files (was +545/-20 in 8): adds helios/src/runtime_core/mod.rs (+1) and helios/src/runtime_core/protection.rs (+1/-1), and metrics/process.rs shrank +184 -> +172. Still draft; no review, no CI evidence on the new head.
WHAT THE COMMIT DOES
- e2e exclusion + single observation point. http.rs:598-606: one observation per successful response, guarded
if !count && !encoder.tool_limit_reached, placed just beforeyield Delivery::Complete(response)inside the delivery generator; the duplicate observations in the streaming filter_map (:614-617 before) and the non-streamingDelivery::Completebranch (:631-635 before) are deleted,Delivery::Complete(_) => Nonenow (http.rs:621), and the cachedmetrics_handle()clone is gone (usesstate.model.metrics()). - process.rs now reuses shared helpers instead of hand-rolling them:
page = crate::os::page_size()(process.rs:56; eos/src/unix.rs:73-75),open_fds = crate::runtime_core::open_descriptors()(:63; runtime_core/protection.rs:291-302, newlypub(crate)and re-exported at runtime_core/mod.rs:58),max_fds = crate::os::raise_open_file_limit(0)(:65; eos/src/unix.rs:138-165, desired=0 only reads the soft limit). Only /proc/self/stat and /proc/stat btime parsing stay local.process_resident_memory_bytesno longer has a separate page-size fallback (:85-93). - New assertion in
disabled_parallel_calls_complete_http_and_stop_decoding(phase_tests.rs:4604-4613): the tool-limit cancellation must leaveflare_request_e2e_seconds_count 0.
BLOCKER 1 OF THE 26 NOV REVIEW IS FIXED. The tool-limit path was the only place the HTTP layer cancels a generation while still delivering a complete response (http.rs:471-476 skip, :526 Cancelled substitution, :563-567 generation.cancel()), and it is now excluded; docs/api.md:315-316 ("Cancelled and failed requests enter only ..._cancelled_total and ..._failed_total") is consistent again. The other cancel paths set the flag only from Generation::cancel/Drop (runtime.rs:152-154, :175-179), which either ends in an Error event or a dropped response, so no Complete and no observation. Nothing in the new head addresses the earlier "cancellation races the natural finish" remark, but I found no path where it now produces an e2e observation.
NEW HIGH FINDING — the refactor makes a documented build configuration fail to compile on Linux.
helios/src/server/metrics/process.rs:63callscrate::runtime_core::open_descriptors()unconditionally under#[cfg(target_os = "linux")].runtime_coreis#[cfg(feature = "runtime-core")] pub mod runtime_core;(helios/src/lib.rs:25-26), whileserveris gated only on#[cfg(feature = "server")](:28-29) and theserverfeature does not enableruntime-core(helios/Cargo.toml:25; default = [] at :17).- So a Linux build/test of helios with
--features serverand withoutruntime-corenow references a module that does not exist (E0433). Two documented commands use exactly that feature set:cargo test --manifest-path helios/Cargo.toml --features server --lib frontend::and... --features server --test message_boundaries(docs/model-development.md:99-100), and... --features server --lib scheduler::/server::runtime::phase_tests::(docs/scheduling-runtime-design.md:735-737). - CI cannot see it: native-serving builds helios only with
--features runtime-core,server(.github/workflows/native-serving.yml:63,68), flare-cli/flare always enable both (flare-cli/Cargo.toml:27, flare/Cargo.toml:23), helios-lifecycle runscargo kani --libwith no features. Windows--features serverstill compiles because the call sits behindcfg(target_os = "linux")— the break is Linux-only. - Before this commit the server module had no
runtime_corereference outside#[cfg(feature = "runtime-core")]code (session.rs, prompt_tests.rs), so this is new. - Cheap fixes: gate the call on the feature, route the fd count through the
crate::ossurface (it is a /proc read, not a runtime-core concept), or gate the wholeprocessmodule.
Also unchanged by the commit: the two competing histogram implementations (host-cache arrays vs Histogram<N>), the ~190-line permanent growth of every /metrics body with no opt-out, no process_* on Windows, and the unmeasured per-step/per-scrape cost.
#18 [high] AMENDMENT (2026-11-27): docs findings resolved at head; description drift grows
The d64c3ea docs hunk in docs/api.md (PR head lines 287-321) resolves most of the documentation findings in my 26 Nov report:
- Naming contradiction fixed: "Counter and gauge names start with
flare_, ... except the standardprocess_*series described below" (docs/api.md:288-290). - "Histograms ... accumulate since server start" added (:297).
- The two groups are now named and split: "The HTTP histograms observe delivery" (:303-307) and "The runtime histograms observe completed generations" (:309-316).
- e2e stream semantics fixed: "for a stream it is observed when delivery completes, which requires the client to drain the body" (:304-306).
- Eligibility fixed: decode and
flare_time_per_output_token_seconds"are recorded only for requests with at least two generated tokens" (:312-314), matching metrics.rs:470-479. - Prompt-token definition kept and clarified (:314-315).
- The queue boundary is now named as "model-scheduler arrival to the first model step that includes the request, which can be a vision step" (:309-312).
- The old "The only histograms describe host prefix-store lookups" sentence is gone, so the earlier "undeclared doc repair" finding is moot, and
flare_host_cache_retirement_secondsis listed (:298-301).
STILL WRONG / STILL OPEN
- "The HTTP histograms observe delivery" (:303) overstates the non-streaming case: e2e is recorded inside the delivery generator before the response is returned (http.rs:598-606), and
first_response_http_nonstream_records_only_when_completed_body_is_offeredstill pinsflare_request_e2e_seconds_count 1for bothpoll_body = falseandtrue(phase_tests.rs:4461-4465). Only the streaming case needs the client to drain. One clause ("non-streaming responses are observed when the body is produced"). - The vision phrase covers the queue boundary but not that prefill absorbs vision compute:
first_scheduled_nsis stamped for every lane before theGraphKind::Visionsplit (runtime.rs:2191-2203 vs :2208), soflare_request_prefill_secondsincludes vision work too. Partially addressed, still not said explicitly. - The PR description remains silent on the queue histogram's start point (docs say model-scheduler arrival; #536 asked for admission) and now also silent on the third e2e exclusion: it still reads "observed when delivery completes a successful response, except for
/v1/messages/count_tokens", with no mention of the tool-limit/cancelled exclusion that this commit adds, and no mention of the newruntime_coredependency or the shared-helper refactor. - The description's Evidence section was not updated with the new assertion, and still claims "nothing about serving changes" (unchanged), the two module-subset runs (109 + 20), the run-not-run list, and "CI covers the first two" (no checks on the new head either; the author instead asked for an autobot re-review).
docs/api.md:318-321still says other platforms omitprocess_*; unchanged, still the Windows gap.
#19 [high] AMENDMENT (2026-11-27): #548 now has a stacked dependent (#552) and a sibling (#553); issue #551 names the proxy gap
Three new items appeared in the hours after my 26 Nov report, all by WynnD and all referring to #548:
- Issue #551 "Report per-request timings on final responses so llama-swap can show prompt and decode rates" (WynnD, 2026-11-27 03:26, open, 0 comments): llama-swap's activity table and
GET /api/metrics/activityshow -1 for prompt/decode rates because Flare emits onlyusage;buildMetricsin llama-swap v250 (internal/server/metrics.go, commit60226b6) reads a llama.cpptimingsobject or a vLLMmetricsobject from a non-streaming body or any SSE event and never scrapes/metrics. Explicitly says "Flare's Prometheus histograms cannot substitute: llama-swap parses proxied response bodies and does not scrape/metrics" — i.e. the author states #548's series cannot serve this consumer. - PR #552 "Report request timings on final responses" (WynnD, 2026-11-27 04:30, draft, +929/-26, 11 files, head aea4147, closes #551): stacked on #548 — "This branch is stacked on #548, which adds the request-latency histograms and the
RequestTimesstamps this PR reads... Merge #548 first." It makesRequestTimespub, addsDraftCounts, carries both onGenerationEvent::Finished, and renders a llama.cpp-compatibletimingsobject (cache_n/prompt_n/prompt_ms/prompt_per_second/predicted_n/draft_n/draft_n_accepted) on the final output of all four protocols. Its own file list still shows #548's files (docs/api.md +45, metrics.rs +228, process.rs +184, latency.rs +27/-8) because it is not rebased. - PR #553 "Add vLLM-compatible per-request metrics" (WynnD, 2026-11-27 04:52, open, +302/-9, 11 files, head fd5c67e): opt-in
--enable-per-request-metrics/[server] per_request_metrics, emitting vLLM'smetricsobject (time_to_first_token_ms, time_to_first_content_token_ms, generation_time_ms, queue_time_ms, mean_itl_ms, tokens_per_second) in OpenAI response bodies. Claims no runtime/#548 overlap and "merges in any order with them"; its http.rs hunk starts from the pre-#548 base (delivery.next()loop still present), so it will conflict textually with #548's e2e rearrangement (http.rs:598-606 vs :631-644). - WynnD's 2026-11-27 04:56 comment on #548: "@flare-autobot review the pushed changes. The per-request metrics PR is new; the other two carry review fixes." — i.e. #548 is the PR carrying review fixes, #552/#553 are new.
Consequences for #548's review:
- The response-side gap #548 leaves (no per-request timing for proxies) is now explicit in the same author's own issue #551, and #552 is stacked behind #548, so #548 becomes a merge-order dependency for at least one sibling. That makes the queue histogram's semantics and
RequestTimes' shape more consequential: #552 reads exactly the stamps #548 added (first_scheduled_ns,first_token_ns,last_token_ns) and turns them intoprompt_ms/predicted_ms, so a wrong start point propagates into the response body, not just a scrape. - Three PRs now touch helios/src/server/http.rs and metrics.rs in the same week; the earlier "three open PRs edit metrics.rs" queue is now four-way plus #552/#553.
- No maintainer comment, review or CI run on any of #551/#552/#553 either; all under a day old.
#21 [high] Research summary
The new event (commit d64c3ea on PR #548, plus three new items in the cluster) is reviewed and the amendments are in scratchpad notes #17–#20. Headline amendments:
-
Review blocker 1 is fixed. e2e is now observed once, inside the delivery generator, guarded by
!count && !encoder.tool_limit_reached(http.rs:598-606); the duplicate observations and themetrics_handle()clone are gone; and a new assertion pinsflare_request_e2e_seconds_count 0on the parallel-tool-limit path (phase_tests.rs:4604-4613). The docs naming, cumulative-window, group-split, ≥2-token and stream-drain findings from the 26 Nov review are also now fixed indocs/api.md:287-321. -
New high finding introduced by the same commit.
process.rs:63now callscrate::runtime_core::open_descriptors()undercfg(target_os = "linux"), butruntime_coreis gated on theruntime-corefeature (helios/src/lib.rs:25-26) while theserverfeature does not enable it (helios/Cargo.toml:25). A Linux build with--features serveralone — exactly the documented commands indocs/model-development.md:99-100anddocs/scheduling-runtime-design.md:735-737— no longer compiles. No CI job covers that combination (native-serving.yml:63,68always passes both features; Windows compiles because the call is Linux-gated). -
Cluster change. #548 is now a merge-order dependency: PR #552 (draft, +929) is explicitly stacked on #548 and turns
RequestTimesinto llama.cpp (not opened)-styletimingson response bodies, and PR #553 adds vLLM-style per-requestmetrics; both by the same author, whose issue #551 states plainly that Prometheus histograms cannot serve the llama-swap consumer. That raises the cost of the queue-histogram start point, since #552 propagates the same stamps into the wire format. Also: docs still call non-streaming e2e "delivery" when it is recorded before the body is returned, the description is unchanged (still no queue start point, no tool-limit exclusion, stale CI/evidence claims), no CI has run on d64c3ea, and there are still no reviews or maintainer engagement anywhere in the cluster.
#22 [high] AMENDMENT TEXT (2026-11-27): the amendments to append to the report, worded
Amendments to the 2026-11-26 report (run of 2026-11-27)
1. Head moved: ebecef1 → d64c3ea "Exclude cancelled responses and reuse host helpers". Size +550/−20 in 10 files (was +545/−20 in 8). Still draft, still no reviews, still no CI checks, no maintainer engagement.
The two new files in the diff are helios/src/runtime_core/mod.rs (+1) and helios/src/runtime_core/protection.rs (+1/−1); metrics/process.rs shrank +184 → +172.
2. Corrected: the cancelled-response blocker is fixed (it was the first blocker in the 22:00 review of my last report).
flare_request_e2e_seconds is now observed exactly once, inside the delivery generator, immediately before yield Delivery::Complete(response), guarded by if !count && !encoder.tool_limit_reached (helios/src/server/http.rs:598-606). Both former observation sites are gone (Delivery::Complete(_) => None at http.rs:621; the non-streaming arm at http.rs:635-644 now only maps the body), the cached metrics_handle() clone is gone in favour of state.model.metrics(), and disabled_parallel_calls_complete_http_and_stop_decoding now asserts flare_request_e2e_seconds_count 0 on the tool-limit path (phase_tests.rs:4604-4613). The tool-limit path was the only place HTTP cancelled a generation while still delivering a complete response (http.rs:471-476, :526, :563-567), so the documented promise that cancelled and failed requests appear only in the _cancelled_total/_failed_total counters (docs/api.md:315-316) holds again. The earlier "e2e is recorded as soon as the handler produces a response even if the body is dropped" asymmetry is now deliberate, documented, and pinned by a test.
3. Corrected: most of the documentation findings are resolved.
At the new head docs/api.md:287-321 fixes: the process_* exception to "Counter and gauge names start with flare_" (:288-290); "accumulate since server start" (:297); the split into "The HTTP histograms observe delivery" and "The runtime histograms observe completed generations" (:303, :309); the ≥2-generated-token eligibility of decode and time-per-output-token (:312-314); the stream-drain wording (:304-306); and the queue boundary named as model-scheduler arrival to the first model step, "which can be a vision step" (:309-312). The stale "The only histograms describe host prefix-store lookups" sentence is gone, so my earlier "undeclared doc repair" observation is moot and flare_host_cache_retirement_seconds is listed (:298-301).
Two doc inaccuracies remain, both smaller than before:
- "The HTTP histograms observe delivery" (:303) is still wrong for the non-streaming case — e2e is recorded before the response is returned, and
first_response_http_nonstream_records_only_when_completed_body_is_offeredpins count = 1 withpoll_body = false(phase_tests.rs:4461-4465). Only streams require a drain. - The vision note covers the queue boundary only;
first_scheduled_nsis stamped for every lane before theGraphKind::Visionsplit (runtime.rs:2191-2203vs:2208), so prefill also absorbs vision work, which the docs do not say.
4. New high-severity finding the new commit introduces: the helper reuse breaks a documented feature build on Linux.
helios/src/server/metrics/process.rs:63 calls crate::runtime_core::open_descriptors(), but runtime_core is declared #[cfg(feature = "runtime-core")] pub mod runtime_core; (helios/src/lib.rs:25-26) while server is independent (:28-29) and does not enable it (helios/Cargo.toml:25; default = [] at :17). A Linux build of helios with --features server and without runtime-core therefore references a module that is not compiled (E0433). That feature set is documented and used: docs/model-development.md:99-100 (--features server --lib frontend::, --features server --test message_boundaries) and docs/scheduling-runtime-design.md:735-737 (--features server --lib scheduler::, server::runtime::phase_tests::). No CI job covers it — native-serving always passes runtime-core,server (.github/workflows/native-serving.yml:63,68), flare/flare-cli always enable both (flare/Cargo.toml:23, flare-cli/Cargo.toml:27), helios-lifecycle runs cargo kani --lib with no features — and Windows is unaffected because the call is Linux-gated, so the break is Linux-only and invisible to the matrix. Before this commit the server module had no unconditional runtime_core reference (only #[cfg(feature = "runtime-core")] code in session.rs and runtime/prompt_tests.rs). Fixes are cheap: gate the call on the feature, gate the process module, or route the fd count through the crate::os surface, which already re-exports flare_eos (helios/src/os.rs:8).
The rest of the helper consolidation is an improvement and is what the review asked for: crate::os::page_size() (process.rs:56, eos/src/unix.rs:73-75), crate::os::raise_open_file_limit(0) (:65, eos/src/unix.rs:138-165), and the shared open_descriptors (runtime_core/protection.rs:291-302, newly pub(crate) and re-exported at runtime_core/mod.rs:58). ~12 hand-rolled lines in process.rs disappear.
5. New context: #548 is now a merge-order dependency and one of three same-author PRs.
- Issue #551 (WynnD, 2026-11-27 03:26, open, 0 comments) asks for llama.cpp-style
timingson final responses so llama-swap can show prompt/decode rates, and states explicitly that "Flare's Prometheus histograms cannot substitute: llama-swap parses proxied response bodies and does not scrape/metrics." The author has therefore written down that this PR's series do not serve that consumer. - PR #552 "Report request timings on final responses" (WynnD, draft, +929/−26, head
aea4147, closes #551) is stacked on #548: "This branch is stacked on #548, which adds the request-latency histograms and theRequestTimesstamps this PR reads… Merge #548 first." It makesRequestTimespub, addsDraftCounts, carries both onGenerationEvent::Finished, and rendersprompt_ms/predicted_ms/draft_nfrom exactly the stamps #548 added. A mis-anchored queue or prefill stamp therefore no longer stops at a scrape: it reaches the response body of a downstream PR. - PR #553 "Add vLLM-compatible per-request metrics" (WynnD, +302/−9, head
fd5c67e) adds an opt-in--enable-per-request-metricsvLLMmetricsobject; it claims no overlap with #548 but starts from the pre-#548http.rsshape, so it will conflict textually with the new e2e rearrangement. - WynnD's 04:56 comment on #548 says the three pushed PRs are "the per-request metrics PR is new; the other two carry review fixes", i.e. #548 is the one carrying review fixes.
Consequence for the recommendation: the value of #548 is now partly as a dependency (#552 cannot land without it), and the cost of its weakest part — the queue histogram anchored at runtime arrival rather than HTTP admission, which #536 asked for and which the description still does not disclose — is higher, because the same stamps will be rendered into client-visible timings.
6. Unchanged since the last report.
The description was not edited: it still omits the queue histogram's start point, still omits the tool-limit exclusion it now implements, still says "nothing about serving changes", still cites the two module subsets (109 + 20 passed) with no run on the new head, still says "CI covers the first two", and does not mention the runtime_core dependency or the helper refactor. The untouched review items remain: the unmeasured per-step clock read plus lane loop and the blocking procfs reads per scrape, converting the four host-cache histograms to Histogram<8> (two implementations still coexist), gating the module on target_os instead of the let _ = text shim, the maintainer-authorization question for #536, and the ~190-line permanent /metrics growth with no opt-out. Windows still gets no process_* series (docs/api.md:318-321). No CI check has run on d64c3ea and no reviewer or maintainer has engaged with any of #536, #537, #548, #549, #551, #552 or #553.
#24 [high] AMENDMENT (2026-11-27b): head a34c4d0 closes 2 review nits, introduces a parser fix, build break persists
PR #548 head moved d64c3ea -> a34c4d060f96553c490eceb44b2fcf09ed277098 ("Hoist completion values and tighten stat parsing", WynnD, 2026-11-26 20:24-ish, pushed before the 04:56 re-review request). Size: +548/-25 in 10 files (was +550/-20); pr_files now reports process.rs +177, runtime.rs +43/-13, metrics.rs +219, latency.rs +24/-8. Still draft, still zero human reviews, no CI checks recorded.
WHAT THE COMMIT DOES (four hunks, all verified):
-
latency.rs: an
impl FirstResponseSamplesblock that sat afterstruct FirstResponse(latency.rs:127-131 in the old head) is moved up beside the struct's own impl (newrender_histogramat latency.rs:101-109). Pure code motion, no behaviour change. This is item "the separate impl block" from the 22:00 review's nit list, so one nit is closed. -
metrics/process.rs:
parse_stattightened. It now consumes the state character as the first tail token and rejects the line unless that character is in "RSDZTtWXxKPI" (process.rs:24-29), and theutimeskip drops from 11 to 10 (process.rs:31-32). Verified correct against proc(5): after the last)the first token is field 3 (state), so token k = field k+2, and afields.nth(n)afternext()consumes n+2 more tokens, i.e. field n+4. nth(10) -> field 14 = utime(P) ✓; nth(0) -> field 4 = ppid... wait, careful: nth(0) consumes 1 token = field 4 (ppid)?? No: afternext()(field 3), nth(0) consumes 1 more token = field 4 = ppid, not stime. Let me redo: value(|) is called successively, and each closure call consumes. Sequence: next() consumes field 3. value(10): nth(10) consumes fields 4..14 = 11 tokens, lands on field 14 = utime ✓ (21st field = token 19, so 19-14 = 5 tokens left, consistent). value(0): nth(0) consumes field 15 = stime ✓. value(6): consumes fields 16..22... but stat has only 21 fields, so starttime would be missing -- yet the unit test passes [11,12,19,20,21]. The test input is a fabricated 21-token line, not real procfs, so the arithmetic after utime is unverified against the kernel. This deserves an amendment line: the test string "42 (a) b) S 1 2 ... 21" supplies numbers 1..21 which are exactly the token positions, so the assertion Some([11,12,19,20,21]) only proves the "token value == token index" coincidence, not correct field mapping. Also the state validation makes the42 (no tail)case still None, correct. -
metrics.rs test: the second half of
request_histograms_bucket_completed_request_timingsnow usesRequestTimes::default()andgenerated_tokens = 0instead of the impossible{first_scheduled_ns: None, first_token_ns: Some(...)}+ 1 token state, and re-pins queue/prefill/decode_count 1, prompt_tokens_count 2, completed_total 2. This is the "impossible {None, Some} test state" nit from the 22:00 review, closed. It also, incidentally, pins that a zero-token completion contributes only a prompt-size observation -- which is a real semantic (a request that stops before any token) that the docs still do not describe. -
runtime.rs: hoists the two completion expressions into locals at the natural-finish site (runtime.rs:1993-2001), matching what Worker::complete already did (:1837-1845). Equivalent to the previous inline copy in request_completed and the Finished event; no behaviour change. This closes the "two expressions not hoisted" nit. But NOTE: the hoist leaves
prompt_tokens/generated_tokensshadowing the earlier frame locals and reuses them in theGenerationEvent::Finishedemit at :2018-2025, i.e. correct but the diff is now a 4-line duplication of the identical pattern in two functions instead of one, so the "extract a helper" suggestion would shrink it.
NEW HEAD STILL CARRIES the high finding from my last amendment, unchanged: process.rs:68 crate::runtime_core::open_descriptors() under #[cfg(target_os = "linux")] only, while runtime_core is #[cfg(feature = "runtime-core")] (helios/src/lib.rs:25-26) and server does not enable it (helios/Cargo.toml:25). Documented --features server Linux commands still break: docs/model-development.md:99-100 and docs/scheduling-runtime-design.md:735-736. No CI job passes --features server alone: native-serving.yml:63,68 pass runtime-core,server on both Linux and Windows. So the new commit lowered the count of the two named blockers from 2 to ... actually it did not touch blocker 2 (evidence overstatement) at all.
AMBIGUITY I MUST FLAG: the 06:15 autobot review says "most of the previous round is fixed" and still lists 2 blockers / 3 should-fix / 5 subtractive / 6 nits, but it was posted 2026-11-27 06:15 against a head that includes a34c4d0 (the diff in the review's own 22:00 predecessor cites the pre-a34c4d0 line numbers, e.g. runtime.rs:2187-2203 for the stamp, while the new head has it at :2190-2204). The two newest nits it names -- hoisting and parse_stat accepting any line with ) -- are exactly what a34c4d0 addresses, so the review either was generated from the partial update or is now partly stale. Either way the review's blocker set (e2e cancellation, evidence overstatement) is NOT refuted by a34c4d0: e2e cancellation was already fixed at d64c3ea, and evidence overstatement is untouched.
#536 asked for flare_request_queue_seconds: "admission to first scheduled step" (issue #536, Proposal bullet 2). The PR anchors it at runtime arrival (runtime.rs:183 arrival_ns, :901 set at runtime admission) and docs/api.md:309-311 now say "model-scheduler arrival", i.e. the PR silently narrows the requested metric and the description never says so. Unchanged by a34c4d0.
#25 [high] AMENDMENT TEXT (2026-11-27b): amendments to append, worded — head a34c4d0
Amendments to the 2026-11-27 report (head d64c3ea -> a34c4d0)
1. Head moved again. d64c3ea -> a34c4d0 "Hoist completion values and tighten stat parsing". Size +548/−25 in the same 10 files (was +550/−20). Still draft, still no CI check on the head, still no human reviewer and no maintainer engagement anywhere in the cluster (#536, #537, #548, #549, #551, #552, #553). The only comments are three from flare-autobot and one from the author. My earlier note "zero comments" is superseded only in the sense that bot comments now exist; the human-review count is still zero.
2. Correction to my last amendment: the runtime_core build break is NOT new to this cluster's later commits, but it is not fixed either.
Unchanged at a34c4d0: helios/src/server/metrics/process.rs:68 calls crate::runtime_core::open_descriptors() while process is only #[cfg(target_os = "linux")]-gated inside the module, runtime_core is #[cfg(feature = "runtime-core")] pub mod runtime_core; (helios/src/lib.rs:25-26), and the server feature does not enable runtime-core (helios/Cargo.toml:25, default = [] at :17). The two documented Linux commands that pass --features server alone still fail to compile: docs/model-development.md:99-100 and docs/scheduling-runtime-design.md:735-736 (--lib scheduler::, --lib server::runtime::phase_tests::). CI still cannot see it: .github/workflows/native-serving.yml:63,68 pass runtime-core,server on both Linux and Windows. a34c4d0 did not touch process.rs's helper call, so the finding stands exactly as reported.
3. New: three review nits are now closed, and all three hunks are behaviour-preserving.
- latency.rs — the stray second
impl FirstResponseSamplesblock that sat afterstruct FirstResponseis folded into the struct's main impl (helios/src/server/latency.rs:101-108). Pure code motion;render_histogramkeeps its signature and call site (helios/src/server.rs:671). - runtime.rs — the two completion expressions are hoisted into locals at the natural-finish site (
helios/src/server/runtime.rs:1993-2001) and reused by theGenerationEvent::Finishedemit (:2018-2019), matching whatWorker::completealready did (:1838-1840,:1850-1851). Values are identical to the previous inline copies; no semantic change. It is now two copies of the same 3-line pattern rather than one, so the "extract a helper" suggestion would still shrink the diff. - metrics.rs — the test's second half replaces the impossible
RequestTimes { first_scheduled_ns: None, first_token_ns: Some(..) }+ 1-token state withRequestTimes::default()+ 0 generated tokens (helios/src/server/metrics.rs:1683). Sensible: that state is unreachable in production becausefirst_token_nsis only stamped on a committed token, which implies a scheduled step.
This lowers my count of outstanding review items but leaves the two things that actually gate merge: the description evidence and the process-module feature gate.
4. New medium finding the hoist exposes: the docs do not describe a zero-generated-token completion, and the new test now pins that case.
Metrics::request_completed observes flare_request_prompt_tokens unconditionally and only observes queue/prefill when first_scheduled_ns is set, decode and time-per-output-token only when first_token_ns is set and generated_tokens > 1 (helios/src/server/metrics.rs:459-479). The rewritten test now pins exactly that shape: after request_completed(1_000_000_000, RequestTimes::default(), 3000, 0) the queue, prefill and decode counts stay at 1 and only flare_request_prompt_tokens_count rises to 2 (metrics.rs:1683-1690). docs/api.md:309-316 says the runtime histograms "observe completed generations" and names the ≥2-token rule for decode, but never says that a completion which generates no token still counts in flare_requests_completed_total and flare_request_prompt_tokens while contributing to none of the other five. One clause, and it matters for anyone dividing _count by flare_requests_completed_total to get a completeness ratio — that ratio is legitimately below 1.
5. New: the parse_stat hardening is a real improvement, but the accompanying test cannot catch a field-mapping error.
The commit adds a state-character check: after the last ), the first tail token must start with one of RSDZTtWXxKPI, else the parser returns None (helios/src/server/metrics/process.rs:24-28), and the utime skip drops from 11 to 10 (:31). Verified correct against proc(5): the tail token list starts at field 3, so the fields.nth(n) chain after one next() resolves to utime = field 14 (P), stime = 15, starttime = 22 (starttime is computed as starttime_ticks + btime, :104-111). So the values emitted are right.
The test does not prove that, though. Its fixture is "42 (a) b) S 1 2 3 ... 21", i.e. the token values are the token positions, so the assertion Some([11, 12, 19, 20, 21]) is satisfied by any consistent off-by-N as long as the parser stays positionally ordered — a shift of the utime index from 10 to 9 or 11 would still yield the same coincidental shape only if the numbers were chosen independently. Distinct, non-sequential fixture values would pin the mapping. Worth noting because the commit message advertises tightened parsing and the reject path is the only part genuinely tightened; the prev-head parser accepted any line containing ), which the new check now correctly rejects (42 (no tail) still yields None).
Also unchanged and still unexercised as a failure path: the six if let (Some(..), Some(..)) fallbacks (process.rs:72-131) cannot fail on a live Linux kernel, and the only test asserting real kernel values is render_reports_process_memory_descriptors_and_start_time (process.rs:150-177).
6. New: the 06:15 autobot review is already partly stale against the head it was posted on.
Posted 2026-11-27 06:15, i.e. after the author's 04:56 "review the pushed changes" and after a34c4d0 was pushed. It repeats "Changes Requested — the design is right … most of the previous round is fixed", with 2 blockers / 3 should-fix / 5 subtractive / 6 nits, and its own predecessor (22:00) cites pre-a34c4d0 line numbers (runtime.rs:2187-2203 for the stamp, now :2189-2202). Two of the six nits it names — "two expressions in Worker::publish not hoisted as complete does" and "parse_stat accepting any line with )" — are precisely what a34c4d0 fixes. So the review text under-describes the head by two items.
What survives from that review is what I independently confirmed: the description-level evidence problem ("nothing about serving changes" is still in the description verbatim, and the per-request e2e block was addressed at d64c3ea), the vision-stamp ambiguity in the prefill histogram, the host-cache Histogram<8> simplification, the #[cfg]-the-module suggestion, and the maintainer-authorization question. Nothing in it is a new defect I had not already logged; its one genuinely new item relative to my notes is the observation that the scrape deltas are 6 TTFR vs 5 runtime observations, which the author explains in the description as the instance also serving the agent session's own traffic — a confound the description states but does not resolve.
7. Unchanged.
The description still does not disclose that flare_request_queue_seconds starts at runtime arrival (runtime.rs:183, :901) rather than HTTP admission as #536 asked ("admission to first scheduled step", issue #536 Proposal bullet 2), even though docs/api.md:309-311 now says "model-scheduler arrival". #552 remains stacked on this PR and renders those same stamps into a client-visible timings object, so the undisclosed anchor propagates. Windows still receives no process_* series (docs/api.md:318-321). The /metrics body still grows ~190 lines permanently with no opt-out, and the per-step clock read plus lane loop (runtime.rs:2189-2202) and per-token stores are still unmeasured.
8. Bottom line for the amendment.
a34c4d0 is housekeeping: three nits closed, no behaviour change, no test-count growth, no description update, no CI run. It does not move the two merge gates. The one substantive code regression in the PR — the --features server Linux build break from d64c3ea — is still there, and the one substantive evidence problem — a description claiming "nothing about serving changes" and "CI covers the first two" — is still there. My recommendation is unchanged (Changes Requested), with the amendment that the review now to hand (06:15) is itself stale on two of its own nits.
#26 [high] AMENDMENT TEXT (FINAL, 2026-11-27b): supersedes #25 — head a34c4d0
SUPERSEDES entry #25 (and the garbled derivation inside entry #24). Entries #24 and #25 each contain an arithmetic error in the parse_stat section; the corrected analysis is section 5 below. Everything else in #25 stands.
Amendments to the 2026-11-27 report (head d64c3ea -> a34c4d0)
1. Head moved again. d64c3ea -> a34c4d0 "Hoist completion values and tighten stat parsing". Size +548/−25 in the same 10 files (was +550/−20). Still draft; no CI check has run on it; no human reviewer has engaged anywhere in the cluster (#536, #537, #548, #549, #551, #552, #553). The only discussion is three flare-autobot posts and one author post.
2. Correction to my last amendment — I over-claimed on this point, and the correction matters for triage.
My 2026-11-27 amendment described the --features server Linux build break as something "the same commit introduces". The gate is real and still open, but it is not this commit's doing and should not be attributed to a34c4d0:
helios/src/server/metrics/process.rs:68callscrate::runtime_core::open_descriptors()insiderender_linux.runtime_coreis#[cfg(feature = "runtime-core")] pub mod runtime_core;(helios/src/lib.rs:25-26), whileserveris gated independently (:28-29) and does not pull inruntime-core(helios/Cargo.toml:25;default = []at :17).- The documented Linux commands that pass
--features serveralone therefore fail to compile:docs/model-development.md:99-100, anddocs/scheduling-runtime-design.md:735-736(--lib scheduler::,--lib server::runtime::phase_tests::). - CI cannot detect it:
.github/workflows/native-serving.yml:63,68passruntime-core,serveron both Linux and Windows; no job passesserveralone.
a34c4d0 did not touch that call, so the finding is unchanged in substance. What I am correcting is the attribution: it arrived with the helper-reuse commit d64c3ea, and it survives a34c4d0. Fix is still one line — gate the call, gate the process module on the feature, or route the fd count through the crate::os surface, which already re-exports flare_eos (helios/src/os.rs:8).
3. New: three review nits are closed, and all four hunks are behaviour-preserving.
- latency.rs — the stray second
impl FirstResponseSamplesblock that sat afterstruct FirstResponseis folded into the struct's main impl (helios/src/server/latency.rs:101-108). Pure code motion;render_histogramkeeps its signature and its single call site (helios/src/server.rs:671). - runtime.rs — the two completion expressions are hoisted into locals at the natural-finish site (
helios/src/server/runtime.rs:1993-2001) and reused by theGenerationEvent::Finishedemit (:2018-2019), matching whatWorker::completealready did (:1838-1840,:1850-1851). Values are identical to the previous inline copies; no semantic change. It is now two copies of the same 3-line pattern in two functions rather than one, so an extracted helper would still shrink the diff. - metrics.rs — the test's second half replaces the impossible
RequestTimes { first_scheduled_ns: None, first_token_ns: Some(..) }+ 1-token state withRequestTimes::default()+ 0 generated tokens (helios/src/server/metrics.rs:1683). Sensible: that state is unreachable in production, becausefirst_token_nsis only stamped on a committed token and a committed token implies a scheduled step.
Net effect: the count of outstanding review nits drops, but the two things that gate merge do not move.
4. New medium finding: the docs do not describe a zero-generated-token completion, and the rewritten test now pins that case.
Metrics::request_completed increments flare_requests_completed_total and observes flare_request_prompt_tokens unconditionally; queue and prefill are observed only when first_scheduled_ns is set; decode and time-per-output-token only when first_token_ns is set and generated_tokens > 1 (helios/src/server/metrics.rs:459-479). The rewritten test now pins exactly that shape — after request_completed(1_000_000_000, RequestTimes::default(), 3000, 0) the queue, prefill and decode counts stay at 1 and only flare_request_prompt_tokens_count rises to 2 (metrics.rs:1683-1690).
docs/api.md:309-316 says the runtime histograms "observe completed generations" and states the ≥2-token rule for decode, but never says that a completion generating no token still counts in flare_requests_completed_total and flare_request_prompt_tokens while contributing to none of the other five. That matters operationally: anyone computing flare_request_prefill_seconds_count / flare_requests_completed_total to get an instrumentation-completeness ratio will legitimately see it below 1, with no documented explanation. One clause fixes it.
5. CORRECTED: the parse_stat change is correct, and its test does pin the field mapping.
The commit adds a state-character check — after the last ), the first tail token must start with one of RSDZTtWXxKPI, else the parser returns None (helios/src/server/metrics/process.rs:24-28) — and drops the utime skip from 11 to 10 (:31).
Derivation, verified against proc(5) field numbering: after the last ), the first tail token is field 3 (state), so tail token i is field i+3. The fields.next() that performs the state check consumes tail token 0 (field 3). Then each value(n) is fields.nth(n), which skips n and returns one, i.e. consumes n+1 tokens:
value(10)→ tail token 11 → field 14 = utime ✓value(0)→ tail token 12 → field 15 = stime ✓value(6)→ tail token 19 → field 22 = starttime ✓ (rendered asbtime + starttime_ticksat:104-111)value(0)→ tail token 20 → field 23 = vsize ✓value(0)→ tail token 21 → field 24 = rss ✓
All five correct. The fixture "42 (a) b) S 1 2 3 ... 21" supplies distinct sequential values whose magnitude equals their tail-token index, so the assertion Some([11, 12, 19, 20, 21]) genuinely pins the mapping — an off-by-one in any index yields different numbers and fails. My earlier note claiming this test cannot catch a mapping error was wrong; the fixture is adequate. The reject path is also a real improvement: the previous head accepted any line containing ), while 42 (no tail) now correctly returns None.
The one residual concern is a new failure mode the check introduces, and it is small but worth a line: the module's stated principle is that "a source that cannot be read or parsed omits only the metrics that depend on it." Because every stat-derived series shares this one parse, a kernel state character outside the hard-coded set — RSDZTtWXxKPI covers the documented R/S/D/Z/T/t/X/x/I plus the legacy W/K/P — would silently drop process_cpu_seconds_total, process_resident_memory_bytes, process_virtual_memory_bytes and process_start_time_seconds together, leaving only process_open_fds and process_max_fds. Substring matching on one character is also cheerfully permissive (any token starting with X, e.g. a 64-bit-clean marker, passes). Low severity: the current set covers every state in modern proc(5).
Separately, still unexercised as a failure path: the six if let (Some(..), Some(..)) fallbacks (process.rs:72-125) cannot fire on a live Linux kernel, and the only test asserting live kernel values is render_reports_process_memory_descriptors_and_start_time (process.rs:150-177).
6. New: the 06:15 autobot review is already partly stale against the head it was posted on.
Posted 2026-11-27 06:15 — after the author's 04:56 "review the pushed changes" and after a34c4d0 was pushed — it repeats "Changes Requested … most of the previous round is fixed" with 2 blockers / 3 should-fix / 5 subtractive / 6 nits. Its own predecessor (22:00) cites pre-a34c4d0 line numbers (e.g. runtime.rs:2187-2203 for the stamp, now :2189-2202), and two of the six nits it names are exactly what a34c4d0 fixed: "two expressions in Worker::publish not hoisted as complete does" and "parse_stat accepting any line with )". So the review under-describes the head by two items.
What survives from it is what I independently confirm: the description-level evidence problem, the vision-stamp ambiguity in the prefill histogram, the host-cache Histogram<8> simplification, the #[cfg]-the-module suggestion, and the maintainer-authorization question. Nothing in it is a defect I had not already logged. Its one genuinely new observation is that the live-scrape deltas are 6 TTFR observations against 5 runtime observations; the description attributes the excess to the instance also serving the agent's own session traffic, which states the confound but does not resolve it.
Note also that the review reports "2 blockers" and its blocker list still leads with the e2e cancellation issue, which the author fixed at d64c3ea (helios/src/server/http.rs:598-606, pinned at phase_tests.rs:4604-4613). So the outstanding blocker tally in that posted review is one higher than my own.
7. Unchanged and still the two merge gates.
- The description still does not disclose that
flare_request_queue_secondsstarts at runtime arrival (runtime.rs:183,:901) rather than HTTP admission as #536 asked ("admission to first scheduled step", #536 Proposal bullet 2), even thoughdocs/api.md:309-311now says "model-scheduler arrival". #552 remains stacked on this PR and renders those same stamps into a client-visibletimingsobject, so the undisclosed anchor propagates beyond a scrape. - The description still says "nothing about serving changes", still asserts "CI covers the first two" with no CI run on any head, still omits the tool-limit exclusion it implements, and still omits the
runtime_coredependency and the helper refactor. - Windows still receives no
process_*series (docs/api.md:318-321). The/metricsbody still grows ~190 lines permanently with no opt-out. The per-step clock read plus lane loop (runtime.rs:2189-2202) and the per-token stores remain unmeasured;a34c4d0neither added nor removed cost on the hot path (the hoist is value-neutral, the parser runs only per text scrape).
8. Bottom line.
a34c4d0 is housekeeping: three nits closed, no behaviour change, no new tests, no description update, no CI run, size roughly flat (+548/−25 vs +550/−20). It does not move either merge gate. My recommendation stands at Changes Requested, narrowed to: (a) the --features server Linux build break at process.rs:68, inherited from d64c3ea; (b) the description's evidence claims, which no commit has touched. The two doc-level items I would still raise in review are the missing zero-token completion clause (§4) and the non-streaming "observe delivery" overstatement already logged. Everything else in the PR is sound, and the parser change is correct.
#27 [high] Research summary
Amended. The new event is one commit, a34c4d0 "Hoist completion values and tighten stat parsing", taking #548 from d64c3ea to +548/−25 in the same 10 files. It is housekeeping: three review nits closed (the stray impl block folded into the struct's impl in latency.rs:101-108, the completion expressions hoisted in runtime.rs:1993-2001, and the impossible {None, Some} test state replaced with RequestTimes::default() + 0 tokens in metrics.rs:1683), all behaviour-preserving. The PR is still draft, no CI has run on the head, and no human has reviewed it or engaged with any item in the cluster.
Two findings from the previous report are corrected or refined. I re-derived the parse_stat field arithmetic against proc(5) — utime is field 14, stime 15, starttime 22, vsize 23, rss 24 — and the parser is correct, with the test fixture adequate to pin the mapping; my earlier suspicion of a mapping bug was an arithmetic slip of my own, now corrected on the scratchpad. I also corrected the attribution of the outstanding --features server Linux build break (process.rs:68 calling a feature-gated runtime_core): it is real and still open, but it arrived with d64c3ea, not with this commit.
Genuinely new material: the rewritten test newly pins that a zero-generated-token completion still increments flare_requests_completed_total and flare_request_prompt_tokens while contributing to none of the other five histograms, a semantic the docs never state — relevant to anyone computing an instrumentation-completeness ratio. And the 06:15 Autobot review is already partly stale against the head it was posted on: two of the six nits it lists are exactly what a34c4d0 fixed, and its blocker tally retains the e2e cancellation item fixed at d64c3ea. Recommendation is unchanged at Changes Requested, narrowed to the build break and the untouched description evidence claims. The deliverable amendment prose is scratchpad entry #26, which supersedes #25 and corrects #24.
#28 [high] Verified-at-head fact sheet for a34c4d0 (citations the report should use)
PR #548 head a34c4d060f96553c490eceb44b2fcf09ed277098, +548/−25, 10 files, draft. Verified this turn by reading the head directly.
SIZE AND FILES (pr_files) docs/api.md +28/−3 · helios/src/runtime_core/mod.rs +1/−0 · helios/src/runtime_core/protection.rs +1/−1 · helios/src/server.rs +2/−0 · helios/src/server/http.rs +8/−0 · helios/src/server/latency.rs +24/−8 · helios/src/server/metrics.rs +219/−0 · helios/src/server/metrics/process.rs +177/−0 (new, 178 lines total) · helios/src/server/runtime.rs +43/−13 · helios/src/server/runtime/phase_tests.rs +45/−0
COMMITS (search_history) a34c4d06 "Hoist completion values and tighten stat parsing" · d64c3ea3 "Exclude cancelled responses and reuse host helpers" · ebecef13 "Add request latency histograms and process metrics"
THE NEW COMMIT, HUNK BY HUNK
- latency.rs:101-108 —
render_histogramnow lives in the mainimpl FirstResponseSamplesblock (block that previously sat afterstruct FirstResponse); body unchanged, renders "time_to_first_response_seconds" againstsuper::metrics::REQUEST_SECONDS. Call site server.rs:671. - runtime.rs:1993-2001 —
prompt_tokens = request.carried.prompt_tokens.unwrap_or(prompt_tokens),generated_tokens = request.carried.generated_tokens + generated, thenmetrics.request_completed(request.incoming.arrival_ns, request.incoming.times, prompt_tokens, generated_tokens); the same two locals feedGenerationEvent::Finishedat :2018-2019. Mirrors the pre-existing pattern at :1838-1845 / :1850-1851. Value-identical to the previous inline expressions. - metrics.rs:1683 — test line now
metrics.request_completed(1_000_000_000, RequestTimes::default(), 3000, 0);replacing the{first_scheduled_ns: None, first_token_ns: Some(2_000_000_000), last_token_ns: 2_500_000_000}+ 1-token construction; assertions at :1685-1696 pin queue/prefill/decode_count 1, prompt_tokens_count 2,flare_requests_completed_total 2. - process.rs:24-32 — state-char check
"RSDZTtWXxKPI".contains(state)on the first token after the last), returning None otherwise;utimeskip 11 → 10.
PARSER ARITHMETIC (correct; verified against proc(5))
Tail token i = field i+3. After fields.next() (field 3), each value(n) consumes n+1 tokens: value(10)→utime=f14, value(0)→stime=f15, value(6)→starttime=f22, value(0)→vsize=f23, value(0)→rss=f24. Renderer uses btime + starttime/ticks at process.rs:104-111. Test fixture "42 (a) b) S 1 2 … 21" → Some([11,12,19,20,21]) at process.rs:141-148 pins the mapping because values are distinct (earlier doubt retracted).
HISTOGRAM SEMANTICS (unchanged)
Metrics::request_completed, metrics.rs:452-480: completed++ and prompt-token observe unconditional; queue needs first_scheduled_ns; prefill additionally first_token_ns; decode and time-per-output-token need first_token_ns and generated_tokens > 1. Field types metrics.rs:308-331 (request_e2e Histogram<21> at :327). Render for decode/time-per-output-token at :1406-1415. RequestTimes definition metrics.rs:300-306.
GATING AND COST
process.rs:9-15 render shim (let _ = text off Linux), render_linux :56-126, open_descriptors call :68, raise_open_file_limit(0) :70, if let fallbacks :72-125, tests :128-177. metrics.rs:12 pub(super) mod process; (no cfg). server.rs:706-709 calls metrics::process::render. lib.rs:22-29: server and runtime_core gated independently; Cargo.toml:25 server does not enable runtime-core, :17 default = []. server.rs:26-29 is the only cfg-gated server module (session). helios/src/os.rs:8 pub(crate) use flare_eos::*;.
HTTP / e2e
http.rs:598-606 single guarded observation (!count && !encoder.tool_limit_reached) before yield Delivery::Complete(response); :621 Delivery::Complete(_) => None; :635-644 non-streaming arm only maps the body. Pinned at phase_tests.rs:4604-4613 (tool-limit → count 0), :4461-4465 (non-streaming records with poll_body=false), :5395-5399 (route test, process_resident_memory_bytes present).
DOCS AT HEAD
docs/api.md:287-290 naming exception for process_*; :297 "accumulate since server start"; :303-307 HTTP group incl. stream-drain clause; :309-316 runtime group, queue = "model-scheduler arrival … which can be a vision step", ≥2-token rule, cancelled/failed exclusion; :318-321 Linux-only process series. Documented --features server-only Linux commands: docs/model-development.md:99-100, docs/scheduling-runtime-design.md:735-736. CI passes only runtime-core,server: .github/workflows/native-serving.yml:63,68.
#31 [high] AMENDMENT (2026-11-28): head 49373bc — PR retitled, process metrics removed, both old gates look closed but #536 scope breaks
Head 49373bc5673c2130ad7f8d645510365d45e85f06, retitled "Add per-request histograms and vLLM-parity request metrics", open, +1016/−51, 9 files, updated 2026-11-28 02:09 (read_item 548).
FILES (pr_files): docs/api.md +127/−4 · helios/src/scheduler.rs +4 · helios/src/scheduler/tests.rs +7 · helios/src/server.rs +2 · helios/src/server/http.rs +15 · helios/src/server/latency.rs +24/−8 · helios/src/server/metrics.rs +548/−2 · helios/src/server/runtime.rs +102/−37 · helios/src/server/runtime/phase_tests.rs +187. helios/src/server/metrics/process.rs DELETED (177 lines); helios/src/runtime_core/mod.rs and protection.rs reverted (open_descriptors private again).
COMMITS: 49373bc "State request-histogram populations from the code and drop duplicate assertions" · 15018689 "Document how Flare's metrics correspond to vLLM's" · 01f1e92b "Count lookup tokens, output-limit stops, parked requests, and queue rejections" · 10c0b937 "Add per-request histograms that match vLLM's request metrics" · 54e06b30 "Remove process metrics from the request latency change" (on top of a34c4d0).
NEW SERIES beyond the old head: request_inference_seconds, time_to_first_token_seconds, inter_token_latency_seconds, request_prefill_computed_tokens, request_generated_tokens, request_max_tokens, request_preemptions, request_choices, request_max_choice_generated_tokens, model_step_tokens, requests_output_limited_total, cache_lookup_tokens_total, parked_requests gauge, admission_rejections_total{http_slots|generation_capacity|request_queue}. Citations: metrics.rs:242-253 (PREEMPTION_COUNTS/CHOICE_COUNTS), :332-385 (RequestRecord/CompletedRequest/AdmissionLimit), :286-295 (Histogram::absorb), :545-618 (request_completed + response_completed), :1548-1656 (render), :1696-1720 (parked/pending help). runtime.rs:1568-1569 max_tokens at first admission, :1721-1732 model_step, :1801-1805 tokens_committed at position 0, :2108-2110 preemptions on preemption park only, :865-870/:941-946 admission limits, :1199-1211 publish_gauges, :1203-1211 parked gauge. server.rs:812-824 http_slots at ingress Full; http.rs:230-249 second http_slots site, :407/:528-531 generated per choice, :604-612 response_completed guard.
CLUSTER RESHUFFLE: #552 closed 2026-11-28 02:04 "Superseded by #560" (it emitted a llama.cpp timings object; emitting both made llama-swap subtract cached prompt tokens twice). #553 closed 2026-11-28 02:05 superseded by #560. #560 open (WynnD, 2026-11-28 02:04, +1898/−123, 18 files, closes #551) — vLLM metrics object from runtime instants, stacked on #548, and its diff carries #548's own hunks (metrics.rs +548/−2, latency.rs +24/−8, scheduler.rs +4 identical). #560 discloses the queue anchor it inherits: "queue_time_ms starts at model-queue arrival ... includes that channel transit (microseconds)". #549 and #541 unchanged.
#32 [high] AMENDMENT TEXT (FINAL): head 49373bc — append these amendments
AMENDMENTS TO APPEND (head a34c4d0 → 49373bc)
1. The head moved five commits and the PR was retitled
a34c4d0 → 49373bc "Add per-request histograms and vLLM-parity request metrics" (was "…and process metrics"). Now +1016/−51 in 9 files (was +548/−25 in 10). Still open; still no CI check on any head; still no human reviewer.
2. Two of my three merge gates are closed, and one PR claim becomes wrong
process_*metrics are gone.helios/src/server/metrics/process.rsis deleted,metrics::process::renderis removed from the/metricshandler, and the tworuntime_corerevert hunks are undone (open_descriptorsis private again). The--features serverLinux build break I raised twice is therefore resolved by deletion, not by a fix —--features servernow has noruntime_corereference outside the#[cfg]-gatedsession/prompt_testsmodules.- But the description still says
Closes #536, and #536 asks for process metrics. #536's table listsprocess_cpu_seconds_total,process_resident_memory_bytes,process_open_fds,process_start_time_secondsas missing, alongside the histograms; the new description says "This change exports noprocess_*series; host-process CPU, memory, and descriptor metrics are outside its scope." Merging this closes #536 with one of its two headline asks unimplemented and no follow-up issue filed. Either dropCloses #536for a "part of #536" + a new issue, or keep the process module — the author has now removed the reviewer's blocker in a way that silently shrinks the driving issue's scope. (Theflare_naming-exception clause indocs/api.md:288-290was correctly dropped with it, so the docs no longer contradict themselves.) - The zero-token documentation gap is closed.
docs/api.mdnow says "A completion that committed no generated token still incrementsflare_requests_completed_totaland enters the token histograms below, but records no time-to-first-token, prefill, or inference observation." - The evidence gate is substantially addressed. The description is rewritten:
Costis a per-operation list ending "Scrape latency, scheduler-step cost, and CPU overhead under load are not measured";Evidencenames the 814-passed/1-failed run and the one known template failure, drops the "CI covers the first two" claim, drops "nothing about serving changes" for "No response body, scheduling decision, or eviction decision changes", and adds the#549rebase note. What is still missing is the documented--features server-only test commands, which no longer fail for the reason they used to but are still unexercised by the one run cited.
3. New content: the diff doubled, and it is mostly vLLM parity
Nine new series families landed with the new commits: request_inference_seconds, time_to_first_token_seconds, inter_token_latency_seconds, request_prefill_computed_tokens, request_generated_tokens, request_max_tokens, request_preemptions, request_choices, request_max_choice_generated_tokens, model_step_tokens, plus counters requests_output_limited_total, cache_lookup_tokens_total, gauge parked_requests, and admission_rejections_total{reason}; docs/api.md gains a full "Correspondence with vLLM metrics" table (+127/−4 lines total).
Mechanism changes worth reviewing (metrics.rs): a per-request RequestRecord with its own 19-bucket inter-token Histogram merged by a new non-atomic Histogram::absorb at completion (:286-295, :576); RequestRecord::tokens_committed is called once per step, at position 0 (runtime.rs:1801-1805), so a speculative round is one interval; max_tokens is captured only at first admission (runtime.rs:1568-1569, max_new_tokens + reasoning_cut.after); preemptions increments only on the preemption park (:2108-2110), not on reasoning-budget parks; model_step_tokens covers Prefill/TerminalPrefill/ScoredPrefill/Resume/Decode/Speculative/Mixed (:1721-1730); three admission-rejection sites (server.rs:816 HTTP ingress, http.rs:240 batch extra permits, runtime.rs:869/:945 capacity and channel).
4. New small findings I verified
admission_rejections_total{reason="http_slots"}has a wider population than documented.admit_httpwraps/v1/messages/count_tokenstoo (server.rs:581-588), so a token-count request refused at full HTTP admission increments a seriesdocs/api.mddefines as "generation requests refused because a queue limit was full".Histogram::absorbis not atomic across buckets andsum(metrics.rs:286-295): a scrape racing a completion can see the added buckets with the old_sum, so_sum/_countcan disagree for one scrape oninter_token_latency_secondsonly. All other histograms observe single values atomically.flare_request_prefill_computed_tokenswording is ambiguous: "subtracts the tokens … supplied at the request's first admission; recomputation after a preemption is not included" reads two ways; only the first-admission reuse is subtracted, so post-preemption recomputation is in the observation (which matches vLLM'srequest_prefill_kv_computed_tokens).pending_requests/parked_requestsare published only when a worker pass made progress (runtime.rs:1156-1157,:1203-1211);docs/api.mdstill does not say the gauges lag the scheduler by up to a step.
5. The cluster moved, and #548 is now the base of a stack
- #552 closed 2026-11-28 02:04, #553 closed 02:05, both "Superseded by #560". So the sibling/stacked pair I flagged last turn is gone.
- #560 open (WynnD, 02:04, +1898/−123, 18 files, closes #551): vLLM
metricsobject on responses from runtime instants, explicitly stacked on this PR, and its diff contains #548's own hunks byte-for-byte (metrics.rs +548/−2,latency.rs +24/−8,scheduler.rs +4). Every finding here therefore propagates into #560, and #560 does disclose the queue anchor it inherits: "queue_time_msstarts at model-queue arrival … includes that channel transit (microseconds)." - The queue-anchor gate is now half closed:
docs/api.mdsays "model-scheduler arrival", #560 says it too, but #548's own description still never states that the histogram starts at runtime arrival rather than HTTP admission as #536 asked.
6. The 07:04 bot review is stale on both blockers
It was posted before these five commits. Its blocker 1 (the --features server build break) is moot now that process.rs is deleted, and its blocker 2 (unreconciled evidence) is answered by the rewritten Cost/Evidence sections; its "the diff can shrink by about a third" has instead grown by ~470 lines of new series. No review has run on 49373bc.
Bottom line
Recommendation narrows to one blocker and one question: (a) Closes #536 now over-claims, because the process metrics #536 asked for were removed and no follow-up issue exists; (b) whether ~470 lines of new histograms/counters on top of an unreviewed hot-path change should land before any CI run and before the four-PR chain (#548 → #560) has a reviewer. Everything else I raised is either fixed (build break, zero-token docs, evidence wording, docs naming exception) or reduced to the four small items in §4.
#34 [high] Research summary
Amendments written to scratchpad entry #32 ("AMENDMENT TEXT (FINAL): head 49373bc"), supported by fact notes #31 and #33.
The new event is five commits taking #548 from a34c4d0 to 49373bc, retitled "Add per-request histograms and vLLM-parity request metrics", now +1016/−51 in 9 files (was +548/−25 in 10). Amendments the report needs:
process_*metrics are deleted, with theruntime_corerevert. My long-standing--features serverLinux build-break blocker is resolved by removal, not by a fix.- New blocker: the description still says
Closes #536, but #536's second headline ask is process metrics, which the description now explicitly declares out of scope — so merging closes the driving issue with half of it unimplemented and no follow-up filed. - Two gates closed: the zero-token completion is now documented, and the evidence/cost section is rewritten (per-operation cost, "not measured" stated, the unsupported CI claim dropped).
- The diff nearly doubled with nine new histogram/counter families and a vLLM correspondence table; I logged four new small findings —
http_slotsalso counted for/v1/messages/count_tokens, non-atomicHistogram::absorbon inter-token latency, ambiguousrequest_prefill_computed_tokenswording, and gauge lag forpending/parked. - Cluster reshuffle: #552 and #553 are closed as superseded by new #560 (open, +1898/−123, 18 files, stacked on #548 and containing its hunks verbatim). The queue-anchor gate is now half closed — #560 discloses the anchor, #548's own description still does not.
- The 07:04 bot review is stale on both of its blockers; no review or CI has run on
49373bc.
Recommendation narrows to one blocker (Closes #536 over-claim) plus the open question of landing ~470 unreviewed lines of hot-path series before any CI run.
#35 [high] Verified-at-head fact sheet for 49373bc (citations + description quotes the report should use)
PR #548 head 49373bc5673c2130ad7f8d645510365d45e85f06, +1016/−51, 9 files, open (not draft), updated 2026-11-28 02:09. Discussion is 5 items: case-file bot post, three flare-autobot reviews (2026-11-26 22:00, 2026-11-27 06:15, 07:04) and one author post (2026-11-27 04:56 "@flare-autobot review the pushed changes"). No human reviewer. No CI check on any head, including 49373bc.
FILE SIZES (pr_files): docs/api.md +127/−4 · helios/src/scheduler.rs +4 · helios/src/scheduler/tests.rs +7 · helios/src/server.rs +2 · helios/src/server/http.rs +15 · helios/src/server/latency.rs +24/−8 · helios/src/server/metrics.rs +548/−2 · helios/src/server/runtime.rs +102/−37 · helios/src/server/runtime/phase_tests.rs +187. helios/src/server/metrics/process.rs deleted (177 lines); helios/src/runtime_core/mod.rs and helios/src/runtime_core/protection.rs reverted (open_descriptors pub(crate) fn → fn at protection.rs:291, re-export removed from runtime_core/mod.rs).
DESCRIPTION QUOTES (verbatim, needed for the Closes #536 blocker)
- Title: "Add per-request histograms and vLLM-parity request metrics".
- "This change exports no
process_*series; host-process CPU, memory, and descriptor metrics are outside its scope." - "Closes #536" (single closing reference; nothing else is closed).
- "No response body, scheduling decision, or eviction decision changes." (replaces the old "nothing about serving changes").
- Cost section ends: "Scrape latency, scheduler-step cost, and CPU overhead under load are not measured."
- Evidence: "cargo check --features server clean; cargo test --features runtime-core,server --lib -- server:: scheduler:: cache::: 814 passed, 1 failed", the failure named as
messages_image_hints_end_after_expansion_for_text_and_segmented_templatesneedingFLARE_TEST_TEMPLATE_DIR; the old "CI covers the first two" claim and the two module-subset runs are gone. - Rebase note: "This PR and #549 both edit helios/src/server/metrics.rs (adjacent rows of the exposition test fixture) and docs/api.md (the vLLM mapping row for kv_cache_usage_perc…). Whichever merges second needs a small rebase".
WHY THE Closes #536 BLOCKER HOLDS — #536 (by Napuh, opened 2026-11-26 09:03, open) "Missing metrics" table has eight rows: seven histogram rows plus "| Process metrics | process_cpu_seconds_total, process_resident_memory_bytes, process_open_fds, process_start_time_seconds | none |". Its Proposal's last line: "Plus the standard process_* collector metrics." No follow-up issue exists (searched process, process metrics procfs, CPU memory descriptors serving process; only #548 itself matches).
CITATIONS AT HEAD
- metrics.rs:242-253
PREEMPTION_COUNTSBuckets<9>,CHOICE_COUNTSBuckets<6>; :226-240TOKEN_SECONDS<19>,TOKEN_COUNTS<21> (renamed fromPROMPT_TOKENS). - metrics.rs:257-322
Histogram<N>withobserve(single atomic bucket + sum) and the non-atomicabsorbat :286-295; absorb's only caller is :576 (self.inter_token_latency.absorb(&record.inter_token)). - metrics.rs:324-330
RequestTimes; :332-363RequestRecord(max_tokens,preemptions, privateinter_token: Histogram<19>) andtokens_committed(:352-362: first call stampsfirst_token_ns, later calls observe one interval). - metrics.rs:365-385
CompletedRequest,AdmissionLimit { HttpSlots, GenerationCapacity, RequestQueue }. - metrics.rs:545-603
request_completed: completed++ at :558 (now the only increment — grep forcompleted.fetch_addfinds only this site); output_limited :559-561; prompt_tokens :562-563; prefill_computedsaturating_sub(reused_prompt_tokens):564-567; generated :568-569; max_tokens only if >0 :570-573; preemptions :574-575; absorb :576; TTFT :577-580; queue :581-583; prefill/inference :584-591; decode + time-per-output-token requirefirst_token_nsandgenerated_tokens > 1:593-602. - metrics.rs:605-618
response_completed(elapsed_ns, choices, generated): one e2e observation thenfor prompt in generated.chunks(choices)→ onerequest_choices+ onerequest_max_choice_generated_tokensper prompt. - metrics.rs:678-686
model_stepandadmission_rejected. - metrics.rs:1548-1656 render: six REQUEST_SECONDS histograms (:1548-1581), two TOKEN_SECONDS (:1582-1595), five TOKEN_COUNTS (:1596-1624), request_choices :1625-1630, request_preemptions :1631-1636, model_step_tokens :1637-1642, then the hand-written
flare_admission_rejections_total{reason=…}block :1643-1656 with HELP "Generation requests rejected because a queue limit was full." - metrics.rs:1696-1720
pending_requestshelp "…for first admission…" and newparked_requestsgauge. - metrics.rs:1884-2000 rewritten unit test (
RequestRecord { max_tokens: 256, preemptions: 1 }, threetokens_committedcalls), plus the zero-token half; :1988-2000 newresponse_histograms_count_choices_and_largest_choice_per_prompt. - runtime.rs:183
arrival_nsfield; :904arrival_ns: super::observation::monotonic_ns()(model-queue arrival); :1484set_arrival; :749-750 shutdown resetspending/parkedto 0; :865-870GenerationCapacityrejection; :941-946RequestQueuerejection; :1199-1211publish_gauges(scheduler stats + pending + parked) called only whenprogress(:1156-1157). - runtime.rs:1566-1570 max_tokens captured at first admission only:
incoming.prompt.max_new_tokens + reasoning_cut.after. - runtime.rs:1721-1732
model_step(prefill + generated.len())for Prefill|TerminalPrefill|ScoredPrefill|Resume|Decode|Speculative|Mixed. - runtime.rs:1801-1805
if position == 0 { record.tokens_committed(completed_at_ns) }. - runtime.rs:1875-1884 (text-stop completion,
output_limit: false) and :2038-2047 (natural finish,output_limit: reason == "length", withreasoncomputed at :2033-2037). - runtime.rs:2096-2113
park_if_preempted:record.preemptions += 1at :2110 — the only increment, so reasoning-budget parks are not counted. - server.rs:581-588 route list shows
/v1/messages/count_tokenslayered withadmit_http; :812-824admission_rejected(HttpSlots)onIngressRejection::Full. - http.rs:230-249 second
HttpSlotssite (batch extra permits → 429); :407let mut generated = vec![0u32; size]; :528-531generated[index] = generated_tokensonGenerationEvent::Finished; :604-612if !count && !encoder.tool_limit_reached { response_completed(...) }beforeyield Delivery::Complete; zero-token choices bypass generation entirely at :315-319 (zerolist). - scheduler.rs:113-119
cache_lookup_tokensfield; :1598-1601looked_up = if spec.prompt_logprobs { 0 } else { spec.prompt.len() }; :1801-1802stats.cache_lookup_tokens += looked_up. Tests scheduler/tests.rs:882-887, :3427-3439. - latency.rs:63-109
FirstResponseSampleswith the in-linerender_histogram(:101-108) renderingtime_to_first_response_seconds; observation at :115-127 viaFirstResponse::output; call site server.rs:671. - docs/api.md:287-290 naming paragraph WITHOUT the old
process_*exception; :296-300 histograms "accumulate since server start"; :302-319 HTTP histograms (e2e per delivered response, count_tokens and tool-limit excluded, choices/max-choice); :320-357 runtime histograms incl. "A completion that committed no generated token still incrementsflare_requests_completed_totaland enters the token histograms below, but records no time-to-first-token, prefill, or inference observation", inter-token semantics incl. preemption wait, prefill-computed wording, max_tokens "Prompt-scoring requests with a zero limit are not observed"; :358-390 counters/gauges incl. output_limited, cache_lookup_tokens, pending/parked, admission_rejections (paused/503 not counted), model_step_tokens; :406pendingJSON row narrowed; :475-516 new "### Correspondence with vLLM metrics" section with the mapping table (Flare exports novllm:names). - Gating that makes the old build break moot: lib.rs:20-29
serverandruntime_coregated independently; Cargo.toml:17default = [], :25serverdoes not enableruntime-core; server.rs:26-29#[cfg(feature = "runtime-core")] mod session; runtime.rs:4018#[cfg(all(test, feature = "runtime-core"))] mod prompt_tests. Documented--features servercommands: docs/model-development.md:99-100, docs/scheduling-runtime-design.md:735-737. - CI:
.github/workflows/native-serving.yml:63,68passruntime-core,serveronly (unchanged conclusion: no job buildsserveralone).
STILL-OPEN SMALL ITEMS (report §4) — evidence:
http_slotscounted for token counting: routes at server.rs:581-588, counter at server.rs:816, docs definition at api.md:379-386 ("counts generation requests refused because a queue limit was full").absorbatomicity: metrics.rs:286-295 vsobserve:272-283; onlyinter_token_latency_secondsis merge-based.request_prefill_computed_tokens: metrics.rs:564-567 subtracts the first-admission reuse only; docs sentence at api.md:341-344 can read as excluding recomputation.- Gauge lag: runtime.rs:1156-1157/1203-1211; docs/help (metrics.rs:1704-1718) do not state the lag.
QUEUE ANCHOR (unchanged status): flare_request_queue_seconds starts at arrival_ns = model-queue arrival (runtime.rs:183, :904) vs #536's "admission to first scheduled step"; docs say "model-scheduler arrival" (api.md:321-323); #548's description never states the divergence; #560 now does disclose it ("queue_time_ms starts at model-queue arrival … includes that channel transit (microseconds)").
#37 [high] AMENDMENT TEXT (FINAL): head 055663a7, first live evidence, first review of the 1016-line diff, #562 opens a three-deep stack
AMENDMENTS TO APPEND (head 49373bc → 055663a7)
1. New head 055663a7 is a compatibility commit for #549, not new content
055663a7 "Place request-histogram docs and test rows apart from the KV-page gauges" (WynnD). Diff shape unchanged: +1016/−51 in 9 files (pr_files re-checked this turn). What it does:
- docs/api.md: moves the "The route returns one JSON object instead when the query contains
format=json…" paragraph above the histogram paragraphs (nowdocs/api.md:296-303), because #549 inserts itsflare_request_kv_pages/flare_reserved_kv_pagesparagraph at exactly that spot (pr/549docs/api.md:298-310). - metrics.rs tests only:
cache_lookup_tokens: 320moved belowinbound_waitingin theSchedulerStatsfixture (metrics.rs:2299-2303), and("parked_requests", 2)moved to the end of the gauge-name list (:2352-2356), because #549 insertsrequest_kv_pages/reserved_kv_pagesrows at the front of both. No series, semantics, or exposition change. It is a deliberate privation to make the "merge cleanly in either order" note true at the hunk level rather than by luck. Consequence for review: the previously reported docs layout at 49373bc is superseded (the JSON-negotiation paragraph now precedes the histogram block), and nothing in my earlier findings changes — the citations todocs/api.md:305-367shift by ~+3 lines.
2. The evidence gate is now substantially met: first reconciled live scrape
Author post 2026-11-28 03:26 (also carrying the same table in #549 and #560), hardware named — one RTX PRO 6000 Blackwell, local-inference-lab/Qwen3.8-Flash-Next-FLARE gb202 package, llama-swap v250, image built from upstream main with this PR + #549 + #560. Results: every new series exported; over 24 completed requests of mixed Chat/Completions (incl. n=2 and two prompts)/Responses the completed-counter delta 24 equals the TTFT and generated-token histogram count deltas; generated-token histogram sum equals flare_generated_tokens_total (3,112); flare_request_e2e_seconds count 22 equals delivered responses; 814 unit tests pass, 1 unrelated template test needs FLARE_TEST_TEMPLATE_DIR.
This answers the reconciliation gap I raised: the counts are tied to series rather than asserted, and the internal arithmetic is consistent with the documented populations (22 e2e observations from 24 completions is exactly the multi-choice collapse docs/api.md:315-317 describes). Two caveats remain: the image carries three PRs, so nothing is attributable to #548 alone (#560 rewrites the runtime/HTTP paths the queue and e2e histograms are stamped in), and "Not measured: this PR's always-on recording cost in isolation" is still the whole cost question. The description's Cost section still says scrape/scheduler-step/CPU cost "not measured", so #548's own evidence is now smoke-plus-reconciliation, not measurement.
3. The doubled diff has finally been reviewed — and the review agrees with this report
flare-autobot posted at 2026-11-28 03:31 (4 minutes after the author's comment) "Changes Requested — Blockers: 0, Should fix: 3, Subtractive: 8, Nits: 6". It is the first review to cover the vLLM-parity half (the previous three were on ebecef1/d64c3ea/a34c4d0, all pre-dating the five commits that doubled the diff). Its remaining items coincide with mine: the Closes #536 overstatement, the unversioned vLLM parity table, "one latent HTTP-gate population bug" (my admission_rejections_total{reason="http_slots"} counts /v1/messages/count_tokens, server.rs:581-588, :816 vs docs/api.md:377-382), one histogram-convention gap, and ~245 of the 1,016 added lines deletable. I cannot determine from what I can see whether it reviewed 49373bc or 055663a7; in either case the newest commit is not itself reviewed and no CI check has still ever run on any head.
4. The stack is now three deep: #562 opened
#562 "Report the first content token of per-request metrics in streams" (WynnD, draft, opened 2026-11-28 04:12, head 4aa7b3a, +1920/−129, 22 files, 0 discussion): carries time_to_first_content_token_ms (which #560 reports as permanent null) from worker to stream via one GenerationEvent::Committed { at_ns } per generating step. It declares "Depends on #560 (which depends on #548); merge order #548, #560, this PR", and its diff again contains #548's hunks verbatim (metrics.rs +548/−2, latency.rs +24/−8, scheduler.rs +4, scheduler/tests.rs +7). So the queue behind #548 is now #548 → #560 → #562, plus open #549 whose docs hunks #548 now fits itself around. Three PRs by one author, none reviewed by a human, each re-carrying the first one's ~550-line diff, all gated on #548 landing first.
5. Correction to my own previous amendment about #560's flag
Last period I recorded that #560 documents "no [server] per_request_metrics configuration key; the WinUI desktop controller cannot enable it; a persistent Orbit group cannot turn it back off". That is stale at both current heads: docs/api.md:1007 (pr/560) now says "flare run --enable-per-request-metrics, or [server] per_request_metrics = true in the host configuration", helios/src/server/config.rs:353-357 parses the key, and #562 adds flare/src/settings.rs:32 (per_request_metrics: bool), flare/src/configuration.rs:34 and flare/src/controller.rs:2566 (config["per_request_metrics"] = …), i.e. the desktop controller path. So the configuration gap is closed in the stack, not open. What #560/#562 still do not measure is the CPU cost of the opt-in per-step events; #560 claims flag-on was within run-to-run noise (15.4–15.9 s vs 16.0–16.3 s cgroup CPU per 16×512-token run).
6. Two smaller updates
- #549's docs half is now written, not promised. At #549 head
bca7358,docs/api.md:298-310definesflare_request_kv_pages,flare_reserved_kv_pages, "the worker publishes both when a scheduler pass makes progress" (the gauge-lag disclosure #548 never makes) and states(request_kv_pages + reserved_kv_pages) / total_kv_pagesis the vLLM-comparable share (#549 head+202/−34, updated 03:28, still open, bot review 03:28: 0 blockers, 2 should-fix). #548's own row still reads "kv_cache_usage_perc| Not provided as one ratio… bound it" (docs/api.md:490) and its description now says "#549 supplies that ratio" — so if #549 lands first that row is stale and needs rewriting, while055663a7only avoids a textual conflict. - Main moved by merges only, not in this PR's files. Since last period main gained
#559,#558,#557,#556,#555,#544,#482(Martin Vit, 2026-11-27/28) and the two Luke Alonso governance commits; of these only #555 touchesmetrics.rs(+9/−7) andscheduler.rs, so the merge-conflict surface I reported is unchanged and the PR's rebase note is still accurate about which files contend.
Bottom line after this event
#548 is now the bottom of a three-PR stack, has one reconciled live scrape from a three-PR image, one non-CI-verified test run, and its first review of the full 1,016-line diff at 0 blockers / 3 should-fix. Its two open merge gates are unchanged and both are description-or-docs work: Closes #536 over-claims after the process_* scope deletion, and the vLLM parity table is unversioned. New to watch: whether #548 lands at all before #560 and #562 grow past 3,000 lines each with no human reviewer and no CI run.
#38 [high] Research summary
The new event was one commit on #548 (055663a7), an author live-validation post, the first bot review covering the full 1,016-line diff, and a new stacked PR #562. Amendments are written as scratchpad entry #37 (deliverable prose, formatted to append to the 2026-11-27 report).
Headline amendments: (1) 055663a7 is not new content — it shifts the docs JSON-negotiation paragraph and two test-fixture rows so #549's hunks fit around them; shape still +1016/−51 in 9 files, no series or semantic change. (2) The evidence gate is now substantially met: a named-hardware live scrape reconciles completed-counter delta 24 against TTFT/generated-token histogram counts, generated-token histogram sum 3,112 against flare_generated_tokens_total, and e2e count 22 against delivered responses — though the image carried three PRs, so nothing is attributable to #548 alone, and recording cost remains unmeasured. (3) The doubled diff has finally been reviewed by flare-autobot (2026-11-28 03:31): 0 blockers, 3 should-fix — its remaining items coincide with mine (Closes #536 overstatement, unversioned vLLM table, the http_slots gate population bug). (4) #562 (draft, +1920/−129) makes the merge queue #548 → #560 → #562, each re-carrying #548's hunks verbatim, with no human review and no CI check on any head. (5) I corrected my own last amendment: #560/#562 do now expose [server] per_request_metrics = true and the controller path, so the configuration gap I reported is closed. (6) #549's docs half is written and now defines the vLLM-comparable KV ratio plus the gauge-publication lag, making #548's kv_cache_usage_perc row stale if #549 lands first.
Unchanged: Closes #536 still over-claims after the process_* deletion, and no CI has ever run on any head.
#39 [high] Verified-at-head citations for 055663a7 and the new cluster items (checked this turn)
PR #548 head 055663a76f3cc9c7158fe514bb9a677f79fe279c, +1016/−51, 9 files (pr_files this turn: docs/api.md +127/−4, scheduler.rs +4, scheduler/tests.rs +7, server.rs +2, http.rs +15, latency.rs +24/−8, metrics.rs +548/−2, runtime.rs +102/−37, runtime/phase_tests.rs +187). Branch metrics/request-latency-histograms, open, updated 2026-11-28 03:26. Discussion 7 items: case-file post, 3 bot reviews (2026-11-26 22:00, 11-27 06:15, 11-27 07:04), author 2026-11-27 04:56, author live-validation 2026-11-28 03:26, bot review 2026-11-28 03:31. No human reviewer; no CI check on any head.
WHAT 055663a7 CHANGED (only commit since 49373bc)
- docs/api.md: the "The route returns one JSON object instead when the query contains
format=json…" paragraph now sits at :296-303, immediately BEFORE "Histograms appear in the Prometheus format only…" at :305. Reason: #549 inserts its KV-page paragraph at that exact place (pr/549 docs/api.md:298-310). - metrics.rs test fixture:
cache_lookup_tokens: 320now afterinbound_waiting: 1(:2299-2303);("parked_requests", 2)moved to the end of the gauge-name array (:2352-2356). Both are positions where #549 addsrequest_kv_pages/reserved_kv_pagesrows (pr/549 metrics.rs:1790-1791, :1835-1836). - No series, help text, bucket, or exposition change; diff size unchanged.
CITATIONS RE-VERIFIED AT 055663a7 (still valid from earlier fact sheets, head moved only in docs order and two test rows)
- metrics.rs:558 the only
completed.fetch_addsite (grep of helios/src: metrics.rs:558, unrelated core/reader.rs:517); :559-561 output_limited; :562-567 prompt/prefill-computed; :568-573 generated + max_tokens>0; :574-576 preemptions + absorb; :577-591 TTFT/queue/prefill/inference; :593-602 decode and time-per-output-token require first_token_ns && generated>1. - metrics.rs:286-295 non-atomic
absorb; :272-283 atomicobserve; :297-321 render; single caller :576. - metrics.rs:226-240 TOKEN_SECONDS<19>, TOKEN_COUNTS<21>; :244-253 PREEMPTION_COUNTS<9> (0-bound first), CHOICE_COUNTS<6>; :257-260 Histogram; :332-346 RequestRecord; :348-362 tokens_committed; :605-618 response_completed (e2e once, then per-prompt chunks(choices)).
- metrics.rs:1548-1581 six REQUEST_SECONDS renders; :1582-1595 two TOKEN_SECONDS; :1596-1624 five TOKEN_COUNTS; :1625-1642 choices/preemptions/model_step_tokens; :1643-1656 hand-written admission_rejections block, HELP "Generation requests rejected because a queue limit was full."; :1709-1717 pending_requests and parked_requests gauges.
- runtime.rs:183 arrival_ns field, :904 stamped at model-queue arrival, :748-750 shutdown resets pending/parked, :865-870 GenerationCapacity, :941-946 RequestQueue, :1156-1157 + :1199-1211 publish_gauges only on progress, :1566-1570 max_tokens at first admission, :1721-1732 model_step kinds, :1801-1805 tokens_committed at position 0, :1875-1884 text-stop, :2038-2047 natural finish output_limit, :2096-2113 preemptions++ at :2110.
- server.rs:581-588 route list shows
/v1/messages/count_tokensbehind admit_http; :799-830 admit_http, :816 admission_rejected(HttpSlots), :824 HTTP 429; :634-671 /metrics handler, :671 first_response.render_histogram. - http.rs:606-612
if !count && !encoder.tool_limit_reached { response_completed(admitted_at.elapsed(), choices, &generated) }; :613 yield Delivery::Complete; :476-481 tool-limit drain; :532 Cancelled termination; :569-573 cancel. - docs/api.md:287-294 naming paragraph; :296-303 JSON negotiation; :305-309 histograms cumulative + host histograms; :311-326 HTTP histograms incl. "star[t] excludes count_tokens and tool-limit"; :328-346 runtime histograms incl. vision-step queue, zero-token sentence, inter-token preemption wait; :348-364 token histograms, zero-limit prompt scoring, cancelled/failed exclusion; :366-386 counters/gauges/rejections/model_step_tokens; :475-515 "Correspondence with vLLM metrics" table (kv_cache_usage_perc row at :490 "Not provided as one ratio").
- latency.rs:63-109 FirstResponseSamples + render_histogram (:101-108), :115-127 observation.
NEW CLUSTER ITEMS (verified this turn)
- #562 "Report the first content token of per-request metrics in streams" — WynnD, draft, opened 2026-11-28 04:12, head
4aa7b3a, +1920/−129, 22 files, 0 discussion. Declares "Depends on #560 (which depends on #548); merge order #548, #560, this PR". Carries #548 hunks verbatim (metrics.rs +548/−2, latency.rs +24/−8, scheduler.rs +4, scheduler/tests.rs +7). AddsGenerationEvent::Committed { at_ns }per generating step,output_event_capacity+1 per token, larger budget in helios/model-contract.md, content-TTFT latching in the encoder. - #560 head
ce44060, +1898/−18 files 22? (18 files), updated 03:26; bot review 2026-11-28 03:21 = 2 blockers (named requirement + cost section claiming no per-step clock read), 4 should-fix, 7 subtractive, 5 nits. Author live post 03:26: 40/40 request-matrix checks, tokens_per_second and mean_itl_ms match vLLM definitions, reasoning stream content TTFT 213.7 ms after TTFT 2.3 ms, cgroup CPU 15.4–15.9 s with flag vs 16.0–16.3 s without (16×512-token streams), 820 tests pass. - #560/#562 configuration: docs/api.md:1007 (pr/560) "
flare run --enable-per-request-metrics, or[server] per_request_metrics = truein the host configuration"; helios/src/server/config.rs:353-357 parses the key (rejects non-boolean); #562 adds flare/src/settings.rs:32 (per_request_metrics: bool), :224 default false, flare/src/configuration.rs:34, flare/src/controller.rs:2566config["per_request_metrics"] = self.settings.per_request_metrics.into(). Neither key exists on main (grep per_request_metricsat main: no matches in helios/src/server/config.rs, flare/src/settings.rs, docs/api.md) — so the feature is entirely stack-local. - #549 head
bca7358, +202/−34, updated 03:28; docs/api.md:298-310 defines request/reserved KV gauges, "The worker publishes both when a scheduler pass makes progress", and(request_kv_pages + reserved_kv_pages) / total_kv_pagesas the vLLM-comparable share. Bot review 2026-11-28 03:28: 0 blockers, 2 should-fix, 4 subtractive, 7 nits. Test rows in pr/549 metrics.rs:1790-1791, :1835-1836. - #541 (open, jere357, +785/−0, examples/monitoring) is unchanged and still unmerged; its bot reviews independently call for linking docs/api.md §Health and metrics and note that
flare_requests_cancelled_total/flare_snapshot_backing_pagesare undocumented there — a consumer-side confirmation of the docs gaps this PR is trying to close. - Merge-conflict surface unchanged: metrics.rs touched by open #549, #560, #554, #334 and merged #555; runtime.rs by #549, #560, #483, #554, #540, #497, #404, #505, #334; http.rs by #560, #562, #554, #387; scheduler.rs by #560, #562, #549, #540, #520 and merged #555.
MAIN MOVED (search_history at main, newest first): 353551e9 (Luke Alonso, 11-27, refuse Design-Signed-Off-By on principle violations), 3e2fcd27 #559, 5adb27f2, 4d957175, 7ea532b0 #558, 74618652 #557, 883abc17 #556, c9693765 #555 (metrics.rs +9/−7, scheduler.rs +24/−21), 966df82e #482, f3a5b709 #544, d7031b37 (three-layer testing hierarchy, 11-27). None of the new merges touches docs/api.md's metrics section.
#41 [high] AMENDMENT (2026-11-28b): head 6624592 — both last-period discrepancies fixed; packing now charged to queue; new review still on old head
PR #548 head 66245920cd3b4cf84567e67d19821df70fedd29d (6624592), "Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing" (Wynn Drahorad, author date 2026-11-27), +1008/−51 in 9 files (pr_files this turn: docs/api.md +127/−4, metrics.rs +548/−2, runtime.rs +94/−37, runtime/phase_tests.rs +187, latency.rs +24/−8, http.rs +15, scheduler/tests.rs +7, scheduler.rs +4, server.rs +2). Discussion now 8 items; PR updated 2026-11-28 05:09.
BOTH DEFECTS I REPORTED LAST PERIOD ARE FIXED AT THE HEAD
- Model-step gate is now
if kind.samples()at runtime.rs:1721-1723, reusingGraphKind::samples()(helios/src/execution/manifest.rs:90-101). Variant set identical to the old inlinematches!list — Prefill, TerminalPrefill, ScoredPrefill, Decode, Speculative, Mixed, Resume; Vision excluded — so semantic no-op and ~11 lines of duplicate allowlist deleted. Matches docs/api.md:383-386 ("every completed prefill, resume, decode, speculative, or mixed graph … initialization, restore, vision, and snapshot graphs are not observed"). first_scheduled_nsis now stamped AFTER packing: runtime.rs:2259-2275, i.e. afterself.scheduler.commit(step, fence)(:2213) and afterpack_vision/crate::model::pack_inputs(:2214-2258). In-code comment :2259-2261. My earlier claim (commit title described unlanded work; packing charged to prefill) is withdrawn.
WHAT THE MOVE CHANGES IN THE DATA
- metrics.rs:581-583 queue =
first_scheduled_ns − arrival_ns; :584-591 prefill = first_token − scheduled, inference = last_token − scheduled. So host-side page reservation (commit) plus input packing are now insideflare_request_queue_secondsand outside prefill/inference. TTFT (:577-580) unchanged (arrival → first token). - docs/api.md:328-331 still says the queue histogram "spans model-scheduler arrival to the first model step that includes the request, which can be a vision step" and says nothing about packing, so code and documented definition are now apart in the opposite direction from last period; needs one clause either way.
- Unpinned by tests: only count-level assertions (runtime/phase_tests.rs:578 "\nflare_request_queue_seconds_count 1\n") and a hand-set fixture (metrics.rs:1896
record.times.first_scheduled_ns = Some(1_250_000_000)), so both placements pass. No test asserts the pack-order contract. - Side effect: a failed pack leaves the request with no scheduled instant (comment runtime.rs:2259-2261), so such a request records TTFT but no queue/prefill/inference observation.
- Cost unchanged and still unmeasured: one
monotonic_ns()(:2262) plus a lane walk on every submitted step, althoughget_or_insertcan only take effect on the request's first step, so every later step repeats work whose result is discarded.
NEW REVIEW — STILL ON THE PREVIOUS HEAD
- flare-autobot 2026-11-28 05:09, "Changes Requested — Blockers: 0, Should fix: 3, Subtractive: 7, Nits: 8". It still quotes "1,016 added lines" and never mentions
samples()or the stamp, so it reviewed 055663a7, not 6624592. Same three should-fix headings as the 03:31 review (Closes #536, unversioned vLLM parity table, "one latent HTTP-gate bug"), with the last now described as "drops sibling choices' observations". - I cannot read the linked full review (external URL, no fetch tool) and could not reproduce a sibling-choice observation loss at this head:
n>1is Completions-only and Completions rejectstools/tool_choice(protocol/decode.rs:753-755, :813-815), so a tool-limit cancellation cannot suppress a sibling choice; the group admission gate (http.rs:230-249) rejects before anything is admitted to the runtime;response_completed(metrics.rs:608-618, single caller http.rs:606-612) receives one count per choice viagenerated[index] = generated_tokens(http.rs:530). Honest position: unlocated; must be checked against the full review before merge.
CLUSTER — NEW BLOCKER ONE LAYER UP
- #560 is now head
046aaef, +1757/−77 in 22 files, updated 05:42; new review 05:42 = 1 blocker / 6 should-fix: the documented[server] per_request_metricskey is outside Ignition's config schema and "breaks every Ignition command". Verified independently: ignition/cli/config.py:19 DEFAULT_PATH~/.config/flare/config.toml; :21-33 strict_SECTIONS["server"]schema without the key; :112-114unknown key … in [server];per_request_metricsappears nowhere under ignition/ at pr/560. #560 docs/api.md:1007 tells users to put it in[server], and flare/src/settings.rs reads the same default path. #548 adds no config key, so the break enters with #560, but #548 is the bottom of the stack and merges first. - #549 unchanged at bca7358 (review 04:28: 0 blockers / 2 should-fix); #562 unchanged at 4aa7b3a (draft, 0 discussion); #536 unchanged; #541 unchanged.
#42 [high] AMENDMENT TEXT (FINAL): append to the 2026-11-28 report for head 6624592
See the final assistant message of this turn for the exact wording; kept here in case the message is lost. Content: (1) head 6624592, +1008/−51, both last-period discrepancies fixed (runtime.rs:1721-1723 kind.samples(); runtime.rs:2259-2275 stamp after packing) and my two prior findings withdrawn; (2) the stamp move charges commit+pack to flare_request_queue_seconds, so docs/api.md:328-331 needs a clause and the placement is unpinned by tests (only phase_tests.rs:578 count assertion and metrics.rs:1896 fixture); failed pack now records no scheduled instant; the stamp loop repeats discarded work on every step; (3) flare-autobot 05:09 review 0 blockers / 3 should-fix / 7 subtractive / 8 nits still counts 1,016 lines, so it covers 055663a7 and not the new head; its new "drops sibling choices' observations" item is unlocated and could not be reproduced (Completions-only n>1, tools rejected); (4) #560 at 046aaef now has a 1-blocker review: the documented [server] per_request_metrics key breaks every ignition command (ignition/cli/config.py:19, :21-33, :112-114), a blocker one layer above #548; (5) everything else from the 2026-11-27 report and the earlier amendments stands, re-verified at 6624592.
#43 [high] AMENDMENT TEXT (FINAL): amendments to append after head 6624592
AMENDMENTS TO APPEND TO THE REPORT OF 2026-11-28 (head 055663a7 → 6624592)
Amended: the newest head is 6624592, and both discrepancies I reported last period are fixed
Head is now 66245920cd3b4cf84567e67d19821df70fedd29d ("Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing", Wynn Drahorad), +1008/−51 in 9 files (runtime.rs +94/−37; every other file size unchanged). Both findings from my previous amendment are withdrawn:
- The model-step gate is
if kind.samples()(runtime.rs:1721-1723) overGraphKind::samples()(helios/src/execution/manifest.rs:90-101), so the hand-written seven-variant allowlist is gone and the metric site now matchesdocs/api.md:383-386. Semantic no-op (identical variant set,Visionexcluded), ~11 lines removed. first_scheduled_nsis stamped only afterscheduler.commitand afterpack_vision/pack_inputs(runtime.rs:2259-2275), with a comment saying so. The commit title now describes the code.
New finding from the stamp move (this is the one thing that changed for operators)
Because the stamp moved, the host-side work is now charged to a different series. flare_request_queue_seconds = stamp − arrival (metrics.rs:581-583) and prefill/inference both start at the stamp (:584-591), so page reservation plus input packing now land in queue, not prefill. docs/api.md:328-331 still defines the queue histogram as "model-scheduler arrival to the first model step that includes the request, which can be a vision step" with no mention of packing, so the documented definition and the code now disagree in the opposite direction from last period; one clause fixes it either way. Nothing pins the placement: the only queue assertion is a count (runtime/phase_tests.rs:578) and the metrics unit test hand-sets the instant (metrics.rs:1896), so either ordering passes. Two consequences worth one line each in the docs: a pack that fails now records no queue/prefill/inference observation at all (runtime.rs:2259-2261), and the stamp loop still reads the clock and walks the lanes on every submitted step (runtime.rs:2262-2275) although only a request's first step can take effect — so the per-step cost is unchanged, still unmeasured, and now provably a no-op for all but the first step.
Amended: the 05:09 review is of the previous head, and one new item is unlocated
flare-autobot posted at 2026-11-28 05:09: Blockers 0, Should fix 3, Subtractive 7, Nits 8. It still counts "1,016 added lines" and never mentions samples() or the stamp, so it reviewed 055663a7; the new head is again unreviewed, and no CI check has still ever run on any head. Its three should-fix items are the same three as 03:31 (Closes #536 over-claim, unversioned vLLM parity table, HTTP-gate population bug), with the last now phrased as "drops sibling choices' observations". I cannot reproduce that at the head and cannot read the external full review: n > 1 is Completions-only and Completions rejects tools/tool_choice (protocol/decode.rs:753-755, :813-815), so no admitted response can mix several choices with a tool-limit cancellation; the group gate rejects before admitting (http.rs:230-249), and response_completed gets one count per choice (http.rs:530, metrics.rs:608-618). The review item should be checked against the full review before merge rather than assumed fixed or wrong. Structurally, the exposure is that tool_limit_reached is one flag for the whole encoder (protocol/encode.rs:89) while choices are separate model requests, so any future path that allows tools with n > 1 would drop every choice's e2e and TTFR observation, exactly as the reviewer says.
Cluster: a blocker has appeared one layer up
#560 is now head 046aaef (+1757/−77, 22 files) and its 05:42 review raised 1 blocker: the documented [server] per_request_metrics key is outside Ignition's config schema and "breaks every Ignition command". That is verifiable in the tree: ignition/cli/config.py:19 loads ~/.config/flare/config.toml by default, :21-33 fixes a strict [server] key set, :112-114 raises unknown key … in [server], and the key appears nowhere under ignition/ at pr/560 — while docs/api.md:1007 (pr/560) tells users to write exactly that key, and flare/src/settings.rs reads the same default path. #548 adds no configuration key, so the break arrives with #560, but #548 sits at the bottom of the stack (#548 → #560 → #562) and would merge first. #549 is unchanged at bca7358 (04:28 review: 0 blockers, 2 should-fix), #562 unchanged at 4aa7b3a (draft, no discussion), #536 and #541 unchanged.
Everything else stands
Closes #536 still over-claims after the process_* deletion; admission_rejections_total{reason="http_slots"} still counts /v1/messages/count_tokens as well as refused generation requests; Histogram::absorb is still non-atomic with a single caller; the 17-histogram per-scrape exposition and the per-step clock read remain unmeasured; no human review, approval or maintainer acknowledgement exists on #548, #549, #560 or #562.
#44 [high] Research summary
Amendments written to scratchpad entries #41 (facts, verified at head) and #43 (deliverable prose); the amendment text was also output directly.
The new event is one commit, 6624592 "Reuse GraphKind::samples for model-step metrics and stamp scheduled time after packing", taking #548 to +1008/−51 in the same 9 files, plus a second flare-autobot review (05:09) and movement in the stack.
Key amendments:
- Both discrepancies I reported last period are fixed at this head, so both are withdrawn: the model-step gate is now
kind.samples()(runtime.rs:1721-1723,manifest.rs:90-101) and the scheduled-time stamp now sits after packing (runtime.rs:2259-2275). - New operator-visible consequence: the stamp move charges page reservation plus input packing to
flare_request_queue_secondsinstead of prefill, whiledocs/api.md:328-331still defines that histogram without packing — a docs/code gap in the opposite direction from last period. The placement is unpinned by tests (count-only assertion atphase_tests.rs:578, hand-set fixture atmetrics.rs:1896), a failed pack now records no queue/prefill/inference observation, and the stamp loop still reads the clock and walks lanes on every step although only the first step can take effect. - The 05:09 review still counts 1,016 added lines and never mentions
samples(), so it covers055663a7, not the head; no CI has ever run on any head. Its new "drops sibling choices' observations" item could not be reproduced (n>1 is Completions-only and Completions rejects tools), but the singletool_limit_reachedflag over per-choice requests is a real latent exposure and the item needs checking against the external full review. - A blocker appeared one layer up: #560 (now
046aaef) has a 1-blocker review because its documented[server] per_request_metricskey is absent from Ignition's strict schema (ignition/cli/config.py:19, :21-33, :112-114), which breaks every Ignition command; #548 adds no key but merges first in the #548 → #560 → #562 stack. - All earlier findings stand and were re-verified at the head.
#46 [high] Citation sheet for the report at head 6624592 (this turn's verified file:line)
All verified this turn at pr/548 head 6624592 unless a ref is given.
THE TWO FIXED SITES
- runtime.rs:1721-1723
if kind.samples() { self.metrics.model_step(prefill + generated.len() as u64); }; helios/src/execution/manifest.rs:90-101pub fn samples()with the seven variants; runtime.rs:2948 the only other server use. - runtime.rs:2259-2275 stamp block: comment :2259-2261 ("Stamp after packing so the instant marks a step whose inputs were accepted … A failed pack leaves first_scheduled_ns unset"), clock read :2262, lane walk :2263-2275; preceded by
scheduler.commit:2213,pack_vision:2218-2249,pack_inputs:2251-2257.
WHAT THE MOVE CHANGED IN THE NUMBERS
- metrics.rs:577-580 TTFT = first_token − arrival (unchanged); :581-583 queue = scheduled − arrival; :584-591 prefill = first − scheduled, inference = last − scheduled; :593-602 decode/time-per-output-token need first_token && generated>1.
- docs/api.md:328-331 queue definition still stops at "the first model step that includes the request, which can be a vision step" — no packing clause. Metrics HELP strings unchanged (queue at metrics.rs:1555-1556).
- Test coverage of the contract: runtime/phase_tests.rs:577-583 asserts only
flare_request_queue_seconds_count 1(plus prefill and prompt-token sums); metrics.rs:1896 setsrecord.times.first_scheduled_ns = Some(1_250_000_000)by hand. Nothing asserts pack ordering. - Cost shape: one
monotonic_ns()per submitted step plus a lane loop whoseget_or_insertcan only fire on the request's first step.
REVIEWS AND STATE
- Discussion now 8 items; newest flare-autobot review 2026-11-28 05:09 = Changes Requested, Blockers 0 / Should fix 3 / Subtractive 7 / Nits 8, text says "1,016 added lines" and never mentions
samples()or the stamp. PR updated 2026-11-28 05:09. Previous reviews: 11-26 22:00, 11-27 06:15, 11-27 07:04, 11-28 03:31 (all pre-dating commits 49373bc/055663a7/6624592 as applicable). No CI check on any head; no human review, approval or maintainer acknowledgement on #548/#549/#560/#562. - Current head
66245920cd3b4cf84567e67d19821df70fedd29d, +1008/−51, 9 files: docs/api.md +127/−4, scheduler.rs +4, scheduler/tests.rs +7, server.rs +2, http.rs +15, latency.rs +24/−8, metrics.rs +548/−2, runtime.rs +94/−37, runtime/phase_tests.rs +187.
THE SIBLING-CHOICE ITEM (unverified)
- protocol/decode.rs:753-755
nmust be 1 unless Completions; :813-815 Completions rejectstools/tool_choice; http.rs:230-249 the extra-permit gate rejects before any choice is admitted; http.rs:530generated[index] = generated_tokens; metrics.rs:608-618response_completedchunks by choices; single caller http.rs:604-612 guarded by!count && !encoder.tool_limit_reached. - Latent exposure:
tool_limit_reachedis one flag per encoder (protocol/encode.rs:89, set at :505-506, consumed at :458 and :598-604) while each choice is a separate model request, so tools + n>1 would drop every choice's e2e/TTFR observation.
THE NEW BLOCKER ONE LAYER UP (#560)
- #560 head
046aaef, +1757/−77, 22 files, updated 2026-11-28 05:42; review 05:42 = 1 blocker ("documented[server] per_request_metricskey … outside Ignition's config schema, which breaks every Ignition command"), 6 should-fix. - ignition/cli/config.py:19
DEFAULT_PATH = ~/.config/flare/config.toml; :21-33 strict_SECTIONS["server"]set; :112-114raise UsageError(f"{path}: unknown key {key} in [{section}]");grep per_request_metricsunder ignition/ at pr/560 returns no matches; consumers load it implicitly (bench.py:144, serve.py:127/174/264/431/590, publishing.py:31/73/174/194). - pr/560 docs/api.md:1007 instructs exactly
[server] per_request_metrics = true; flare/src/settings.rs reads the same default path. #548 adds no config key, so the break enters with #560 while #548 merges first (#548 → #560 → #562).
#11 [medium] Recent activity: nothing recent on main conflicts; metrics.rs has 3 open PRs
- Last commits on the default branch in the touched areas: helios/src — ba35da3f (#538 cold pure-prefill), c915b5f0 (#532 16-SM alignment), c36a6a02 (#527 Latent576 page-split codec), 225758fe (#525 kv-codec parallel), e685a975 (#529 GB300 PCI id), 3d8640c6 (#523 kv-codec verify), e30d55db (#522 GPU confidence calibration), 716df00f (#504 KV compression). docs — 698ee450 (#545 RecipeParameters), f377dc85 (#543 remove joint kernel tuning), ba35da3f (#538), 33ab6df5 (#508 row-sharded attention), 28bd5047 (#531 publisher keys). None of these touch metrics, latency or
/metrics; the orientation packet also says no default-branch commit since the branch point (f377dc8) touches any file this PR changes. So the change builds on nothing recent and conflicts with nothing recent on main. - The most recent metrics-area commit is f646bebc (2026-11-24, Luke Alonso, #507) — persistent worker counter schema, Prometheus metrics, /v1/worker telemetry, launch dashboard view, parallax CLI. That is the function next to which the new histograms are inserted; it is also the commit that created the live-scrape cherry-pick conflict the author describes. #507 is merged, so #548 layers on top of it cleanly on main.
- Sibling in-flight work in the same file: #549 (WynnD, same day), #542 (FujitsuPolycom, "single-phase TP dispatch, x86_64 wake wait, intermediate batch capacities, and PreparedAllToAll") also lists
helios/src/server/metrics.rsas touched; #334 (javieratomic, Engram rows ahead of prefill) also touches it. So metrics.rs has two other open PRs plus #548 in flight — a three-way textual-overlap risk that the PR description addresses only for #549. - Prior art in the same file that the change does not unify with: the host-cache histograms (
flare_host_cache_missing_tokens,estimated_transfer_ns,estimated_prefill_ns,retirement_seconds) use[AtomicU64; 8]+flare_selene::RETIREMENT_LATENCY_MSand emit bucket bounds divided by 1000 at render time (metrics.rs:851-876). A reviewer may ask whether the new genericBuckets/Histogramshould replace them; the PR deliberately leaves them alone (no diff in that region).
#14 [medium] Why (continued): #537 sibling gap, demand age, and the only pre-existing signals
- Issue #537 (Napuh, 2026-11-26 09:07, open, 0 comments, env v0.3.2
c0c4f79) is the sibling gap: vLLM'svllm:kv_cache_usage_perccannot be computed from Flare's gauges because pages pinned by active requests still count asflare_cached_kv_pages. It reports three attempted bounds on the same two-GPU load:1 - free/totalvery high % even idle;1 - (free+cached+snapshot_backing)/total~0 % (lower bound);1 - (free+snapshot_backing)/total~16 % (upper bound); vLLM ~9 %. It proposesflare_request_kv_pagesor splitting cached into pinned/idle. Closed by #549, not by #548. - Relevance to #548: the PR description cross-references it ("This PR and #537 add different regions of
helios/src/server/metrics.rs"), and #549's description repeats the same claim in reverse ("page gauges besidecached_pageshere, request histograms beside the completion counter there. They merge in either order"). Verified plausible from the two diffs: #549 changesMetricsnear cached/free page fields plusSchedulerStats/cache.rs/scheduler.rs, #548 changes it besidecompletedplus runtime.rs/http.rs/latency.rs; both edit docs/api.md in different paragraphs. Same author, same day, so they are effectively a two-PR series closing #536+#537 together. - Demand age and width: both issues and both PRs appeared within about twelve hours of each other on 2026-11-26, from two accounts with no prior merged work in the 180-day window. Nothing in the repo's older history records a prior request for request histograms (searches for
histogram,p95/p99,vLLM parity,time to first tokenreturn only #536/#548/#549/#541 and unrelated issues). The one adjacent older signal is issue #78 (open, DS4.1 Flash disk Engram), which asks in passing whether "per-gather latency/miss-count histograms and explicit metric scope/rank labels" would be useful — a different subsystem. docs/TODO.txt:110-124 separately carries a standing TODO to "Measure cross-host rank handoff ... request p99 ..." and "Qualify retained graph costs ... request latency measurements; measure GPU replay, queueing, and host planning separately", which is the closest thing to a pre-existing project want in this area.
#15 [medium] Process: draft with no CI on head; description meets the repo's four-part rule
- State at review time: draft, base
main, headebecef1, branched fromf377dc8, 8 files +545/−20, labels none, reviews none, inline comments none, no CI checks on the head commit, opened and last updated 2026-11-26 (same day, so under a day old when examined).pr_commentsreturns "No comments". - Because no workflow has run, the
native-servingmatrix (ubuntu-24.04 + windows-2022,cargo test --release --features runtime-core,serverfor helios, plusflare-cli,flare,eos,selene,selene-manager) has produced no result for this head. The author's "CI covers the first two" refers to what that matrix would do, not to a run. - The description follows the repo's mandatory four-part shape from AGENTS.md:72-112 (why / what changed / claimed result / evidence), states "Not run here: the Windows build; the full helios suite; and
messages_image_hints_end_after_expansion_for_text_and_segmented_templates", and carries the requiredDiscord: oystersmilesline (AGENTS.md:142-153). Both issues (#536, #537) also carry Discord lines. - Merge logistics: no rebase or stacking dependency is declared against main. The
5ffe4d54cherry-pick story in the evidence section concerns reproducing the live scrape on a fork base, not the merge target; on main the surrounding persistent-worker code from #507 (f646bebc) is present and untouched by the diff. - Reviewer queue notes: the same file is claimed by #542 (FujitsuPolycom) and #334 (javieratomic), so whichever lands first sets the context for the others; #548's description only reasons about #549's overlap.
#20 [medium] AMENDMENT (2026-11-27): review scorecard at head d64c3ea
State at the time of this amendment (2026-11-27):
- #548 head
d64c3ea(+550/-20, 10 files), still draft, still zero reviews and zero substantive comments. The only comments are the autobot intake note (2026-11-26 20:56), the autobot review (2026-11-26 22:00, "Changes Requested") and WynnD's re-review request (2026-11-27 04:56, "@flare-autobot review the pushed changes. The per-request metrics PR is new; the other two carry review fixes."). - No CI checks on
d64c3eain the local record (same asebecef1); the description's evidence section was not updated, and no new test counts are reported. - CI coverage of the touched area, verified:
native-servingbuilds/tests helios on ubuntu-24.04 and windows-2022 with--features runtime-core,serverandFLARE_TEST_TEMPLATE_DIRfromtests/frontend/prepare_templates.py(.github/workflows/native-serving.yml:43-68);helios-lifecycleruns a TLA+ conformance check andcargo kani --libwithout features. Neither would catch a--features server-only Linux build break (see note on the runtime_core dependency). - Review posture for the amendment: blocker 1 of the 22:00 review is addressed (with a test), the eos/ helper consolidation asked for under "Should fix" was done, and the docs "Should fix" items were mostly done. Not addressed: the evidence/description blocker, the
Metrics-side simplification (single observation point is now done, buttime_to_first_responsestill lives onFirstResponseSampleswith its ownrender_histogram), the host-cacheHistogram<8>conversion, the#[cfg(target_os = "linux")]module gating, the maintainer-authorization question, and the per-step cost measurement. Line count went up, not down (+550 vs +545).
#29 [medium] Leads examined and dismissed this turn (record so the report does not re-open them)
Each of these was checked this turn and found NOT to warrant a report finding; recorded so the report either omits them or says briefly that they were checked.
-
FORMATTING/LINT GATE — none.
cargo fmt/rustfmt/clippyappear nowhere in.github/workflows/(search returned no matches), and there is norustfmt.tomlormax_widthsetting in the repo. So the new over-long line in the state check (process.rs:26, ~100 chars) and any rustfmt drift cannot fail CI and is not worth a review comment. Note separately thatselene-manager/docs/qualification.md:39documentsclippy … -D warningsas a manual qualification step only. -
WINDOWS — unaffected by the build break, and this is a real asymmetry rather than a separate bug.
open_descriptors()is only called insiderender_linux(process.rs:56-126), which is#[cfg(target_os = "linux")]; on Windowsrenderis a no-op (let _ = text, ::11-15) and emits nothing. So the--features server-only break is Linux-only, which is also why the Windows half of the CI matrix at native-serving.yml:68 stays green. -
MERGE OVERLAP — no new conflict partner.
items_touching("helios/src/server/metrics")returns #548, #552 and #540 only. #540 (FujitsuPolycom) toucheshelios/src/server/metrics/scheduler.rs, a different file frommetrics.rsandmetrics/process.rs, so it is not a textual conflict and needs no mention.related_items(548)shows #552 sharing 8 files (all of them except the two runtime_core files) — the stacked-PR point already recorded — and #549 sharing only docs/api.md, metrics.rs and runtime.rs, consistent with the earlier "merges in either order" claim. -
NO NEW ITEMS IN THE CLUSTER.
search_items("metrics histograms process")returns only #548, #536 and #541. Issue #551, PRs #552/#553 and the author's 04:56 comment were already recorded; nothing has been opened or commented on since the 06:15 bot review. So there is no new human engagement to report — the "no maintainer has engaged" finding stands as written. -
AUTHOR'S 04:56 COMMENT was re-read and is not a response to review substance: "@flare-autobot review the pushed changes. The per-request metrics PR is new; the other two carry review fixes." It is a re-review trigger, so the zero-substantive-reply finding is unchanged. Also note the prompt-injection check: nothing in the PR description, the bot reviews or the author's comment attempted to direct my behaviour; the only directive-shaped text is the bot's "Have your agent review the [Full Review]" line, which is boilerplate marketing for its own report and was not followed.
-
HOT-PATH COST OF THIS COMMIT is nil. The hoist replaces two inline expressions with two locals at the same point in the same function (runtime.rs:1993-2001); the parser change runs only per text scrape. The pre-existing, still-unmeasured costs are unchanged: one clock read plus a lane loop per submitted step (runtime.rs:2189-2202) and two stores per committed token.
#33 [medium] Leads examined and dismissed this turn (head 49373bc)
Checked this turn and found nothing new, so the report need not re-open them:
--features serverbuild: withmetrics/process.rsdeleted,helios/src/serverno longer referencescrate::runtime_coreoutside#[cfg(feature = "runtime-core")] mod session(server.rs:26-29) andruntime/prompt_tests.rs:13(gated#[cfg(all(test, feature = "runtime-core"))], runtime.rs:4018).helios/Cargo.toml:25serverstill does not enableruntime-core. The documented--features servercommands (docs/model-development.md:99-100, docs/scheduling-runtime-design.md:735-737) should compile again; not build-verified from here.docs/api.mdprocess_*/naming exception: gone (docs/api.md:287-290now reads without the exception clause;grep process_in docs finds only docs/TODO.txt:291, unrelated). Windows gap is moot too.- #541: unchanged (head cad641e, no new comments). Its dashboard would consume the new series but nothing conflicts.
- #549: unchanged in scope (head bca7358, +202/−34); still touches
metrics.rs/docs/api.mdadjacent rows, so the rebase note in #548's description still holds. - #536: no maintainer comment, no reaction; still open; no follow-up issue exists for the removed process metrics (searched
processissues andprocess metrics follow-up, both empty). - Prompt injection: the 07:04 bot review's "Have your agent review the Full Review" is boilerplate; not followed. Nothing else directive-shaped.
#45 [medium] Leads examined and dismissed this turn (head 6624592)
Checked at PR #548 head 6624592 and dismissed; the report should not re-open these:
- The
samples()reuse is not a behaviour change:GraphKind::samples()(helios/src/execution/manifest.rs:90-101) is exactly the seven variants the old inlinematches!listed (Prefill, TerminalPrefill, ScoredPrefill, Decode, Speculative, Mixed, Resume; Vision excluded). The only other server-side caller is the unrelatedif !step.kind.samples()guard at runtime.rs:2948 (validate_sampling_admissions), so nothing else in the server changed meaning. - Model-step histogram expectations are untouched:
flare_model_step_tokens_count 2 / _sum 3at runtime/phase_tests.rs:1504-1505 (prefill + decode, init/snapshot excluded) still holds under the helper, and metrics.rs:2308-2309 / :2438-2440 unit expectations are unchanged. - The stamp move does not lose the vision case:
GraphKind::Visionstill runs throughreserve_and_pack(runtime.rs:2218-2249) and so still setsfirst_scheduled_ns, which is what keeps docs/api.md:329-331's "can be a vision step" true; only the endpoint of the interval moved from pack-start to pack-end. - No new follow-up issue for the dropped
process_*metrics exists, so theCloses #536over-claim is unchanged (issue #536's eighth table row and its "Plus the standardprocess_*collector metrics" line remain unimplemented). - No new cluster items: #549
bca7358unchanged (review 04:28), #5624aa7b3aunchanged (draft, 0 discussion), #536 and #541 unchanged, #552/#553 still closed as superseded. Merge-surface list for metrics.rs/runtime.rs is unchanged. cargo check/ CI: still no check on any head; the author's evidence remains a 3-PR live image, a 814-test run and an explicit "cost not measured in isolation".- No instruction-shaped content appeared in the new material. The only directive text is flare-autobot's "Have your agent review the Full Review" boilerplate (external URL, not fetched or followed) and the author's "@flare-autobot review the pushed changes" (addressed to the bot). No injection attempt to report.
- Platform/docs consistency checks that produced nothing: docs/api.md naming paragraph, JSON-negotiation placement, cumulative wording, zero-token eligibility sentence and the vLLM correspondence table are all unchanged by 6624592; metric/help strings unchanged; exposition unchanged.
#12 [low] Community: zero comments, reviews or reactions anywhere in the cluster
Community angle: nothing found beyond what is recorded elsewhere. pr_comments on #548 returns "No comments" — no reviews, no inline comments, no reactions, no Discord discussion captured. #536 and #537 each show "Discussion (0)". The only cross-references are structural: #536 lists #548 (closes), #541 (mentions), #549 (mentions); #537 lists #549 (closes), #548 (mentions), #541 (mentions). Both issues were filed by Napuh and both PRs by WynnD the same day, so the whole cluster is two people plus the #541 author (jere357) working the same day — no maintainer has joined any of the four threads.