Contracts, Charter & Verification Gates Audit — PR #742 (selene,helios: bound pool-only capture buffer to max_sequence_pages)
Verdict: No contract or verification gate blockers.
The diff (9 files, +115/−10) is a single coherent outcome: one new Option<u64> on an unpublished internal Rust struct, one min() at the single sizing/enforcement point, three clamped call sites in Helios startup memory planning, one documentation paragraph rewritten, two new unit tests and eight fixture fields. Nothing in the hard-gate set is violated. Details per gate below, followed by two Info / Nit observations and the one thing a maintainer should consciously accept.
Gate 1 — Signed core-format / wire / captured-graph / public-contract boundaries: PASS
- No proto, core-format, or wire changes. The diff touches no
.proto,helios/src/core/, noFORMAT_VERSION(docs/core-format-design.md:8-9), no enum, no reserved identifier, no signature domain. Design-review principle 13 (model core compatibility, retained readers for legacy cores) is not engaged: previously exported cores still load unchanged because nothing about prepared metadata, allocation payloads, or graph catalogs changes. - No captured-graph op contract. Principle 1 (
docs/design-review.md:22-26) requires owner approval for a captured-graph operation family; this PR adds no operation, no shape/capacity variant, no graph kind. No approval is needed and none is claimed. - No public/CLI/config surface. The only API addition is
PrepareInputs::max_sequence_pages: Option<u64>(selene/src/offload.rs:343-346), a struct in selene, which the charter roadmap records as not published (#6, "the crates aren't published yet"). No flag, no config key, no environment variable, no default changed — so principle 10 ("use explicit configuration", no env behavior switches) and the "no magic defaults / no per-model flags" charter rule are respected. All eight in-repo construction sites are updated (selene/src/offload/tests.rs:14,51,selene/src/offload/sharded/tests.rs:118,261,392,558,helios/src/offload/pool/tests.rs:134,helios/src/runtime_core/memory.rs:2031,selene-manager/tests/client.rs:3255,3509,selene-manager/tests/offload.rs:139) plus both production sites (helios/src/runtime_core/memory.rs:1130,helios/src/runtime_core/model.rs:1168), i.e. 11 insertion points, exactly as the description claims. - No contradicted normative doc left stale. The one doc that specifies this buffer is updated in place:
docs/prefix-cache-offload.md:1593-1608now states the capped chain rather than the old whole-GPU-capacity chain, and the automatic-intake floor is stated correctly there (chain.max(intake_slots(...)),selene/src/offload.rs:179-181).docs/runtime-core-design.md:732-738("deduct the pinned host reservation from prefix-cache capture growth") anddocs/core-design.md:295("Shared CPU/GPU DRAM is one budget") remain true descriptions — the cap changes the size charged into that one budget, not the accounting rule.docs/scheduling-theory.mdanddocs/scheduling-runtime-design.mdwere checked and contain no statement about this buffer (no matches for "capture buffer", "host budget", "pool-only", "page capacity").
Gate 2 — Vendored upstream dependencies & cross-PR coupling: PASS
- No vendored upstream file is forked.
helios/native/,selene-manager/docs/, and all vendored C/build.rs(not opened) inputs are untouched; the diff contains noCargo.toml/Cargo.lockchange, so dependencies remain pinned as onmain(charter: "pin dependencies to exact versions or commits", #215). - No unmerged external recipe or PR is depended on. The change is self-contained in-repo.
- Merge-order overlap with open #737 (lukealonso) — which rewrites
host_pool_budget_and_total*inselene/src/offload.rsand the host-RAM/future accounting in the samememory.rs/model.rs— is a sequencing risk, not a gate violation: #742 does not fork #737's code or require it.Info / Nitonly.
Gate 3 — Mandatory verification evidence & failing tests: PASS (with a disclosed-evidence caveat)
- No failing test or failing CI is reported anywhere in the description or the Discovery Dossier, and the PR reports green runs on the head commit for all six crates that
.github/workflows/native-serving.yml:45-81(not opened) exercises, in--locked --release(eos 12, selene 650 with--features test-support, selene-manager 448, helios 2,041 with--features runtime-core,server, flare 255, flare-cli 254). That matches Layer 1 ofdocs/design-review.md:180-193exactly. No CI checks are observable on02990da, which by itself is not a finding. - TLA+
verification/helios-lifecycle/check.pyis not a mandatory gate for this diff. Layer 3 / the "mandatory enforcement" block (docs/design-review.md:209-240) triggers on admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering/ownership, offload aggregation (rank job aggregation,helios/src/offload/transfer.rs(not opened)), readiness, or rank coordination. The changed functions —headroom_innerstartup sizing (selene/src/offload.rs:150-222),capacities/capture_growth/planned_offload_hoststartup planning (helios/src/runtime_core/memory.rs:667-681, 683-780, 1550-1556) — are none of those, andhelios/src/runtime_core/memory.rsappears in noCHECKSentry or mutation target incheck.py:18-36, 473-792. No new protocol state or geometry bound is added, so the "keep formal bounds aligned" clause does not apply. Same reasoning for Kani: no completion-vector validation, prepared completion contract, state-view extent arithmetic, or sequential validator is touched. - The memory claim is a live trace, not an unattributable combined-stack speedup. Principle 12 requires "actual Helios service measurements" for performance claims and "the target benchmark or live trace" for memory cost (
docs/verification.md:15); the author suppliesdocker statsRSS on identical Qwen4-35B-A3B / 24 GiB-cgroup hardware (18.74–19.06 GiB pool-only vs 7.83–8.04 GiB at--prefix-cache-memory 1G, delta matching the configured slab delta), plus the startup log linepool only: capture buffer 11.8 GiB (16475 slots, …). The provenance is disclosed rather than hidden ("observed on av0.6.0(f705086) build carrying this exact patch rather than re-measured via an A/B restart onf46a99220a"), which is whatAGENTS.md:194-199and principle 12's "keep raw measurements and disclose unrun checks and material limitations" require. This is therefore not a hard gate failure — but it is the one item a maintainer should consciously accept rather than infer: the head commit has nomain-vs-branch A/B for the RSS or the 70.7 → 11.8 GiB figure, and no test drives the newmodel.rswiring (the two new tests exerciseheadroom_innerandcapture_growthin isolation). If the merging maintainer wants principle 12 evidence tightened, that is the ask; it is not a blocker under the gates as written, because the disclosed provenance is honest and the mechanism is otherwise covered by a passing head-commit unit test. - Charter "bring real evidence": PR description has all four required parts in order (why → what changed → claimed benefit → evidence), including an explicit "Unrun checks" section (hardware CUDA,
tests/server/test_prefix_cache_offload.py(not opened),qualify/host_cache.py(not opened), unified memory, sharded/RoCE, Windows, Kani/TLA+). Discord line present (Discord: fakoli, principle 17 satisfied).
Gate 4 — Material scope / claim contradictions: PASS
I verified every concrete artifact the description names against the diff:
pool_only_caps_capture_buffer_to_max_sequence_pages— present,selene/src/offload/tests.rs:566-621; asserts both the capped slot count and theSome(0)/Noneuncapped headroom, as described.pool_capture_growth_caps_at_max_sequence_pages_without_throttling_gpu_pages— present,helios/src/runtime_core/memory.rs:2440-2457.- The three clamps — present at
memory.rs:1132(capture.then_some(minimum_pages.min(max_sequence_pages))),:1486,:1553; the derivation at:996; the attach-path value atmodel.rs:1155-1159. - Doc rewrite — matches the before/after in the diff (
docs/prefix-cache-offload.md:1593-1603), and the GLM-5.3-Flash TP4 11.0 GiB / 1,664 slot / 7.1 GiB floor example is retained. - No unrelated tooling, no bundled feature surface, no thousands of stray lines. Nothing claimed that is absent; nothing present that is unclaimed in material terms (the
None/Some(0)uncapped semantics and the intake floor are both stated in the description). - Scope is not expanded. No HTTP surface, no prefill/decode routing, no cluster orchestration — none of closed #718's out-of-scope material is carried. Capture remains single-host by construction (
self.cluster().is_none()inmemory.rs:998,shard.is_none()inoffload.rs:700), consistent withdocs/prefix-cache-offload.md:1608. The charter non-goals are untouched. - Charter authorisation question (flagging for the maintainer, not as a gate breach):
AGENTS.md:165-169accepts a contribution that addresses "an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation." This PR claims a measured memory problem with a disclosed live trace, which lands inside that list. But the origin remark in yatesdr's #455 review asked only to state the size and the failure case, which #455 satisfied in docs; the runtime cap itself is the author's extrapolation with no issue filing. This is a judgement call for the merging maintainer (charter line: "PRs that address … a measured performance/memory issue" is satisfied; "explicit maintainer request" is arguably not) — not a contract-, vendored-file-, or verification-gate violation.
Info / Nit (non-blocking)
- Doc precision:
docs/prefix-cache-offload.md:1596says the chain is bounded bymin(GPU page capacity, ceil(max_sequence_tokens / page_tokens)), but on the Helios path thelocal_pagesargument it is combined with isminimum_pages.min(max_sequence_pages)(helios/src/runtime_core/memory.rs:1132), i.e. the pre-planned minimum page capacity, not the allocated capacity. The prose is correct for a caller that passes the allocated capacity; it is slightly loose about which capacity Helios supplies. Documentation wording only. - Merge-order with open #737 (lukealonso): it redefines the host-budget functions this cap divides against and touches the same
selene/src/offload.rsandmemory.rs/model.rsregions. Sequencing, not a gate.
Explicitly not flagged (per calibration)
- No CI is observable on
02990da; the PR does not claim a failure, and the reported local runs cover every cratenative-serving.ymltests, so absence of observable checks is not reported. - No
docs/TODO.txtbookkeeping ask. heliopauseis not in the native-serving workflow's test list, so not running it is not a gap for a change that touches noheliopausecode (verified: noPrepareInputs/prepare_with_inputsuse there).- PR-description phrasing, the intake-floor design choice, the
memory.rs/model.rsNoneasymmetry, and thepages > max_sequence_pagesassertion strength are all correctness/design-lens items, disclosed in the description, and out of scope for this governance gate.