Case file: PR #634 "Measure streaming latency after scheduler idle periods"
https://github.com/NVIDIA/hyperflare-inference/pull/634 — open, ready for review, head a0467e2, base main (branched at 0a8c20f), author salignatmoandal (CONTRIBUTOR), branch bench/scheduler-idle-resume. Opened 2026-11-30 09:52. +21 / −4 in 1 file: scripts/benchmark_scheduler.py.
Key findings
- The change is a measurement tool, not a measurement. The PR adds two opt-in flags to
scripts/benchmark_scheduler.py; it does not use them on a real server. Its own Evidence section concedes: "Native GPU serving, scheduler idle transitions, and latency gains were not measured." Nothing is claimed to be faster, so the charter's "speedup overmain" rule (read_charter, "Bring real evidence") is not triggered — but the tool's usefulness is also undemonstrated: no JSONL row from a real deployment, no example comparison, and no report of whatidle_seconds_before_burstactually read in the stub run. - The new field does not measure latency to first token.
idle_seconds_before_burst=min(row['started']) − pause_started(scripts/benchmark_scheduler.py:227-228), androw['started']is a client timestamp taken before the POST is issued (scripts/benchmark_scheduler.py:27, afterconnection(url)at :26). So it measures "sleep + client scheduling + connect" — for a local server it reads ≈--idle-seconds, i.e. it is a self-check that the pause happened, not that the server was idle or slow to wake. The genuine post-pause latency number is the pre-existingttft_median_seconds(scripts/benchmark_scheduler.py:169), which the description does not name as the idle-latency metric it claims operators can compare. - Idle-mode JSONL rows silently change the meaning of existing keys.
trial()returns'issue_duration_seconds': duration(scripts/benchmark_scheduler.py:164), which isNonein burst mode, andtokens_per_second = tokens / elapsed(:165) whereelapsedis now burst duration rather than the deadline window. Same key names, different quantities across modes. No in-repo consumer exists (see #6), so this is a latent schema inconsistency rather than a break — and it is not mentioned in the description. - The strongest justification lives in the linked PR, not in #634. #540 (merged 2026-11-29, one day before #634) retained post-idle timing credit, added a Rust regression test, and explicitly deferred live GPU/HTTP qualification to
docs/TODO.txt:110-114("Qualify retained graph costs and funded remeasurement in live Helios: idle/resume, …"). #540 also states its simulator's fiveidle-*scenarios sit well below the 2,495 ms funding threshold and "do not exercise the fully-charged post-idle wakeup probe case" — the case #634's burst mode exists to observe. #634 cites none of this by name and does not close the TODO entry. - No engagement whatsoever. Zero comments (
pr_comments→ "No comments."), zero reviews, no labels (not evenarea:schedulingortriage:review, which every comparable PR carries), no CI checks ona0467e2, and noflare-autobotintake comment — unlike the author's #601/#602/#603, which each received one within minutes. The PR was under a day old when researched, so low engagement is expected rather than a signal. - The touched file is the project owner's and had been stable for five weeks. All three commits to
scripts/benchmark_scheduler.pybelong to Luke Alonso (bce032c02026-10-24,28f0833b2026-10-30 licence header, then this PR). No other open or merged PR in 180 days touched it, so there is no conflict or competition — but the reviewer pool is effectively one person. - Description completeness is good; reproduction detail is thin. All four AGENTS.md:72-112 sections are present in order, and the Evidence section separates what passed from what was not run — the repo's rules ask for exactly that. However AGENTS.md:110-112 asks reproduction commands to identify required inputs, and the stub SSE server used is not described well enough to reproduce.
The change
Verified against the diff and the file at the PR head:
trial()gains a keyword-onlyrequests_per_lane=None(scripts/benchmark_scheduler.py:140). The worker loop becomes "count completed requests" instead of "run until deadline" (scripts/benchmark_scheduler.py:147-148).deadline[0] = start + (duration or 0)(:156) soduration=Noneis tolerated; side effect: an explicit--seconds 0also collapses to 0 viaor, a no-op in practice because the count branch is used.- New CLI args (scripts/benchmark_scheduler.py:187-190):
--idle-seconds(float) and--requests-per-lane(int, default 1). - Validation (scripts/benchmark_scheduler.py:198-201):
--idle-secondsmust be finite and > 0 (math.isfinite;mathwas already imported at :11 forpercentile, so no new import or dependency);--requests-per-lanerequires--idle-secondsand must be ≥ 1. Misuse fails loudly. - Main loop (scripts/benchmark_scheduler.py:217-231): in idle mode, per trial —
pause_started = perf_counter(),time.sleep(args.idle_seconds),trial(..., None, requests_per_lane=args.requests_per_lane or 1), then recordsidle_seconds_before_burst. Continuous mode is the untouched default branch (:220-221). - The pause begins after the previous trial's worker joins (:158) and after its
metrics_afterscrape inside the returned dict (:174), so the server-visible idle window is longer than--idle-seconds. Warmup trials (--warmup-seconds, :217-218) are not preceded by a pause, and warmup stays deadline-mode even in idle mode. requests_per_lane or 1(:226) is an implicit default of the kind the charter's "Be explicit and pin everything. No magic defaults" bullet and AGENTS.md:118 discourage, though the validation at :200-201 partially covers it.
What the description says that the code does not do: nothing material — "waits after previous streams drain", "fixed number of requests per concurrency lane", "continuous mode remains the default", and "interval from the start of the pause to the first request" all match. What the code does that the description omits: the issue_duration_seconds: null / tokens_per_second meaning change, and that the recorded interval excludes nothing but response time — it is not a first-token measurement.
Not attempted: any aggregation across trials, any JSONL-diff or comparison tooling, any wiring of the dormant --pair-index/--variant/--pair-order flags (scripts/benchmark_scheduler.py:191-193), no test, no docs.
The why
- Own "Why": "The scheduler benchmark continuously issues requests during each trial. It cannot isolate streaming behavior when traffic returns after an idle period, a qualification case for the timing credit retained by #540."
- #540 "Retain bounded timing-refresh and acceptance credit across idle" (FujitsuPolycom / PCCessna, merged 2026-11-29 22:12, commit
59adc480, 11 files, +434/−153, labelsarea:scheduling,bug,performance,triage:review) removedRefreshState::idleand renamedRequestScheduler::idle→assert_idle, keeping up to 5 ms of timing-refresh/acceptance credit across idle. - The chain a reviewer should follow: #540 → spec
docs/scheduling-runtime-design.md:460-466("Funding the first refresh requires 2,495 ms of cumulative credited ordinary execution, accumulated across idle-separated requests because idle intervals add neither credit nor ordinary duration. When full credit carries across an idle gap longer than the freshness lifetime, the first waking request can execute one refresh episode before negative debt suppresses further probes.") → #540's own deferral: "Live GPU and HTTP serving qualification (tests/server/test_scheduler.pyand live power-cap cost-refresh recovery) was not run on GPU hardware and remains tracked indocs/TODO.txt." →docs/TODO.txt:110-114(unchecked): "[ ] Qualify retained graph costs and funded remeasurement in live Helios: idle/resume, concurrent decode latency, cost-change recovery, and queued generation transitions. … See scheduling-runtime-design.md#funded-timing-refresh." → #634, a client-side tool aimed at that measurement. - What the chain does and does not justify. It gives #634 a legitimate maintainer-side ask (the TODO entry) — its strongest charter fit. It does not mean #634 closes that TODO: no measurement is produced, the TODO is neither edited nor referenced, and a future reader of the TODO list will not discover this tool.
- Server side makes the client pause meaningful:
helios/src/server/runtime.rs:1244-1250callsself.scheduler.assert_idle()?thenself.idle_wait()and blocks inreceiver.recv_timeout;idle_wait()(:1257-1280) is 50 µs with inbound in flight, 100 µs when parked requests await the pool, otherwise 2 ms. A paused client therefore leaves the worker genuinely parked — the state #540 changed. - How widely wanted: no issue requests this (
search_itemsreturns only #634). No roadmap item covers it (charter roadmap: in-process Rust SDK #6, Engram #267, FlashInfer #215). The demand signal is indirect but real: maintainers keep hand-rolling idle probes — #280 states its runs "do not establish the latency of the first request after an idle stretch, because the probe's short prompt was already in the prefix cache"; #353 measured "the time to first token after 150 s of idle (0.091 and 0.097 s)". #634 would turn such one-off probes into a flag.
Related work
- #540 is the only linked item and the only result from
related_items(634). Nothing is stacked on #634; nothing supersedes it; no PR undoes it. - No file contention:
items_touchingforscripts/benchmark_scheduler.py→ no open or merged PR in 180 days changed it.search_code "benchmark_scheduler"→ no matches anywhere in the repo, i.e. no CI workflow, no doc, no test imports the script (contrastscripts/scheduling_sim/*, imported by ninetests/test_scheduling_*.pyfiles). - Simulator analogue, same area, one day earlier: #540 itself edited
scripts/scheduling_sim/(learning.py(not opened)--retain-idle-credit,learning_policy.py(not opened)). The simulator models idle as an arrival gap between requests inside one run (scripts/scheduling_sim/learning_scenarios.py:21 (not opened),88-92foridle-{seconds}s/idle-short-burst;learning_run.py:243-244(not opened) appliesidle_gaps_ms), not as a driver-level pause as #634 does. #634 is the live-HTTP analogue of #540's simulator work. - Other streaming-gap harness:
tests/server/test_scheduler.pymeasures SSE gaps (max_sse_gap_msat :53; requiresFLARE_RUN_CUDA_TESTS=1and an idle service), documented atdocs/scheduling-runtime-design.md:773-790, which warns "SSE arrival gaps are not GPU execution times or per-token latencies". Same measurement concern, different harness; it has no idle-resume case. - Orientation-packet leads judged not relevant on inspection: #548 and #560 (per-request histograms / vLLM-parity
/metrics— server-side Prometheus, issue #536 behind them), #581 (USE_NODE_PRIORITY CUDA graphs), #497 (disk offload restore latency), #519 and #353 (Engram/WFET parking — #353 only as an idle-probe precedent), #567 (resident prefixes, closed; shares only the wordperf_counter), #218, #415, #326, #319, #116, #288, #186 (kernels, pool records, cache aliasing, wedges, hardware-specific benchmark reports). None shares #634's file or purpose.
Recent activity
- File history, complete (
search_historyby path):bce032c02026-10-24 Luke Alonso "Overlap CPU scheduling with queued generation graphs";28f0833b2026-10-30 Luke Alonso licence header;a0467e292026-11-30 Mawen Salignat-Moandal (this PR). No functional change for ~5 weeks, single owner. scripts/last 8 commits in 60 days:59adc480#540 (PCCessna),ea756eef#425 (Jason Cook),17bb3c4a/da037284(Luke Alonso),e9d509d6#433 (Nero),be4ff01e(yatesdr),5a4e8679/94fbce5f(Luke Alonso). Commit counts over 180 days inscripts/: Luke Alonso 57, jasonc 4, yatesdr 4.- No commits on
mainsince the base0a8c20ftouch the changed file, so the PR is textually current. - Builds on / does not conflict with #540 — different files within
scripts/, same theme. It does not reverse anything. - Dormant harness flags:
--pair-index,--variant,--pair-order(scripts/benchmark_scheduler.py:191-193) are parsed and never read in the script. They are leftovers of the paired baseline/candidate harness removed by17bb3c4a2026-11-22 ("Remove extracted hyperflare_recipes, qualification drivers, and model tests from core Flare"). Relevant because #634's stated benefit — "replay the same request bodies and request counts across builds" — is exactly what those flags were for; the PR uses only--reuse-requests(:194-196).
People
- Author: salignatmoandal (Mawen Salignat-Moandal), GitHub association CONTRIBUTOR. Last 180 days: 3 merged, 0 closed, 0 other open — all merged on 2026-11-29, all small and operator-facing: #601 "Expose Selene metrics on the Docker host loopback" (+3/−4), #602 "Correct PID namespace guidance for Selene's TLS Compose example" (+3/−2), #603 "Report the repository and revision on Hub lookup errors" (+41/−1,
flare/src/hub.rs(not opened)). Each was reviewed byflare-autobot. Pattern: tiny, accurately scoped, honestly limited — the same pattern #634 follows. No prior work inscripts/, Python benchmarks, or the scheduler; #634 (the next morning) is their first contribution outside ops/docs and their first in a performance-qualification area. - Who works here:
scripts/andscripts/benchmark_scheduler.pyare Luke Alonso's (project owner perread_charterpriority-contributor list). The Helios timing/refresh subsystem behind #540 is PCCessna/FujitsuPolycom's. Scheduling performance PRs are approved by original-el8 (e.g. #280, APPROVED) and Luke Alonso (yatesdr closed #353 for lack of measured benefit) — precedent that this area demands measured benefit. - Engagement on #634: none, from anyone.
Community
- Zero comments, reviews, reactions, labels; no CI; no autobot case file (the automated pipeline has not picked this PR up, unlike #601-#603). Age <1 day at research time.
- Interest it would draw if it lands: the #540 follow-up crowd (FujitsuPolycom, Luke Alonso) and operators, per the PR's own Benefit section.
- No Discord handle given ("Discord: no username provided"), same as #602 and #603.
Project fit (charter, AGENTS.md, docs)
- Charter "Bring real evidence": "Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)". #634 claims no speedup — it is instrumentation, so the rule does not bite. Fit. - Charter "What gets merged": "PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs." #634 has no issue, no roadmap item, no bug, no docs. Its only affiliation is
docs/TODO.txt:110-114via #540 — the closest thing to a maintainer request, and the strongest fit argument available. - Charter "Stay focused" ("random switches … extra switches") and "Be explicit and pin everything. No magic defaults" (AGENTS.md:118): tension. The added validation (:198-201) is in the spirit;
requests_per_lane or 1(:226) andduration or 0(:156) are implicit-default shortcuts. - AGENTS.md:9-13 + commit
17bb3c4a: "qualification drivers … live in local-inference-lab/hyperflare-recipes". Tension: #634 adds a live-server qualification capability to core Flare'sscripts/. Mitigation:docs/TODO.txt:110-114is a core-Flare TODO, which supports keeping the tool here. - AGENTS.md:497-499: comparisons should run "an exported core running through
flare run". #634's cross-build comparison benefit is consistent as long as operators point--base-url(:179) atflare run; the script does not say so. - AGENTS.md:512-513: "Keep ordinary tests and raw benchmark measurements." #634's per-trial JSONL is exactly a raw measurement. Fit.
- AGENTS.md:72-112: four required description sections in order — all present.
- Docs coverage gap:
docs/core-design.md:1818-1838lists the required live measurement set (cold TTFT, inter-token median/p99, decode and prefill throughput, prefix-hit TTFT, startup, host submission gap) and has no idle-resume / post-pause-first-token row.docs/never mentionsbenchmark_scheduler.pyat all (grep ofdocs/forscripts/shows onlybuild_deb.sh(not opened),setup_preparation.py(not opened),s3_upload.py(not opened),set_release_version.py(not opened),setup_windows.ps1,dev_windows.ps1,scheduling_sim/*,repro_glm_batched_speculation.py(not opened),benchmark_csf_conversion.py(not opened)). The new flags are therefore undiscoverable from documentation except by reading the script.
Claims and evidence
| Claim | Backing | Status |
|---|---|---|
"with --idle-seconds, the driver waits after previous streams drain, then issues a fixed number of requests per concurrency lane" |
:224 sleep after prior trial() join (:158) and metrics scrape (:174); count-bounded loop (:145-151) |
Verified in code. Caveat: effective idle > --idle-seconds |
| "each JSONL trial records the observed interval from the start of the pause to the first request" | min(row['started']) − pause_started (:227-228), started taken pre-POST (:27) |
Verified, but narrower than it sounds — to request send, not to first token; largely a sleep self-check |
| "the continuous mode remains the default" | :220 branch; --idle-seconds default None |
Verified |
| "operators can replay the same request bodies and request counts across builds" | pre-existing --reuse-requests (:194-196) plus JSONL requests line (:214); new fixed per-lane count makes counts deterministic |
Partly supported. No tooling is added to diff two runs |
| "compare first-token latency and SSE delivery gaps after a pause" | existing ttft_median_seconds (:169), burst_gap_median/p99_seconds (:170-171) |
Achievable but unsupported by any demonstration |
Evidence: both CLI modes run against a local SSE stub; two lanes → two completed requests per burst; second burst began ≥100 ms after the preceding streams drained; continuous control retained deadline output; py_compile and git diff --check pass |
Not attached anywhere visible | Claimed, not verifiable from the repo. It is a stub-server smoke test: it validates control flow, nothing about the server behavior the PR exists to observe. It does not report what idle_seconds_before_burst read versus the requested value, so even the new field's accuracy is unverified |
| "Native GPU serving, scheduler idle transitions, and latency gains were not measured" | self-declared | Accurate and appropriate |
No test file was added; no CI check exists; nothing in tests/ imports the script, so .github/workflows/python-cpu.yml (not opened) (pytest tests/) never exercises it.
Reach
- Affected: only people invoking
scripts/benchmark_scheduler.pyby hand. Nothing in.github/workflows(helios-lifecycle.yml(not opened),native-serving.yml(not opened),python-cpu.yml,release.yml(not opened)),docs/, ortests/references it. - Configuration/defaults: no default changes. Two opt-in flags; continuous path behaviour-identical. CLI surface is append-only.
- JSONL schema: one new key (
idle_seconds_before_burst) in idle mode;issue_duration_secondsbecomesnullandtokens_per_secondchanges meaning (see Key finding 3). Old JSONL files remain readable by--reuse-requests. - Dependencies: none added (stdlib only;
mathalready imported at :11). Python 3.12 perpython-cpu.yml. - Packaging/deployment: none. The script is not shipped in release artifacts and has no
pyproject.toml[project.scripts]entry. - Runtime/scheduler behavior: zero — client-side only; it cannot alter #540's credit retention.
- Documentation: unchanged; the
docs/TODO.txt:110-114item stays open, which is defensible since no measurement was produced, but nothing points a future reader at the new tool.
Process
- Open, "ready for review" (not a draft). Single commit
a0467e2(a0467e298a4e7f38622dbc6ec37ecae1cdd340d1), branchbench/scheduler-idle-resume→main, no unrelated files, commit subject matches PR title. - Untriaged: no labels at all, whereas comparable PRs (#540, #601, #602, #603) carry
area:*andtriage:*. - No CI checks on the head commit — either the workflow did not trigger or was not approved; no automated verification exists.
- No
flare-autobotcase file, unlike the author's three prior PRs. - Age: under one day at research time.
- Sign-off:
CONTRIBUTING.md:19requiresSigned-off-by(a factor in closing #353). The commit body/trailer ofa0467e2could not be read with the available tools — worth checking before merge.
Open questions / could not be found
- Whether
a0467e2carries aSigned-off-bytrailer, and whether any GitHub check attempted to run (no commit-body view available; #634 is absent from the local mirror, sorelated_items/items_touchingreflect the mirror andread_itemresolved it directly). - The author's stub SSE server and any sample JSONL output or measured
idle_seconds_before_burstvalue — not attached or linked anywhere visible, so the new field's accuracy is unverified even in the stub run. - No behaviour was checked for
--trials 0,--warmup-seconds 0, or--concurrency1 combined with a small--requests-per-lane; nothing in the description or code addresses those combinations. - Nothing in the repository states whether operators currently use
scripts/benchmark_scheduler.pyagainst real deployments at all, so the practical reach of the new flags is unknown. - No issue, roadmap item, or documentation request asks for an idle/burst mode; the only documented demand is
docs/TODO.txt:110-114, which #634 does not reference and does not close.