#1 [high] Change: what PR #742 does, size, and how the cap flows
PR #742 "selene,helios: bound pool-only capture buffer to max_sequence_pages", author fakoli (FIRST_TIME_CONTRIBUTOR), open, ready for review, opened 2026-12-05, head 02990da, base main f46a99220a. 9 files, +115/-10. No comments/reviews, no CI checks.
Change in code (verified in diff, result 1):
- selene/src/offload.rs:165-171 headroom_inner (pool-only capture branch) now computes
chain_pages = match inputs.max_sequence_pages { Some(limit) if limit > 0 => pages.min(limit), _ => pages }before addinglayout.row_slots().Some(0)andNonestay uncapped (= previous behaviour). - selene/src/offload.rs:340-346 new field
pub max_sequence_pages: Option<u64>on PrepareInputs with doc comment. - selene/src/offload.rs:628 destructuring in prepare_with_inputs_budget_with_progress ignores the field (
max_sequence_pages: _) — it only reaches sizing through headroom_inner(effective.headroom_inner(..., inputs, local_pages, host_budget)) at offload.rs:704-710, which both sizes the slab bytes (offload.rs:711-714) and validates the "host budget cannot hold a full pool capture" check (offload.rs:176-178). - helios/src/runtime_core/memory.rs:996
max_sequence_pages = context.div_ceil(contract.cache.page_tokens as u64)where context = server_config["max_sequence_tokens"] (required, errors if absent). - memory.rs:1130 passes Some(max_sequence_pages); memory.rs:1132
capture.then_some(minimum_pages.min(max_sequence_pages))replacescapture.then_some(minimum_pages)(this local_pages arg is the pool-capturelocal_pagesin headroom_inner). - memory.rs:1486
capture_growth(layout, pages.min(max_sequence_pages), ...)in the capacities() growth callback. - memory.rs:1552-1555
planned_offload_hostchain_bytes usespages.min(max_sequence_pages). - helios/src/runtime_core/model.rs:1155-1157
max_sequence_tokens.as_u64().map(|c| c.div_ceil(page_tokens))— NOTE: Option here, so if server_config lacks max_sequence_tokens the runtime attach path stays uncapped, unlike memory.rs which hard-errors. - docs/prefix-cache-offload.md pool-only capture buffer section rewritten to document
min(GPU page capacity, ceil(max_sequence_tokens / page_tokens))+ one row, keeping GLM-5.3-Flash TP4 11.0 GiB/1,664 slots and 7.1 GiB floor example andhost budget cannot hold a full pool capturefailure text. - Tests: selene/src/offload/tests.rs:566-620 pool_only_caps_capture_buffer_to_max_sequence_pages; helios memory.rs:2440-2457 pool_capture_growth_caps_at_max_sequence_pages_without_throttling_gpu_pages; plus
max_sequence_pages: Noneadded to 8 existing PrepareInputs fixtures (helios/src/offload/pool/tests.rs:134, helios memory.rs:2031, selene/src/offload/tests.rs:14,51, sharded/tests.rs x4, selene-manager/tests/client.rs:3255,3509, offload.rs:139).
#2 [high] Related work: closed #718 is superseded by #742; #742 takes only its pool_only() part
#718 "helios,selene,selene-manager: add prefill-only KV handoff, announce barrier, and bounded pool-only capture" by fakoli, +1134/-57 over 32 files, opened 2026-12-04, CLOSED (not merged) 2026-12-05 08:52. Labels: area:api, area:memory, area:selene, enhancement, performance, triage:design-review. #742's body says "Supersedes the bundled pool_only() change previously included in closed #718." and the local index records #742 as referring to #718 ("this closes").
#718's scope that #742 does NOT carry (so those parts are currently unlanded/abandoned):
- helios/src/server/http.rs +232:
X-Flare-Prefill-Onlyheader on /v1/chat/completions, /v1/completions, /v1/messages, /v1/responses (400 on duplicate/malformed, 400 on count_tokens and multi-prompt batches), JSONobject: "prefill"response with X-Flare-Pool-Announced / X-Flare-Checkpoint-Key, docs/api.md +39. - helios/src/scheduler.rs, scheduler/checkpoints.rs:
prefill_onlyon runtime::Prompt/RequestSpec/LiveRequest, checkpoint_anchor() = prompt_tokens, checkpoint_key(CheckpointId), pending_prefill_finishes, GenerationEvent::Finished reason "prefill". - selene/src/pool/*, selene-manager/src/pool/lookup.rs: HostStore::announce_gpu, HostStore::announce_barrier/AnnounceTicket, PoolClient::announce_barrier with ANNOUNCE_BARRIER_TIMEOUT=5s, empty-boundary WireLookupRequest sentinel, gpu_index_entry refactor.
- docs/prefix-cache-offload.md note in #718 was about selene-manager Arena power-of-two
--staging(e.g.--staging 16Gto avoid NoWindows) — a DIFFERENT doc edit from #742's.
#718's own claimed pool_only() numbers differ from #742's: on JMNI-Labs/Inkling-2-Mini-FLARE, 1M ctx, RTX PRO 6000 96 GiB, capture went from ~33 GiB to 9.1 GiB / 8,293 slots, combined RSS 46.02 -> 41.77 GiB. #742 claims 11.8 GiB / 16,475 slots for Qwen4-35B-A3B with 24 GiB container limit. Different model/hardware, so not directly contradictory, but the two bodies report different hardware/container limits for what is described as the same patch.
#718 discussion: two flare-autobot comments only — (1) case file opened; (2) "Review Stopped: Auto-Review halted due to finding: It is low value or does not align with the project charter" with a Value Proposition Report link (autobot.eidonix.com/p/1cf7d0ca...). #718 referred to #714 (closed), #716 (merged), #720 (merged), #721 (merged); referred to by #715 (open) and #742 (open).
#3 [high] Community: #160 scope thread — maintainer ruled disaggregation out of scope; #742 is presented as the in-scope remnant
#160 "Roadmap question: prefill/decode disaggregation roles, now that the prefix cache pool exists?" by JCTaz9, opened 2026-10-31, CLOSED 2026-11-18 by yatesdr: "prefill/decode disaggregation is outside Flare's design. docs/core-design.md (lines 347-348) states 'Disaggregated prefill ... outside this design', and request routing across instances ... is cluster orchestration, which AGENTS.md ... reserves for an explicit maintainer decision. To reopen, attach the benchmark and request a scope decision from the project owner, Luke Alonso."
The same thread was REOPENED-in-substance by fakoli on 2026-12-05 08:52 (same day #742 opened) with 1P1D measurements and an explicit scope question to @lukealonso, including the line: "(Note: I closed #718 and split out the charter-aligned #455 pool_only() capture-buffer bound by itself into https://github.com/NVIDIA/hyperflare-inference/pull/742.)" and three options (announce-barrier primitive only / minimal prefill-only mode / out of scope, keep selene contributions to pool sizing and shared prefix caching).
So: the author frames #742 as the deliberately narrow, charter-aligned remnant of the disaggregation work. The maintainer's stated preference (option 3 territory) is "keep upstream selene contributions scoped to pool sizing and shared prefix caching" — that is exactly what #742 does.
Link: #160 mentions #455, #718 (closes) and #742; #718 and #742 both mention #160.
#5 [high] People: fakoli first-time contributor; yatesdr owns the code and raised this exact cost in #455 review; lukealonso is project owner
- fakoli: FIRST_TIME_CONTRIBUTOR. In the last 180 days in this repo: 0 merged, 0 closed, 1 open — #718 (closed 2026-12-05) and #742 (the PR under review). No commits on main in selene/src, helios/src or docs (authors there: Luke Alonso 249 helios commits, yatesdr 38 selene commits/52 helios, Martin Vit, Joshua Cartu).
- fakoli is the author of both #718 (closed) and #742 and of the 2026-12-05 reply on closed #160. Discord: fakoli (per AGENTS.md contact-line rule).
- Area owners who will recognize the code: yatesdr wrote #455 (the pool-only capture buffer this PR modifies: offload.rs:77-83 at the time,
capture.then_some(minimum_pages)), #497 (planned_offload_host / pool-only restore-only), #674, #92 (the pool itself). Luke Alonso is named as "the project owner" by yatesdr in #160; he owns AsyncTransfer/#711/#721/#737 which touch the same host-budget functions (host_pool_budget_and_total, planned_host_future). - yatesdr's #455 review (2026-11-21) is the direct origin of the concern this PR answers: "Pool-only now reserves host memory, and can now fail to start. The capture buffer holds the largest GPU page capacity plus one row ... so it is about the size of the GPU KV cache in registered host memory." #455 resolved it by documenting the size and the failure, not by capping; #742 caps.
- Engagement on #742 so far: none — 0 comments, 0 reviews, no labels, no CI checks (orientation packet; pr_comments returned "No comments").
- Prior art of the same author being halted: flare-autobot "Review Stopped: It is low value or does not align with the project charter" on #718 (2026-12-04 17:28). #742 has no autobot case file comment yet at head 02990da.
#6 [high] Claims and evidence: intake floor not capped; RSS numbers not A/B'd on the head commit; no CI; model.rs path untested
Claims in #742's description and what backs them (verified against the diff and repo):
- "host capture memory stays proportional to one max_sequence_tokens chain" — true for the chain term only. The slab is
chain.max(intake_slots(layout, max_active)).min(budget)(selene/src/offload.rs:179-181), so automatic intake (2max_activerow_slots + 2*WINDOW_PAGES, offload.rs:227-229) is a floor that is NOT capped, exactly as docs/prefix-cache-offload.md:1593-1600 now says ("the larger of automatic intake and one full single-sequence capture chain"). For high max_active the buffer can still exceed one chain. - Table: "Allocated GPU KV capacity 99,008 pages (70.9 GiB) unchanged" — the diff does not change KV sizing inputs other than the headroom local_pages clamp (memory.rs:1132) and capture_growth clamp (memory.rs:1486), both of which can only relax the host-driven limit, so "unchanged/unthrottled" is consistent with the code direction. The helios test
pool_capture_growth_caps_at_max_sequence_pages_without_throttling_gpu_pages(memory.rs:2440-2457) asserts onlypages > max_sequence_pageson one synthetic core, not EQ of page counts. - "18.74–19.06 GiB vs 7.83–8.04 GiB container RSS" delta matched to slab delta — the PR itself discloses these were observed "on a v0.6.0 (f705086) build carrying this exact patch rather than re-measured via an A/B restart on f46a99220a". So the live evidence is not an A/B on the PR head against base.
- Six-crate release test counts (12/650/448/2041/255/254) — described as executed on head 02990da in rust:1.94.1-slim-trixie; not independently visible (no CI checks on the head commit). helios run required FLARE_TEST_TEMPLATE_DIR prepared for 7 model aliases; eos was re-run single-threaded after a timing flake (
adaptive_mid_mapping_fallback_merges_into_single_vma), which the PR discloses. - Unrun: hardware CUDA tests, tests/server/test_prefix_cache_offload.py, qualify/host_cache.py, integrated/unified-memory hosts, multi-host sharded/RoCE, native Windows, Kani and TLA+ (argued not applicable: PR does not touch scheduler/cache_memory, lifecycle state machines or Kani-proven validators — consistent with .github/workflows/helios-lifecycle.yml which runs TLA+/Kani on helios/, selene/, selene-manager/** changes; that workflow's paths filter does match this PR, so CI would run it on the head commit if triggered).
- No test exercises the helios
model.rswiring (theOption-mapped value) nor asserts thepool only: capture buffer …log line; the two new tests exercise headroom_inner and capture_growth in isolation. - Description says it supersedes the pool_only() change from closed #718 — #718 carried a near-identical capture bound (its own text:
local_pages.min(limit)whenlimit > 0) plus HTTP/scheduler/pool primitives that #742 does not carry.
#7 [high] Project fit: charter goal 24 (host prefix cache via Selene) and AGENTS.md evidence rules; maintainer request origin in #455 review
Charter (read_charter) status line 24: goal "* Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene." Charter "What gets merged": PRs addressing a maintainer request, roadmap item, reproducible bug, measured performance/memory issue, or bad docs. This PR is framed as a measured memory issue (host RSS) and as the follow-up to a maintainer review comment (yatesdr in #455), and is deliberately restricted to pool sizing after #718's prefill-only HTTP surface was pushed back as out-of-scope disaggregation (#160 close reason; #718 close comment).
Charter/docs tensions:
- AGENTS.md:165-169 "Every contribution must address an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation." The explicit maintainer request is yatesdr's #455 review item 2 (2026-11-21) — it asks to give the buffer's size and state the failure case in docs, not to cap. The cap itself is the author's proposal.
- AGENTS.md:95-101 (claimed benefit) and :103-112 (evidence, "Never invent evidence") — #742 discloses its provenance/non-A/B nature, which lines up with :105-108 (state what remains untested) and with docs/design-review.md:153-155.
- AGENTS.md:171-175 "Reject unapproved scope expansion ... general-purpose cluster orchestration require an explicit maintainer decision." #742 contains no routing/API surface, so it does not itself expand scope; the surrounding disaggregation programme is still pending the @lukealonso decision requested in #160 (2026-12-05).
- Self-consistency with docs: the repo doc treating "known limitations" is docs/prefix-cache-offload.md:1847-1858 and "designed, not implemented" :1860+; the PR updates only the 2.15 pool section (lines ~1593-1608). Remaining stale statement: docs/prefix-cache-offload.md:612 mentions pool-only capture buffers drop ... (not a sizing statement) — no contradiction found.
- Single-host constraint: capture only applies when
self.cluster().is_none()(memory.rs:998) andshard.is_none()(offload.rs:700), so multi-host behaviour is unchanged by design, consistent with docs/prefix-cache-offload.md:1608 "With separate rank processes, a pool without a local disk tier only restores." - No per-model branches, no new flags, no new defaults: the change is model-agnostic and introduces no user-visible option (PrepareInputs is an internal Rust struct). This matches charter "No per-model special cases or flags".
#8 [high] Reach: pool-only single-process users only; may now admit MORE GPU pages and pass startup where main failed; internal API field added
Reach / impact of #742:
- Users affected: single-process (one process, all ranks) deployments using
--prefix-cache-poolwith--prefix-cache-memory 0and no local disk tier, i.e.PrefixCacheOffload::pool_only()(selene/src/offload.rs:116-118). With a pool + any memory or disk tier, nothing changes (the cap is insideheadroom_inner'scapturebranch only, offload.rs:163-181; disk branch :182-196 untouched). - Effect on GPU KV capacity:
capture.then_some(minimum_pages.min(max_sequence_pages))(memory.rs:1132) feedsheadroom_inneras local_pages for the pool capture, andcapture_growth(layout, pages.min(max_sequence_pages), …)(:1486) is the host-budget term incapacities()(:749-760). Reducing those terms can only let the capacity search admit MORE pages, never fewer: it removes host budget as a KV throttle once one sequence chain fits. So operators may see a larger KV allocation on hosts whose budget previously limited pages - visible in thePlan cachesummaryper GPU: … KV pagesline. - Startup behaviour change: the
host budget cannot hold a full pool capturefailure (selene/src/offload.rs:176-178) now triggers only if the capped chain (max_sequence_pages + one row) does not fit the host budget, instead of the full GPU page capacity. Startup that failed on main can now succeed — a user-visible behaviour change beyond "smaller buffer". - New startup log expectation: summary line
pool only: capture buffer N GiB (… slots, populate …, register …)(selene/src/offload.rs:450-461, mode chosen when intake_slots()==0). The PR's evidence quotes exactly this line. - API/compat:
PrepareInputsgains a public field (selene/src/offload.rs:340-346). selene is not published ("crates aren't published yet", charter roadmap #6), so no external semver break; all in-repo callers were updated (8 fixtures + 2 production sites). Any out-of-tree caller constructing PrepareInputs without..Default::default()breaks at compile time. - No config-file/CLI/documented-default change; no dependency change; no docs/defaults touched outside docs/prefix-cache-offload.md:1593-1608.
- Deployment: matters for container memory limits (PR's 24 GiB cgroup example) and for hosts where the GPU holds multiple full sequences (quantized models, 96 GiB workstation cards, 1M contexts) — exactly the compact-workstation audience the charter names.
- Edge cases:
Some(0)/Nonekeep old unbounded sizing (offload.rs:165-168, documented in the field doc comment);max_sequence_pagesderives from max_sequence_tokens which for a small runtime override (e.g.--max-sequence-tokenssmaller than the core's) shrinks the buffer; server_config value is the prepared ceiling (helios/src/server/config.rs:131-148).
#9 [high] Related work: builds on #455/#497; overlaps open #737 in the same budget functions; #718 superseded; #705 Slabs path relevant
Related / overlapping work on the same code (all in helios/src/runtime_core/memory.rs + selene/src/offload.rs, host-budget and capture sizing):
- #455 (merged 2026-11-22, yatesdr): created the pool-only capture buffer,
capture.then_some(minimum_pages)in memory.rs and the pool-only branch in offload.rs; its review is the origin of this PR (see people note). #742 edits exactly the lines #455 added. - #497 (merged, FujitsuPolycom/PCCessna): "pool-only capture retain the pre-planned planned_offload_host budget without post-KV-allocation shrinkage" — #742 also edits planned_offload_host (memory.rs:1550-1556). Need to check for conflict: #742 only adds
.min(max_sequence_pages)to the existing expression, so it is additive. - #737 (OPEN, lukealonso, +1769/-268, opened 2026-12-05 03:33): adds
host_pool_budget_and_total_with_reservein selene/src/offload.rs (+7/-1), rewritesasync_transfer_host_ram/--pool-ram-memoryhost-wide and peer-UVA accounting in helios/src/runtime_core/memory.rs (+88/-29) and model.rs (+29/-1). Same files, adjacent functions (host budget helpers used by headroom_inner'sbudget_overridepath, memory.rs:972-982host_budget_for). Real merge-conflict/merge-order risk with #742, and it changes what "host budget" means for the same capture buffer. #737 is also the only other open PR touching these files for the same reason (host memory budgeting). - #711, #721, #727 (lukealonso, merged): AsyncTransfer + device pools, planned_host_future / host_future coordination — the host budget that bounds this capture buffer is computed through those paths (memory.rs:1266, 1339-1370).
- #674 (merged, yatesdr): prefix-cache hit rate / L1 retention / GPU snapshot packing — touched offload.rs and memory.rs
capture_growth/planned_offload_hostarea; #455's later work built on it. - #625 (merged): offload startup timings (
PrepareTimings: slab_populate / cuda_register) — the timings quoted in the PR's log line come from it. - #705 (merged 2026-12-05, Joshua Cartu): Retry(Slabs) CPU storm fix — relevant because a too-small capture buffer surfaces as Retry(StoreReason::Slabs) (selene/src/memory.rs:857-860, composite.rs:2027/2053), the path a cap could stress under concurrent captures.
- #694 (merged, yatesdr): spill profitability gate, in the same selene offload area.
- #589 (merged, lukealonso): Selene unified-memory budgeting + host_pool_budget* helpers.
- Superseded/competing proposals by the same author: #718 (closed; carried the same cap inside a much larger diff; autobot stopped review as out-of-charter). No other PR proposes the same cap.
- Nothing found that is undone by #742: no other open PR caps the capture buffer; no revert pending.
#12 [high] Why: slab sized to whole-GPU KV, flagged in #455 review 2026-11-21; no issue filings; single author driving it
The why, and its history:
- Concrete defect #742 targets: with
--prefix-cache-pool+--prefix-cache-memory 0+ no disk, selene sizes the CPU-readable capture slab tolocal_pages + row_slotswhere local_pages = largest GPU page capacity in the process (selene/src/offload.rs:163-181 vialocal_pagesfrom offload.rs:700, max across ranks). Helios then charges that slab as host memory and, if it does not fit the host budget, either limits GPU page capacity (memory.rs capture_growth in capacities()) or fails startup with "host budget cannot hold a full pool capture" (offload.rs:176-178). - Where the requirement came from: yatesdr's #455 review item 2 (2026-11-21) — "Pool-only now reserves host memory, and can now fail to start ... 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 then documented size (11.0 GiB / 1,664 slots, 7.1 GiB floor for GLM-5.3-Flash NVFP4 TP4) and the failure in docs. So the problem has been visible since 2026-11-21 (≈2 weeks before this PR) and the doc text #742 rewrites was written in #455 (merged 2026-11-22).
- The author's own statement of the problem: #718 body item 3 (~33 GiB on an RTX PRO 6000 96 GiB for 1M-context cores) and #742 body (24 GiB container limit for Qwen4-35B-A3B; 70.7 GiB capture vs 11.8 GiB bounded).
- No user-filed issue reports this failure: searches for pool-only capture size ("pool only capture buffer host budget", "host budget cannot hold a full pool capture", "pool_only capture slab oversized host memory pool only" as issue kind) returned only PRs — #455, #718, #742, #497, #737. The only issue in the neighbourhood is #160 (disaggregation, closed/out of scope).
- How widely wanted: one author, one prior attempt (#718, closed), one maintainer remark. Not a recurring community request in the last 30+ days of local search.
- Why it matters more now: #711/#721/#737 moved host-budget accounting (UVA page tables, host-wide --pool-ram-memory), so registered host memory is contested on the same hosts; a slab sized to whole-GPU KV competes with those pools. Charter names SM120/SM121 workstation and DGX Spark as the target hardware, where host RAM is the constraint.
#13 [high] Research summary
Case file for PR #742 (fakoli, open, ready for review, head 02990da on base f46a9922, 9 files +115/−10, no CI checks, no comments or reviews). Twelve scratchpad entries cover all eight angles.
Key findings: (1) The PR is a one-commit extraction of the pool_only() capture-buffer bound that was bundled into #718, which the author closed on 2026-12-05 after autobot stopped its review for charter fit; #742 deliberately drops #718's HTTP/scheduler/pool-announce surface, which is still the subject of an open scope request to @lukealonso on closed issue #160. (2) The concern is not new: yatesdr's #455 review (2026-11-21) item 2 named exactly this cost ("about the size of the GPU KV cache in registered host memory") and asked for documentation, which #455 delivered; #742 changes that documented behaviour by capping. (3) Undeclared-in-headline effects I verified in code: the automatic-intake floor is not capped (offload.rs:179-181), and the clamps at memory.rs:1132/1486 can only relax host-driven KV throttling, so operators may see more GPU pages and startup succeeding where main failed (host budget cannot hold a full pool capture). (4) Real overlap/conflict risk with open #737 (lukealonso), which rewrites the same host-budget helpers and async_transfer_host_ram in the same two files. (5) Evidence gaps the PR itself discloses: the 18.7 vs 7.8 GiB RSS figures were not re-measured A/B on the head commit, no hardware CUDA/multi-host/Windows/Kani runs, and no test covers the new model.rs wiring.
Scratchpad holds the diff/file:line map, the #455→#718→#742 chronology, related-PR conflict notes (#455/#497/#737/#705/#711/#721), people and area-owner facts, charter/AGENTS.md mappings, reach/impact, claims-versus-evidence breakdown, and process state.
#14 [high] The change: description vs diff — precise on files/tests, understates the local_pages semantics and the model.rs Option asymmetry
Checked the #742 description against the diff; the description is unusually accurate for this PR, with these precise refinements a reader should know:
- Description: "Updated
prepare_with_inputs_budget_with_progressfor the new field." The diff does the minimum: the destructuring at selene/src/offload.rs:623-629 binds it asmax_sequence_pages: _, i.e. it is ignored there. The field only takes effect througheffective.headroom_inner(..., inputs, local_pages, host_budget)at selene/src/offload.rs:703-710, which both sizes the slab (bytesat :711-714) and performs thehost budget cannot hold a full pool capturecheck. So there is exactly ONE place the cap is applied in selene. - Description does not mention that the second helios call site handles a missing value differently from the first: helios/src/runtime_core/memory.rs:992-996 hard-errors when
server_config["max_sequence_tokens"]is absent ("model requires a prepared context ceiling") and always passesSome(...), while helios/src/runtime_core/model.rs:1155-1157 uses.as_u64().map(...)and passesNone(uncapped) if absent. In practice both read the same server_config (helios/src/server/config.rs:131-148), so None should not occur on the model path; it is still an undeclared asymmetry. - Description's "clamped the
minimum_pagesheadroom check asminimum_pages.min(max_sequence_pages)" is accurate but understates it: that argument is thelocal_pagesthatheadroom_innertreats as GPU page capacity for the capture branch, so the clamp changes both the slab size and the startup-failure threshold, not only "the check". - Description's claim "Passed
max_sequence_pagesin bothmemory.rsplanning andmodel.rshost offload preparation" is accurate (memory.rs:1130, model.rs:1168). - Description's test inventory matches the diff exactly: 1 new selene test, 1 new helios test, 8
max_sequence_pages: Nonefixture additions (helios/src/offload/pool/tests.rs:134; helios/src/runtime_core/memory.rs:2031; selene/src/offload/tests.rs:14,51; selene/src/offload/sharded/tests.rs:118,261,392,558; selene-manager/tests/client.rs:3255,3509; selene-manager/tests/offload.rs:139 — 11 insertion points across those files). - The description does not say, and the diff does not do, anything about the
intake_slotsfloor:chain.max(intake_slots(layout, max_active)).min(budget)(selene/src/offload.rs:179-181) means the buffer can still be larger than one sequence chain when max_active is high. The docs sentence ("larger of automatic intake and one full single-sequence capture chain") does say it; the PR's headline table does not show an intake-dominated case. - No public CLI/config/default changes and no dependency changes;
PrepareInputs(selene/src/offload.rs:330-347) is internal Rust API.
#4 [medium] Change: verified mechanics of the cap and what happens if a chain exceeds it
Facts from the code read (not opinions):
- The property "no single captured sequence chain exceeds max_sequence_tokens" is what the cap relies on. In helios/src/runtime_core/memory.rs:992-996,
context= server_config["max_sequence_tokens"] (hard error if missing: "model requires a prepared context ceiling") andmax_sequence_pages = context.div_ceil(page_tokens). helios/src/core/cache.rs:130-131 derives max_sequence_tokens from the model metadata; helios/src/model.rs:268 clampslimits.max_sequence_tokens = prepared_sequence_tokens.min(...); helios/src/scheduler.rs:1594 and policy.rs clamp request lengths to limits.max_sequence_tokens, so a live sequence cannot exceed it. - Chain-size failure path if the assumption ever breaks: selene/src/memory.rs:4183-4190 (
PooledStore::store): if the chain does not fit (record_slots(tail.len(), row)> pool), it returnsStoreOutcome::Oversizeafter bumping stats.store_skipped / dropped[1] — i.e. the capture is silently dropped, not a crash. Also selene/src/memory.rs:857-860 refill_row returns Retry(Slabs) on no slots; composite.rs maps full slabs to Retry(StoreReason::Slabs) (composite.rs:2027,2053). - Selene docs still describe "roughly the size of the GPU KV cache" in stale places? Not verified; the doc file updated at docs/prefix-cache-offload.md:1593-1608 is the only pool-only capture sizing description found.
- Note the doc text says the slot count is "the larger of automatic intake and one full single-sequence capture chain ... bounded by the host budget", and the headroom code takes
chain.max(intake_slots(layout, max_active)).min(budget)(selene/src/offload.rs:179-181) — so the automatic-intake floor is NOT capped by max_sequence_pages; the min() applies only to the chain term, exactly as documented. - helios/src/runtime_core/model.rs:1155-1157 uses
.map(...)(i.e.Nonewhen max_sequence_tokens is absent) whereas memory.rs:992 hard-errors. Two different behaviours for the same value in the two call sites; in practice both read the same server_config built by helios/src/server/config.rs:131-148, so None should not occur when memory planning succeeded. max_sequence_pagesis used only inheadroom_inner's pool-only capture branch (selene/src/offload.rs:165) and is explicitly ignored in prepare_with_inputs_budget_with_progress (offload.rs:628) — it does not affect disk/intake tiers, so disk-only and memory tiers are untouched by construction.
#10 [medium] Recent activity: #705/#694/#674/#625 in the same files; single-commit head on f46a9922, mechanical rebase expected
Recent activity in the touched areas (default branch, last ~60 days) and how #742 sits against it:
- selene/src: 5d11354d 2026-12-05 (#705 Joshua Cartu) Retry(Slabs) CPU storm — the failure mode a tight capture buffer produces; cfb72093 2026-12-04 (#723 Luke Alonso) codec/R580/packed dedup changes; 7bbc6707 (#694 yatesdr) pool spill profitability gate; def91796 (#674 yatesdr) hit rate/L1/NVMe/packing; a4720050 (#625 autobot) THP/offload startup timings; bf7562ae (#646 Luke Alonso) rank cache/GB10 sizing; 3801ff1d (#612) selene-manager hardening.
- helios/src: heavily Luke Alonso (249 commits/180d), Martin Vit (52), yatesdr (52). Recent: #705, #723, #729 (grammar KV), #711/#721/#727 (AsyncTransfer), #691/#692/#621 by Joshua Cartu (server metrics/admission), #621 validates scheduler admission against core parameter declarations (relevant: max_sequence_tokens now admission-checked).
- docs: Luke Alonso 404 commits, Martin Vit 55, yatesdr 52 — docs/prefix-cache-offload.md is maintained mostly by yatesdr/Luke Alonso; the PR edits a section (2.15, pooling) that yatesdr authored in #455 (#455 itself rewrote +36/-22 lines of that file).
- Base drift: #742's base f46a9922 is 2026-12-04; main has moved since (5d11354d on 2026-12-05, cfb72093, 6efbd126, be4092d7, 624c6e43…), but none of those touched the exact hunks #742 edits, so a rebase should be mechanical.
- The PR head 02990da is a single commit on top of f46a9922 (search_history pr/742), i.e. no fixup/rebase churn; the description's "base f46a99220a" matches.
Not relevant after checking: #314 (diffusion tensor execution, touches memory.rs but unrelated), #585/#486/#477/#492 (compression work, older), #613 (deferred_prefill checkpoints), #646/#659/#669 (GB10/VMM sizing).
#11 [medium] Community/process: ready for review, zero engagement, no CI checks, autobot precedent on #718
Community / process facts:
- PR #742: open, marked "ready for review" (not draft), opened and last updated 2026-12-05 (same day), 1 commit (02990da) on base f46a9922. Labels: none. Reviews: none. Comments: none (pr_comments → "No comments"). No autobot case-file comment on #742 yet (unlike #718 and #737, which got one within minutes of opening).
- CI on the head commit: no checks (orientation packet). Workflows that would apply: .github/workflows/native-serving.yml (selene, selene-manager, helios test jobs) and .github/workflows/helios-lifecycle.yml (paths include selene/, selene-manager/, helios/**; runs TLA+ check.py, then kani on helios --features runtime-core).
- Precedent for how such a PR is handled here: the maintainers' review culture is detailed and itemized (see yatesdr's #455 review with 4 numbered items and a follow-up sign-off; #737's autobot review with Should Fix list). The author's #718 was stopped by autobot for charter fit; #742 is the author's response to that, self-described as "the charter-aligned #455 pool_only() capture-buffer bound" (#160 comment).
- Evidence of interest: none organic yet — no reactions, no maintainer comment, no linked issue asking for the cap. The demand signal is the author's own measurements plus yatesdr's #455 review remark that the buffer "is about the size of the GPU KV cache in registered host memory".
- Age: <1 day at the time of this case file, so absence of review is expected rather than meaningful.
#15 [medium] Change: file map of the 9 changed files and the doc before/after wording in section 2.15
Per-file map of PR #742 (9 files, +115/−10) with each file's role, for quick orientation:
- selene/src/offload.rs (+10/−1): the only enforcement point.
PrepareInputs::max_sequence_pages: Option<u64>(:340-346), cap inheadroom_inner(chain_pages, :165-171), field ignored inprepare_with_inputs_budget_with_progress(:628).headroom_inneralso servesheadroom_with_inputs(:126-134) andheadroom_with_inputs_for_budget(:139-148). - selene/src/offload/tests.rs (+53):
pool_only_caps_capture_buffer_to_max_sequence_pages(:566-621) — two ranks of page_capacity 512,max_sequence_pages: Some(64)→ buffer slotsintake_slots(layout,4).max(64+row_slots), headroom(2*STORE_DEVICE_MARGIN_BYTES + capped_bytes.div_ceil(512), capped_bytes);Some(0)andNoneboth give the uncapped512+row_slotsfigure. Alsomax_sequence_pages: Nonein theinputs()helper (:14) andprepare_with_inputs()helper (:51). - helios/src/runtime_core/memory.rs (+~30/−4): derives
max_sequence_pages(:996), passes it (:1130) and clampslocal_pages(:1132), clamps thecapture_growthcallback (:1486), clampsplanned_offload_hostchain bytes (:1552-1555); testpool_capture_growth_caps_at_max_sequence_pages_without_throttling_gpu_pages(:2440-2457) assertingcapture_growth(...) == Some(0)when the reserved bytes already cover the capped chain, thenpages > max_sequence_pagesfromcapacities(); fixture at :2031. - helios/src/runtime_core/model.rs (+5): derives the same value with
.map()(:1155-1157) and passes it intoprepare_with_inputs_budget_with_progress(:1168), which is called from the load path at model.rs:1047 withplanned.offload_host. - helios/src/offload/pool/tests.rs (+1): fixture.
- selene/src/offload/sharded/tests.rs (+4): four fixtures (sharded = multi-host, where capture never applies).
- selene-manager/tests/client.rs (+2), selene-manager/tests/offload.rs (+1): fixtures in the tier-matrix and startup tests.
- docs/prefix-cache-offload.md (+9/−7, section 2.15 "Sharing through a pool", :1593-1608): before — slot count is "larger of automatic intake and the largest GPU page capacity plus one row's slots, bounded by the host budget"; after — "the larger of automatic intake and one full single-sequence capture chain (
min(GPU page capacity, ceil(max_sequence_tokens / page_tokens))plus one row's slots)", and "Helios limits GPU page capacity so one sequence chain plus one row fits the host budget. If even the capped minimum page capacity plus one row does not fit, startup fails withhost budget cannot hold a full pool capture." The GLM-5.3-Flash TP4 example (11.0 GiB / 1,664 slots, 7.1 GiB floor) is retained unchanged from #455. - Unchanged but load-bearing for the reader:
PrefixCacheOffload::pool_only()(selene/src/offload.rs:116-118),intake_slots(:227-229),capture_growth/capacities(helios memory.rs:667-681, 683-760), theOversize/Retry(Slabs)drop paths (selene/src/memory.rs:4183-4190, :857-860).