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

Raw Markdown for agents: https://autobot.eidonix.com/p/70e5e0f2-94f4-4e48-a1d3-6d31068cfc65.md

Pre-test report — PR #549 "Report KV pages held by active requests" (head bca7358c, +202/−34, 8 files)

Recommendation: DO NOT REFER to hardware testing. Return to the author for one short round; when it lands, validation is host-side (CI + two unit assertions) and any GPU contact is an optional 10–15 minute scrape piggybacked on an already-scheduled run, not a dedicated job.

This reverses my previous run's "refer, one bounded cn7 job". The reversal is driven by new information, not by the code: the author's own 2026-11-28 validation numbers now show the gauges moving 54–80 pages of a 20,480-page pool (~0.3 %) with ~50 % jitter between scrapes at fixed load — which destroys the one assertion my plan relied on hardware to make — and an active proposal in this review round is to delete half the new surface outright.


1. What the change is (re-verified in code, not from summaries)

Two Prometheus-text-only gauges, closing #537:

The cache half is maintained incrementally on pin/release (helios/src/cache.rs:519-570: pin_with/unpin_with, plus the one-line wrappers pin 572, unpin 576, pin_request 583, unpin_request 587), adding at the request_pins 0→1 crossing (539) and subtracting at 1→0 (565) — never by scanning nodes, which is the constraint the PR states and the reason Cache::stats stays scan-free in release. Rendered beside cached_kv_pages (helios/src/server/metrics.rs:1309-1318), stored from SchedulerStats (metrics.rs:517-518), deliberately absent from the JSON Snapshot (metrics.rs:68-129).

2. Why it is not ready to consume hardware

2.1 (Gating) The head has never been built or tested by anything

Head bca7358c has no CI checks (search_history confirms it is the newest commit; the PR is a draft with no human review). The repository's own CI runs exactly the suite a tester would run — .github/workflows/native-serving.yml:56-68 (not opened) executes cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server on ubuntu-24.04 and windows-2022, with FLARE_TEST_TEMPLATE_DIR prepared at :28-31, and :69-77 adds the CLI and flare-app suites. Running the suite on a GPU host would be the first execution anywhere, and the definition of wasted hardware time on an observability-only change. The author's "809 passed" is a filtered local run (-- server:: scheduler:: cache::) on an unstated host; the Windows build is explicitly unrun.

2.2 (Gating) Half the changed surface is an active deletion candidate

The subtractive review — repeated across three review rounds, now with stronger arithmetic — asks to delete flare_reserved_kv_pages entirely (~20 lines across scheduler.rs:132-133, 1204, 1208, 1221, metrics.rs:266, 518, 1314-1318, 1791, 1836, runtime.rs:2448, docs/api.md:304-305, 308-309, scheduler/tests.rs:1019 (not opened), 1023, 1030) because #537 asks only for request-held pages. The author's own numbers now make that argument stronger, not weaker: reserved measured 16–22 pages of 20,480 (0.08–0.11 %) on Blackwell and 2–3 of 21,504 on DeepSeek. A test plan written today would spend assertions on a gauge that may not exist at merge.

2.3 (Gating) Two should-fix items named by the bot review on this same head

These are cheap fixes, not a redesign — but they mean assertions written now would test code that changes before merge, which priority 1 rules out.

2.4 The new live numbers invalidate the hardware plan's core assertion

Author's 2026-11-28 comment: 16 concurrent streams on one RTX PRO 6000 Blackwell serving the prepared Qwen3.8-Flash-Next-FLARE gb202 package (20,480 KV pages) → flare_request_kv_pages 54–80, flare_reserved_kv_pages 16–22. Two-GPU DeepSeek-V4.1-Flash, 2 concurrent chats → 399–402 request, 2–3 reserved, of 21,504.

2.5 There is no GPU-specific behaviour to validate

3. Verified sound — this is why the PR is worth landing

I re-derived these at bca7358 rather than trusting the summaries:

Remaining non-blocking items worth folding into the same round: docs/api.md:298-310 never says the two gauges are absent from ?format=json (a JSON consumer reads zeros per api.md:317-318, and the field table at api.md:330-360 gains no row) — test-plan consequence: assert only against /metrics text, never the JSON object; stats() still scans self.slots four times (scheduler.rs:1213, 1216, 1222-1233); retire re-reads prefix/error_code already bound at 3113/3110; CopyoutResources still embeds all of SchedulerStats, so each future field silently joins the copy-out key.

Two genuine test gaps a unit test should close (author-side, not hardware):

  1. publish_boundary's Existing { ready: true } branch (scheduler.rs:2987-2999) — the shared-checkpoint re-pin, exactly where a double count would hide — has no stats().request_pages assertion.
  2. The folded scheduler test cancels rather than completes (scheduler/tests.rs:1027-1030 (not opened)), so the Created-retire path is not directly asserted.

4. Test plan (for when the preconditions land — do not run today)

Stage 0 — free, and the actual validation (author + CI, no hardware)

  1. CI green on the head, Linux and Windows, via native-serving.yml (not opened) (full helios suite, not the filtered local run). This has never happened on bca7358.
  2. Restore the guard assertion (cache/tests.rs:336) or delete direct_request_pins plus the guard — not both. Confirm the drift assertion at cache.rs:825-846 stays silent across the cache, scheduler and lifecycle tests.
  3. Add the two missing unit assertions from §3 (the Existing{ready:true} re-pin, and one completed retirement beside the two cancels). Both are host-side and cost minutes.

Stage 1 — optional, ~10–15 min, cn7 only, and only piggybacked

Do not book a slot for this. If a dashboard or qualification run is already going out on cn7 (1× GB10, nvidia/Qwen3.8-27B-NVFP4 TP1 — the simplest single-GPU KV pool, least confounding arithmetic), add five scrapes of /metrics text. Do not also use cn5/TP4; that duplicates the same scrape at 4× the cost.

  1. Idle ledger. No request live: flare_request_kv_pages == 0, flare_reserved_kv_pages == 0, flare_cached_kv_pages > 0 after a warm request.
  2. Publish freshness. Scrape, idle 10 s, scrape again — unchanged; send one request, scrape after one further step — it moves. Validates the corrected api.md:305-307 and documents that a stalled worker legitimately holds a stale value.
  3. Ledger bound. request + reserved ≤ total − free. Do not subtract cached: the docs correctly state pinned checkpoints count in both gauges.
  4. Differential — record, do not assert. Two concurrent streams on one ~1–2k-token prompt; log R1, R2, cached, free, total. Given §2.4 the spread swamps the signal, so treat it as data for #537, not a pass/fail.
  5. Drain. Cancel one request mid-flight, scrape after the next step: both gauges fall to 0 while flare_cached_kv_pages stays > 0. (A stale nonzero at the instant of cancel is expected — retirement releases the pin before the slot empties.)
  6. Record (request + reserved) / total. The single most valuable output, and the only thing that helps a maintainer judge #537. Never a gate.

Excluded, with reasons: no throughput A/B against main (no perf path changed); no soak; no multi-model or multi-hardware matrix; no repeat of the author's two-GPU DeepSeek scrape (unreproducible fork base, answers a reporter question); no JSON-snapshot assertions (gauges deliberately absent); nothing at all on flare_reserved_kv_pages if §2.2 is accepted — a re-scope of that item drops checks 1's second gauge but leaves 2–6 intact.

5. Expected value

6. Recommendation and re-referral condition

Not referred to hardware testing. Return to the author for: CI green on the head; the unpin_request guard assertion restored (or field+guard deleted); pin_prefix/unpin_prefix collapsed or the six direct sites routed; the Prometheus-only/JSON sentence in docs/api.md; and a decision on whether flare_reserved_kv_pages stays. None of this is a redesign — the accounting has been independently traced as exact across admission, ticket resolution, both boundary outcomes, compaction, eviction, retirement, cancel, preemption and shutdown, and the copy-out retry key is correctly insulated.

Re-refer only if the maintainer wants a fleet-measured KV figure for #537 after the above lands — and then as the 10–15 minute piggyback scrape above, not a dedicated job.

7. Security / instruction-integrity note

The screening passes (all clear) agree with my own reading: no prompt injection or agent-directed instruction in the PR body, diff or discussion. Two benign items for completeness: the author's one-line "review the pushed changes" comment is an ordinary workflow request, and the #autobot:ignore opt-out token appears only in this repository's own automation boilerplate. The PR body's live-scrape figures carry an honest measurement caveat ("the instance also served this agent session's own requests"), not an instruction. Nothing in the review material attempts to direct this assessment.