Contracts, Charter & Verification Gates Audit — PR #736 (500b774)
Scope of this lens: the four hard gates only. Consistent with the calibration rules, I do not flag the missing GitHub Actions checks (my tools cannot observe them, and neither the description nor the dossier reports a CI failure), and I do not flag docs/TODO.txt bookkeeping.
Prior-round check: the PR has zero comments, zero reviews, zero labels, and the ## Case File History contains an explore pass and a Value Proposition pass — neither reports a TLA+ run, a --release run, a GPU test, or an A/B benchmark. So no gate is satisfied by earlier-round evidence.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
The diff touches no vendored upstream file (helios/native/* untouched), no Cargo.toml, no Cargo.lock, no recipe, no dependency pin. Nothing depends on an unmerged external PR. File overlap with the closed #181 is textual (10 of 11 files) and carried by an in-repo predecessor, not an external dependency — Info only.
Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: ONE MAJOR
The PR adds no Protobuf enum, no core-format field, no captured-graph operation, and no per-model branch, so the approval-required surfaces (design-review.md:22-26) are untouched. However it does add two new rank-control wire kinds on a shipped default with no version bump and no doc change:
helios/src/execution/parallel/wire.rs:27-28—ZERO_KV_PAGES = 14,ZEROED_KV_PAGES = 15added to the inter-rank control tag set (existing tags 1..13). These are handled inTensorParallelExecutor::zero_kv_pages(parallel.rs:288-328) and inserve_rank(parallel.rs:744-752).- The normative doc for exactly this contract is unmodified:
docs/multi-host.md:24-26— "Serving builds must agree on the rank control protocol version; changing packet framing does not require core re-export." Neither the rendezvous version (helios/src/execution/rendezvous.rs:23-24, stillFLARERV3) nor the exchange layout schema (wire.rs:185-196, first number still6) distinguishes a build that speaks tags 14/15 from one that does not. A patched rank zero paired with an unpatched peer therefore fails at_ => Err(invalid("unexpected rank command"))(parallel.rs:752) instead of being rejected at handshake as the documented invariant promises. The failure is a clean error rather than silent corruption, which is why I rate this Major rather than a Blocker — but it is a genuine, unversioned public wire-contract extension contradicted by a normative statement in the docs, and the docs were not updated.- Required: bump the rank-control version (or the layout schema number) so mixed builds fail at handshake, and state the compatibility rule in
docs/multi-host.md.
- Required: bump the rank-control version (or the layout schema number) so mixed builds fail at handshake, and state the compatibility rule in
Secondary, non-blocking note (Info): the PR adds a second zeroing pass over alias pages while the documented invariant remains the single first-commit pass — helios/src/runtime_core/cache_memory.rs:2110 ("Zero each physical byte once, before any graph or transfer can read an alias") and the implementation at :2111-2125. No normative doc is contradicted (docs/runtime-core-design.md:950 — "GPU tests preserve snapshot bytes while released KV pages are overwritten" — is a qualification statement and remains true), but the new release-time lifetime rule is undocumented in docs/runtime-core-design.md:970-995, which is where snapshot/backing ownership is specified.
Gate 3 — Mandatory verification evidence: BLOCKER (three distinct misses)
3a. TLA+ lifecycle conformance not run for covered code (blocking per the checklist's own words).
docs/design-review.md:212-215 requires python3 verification/helios-lifecycle/check.py whenever changing "admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering or ownership, offload aggregation, readiness, or rank coordination." This PR changes snapshot aliases (scheduler/cache_memory.rs:828-846: new reclaimed_snapshot_pages push on the 1 -> 0 refcount edge, new take_reclaimed_snapshot_pages), admission (runtime.rs:3856-4001: admit_with_host_store gains a zero_kv_pages closure param and a new barrier strictly before store.fetch; Worker::admit becomes #[cfg(test)]-only and is replaced by admit_with_executor), and rank coordination (parallel.rs:99-146, 288-328, 744-752; threaded.rs:1217-1262, 1270-1306). docs/design-review.md:234-240 says touching such code without running the applicable models "is a blocking design failure, regardless of whether CPU unit tests pass," and :247-251 says a disclosed limitation does not excuse the omission.
The description's verification section mentions only cargo check (three feature combinations) and a filtered cargo test ... --lib -- cuda:: scheduler:: execution:: server::runtime::. No check.py invocation appears anywhere in the description, and no verification/ file is in the diff. Affected suite names are enumerated in verification/helios-lifecycle/check.py:22-36 (CacheOwnership, CheckpointReservation, RankProtocol, DispatchRing, Lifecycle) — all in the touched area. This alone is a blocker.
3b. Cross-rank test + live multi-GPU evidence missing for a TP dispatch/transport change.
docs/design-review.md:189-194: changes to helios/src/execution/{threaded,parallel,roce}* "require a multi-thread CPU test with a blocking cross-rank barrier coupling rank-zero local submission with peer commit handlers." docs/design-review.md:252-259: "Replacing or reordering cross-rank launch, commit, cancellation, or drain paths … requires an explicit before/after cross-rank happens-before analysis and live multi-GPU execution of real collective graphs … Disclosing busy or unavailable GPUs does not waive this."
This PR does reorder cross-rank paths: TensorParallelExecutor::poll now funnels READY/COMPLETE through the extracted apply_peer_message (parallel.rs:99-146, used at :415-420 and inside the new waiting loop at :316); it adds a blocking rank-zero zero_kv_pages that services peer READY/COMPLETE while waiting on a 120 s deadline (parallel.rs:288-328); and it adds peer zero streams plus new drain/teardown ordering in ThreadedExecutor (threaded.rs:1217-1256, :1270-1306, including mem::forget of peer streams on poisoned teardown). The only new coordination test is zero_kv_pages_wire_roundtrip_and_truncation (parallel/tests.rs:837-854), which is a two-endpoint channel roundtrip through rank_stream::test_pair(), not a blocking cross-rank barrier through coordinate_step/commit_and_launch. No happens-before analysis is in the description, and the soak numbers are one GB300 with no stated multi-rank run. This is a second independent mandatory-gate miss.
3c. No test at all executes the new CUDA/VMM path.
The change's entire effect is cuMemsetD8Async over coalesced runs across cache planes (transport.rs:1442-1505), on new streams (transport.rs:626 Resources.zero, threaded.rs:1203 peer_zeros). All four added tests are CPU-only and run with CUDA_VISIBLE_DEVICES="": cache_memory.rs:2856-2883, transport.rs:2163-2180 (coalesce_page_runs only), parallel/tests.rs:837-854 (wire codec only), phase_tests.rs:12250-12396 (closure ordering with a fake store). enqueue_zero_cache_pages, Stream::with_context switching (cuda.rs:1128-1132), the per-peer path and the TP zero round-trip are executed by nothing in the repository. Contrast the predecessor #181, which shipped a hardware VMM-alias CUDA test. docs/design-review.md:106-115 (principle 12) requires exercising affected shapes, tails, cache boundaries and allocation stability; AGENTS.md:194-199 rejects validation that does not exercise the affected contract. The SM103 isolation matrix and the 75/75 / 152/152 GB300 soaks are the author's own off-repo runs from one machine and, per the description itself, "were not re-run for this submission."
3d. Profile requirement (Minor within this gate). Layer 1 asks for cargo test --locked --release on affected crates (docs/design-review.md:180-187). The reported runs are debug-profile and filtered; cargo check is explicitly called out as non-substituting.
Attributable failing tests: not a finding. The 6 full-suite failures are disclosed, pre-existing, caused by an absent generated fixture (FLARE_TEST_TEMPLATE_DIR → tests/frontend/prepare_templates.py (not opened), per helios/README.md:170-171 (not opened) and .github/workflows/native-serving.yml:31 (not opened),59), and lie outside the touched files.
Gate 4 — Material scope / claim contradictions: ONE MAJOR (needs author confirmation), ONE MINOR
- Major (claim broader than implemented barrier set): the description states zeroing is guaranteed "before any kernel submission or host-to-GPU prefix-cache DMA restore (
store.fetch) touches them." The implemented barrier is exactly insideadmit_with_host_store, immediately beforestore.fetch(runtime.rs:3995-4001), plus the worker-loop flush points (runtime.rs:1613-1630,:1857-1859,:2164-2166,:3219-3221). Pool-tier lookups go through the sameHostStoreviabegin_pool_lookup/issue_pool_lookup; the Discovery Dossier places them insideadmit_with_host_storeearlier than the barrier (runtime.rs:3699-3770). I did not read those lines in this pass, so I state this as a claim-scope gap that must be confirmed rather than an established defect: if a pool lookup can enqueue a host→GPU copy into a page reclaimed earlier in the same admission, the description's "any … DMA restore" claim is false, and the["zero","fetch"]ordering test does not cover it (it only asserts thefetchpath). Ask: either add the pool-tier barrier plus an ordering test, or narrow the claim. - Minor: the "Overhead ~27 µs" figure is presented in an Overhead section but is arithmetic (≈212 MiB ÷ 8 TB/s), with no timing code, no measurement, and no instrumentation in the diff; the description does not label it as an estimate at the point of claim, and the measured latency A/B already recorded in #116 is not cited. Not a speedup claim, so not a charter-4 performance-gate violation — but it should read as an estimate.
- No bundling of unrelated tooling; the diff is one coherent outcome. Verified: all four claimed new tests exist exactly as named.
Undeclared behaviour worth recording (Info, not blockers)
- An extra
CU_STREAM_NON_BLOCKINGstream is opened unconditionally for everyGraphExecutor(transport.rs:622-626) and per cache-owning peer (threaded.rs:1172-1180), regardless of whether the core has snapshot alias ranges; it uses default priority althoughStream::open_lowest_priorityexists (cuda.rs:809). - TP zeroing is synchronous and blocking on rank zero with a 120 s peer deadline (
parallel.rs:288-328), and any error, timeout, or out-of-range page id poisons the whole executor (parallel.rs:324-327,threaded.rs:1248-1256;transport.rs:1442-1456treats an out-of-range page id as fatal rather than skipped). This converts scheduler bookkeeping inconsistency into a serving-wide failure — defensible, but not disclosed as such. ThreadedExecutorzeroing takesWatchdogCallGuard::enter(&self.watchdog_state, !self.pending.is_empty())(threaded.rs:1227), so a snapshot release can stall the coordinator mid-frame; poisoned teardown intentionally leaks peer streams (threaded.rs:1301-1306).
Bottom line
- Gate 2: clean.
- Gate 1: one Major — unversioned rank-control tags 14/15 against
docs/multi-host.md:24-26, no doc update. - Gate 3: blocker — no
verification/helios-lifecycle/check.pyrun for changes to snapshot aliases, admission and rank coordination (docs/design-review.md:212-215, 234-251); no cross-rank blocking-barrier test, no happens-before analysis, and no live multi-GPU collective run for aparallel.rs/threaded.rsdispatch-and-drain change (:189-194, 252-259); no test anywhere exercising the new memset/stream path;--releaseruns absent. - Gate 4: one Major claim-scope gap (pool-tier restore) needing confirmation, one Minor (27 µs presented as a figure, is arithmetic).
The three Gate-3 items are fixable by running the existing checks and adding the barriers/tests the checklist already specifies — no owner approval is needed for the design itself, and the charter's "right place" question (cache-layer clearing vs kernel masking, #202) is a design question for the Code Correctness/Value lenses, not a governance violation of the four gates I audit.