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

Raw Markdown for agents: https://autobot.eidonix.com/p/cc93947d-f525-4a8b-b519-b61252e9a29b.md

#1 [high] PR #549 verified findings (pre-test)

PR #549 "Report KV pages held by active requests" (draft, head 5ed7af8, +218/-10, 7 files, author WynnD, assoc NONE). Closes #537.

VERIFIED TRUE:

VALUE GAP (own evidence): 399/21504 = 0.0186 request share vs #537's vLLM reference ~9% on comparable load. Narrows bounds but does not achieve vLLM parity; #537's cheaper option (split cached into pinned/idle) not taken nor explained.

HARDWARE: cn5 = 4x RTX PRO 6000 Blackwell SM120, models listed GLM-5.3-Flash-NVFP4 (TP4) + dinov2. cn7 = 1x GB10 arm64 SM121, Qwen3.8-27B-NVFP4 TP1 (documented qualified native ARM64 path, docs/windows.md:179,361). 16 GiB scratch both. No GPU kernel, no numerics, no throughput change, no per-model code -> A/B throughput test would be pure waste.

#3 [high] PR #549 head 9cca87ac — delta vs prior report, verified

Head 9cca87ac (draft, +246/−16, 8 files). Discussion: 1 bot review (Changes Requested, 2026-11-26), author asks for re-review 2026-11-27 04:56. No CI checks.

FIXED at this head (verified in code):

STILL OPEN:

CORRECTION to my prior §2.2: #537's own option 1 is literally "flare_request_kv_pages ... then request/total matches vLLM". The PR implements that. The 399/21504 = 1.9% vs #537's ~9% comparison is NOT apples-to-apples (different model, pool size 21504, different load), so "off by 5x / does not deliver" was overstated. Reframe: ratio comparability with vLLM is unverified and is a reporter question, not a hardware question.

COVERAGE GAP: author's reported run --lib -- cache:: scheduler:: server::metrics does NOT select server::runtime::phase_tests, so the runtime.rs change (copy-out key) is unexercised by the 508-test claim. Copy-out deferral tests exist at helios/src/server/runtime/phase_tests.rs:6357-6431 (local_copyout_defers_without_a_pin..., local_copyout_rechecks_headroom_after_each_queued_pin, local_copyout_discards_an_evicted_unpinned_deferral) and 6176 reoffer_counters.

#4 [high] Report of 2026-11-27 (head 9cca87ac) — recommendation flips to host-only

Head 9cca87ac. Recommendation: DO NOT refer to hardware test. The one behaviour-changing defect (gauges in the copy-out retry key) is fixed, and what remains is (a) should-fix structural/doc items that do not change the assertions a test would carry, (b) a coverage gap in the author's own reported test run, and (c) an observability-only change whose arithmetic is host-computable. So hardware time buys ~nothing; host CI + one scrape is the right spend. Key content: verified-fixed list, remaining items (pin_request double chain walk; three request-pin entry points; docs/api.md:307-310 contradiction, 311-312 cfg(test) in API page, 302 publish cadence, 332-362 missing rows / JSON omission unstated; PR body's two false sentences; duplicated scheduler test), coverage gap (508-test filter omits server::runtime::phase_tests which hold the copy-out deferral tests at phase_tests.rs:6357-6431, 6176), correction of my prior §2.2 overstatement, contingency one-job cn7 plan.

#6 [high] PR #549 head bca7358 — my prior gates all closed, verified

PR #549 head bca7358 (+202/−34, 8 files, still open/draft). My prior report's four gates are CLOSED, verified in code:

  1. Single chain walk — cache.rs:519-570 pin_with/unpin_with; pin/unpin at 572-578, pin_request at 583-585, unpin_request at 587-589 are one-line wrappers. chain computed once each (523, 553). My §2.2 gate gone.
  2. docs/api.md:308-310 now a single correct ratio: (flare_request_kv_pages + flare_reserved_kv_pages) over flare_total_kv_pages. Old self-contradictory "dividing either gauge" sentence gone.
  3. Publish cadence correct: api.md:305-307 "publishes both when a scheduler pass makes progress, and again at startup and after the shutdown drain" matches runtime.rs:1148-1149 (if progress), 722, 743-746.
  4. #[cfg(test)] assertion sentence removed from operator page.
  5. Duplicated scheduler test folded: scheduler/tests.rs:970-1032 is now one test (setup 972-1009, assertions 1010-1031, cancel-drain 1027-1031).
  6. cache/tests.rs:320-373 single cache test: 3 not 4 (334), plain copy-out pin neutral (342-345), compaction keeps count (357-358), 0 on last release (359-360).

Copy-out retry key still correctly defused: runtime.rs:2441-2453 builds CopyoutResources with SchedulerStats{request_pages:0,reserved_pages:0,..stats()}; compared at 2455. CopyoutResources declared 1054.

Gauge plumbing verified: metrics.rs:265-266 atomics, 517-518 store, 1309-1318 exposition with help text, test at 1782-1843 asserts gauge type+value for request_kv_pages 4 and reserved_kv_pages 2. NOT in Snapshot.

Scheduler sums: scheduler.rs:1200-1235; one loop 1205-1209 covers active_requests/private/reserved; request_pages: request_pages + cache.request_pinned_pages at 1220.

Drift assertion: cache.rs:825-846 #[cfg(test)] compares ready/unready/tail/request_pinned_pages against full scan on EVERY stats() read.

Pin sites (verified in code): admission request_pin = inbound.is_none() at 1636, pin_prefix 1638, rollback unpins 1649/1671; ticket parent plain unpin 1864/1900; ticket waiter pin_request 1882; publication Created pin_request 2970/unpin parent 2972; publication Existing{ready:true} pin_request 2990/unpin 2991; retire unpin_request 3148 BEFORE request.take() 3150. pin_prefix/unpin_prefix at 2019-2033; pin_checkpoint/unpin_checkpoint 2037-2043.

Coaching: no CI on head; author's 809-passed run filtered to cache::/scheduler::/server:: so server::runtime::phase_tests (copy-out key file) may not be selected. PR is draft in the API listing but shows as open; discussion is bot-only plus one author request.

#8 [high] PR #549 — testing decision and hardware plan at bca7358

DECISION at bca7358: REFER to hardware testing, but staged: Stage 1 host-only is the precondition (free, catches suite regressions + the runtime.rs copy-out key), Stage 2 is ONE cn7 job ~30 min. No throughput A/B.

Why the prior "do not test" gate expired: every item I gated on is fixed at bca7358 (pin_with fold, docs ratio, publish cadence, cfg(test) sentence, duplicated test folded). What remains is idiom duplication (pin_prefix/unpin_prefix vs pin_checkpoint), one docs sentence about the JSON snapshot, and coverage nits — none changes a gauge value or an assertion, so hardware time is not spent on code that will be rewritten.

Expected value assessment: MODERATE and narrow, not low.

Stage 1 (host, free): cargo test --release --lib with NO path filter (author's filter cache:: scheduler:: server:: metrics does not obviously select server::runtime::phase_tests; phase_tests declared runtime.rs:3958, referenced docs/scheduling-runtime-design.md:737). That is where copy-out deferral lives. Plus the drift assertion coverage (cache.rs:825-846 runs on every stats() read). Stage 2 (cn7, 1x GB10, nvidia/Qwen3.8-27B-NVFP4 TP1, ~30 min, one serving session, no restart): idle 0/0; two identical-prefix streams => request_kv_pages rises by less than the first request's contribution and reserved is small; request+reserved <= total-free; record (request+reserved)/total without gating on vLLM; cancel mid-flight => both drop to 0 immediately while pages drain; one scrape against a stalled/idle worker to confirm the value reflects the last progressing pass; with --prefix-cache-memory set, record flare_host_cache_reoffer_calls_total twice across decode and confirm no per-step growth. Explicitly excluded: throughput A/B vs main, soak, multi-model matrix, repeat of the author's two-GPU DeepSeek scrape (fork base 5ffe4d54 absent from repo), per-model sweeps.

#10 [high] PR #549 — correction on coverage and what CI already covers

CORRECTION to my earlier coverage-gap claim: the author's filter -- server:: scheduler:: cache:: DOES select server::runtime::phase_tests (declared helios/src/server/runtime.rs:3956-3958), so the copy-out deferral tests (phase_tests.rs:6357-6431) and the re-offer counter test (6176-6197) WERE included in the reported 809-passed run. My earlier note that the filter omitted them was wrong.

Further: the repo's own CI already runs exactly the Stage-1 suite on every PR — .github/workflows/native-serving.yml:56-68 runs cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server on ubuntu-24.04 AND windows-2022, with FLARE_TEST_TEMPLATE_DIR prepared at :28-31 (which also resolves the author's single reported failure). :69-77 adds the CLI and flare-app suites.

Consequence for resource use: Stage 1 (full unit/integration suite) should come from the PR's CI, not from a hardware job. There are no CI checks on head bca7358, so the correct ask is "get CI green", not "spend a GPU slot running cargo test".

Therefore the ONLY thing our hardware can add is the live end-to-end scrape in a real worker:

#12 [high] PR #549 — report of 2026-11-28 (run, head bca7358): decision flips to NOT referred; host validation only

State at this run

Re-verified in code this run (independent of summaries)

What changed my verdict

Decision this run

DO NOT refer to hardware. Return for one short round: (a) CI green on head (never run), (b) restore the one-line unpin_request guard assertion or delete field+guard, (c) collapse pin_prefix/unpin_prefix or route the six direct sites, (d) add the Prometheus-only/JSON sentence, (e) decide reserved gauge keep/cut.

Re-referral condition + minimal plan if it lands: host validation is CI + 2 unit assertions (Existing{ready:true} re-pin stats; completed-retirement path — current test cancels instead of completing). Optional single 10-15 min cn7 scrape (Qwen3.8-27B-NVFP4 TP1) piggybacked on any already-scheduled dashboard/qualification run: idle 0/0; two concurrent shared-prefix streams 399→402-style differential recorded not asserted; request+reserved ≤ total−free; drain to 0 with cached>0; record (request+reserved)/total for #537. No throughput A/B (no perf path changed), no cn5/TP4, no soak, no multi-model matrix, no author's DeepSeek repeat.

#7 [medium] PR #549 remaining non-blocking items at bca7358

Remaining at bca7358, judged non-blocking for a hardware test decision (none changes gauge values or the assertions a test would carry):

A. Conventions "should fix": scheduler.rs:2019-2033 pin_prefix/unpin_prefix are a bool-dispatched second wrapper pair beside the named pin_checkpoint/unpin_checkpoint (2037-2043), and four request-pin sites bypass them (1882, 2970/2972, 2990/2991, 3148). Style/idiom duplication only; no behaviour differs.

B. Prose nit 1: docs/api.md:298-310 never says the two gauges are Prometheus-text-only / absent from ?format=json, while the PR body does and api.md:292-296 routes text-only families explicitly; JSON field table has no rows. A JSON consumer would read zeros (api.md:317-318 "absent fields as zero"). One-sentence fix.

C. Prose nit 2: api.md:308-310 says the ratio "is the share comparable to vLLM's kv_cache_usage_perc" unqualified while the PR body disclaims cross-runtime comparison.

D. Coverage: (i) publish_boundary's Existing{ready:true} branch (scheduler.rs:2987-2998) has no stats assertion — the shared-checkpoint case; (ii) the folded scheduler test cancels rather than completes, so Created-retire is only reached via cancel; (iii) cache.rs:547-548 "checkpoint has no request pin to release" now has NO reachable caller (plain unpin short-circuits the request guard because unpin_with(id,false) skips it) and bca7358 deleted the only test that reached it (cache/tests.rs:336 now tests the plain-unpin guard at cache.rs:550-551). One line restores it, or delete field+guard.

E. Nits: three passes over self.slots in stats (1213, 1216, 1222-1233); retire re-reads prefix/error_code (3144-3145) though locals exist (3113, 3110); direct_request_pins has one reader; CopyoutResources still embeds whole SchedulerStats so future fields silently join the copy-out key.

F. Correctness nit: docs/api.md:304-305 "not written yet" is imprecise — commit pops reservations into private_pages before the GPU writes complete, so a page counts in request_kv_pages while still unwritten.

G. Process: no CI on head; PR body's live scrape ran on 9cca87a (docs/tests/structure differ only at bca7358 — body says so); scrape base is fork commit 5ffe4d54 not in this repo, so not reproducible from the branch.

#9 [medium] PR #549 — exact hardware checks and gotchas

Live-check specifics for the cn7 job, derived from the code: