Value proposition report · NVIDIA/hyperflare-inference #549

Raw Markdown for agents: https://autobot.eidonix.com/p/5583d486-a971-4332-9c89-f86779d902fb.md

Verdict: worth merging — the change belongs in Flare; the remaining items are cheap polish, not gates

Head bca7358, +202/−34 across 8 files, no new commits since the last review round. The only new material is WynnD's live-validation table (2026-11-28 03:26) and a bot review asking for "Changes Requested" with 0 blockers, 2 should-fix items, ~55 deletable lines and 7 nits. I re-verified the counter's invariant from the code at this head (not from the description) and re-checked the fit against the charter; the verdict is unchanged: merge it, ideally after folding in the one doc sentence and the reviewer's two should-fix items.

Charter fit — this is on the merge list, at the right layer

It closes a reported, reproducible defect. #537 (hyperflare-inference v0.3.2 c0c4f79) shows that with the shipped gauges an operator can only bracket KV use: 1 − (free + snapshot_backing)/total ≈ 16 % as an upper bound, 1 − (free + cached + snapshot_backing)/total ≈ 0 % as a lower bound, versus ≈9 % on vLLM for the same load. Two mechanisms cause it — a request admitted on a prefix hit shares the checkpoint's pages in place, so they stay inside flare_cached_kv_pages; and reserved growth pages leave free_pages at admission while appearing in no gauge at all. The charter's "What gets merged" list explicitly includes "a reproducible bug … or bad docs", and this is the KV half of a monitoring story #541 is already shipping. It is not a speculative feature request.

Solve it in the right place, with the smallest footprint. The counter lives where the quantity lives: PrefixCheckpointCache maintains request_pinned_pages as pins change (helios/src/cache.rs:536–566, reported at 851), the scheduler adds its live slots' private_pages and reserved_pages in the loop that already counted active_requests (helios/src/scheduler.rs:1200–1221), and the renderer emits two gauges with help text (helios/src/server/metrics.rs:1309–1318). No flag, env var, per-model branch, backend abstraction or new switch — nothing touching a non-goal, nothing near the "no configuration switches / no per-model special cases" rules. This is a runtime-observability concern, which is exactly helios's remit.

It respects the invariant it could have broken. The cache keeps ready_checkpoints/unready_checkpoints/tail_pages specifically so stats never walks nodes (helios/src/cache.rs:257–275, 825–861). The new counter follows that pattern instead of introducing a per-scrape graph walk the code forbids. That is the strongest architectural argument for this PR over the obvious alternative.

No duplication and no simpler route. #537's own second proposal — split cached_kv_pages into pinned and idle — needs identical bookkeeping and yields a number you must combine with private pages anyway. A ready-made flare_kv_cache_usage_ratio would hide the reserved term and freeze arithmetic that #548's metric-mapping work wants to state in prose. Nothing already in the tree reports request-referenced pages: flare_free_kv_pages, flare_cached_kv_pages, flare_snapshot_backing_pages and flare_active_requests are the whole existing set.

Correctness, re-derived at this head

Who benefits, and how much

Operators who migrated vLLM/Grafana dashboards, and #541's KV panel, which today can only show bounds. flare_request_kv_pages is the valuable half — it makes (request + reserved) / total the documented vLLM-comparable figure (docs/api.md:298–310). flare_reserved_kv_pages is the cheap half but accounts for the only pages that vanish from every other gauge at admission, and it keeps the documented arithmetic honest. The audience is real but modest: this is a focused local-inference prototype, not a fleet server, so the benefit is one dashboard-grade number, not an SLO primitive.

Cost

Two u64 per Checkpoint, one usize on the cache, one add/sub per pin on a chain already walked, and per stats one loop over at most slot-count live requests. No GPU work, no allocation, no scheduling decision, no new test infrastructure. The description states the cost was read from code rather than measured, which is the right disclosure for a visibility-only change. The one structural cost worth naming: SchedulerStats now doubles as the deferred-copy-out key, so every future field must be judged for key-worthiness — mitigated by the commented exception, and worth a follow-up only if the struct keeps absorbing fields.

Evidence — adequate, honestly scoped, weaker than it looks on KV pressure

Four-part description with a Discord: line and an explicit not-run list (Windows build, full helios suite, exported core → CI). The new live table adds a second hardware configuration and a shared-prefix case: 54–80 request pages and 16–22 reserved of 20,480 pages at 16 concurrent streams, and 399–402 / 2–3 of 21,504 on two-GPU DeepSeek-V4.1-Flash with two chats; 809 tests, one unrelated template test requiring FLARE_TEST_TEMPLATE_DIR.

My honest reservation, which does not change the verdict: those request-page numbers are ~0.4 % and ~1.9 % of the pool, so the live data proves the gauges move, are monotone with load, and satisfy the implied bound — it does not reproduce #537's ≈16 %-vs-≈9 % heavy-context gap, where a vLLM dashboard would actually mislead. A scrape during a long-context run at high page occupancy would be the data that closes that loop, and it is cheap to add. Also note the validation image mixes #549 with #548 and #560, so the scrape does not isolate this PR's effect (though the unit tests do).

What I would ask for, none of it a gate

  1. One doc sentence (the reviewer's main should-fix): the two gauges are Prometheus-only; Snapshot (metrics.rs:70–129), which is the format=json body and the table at docs/api.md:330–360, does not carry them. The paragraph at docs/api.md:298–310 should say so, and the existing "Beyond the JSON fields below, the text includes …" sentence at 292–296 could name them. This matters because the JSON table is otherwise the authoritative field list, even though flare_snapshot_backing_pages is already a gauge with no table row.
  2. The reviewer's second should-fix and the ~55 subtractable lines — micro-scale (helper shape, one guard, folded test assertions). They improve the patch; they do not change whether the patch is right.
  3. Follow-up, not this PR: adding the two fields to Snapshot would let the terminal dashboard plot them (dashboard.rs:514–529 currently prints cached/free/total only).

Bottom line: this is a defect-driven, correctly layered, honestly evidenced observability change whose bookkeeping cost the cache was already designed to absorb, and whose whole point is a number the project currently cannot compute. Worth merging; ask for the JSON sentence and let CI cover the Windows build and full suite the description already flags. #549 and #548 touch disjoint regions of metrics.rs, so merge order does not matter.