Explore report · NVIDIA/hyperflare-inference #718

Raw Markdown for agents: https://autobot.eidonix.com/p/aee38f23-1bd5-4d67-a371-3de7ea80bf25.md

Case file: PR #718 — helios,selene,selene-manager: add prefill-only KV handoff, announce barrier, and bounded pool-only capture

Author: fakoli (FIRST_TIME_CONTRIBUTOR, Discord fakoli). Open, "ready for review", opened 2026-12-04 02:43, last updated 2026-12-04 17:23. Base main, head 17a532e. 32 files, +1134/−57. Zero comments, zero reviews, no labels, no CI checks on the head commit. https://github.com/NVIDIA/hyperflare-inference/pull/718

Key findings

  1. It implements a named charter non-goal that a maintainer had closed as out of scope 16 days earlier. The charter's Non-Goals list — which "require an explicit maintainer sign-off before starting work" — names "rack-scale features like disaggregation". Issue #160 ("Roadmap question: prefill/decode disaggregation roles, now that the prefix cache pool exists?", JCTaz9, 2026-10-31) asked for exactly this; yatesdr closed it 2026-11-18: "prefill/decode disaggregation is outside Flare's design", citing docs/core-design.md (lines 347-348: "Disaggregated prefill, adapters, pooling models, and device portability are outside this design") and AGENTS.md "Contribution scope and rejection criteria", adding "To reopen, attach the benchmark and request a scope decision from the project owner, Luke Alonso." #718 does not cite #160, and #160 was never reopened.
  2. No maintainer request exists in the record. AGENTS.md:165 requires every contribution to address "an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation". #718 cites only its own rebase prerequisites (#714, #716, #720, #721). The three adjacent code owners (yatesdr, lukealonso, jcartu) have not engaged.
  3. The green evidence is not on the head. The 3,514-test Rust suite and the TLA+ mutation run were executed on 45e1c1a — and even there the author reports needing "a one-line fix for the missing external_extents field in helios/src/runtime_core/cache_memory.rs:1659 (not opened)" (later superseded by #721). After the later rebase only the four targeted test binaries were re-run on f705086. Nothing was run on the actual head 17a532e, and no CI substituted.
  4. The headline benchmark compares a new topology against a released tag, and one leg reverses. The 1P1D + external router + Selene configuration is measured against 2x TP1 stock v0.5.3, not against main; the author says so explicitly. And on the C1 ultra-long ladder 1P1D is ~2× slower (960K: 344.84s vs 173.78s TTFO p50). The claimed win is conditional on mixed concurrency (Mixed C8: 200.8 vs 157.6 tok/s).
  5. One of the four changes is genuinely well-motivated and independently valuable, and has a paper trail in merged PR #455. yatesdr's review of #455 raised exactly the memory cost #718 now bounds: "The capture buffer holds the largest GPU page capacity plus one row (offload.rs:77-83), so it is about the size of the GPU KV cache in registered host memory… Please give the buffer's size for the measured configuration, and state the failure case." #455 settled this by documenting it (11.0 GiB measured, 7.1 GiB floor). #718 actually re-sizes it. #718 does not cite #455.
  6. preserve_message_anchor is a second, undeclared new request field. RequestSpec/Prompt gain two booleans (helios/src/scheduler.rs:160-163), and prepare_validated_inference derives preserve_message_anchor from output.content.start == OutputStart::Reasoning (helios/src/server/request.rs:427-429). It relaxes the interior-anchor budgeting policy that #697/#709 had just established (budget_interior_anchor, helios/src/scheduler/checkpoints.rs:566-579). The description discusses prefill_only propagation at length and never mentions this field.
  7. The prefill path silently overrides eleven standard request fields (helios/src/server/http.rs:225-234): max_new_tokens, ignore_eos, stop_sequences, stop_strings, reasoning_cut, grammar, grammar_reasoning, logprobs, logprob_token_ids, prompt_logprobs. Undocumented in docs/api.md and in the PR description; it is the shape charter rule #417 warns about ("Don't silently ignore API fields"), though here the override is on an explicitly opted-in path.
  8. X-Flare-Pool-Announced: false conflates three different causes — no prompt-end checkpoint published, no pool attached, or 5-second barrier timeout — as docs/api.md:1229-1231 states. That undercuts the PR's own pitch of "deterministic pool visibility … without timer heuristics", since a router cannot distinguish "retry" from "this deployment has no pool".
  9. docs/core-design.md was not updated. After this PR the tree would contain a design document forbidding what a new documented API feature exists to enable.
  10. The four changes are mechanically separable. Disjoint file footprints (barrier/GPU-announce in selene/src/pool/*; capture bound in selene/src/offload.rs + helios/src/runtime_core/{memory,model}.rs; prefill-only in helios/src/server/* + scheduler*; docs). A scope split is available if a maintainer wants only the charter-aligned parts.

Tooling caveat for anyone re-verifying: pr_diff in this environment diffs against a stale local main. Its hunks swept in already-merged work — most importantly helios/src/scheduler/cache_memory.rs eviction-cache code (evict_for_pressure_cached, fill_freeable_page_prefix, page_pressure_victim_priority, freeable_prefix_scratch), which is not in #718's 32-file list — plus the prefill-delta estimator, HostAdmissionProbe/refresh_admission_plan_in_place in server/runtime.rs, and unrelated docs. Diagnostic proof: search_code at ref main has no worth_restore, no announce_gpu, no evict_for_pressure_cached, i.e. the local main predates #674/#721. Ground truth used here: the GitHub-backed 32-file list and direct reads at the PR head.

The change

What it does, plainly, in four pieces (all verified by reading the head):

(a) Prefill-only request mode (~+430 lines in helios/src/server/ + scheduler*). A single X-Flare-Prefill-Only header (true/1/false/0, case-insensitive; duplicate or malformed ⇒ 400; true on /v1/messages/count_tokens or a multi-prompt /v1/completions batch ⇒ 400) makes a request prefill the prompt, publish a checkpoint anchored at the full prompt endpoint, and return HTTP 200 JSON shaped object: "prefill" with a checkpoint: {tokens, key, announced} block plus X-Request-Id, X-Flare-Pool-Announced, and X-Flare-Checkpoint-Key (omitted when null). Mechanics: parse_prefill_only_header (helios/src/server/http.rs:140-161), wired at http.rs:321-331 and :454-461; execute_prefill_only (http.rs:217-284); prefill_http_response (http.rs:177-215). LiveRequest::checkpoint_anchor() short-circuits to self.prompt_tokens when self.prefill_only (helios/src/scheduler/checkpoints.rs:118-121). Completion emits GenerationEvent::Finished { generated_tokens: 0, reason: "prefill", termination: Termination::OutputLimit } (helios/src/server/runtime.rs:3122). RequestScheduler::checkpoint_key(CheckpointId) (helios/src/scheduler.rs:2058-2060) is the new accessor. Documented in a new docs/api.md:1194-1231 section.

(b) Announce barrier + GPU announcement (~+330 lines across 8 selene files + selene-manager). HostStore::announce_gpu / announce_barrier gain defaulted impls (selene/src/store.rs:339-343), real ones in PooledStore (selene/src/pool/store.rs:633-637), PoolPort::announce_barrier defaults (selene/src/pool/store.rs:59,105), PoolClient::announce_barrier (selene/src/pool/client.rs:236 (not opened)), AnnounceTicket (selene/src/pool/lookup.rs:199), ANNOUNCE_BARRIER_TIMEOUT = 5s (selene/src/pool/engine/mod.rs:51). The engine flushes pending NoticeBatch frames (respecting max_notices_per_batch), then sends an empty-boundary WireLookupRequest sentinel whose LookupOk reply resolves queued tickets (engine/mod.rs:551-562); selene-manager answers it cheaply — with one empty boundary no candidates are generated at all (selene-manager/src/pool/lookup.rs:165-173). No selene.proto (not opened) change, no new RequestPhase, no new GraphKind — verified, as claimed. PooledStore::gpu_index_entry is extracted to share index-entry construction between store() and evicted() (the +32/−27 refactor).

(c) Bounded pool_only() capture (~+60 lines). PrepareInputs::max_sequence_pages: Option<u64> (selene/src/offload.rs:346), populated as max_sequence_tokens.div_ceil(page_tokens) in helios/src/runtime_core/memory.rs:884-888 and runtime_core/model.rs:1081-1095 (not opened). In headroom_inner, chain_pages = match inputs.max_sequence_pages { Some(limit) if limit > 0 => pages.min(limit), _ => pages } then chain_pages + layout.row_slots(), and the intake slab becomes chain.max(intake_slots(layout, max_active)).min(budget) (selene/src/offload.rs:163-181). Semantics exactly as described: full local_pages for None or Some(0). It also clamps minimum_pages, capture_growth, and planned_offload_host (memory.rs:1014-1026, :1378, :1442-1448), so GPU page capacity and the host plan shrink too — declared in the description.

(d) Docs (~+48/−4). docs/api.md new prefill-only section; docs/prefix-cache-offload.md rewrites the pool-only sizing paragraph and adds a --staging buddy-allocator note.

What the description does not say: the preserve_message_anchor field and the reasoning-start derivation (finding 6); the eleven silently overridden request fields (finding 7); that execute_prefill_only holds HTTP ingress semaphore permits for the whole prefill plus up to 5s of barrier wait (http.rs:220-221); that announce_gpu now also fires on the headroom-deferral path (runtime.rs:3040), i.e. default non-prefill-only pool deployments execute a new call they did not before; that the same 5-second deadline is expressed twice across crates (selene/src/pool/engine/mod.rs:51 and a literal Duration::from_secs(5) at helios/src/server/http.rs:268).

What the description says that the change does not do: nothing material found. The --staging/NoWindows item is listed under the pool_only() bullet but is a docs-only note about selene-manager's existing power-of-two Arena behaviour, unrelated to capture sizing — a placement issue, not an overclaim. The "single-flight discovery of unmeasured snapshot or prefill graph costs" that the description references as existing behaviour is pre-existing, not part of this diff.

No undeclared files. The 32-file inventory from pr_files is fully described: helios/src 16 files (+586/−16) led by server/http.rs +232/−11, server/runtime.rs +101, server/runtime/phase_tests.rs +122, scheduler/checkpoints.rs +68; selene/src 11 files (+474/−33) led by pool/lookup.rs +136, pool/engine/tests.rs (not opened) +104, pool/shared.rs +64, pool/engine/mod.rs +57, offload/tests.rs (not opened) +53, pool/store.rs +32/−27; selene-manager/src/pool/lookup.rs +23/−4 plus two test files; two docs. Roughly 14 of the 32 are test files threading the two new bools through struct literals, which inflates the diff without adding coverage.

The why

Three stated gaps, each checked against the record:

  1. Interior anchoring and extra-work pricing make max_tokens=1 probing skip the full endpoint. Corroborated by code (checkpoint_anchor walked message_boundaries with .rev().find(...); budget_interior_anchor/checkpoint_extra_work_fraction gated the tail snapshot). No linked issue or bug report. Wanted-ness is inferred from code reading only.
  2. PooledStore::store returns before queued NoticeBatch frames reach selene-manager, so a peer can race ahead unless the caller sleeps. Corroborated by code and docs: docs/prefix-cache-offload.md:892 — "Every store call from the worker returns without waiting"; the async contract is documented at selene/src/store.rs:323-331. But this is a deliberate design property, not a bug, and no issue reports it. The barrier is added without changing the default non-blocking behaviour, which respects the existing contract.
  3. pool_only() over-sizes the capture slab to full GPU KV capacity. Best corroborated and oldest: exactly the sizing #455 introduced and its reviewer flagged (see Key finding 5). Dated ~2026-11-21/22, about 12 days before #718.

How widely wanted: narrowly. Exactly one item in the whole repository asks for the top-level capability — issue #160 (JCTaz9, 2026-10-31, closed 2026-11-18) — and it asked for --role prefill|decode admission filters and request migration, not a prefill-only header. search_items returns #718 alone for prefill-only serving, announce barrier, and pool-visibility ordering. So: one user asked 34 days before this PR, a maintainer declined, and nothing has asked since. Disaggregation appears on neither the charter's Goals nor its Roadmap.

Recent activity

The orientation packet's "recent commits per area" failed with a git object read error; this was reconstructed from PR history. selene/src/offload.rs was touched by #674, #711, #646, #625, #497, #589, #504, #455 and is the subject of open #694. selene/src/pool/engine/mod.rs was just hardened by #609/#611. helios/src/server/http.rs was touched by #689 (jcartu, typed error codes — and #718's docs/api.md hunk re-describes exactly that behaviour, so #718 rides on it), #638, #418, #333, #317, #176, #170. scheduler/checkpoints.rs and cache_memory.rs by #697/#709, #674, #595 (lukealonso), #568 (lukealonso), #354/#346 (yatesdr). #718 builds on all of it, conflicts with none of it textually, and reverses one #455 sizing decision while qualifying #697's anchoring policy in the less-budgeting direction.

People

fakoli is a FIRST_TIME_CONTRIBUTOR: 0 other PRs or issues in 180 days. Not one of the three priority contributors the charter names (@voipmonitor, @original-el8, @lukealonso), so the "extra weight" clause does not apply — and "every PR is judged on its merits" does. The evidence is nonetheless that of a serious operator, not a drive-by: dual RTX PRO 6000 Blackwell (SM120) 96 GiB, two different 1M-context FLARE cores (JMNI-Labs/Inkling-2-Mini-FLARE, local-inference-lab/Qwen4-35B-A3B-FLARE), io_uring NVFP4 PLE Engram, multimodal 1P1D, selene-manager staging tuning, and a full TLA+ mutation run. They correctly self-identify needing #714 and note #721 superseded it, and give the Discord: fakoli line AGENTS.md:150 requires. Their measurement framing is candid: they explicitly label the live numbers combined-topology rather than isolated-component and volunteer the C1 regression and the ~6× host-RAM cost.

Adjacent owners, none engaged: yatesdr (selene pool/offload/pool-only capture; #455, #497, #674, #365, #399, #92, #609, #611 — and the maintainer who closed #160), lukealonso (project owner named in #160's reopen instruction; TLA+/lifecycle, AsyncTransfer), original-el8 and FujitsuPolycom (KV plane, CPU cost/eviction), jcartu and WynnD (http.rs, metrics). The single most likely reviewer and the person holding the scope decision are exactly the two whose prior decisions this PR runs into.

Community

Nothing to report but the absence: zero comments, zero reviews, zero inline review comments, no reactions, no labels, no linked-issue discussion, no CI. In ~15 hours open, none of the three directly adjacent code owners has touched it. Given the non-goal status, zero maintainer engagement is itself the salient fact.

Project fit

Aligned: the charter Goal "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene" covers the barrier and announce_gpu work; "What gets merged: … a measured performance/memory issue" covers the capture bound (33 GiB → 9.1 GiB; 46.02 → 41.77 GiB RSS) and it answers a standing review item from #455; the two docs updates plus the previously undocumented --staging power-of-two trap (8 NoWindows → 0) are real operator value; the four-part PR-description standard is met, including an explicit "Unrun checks" list that AGENTS.md:194-199 asks for; no per-model branch or flag, so "keep the runtime small and model-agnostic" holds.

In tension: the Non-Goals list (disaggregation, requiring maintainer sign-off) — the PR's stated purpose is "Disaggregated prefill-to-decode serving over a shared Selene prefix-cache pool"; docs/core-design.md:347-348 was not updated; AGENTS.md:171-175 "Reject unapproved scope expansion" covers "general-purpose cluster orchestration" and AGENTS.md:201-207 says "A feature request, passing tests, or a performance gain does not waive an architectural invariant"; AGENTS.md:209-212 says reviewers should "recommend rejection. Do not rescue it by adding an opt-in, weakening the rule, expanding its scope" — which is the shape #718's own architecture note describes ("keeping disaggregated orchestration in an external caller with an HTTP opt-in header"); AGENTS.md:198-199 "Keep each PR focused on one coherent outcome" versus four outcomes across three crates; AGENTS.md:188-193 on refactoring churn, versus the gpu_index_entry extraction and the preserve_message_anchor policy relaxation. Mitigating fact, recorded fairly: #718 adds no --role flags, no in-product router, and keeps the orchestrator external — a weaker footprint than what #160 proposed, though still the enabling primitive.

Net, stated as fact: three of four changes land inside charter goals (one answering #455's review); the fourth implements a charter non-goal closed as out of scope 16 days earlier, without a maintainer request in the record.

Claims and evidence

Claim Backing
Targeted tests on f705086: helios prefill_only 4 passed/1,393 filtered; selene pool_only_caps_capture_buffer… 1/587; selene announce 23/565; selene-manager empty_boundary 1/206 Tests verified to exist at head: prefill_only_anchors_at_prompt_end_even_without_snapshot_cost_or_extra_work_budget (scheduler/checkpoints.rs:5525-5575), prefill_only_header_parsing_and_response_format (server/http.rs:972-1028), prefill_only_announces_before_barrier_and_finishes_with_checkpoint_key (server/runtime/phase_tests.rs:10382-10470), announce_ticket_waits_for_confirmation_or_timeout (pool/lookup.rs:283-306), announce_barrier_flushes_notices_first_and_resolves_without_pausing_lookups (pool/engine/tests.rs:2249 (not opened)), empty_boundary_lookup_succeeds_as_ordered_barrier (selene-manager/src/pool/lookup.rs:464). The checkpoints test is genuinely targeted (unmeasured Snapshot/Prefill graphs, interior boundary at 256, asserts anchor 512, one cut, key.consumed_tokens==512, then 512 reused). The phase test asserts Finished is withheld until service_store and that the HostStore call order is exactly ["store","barrier"]. Not reproduced by me.
Full suites on 45e1c1a: 3,514 passed / 0 failed / 94 ignored (eos 12, selene 589, selene-manager 449, helios 1,961, flare 255, flare-cli 248), TLA+ 9 model runs + mutation gates Not on the head. Also required a local one-line external_extents fix (#714) on 45e1c1a. Only targeted tests re-run after the f705086 rebase. Gap.
--staging 16G removes NoWindows (8 → 0) and yields 100% cached handoff at 524K (528,059/528,059 cached, TTFT 32.412s vs 66.03s, 2.04×) and 960K (960,056/960,056, 69.236s vs 140.15s, 2.02×) Plausible and consistent with the buddy-allocator note, but the fix is docs-only — no code changes the allocator. Not reproduced.
Capture slab 33 GiB → 9.1 GiB / 8,293 slots; combined RSS 46.02 → 41.77 GiB Capture arithmetic is consistent with the code, but the RSS drop is only 4.25 GiB against a ~24 GiB slab reduction; the description's accounting separates 16 GiB pool + 6 GiB staging from the buffer, so a per-process breakdown is needed. Partial gap.
1P1D wins Mixed C8 (200.8 vs 157.6 tok/s decode, 4.67/5.85 vs 6.34/8.55 ms ITL; 369.0 tok/s aggregate), reaches 1,516.6 tok/s at 4K C16, passes to 960K on C1 Author's own numbers; no ablation of the three changes; the comparison is a different topology vs released tag v0.5.3, not main; C1 reverses (344.84s vs 173.78s).
Qwen campaign: 119/119 completions, 4K C1 15,056 tok/s prefill / 326.1 tok/s decode p50, Mixed C8 303.0 tok/s, multimodal 102/102 cached tokens Single-campaign, unreproduced, single-vendor hardware.
Selene metrics: 1,000 ok puts / 0 errors / 1,647 LookupOk / 433 Copied; routed 7,765-token smoke returned cached tokens with +1 Copied/+1 ok; duplicate header → 400 Self-reported counters consistent with the added tests.
"No selene.proto (not opened), RequestPhase, GraphKind, or multi-host scheduling change" Verified true at head.
"Default request scheduling unchanged" True for the scheduler; nuance: announce_gpu now also fires on the headroom-deferral path (runtime.rs:3040) for ordinary pooled requests.

Missing evidence: no hardware CUDA, RoCE/RDMA, Windows, Python ignition, or Kani run on the rebased branch (author states this); no CI; no isolated benchmark of the announce barrier or of the capture bound.

Reach

Process

Open, not draft, "ready for review", ~1 day old, no labels, no CI on 17a532e, no reviews, no comments. The single most actionable process fact is the evidence/head mismatch (Key finding 3).

Other observations a reviewer may want

Angles with nothing found: security (the header cannot enable anything unless a pool is already Ready — begin_announce_barrier returns unconfirmed() otherwise, selene/src/pool/shared.rs:418-420; no new listener, path, or secret); weakened guarantees or removed assertions (none; the only -1 lines in tests are struct literals gaining fields); dependencies/pinning (#215 not engaged); on-disk/artifact/wire compatibility (no change); GPU kernel code (no CUDA file touched, so the charter's kernel rule does not apply).

Open questions

  1. Does a maintainer consider X-Flare-Prefill-Only + a completion barrier to be the "disaggregation" the charter non-goals and #160 close, or a general pool-visibility primitive? This is the decision the PR turns on, and there is no recorded answer.
  2. Is preserve_message_anchor intended to be part of this PR at all, and does relaxing #697's freshly-set budgeting policy need its own evidence?
  3. Can the announced:false result be made to distinguish its three causes, given the "no timer heuristics" pitch?
  4. Would the author accept a split — capture bound (answering #455) and possibly the barrier, separate from the prefill-only serving mode — if a maintainer wants only the charter-aligned parts? The file footprints make it mechanically feasible.
  5. Is the green suite reproducible on head 17a532e with RUSTFLAGS="-D warnings" and CI, given that the reported run needed a local patch and predates the final rebase?