Contracts, Charter & Verification Gates Audit — PR #727 @ c9df77bd
Verdict: no hard contract or vendored-file gate violations; one genuine mandatory-verification gap (Gate 3, live multi-GPU execution of the reordered peer-drain path at the current head). Everything else in all four gates passes; I deliberately did not escalate process preferences (PR splitting, unrun SM103/SM121, workload-differs-from-#722, unobservable CI) into findings.
Scope verified at head: 17 files, none under .github/, no .proto/core-format/schema file, nothing under helios/native/ (pr_files). The earlier .github/ hunks were base drift, now confirmed absent.
Gate 1 — Signed core-format / wire / captured-graph / public-contract boundaries: PASS
- No new captured-graph operation family or graph kind.
docs/design-review.md:22-26requires owner approval for a new op contract "even if it reuses a graph kind or enum value". This PR adds none: it classifies existing graph content.node_peer_usage()(helios/src/runtime_core/mod.rs:278(not opened)) inspects existingNode::Copy, memsets, kernel arg/attribute relocations, module globals, and a payload word scan;peer_copy_graphs/peer_access_graphsare internalVec<bool>fields, and the only consumer-side change isgraph_uses_copy_gate(index)athelios/src/runtime_core/serving.rs:59, which fills the pre-existingpeer_copy_graphsvector ofGraphDescriptor. - No wire/core-format change.
Core,Allocation,Execution.async_transfers,ExternalExtentTable, andRangeBody.external_extentskeep their recorded shapes;docs/core-format-design.md(its onlyasync_transfersmention is the unchangedExternalExtentTablerow at:224) is not touched. Principle 13 (docs/design-review.md:116-123) is therefore not stressed: no new required field, no reserved identifier removed, no ABI gate. No previously supported core changes shape, and the load-time rejection the PR adds is documented rather than silently introduced. - Normative invariants are consistent, and contradicted prose was updated in this diff.
docs/scheduling-theory.md(not opened) anddocs/scheduling-runtime-design.md(not opened) contain zero mentions ofCopyEngineGate, peer access,peer_copy, orasync_transfers(regex search) — nothing normative is contradicted there.docs/core-design.md:595mentions "peer access" generically without a gate invariant. The two docs that did state the old, narrower behavior are updated in this PR's diff:docs/prefix-cache-offload.md— the gate paragraph now covers explicitNode::Copy(Memory::Peer)and single-host PCIe multi-rank graphs whose "kernels, memsets, module globals, or indirect pointer tables accessMemory::Peer", with "gated graphs bound their drain wait at 120 seconds". I verified that 120 s is the real bound (helios/src/offload/copy_gate.rs:27-28,PEER_GRAPH_GATE_TIMEOUT, "Aligned withThreadedExecutor's 120 s stall deadline"), so the doc matches code.docs/runtime-core-design.md:687-702— replaced the old single-rank teardown prose with the three-phase cross-rank barrier, the load-timeasync_transfers+ peer-copy rejection, and "all ranks retain their CUDA and host resources until process exit".docs/api.md:403-405— theflare_async_transfer_*series are now documented as "labeled bychanneland the globalrankID", matchinghelios/src/server/metrics.rs:1567(let rank = s.rank;).
- No new CLI flag, config key, or environment-variable behavior switch (
AGENTS.md:450-477). A repo-wideenv::var(scan finds only test opt-ins and existing terminal/dashboard detection; the touched area addsFLARE_ASYNC_TRANSFER_TRACE-style test variables only, whichAGENTS.md:475-477permits. - No per-model branch. The decision is a pure topology function,
copy_gate_policy(local_ranks, all_nvlink, has_peer_copy_nodes, has_peer_access_graphs)(helios/src/runtime_core/model.rs:176-185), fed by a pairwise NVMLP2P_CAPS_INDEX_NVLINKquery that now checks both directions (model.rs:152-170) and fails toward gating when NVML is absent. Nothing keys on model identity or asupports_*flag. - Operator-facing note (Info only, not a gate): the
ranklabel semantics change is documented as the new meaning but not as a change (dashboards keyed onrankshift silently); andRankWedgeWatchdog's terminal action,std::process::abort()at ~TIMEOUT + WATCHDOG_GRACE(helios/src/execution/threaded.rs:1017-1028), has no entry anywhere underdocs/. Grading rule applied: these are documentation precision gaps on an internal-alpha runtime, not wire/format contradictions on a shipped default → not flagged above Nit.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored-upstream fork.
helios/native/roce_proxy.c(not opened) (the repository's vendored-artifact case) and everything else underhelios/native/are untouched (pr_files). The RDMA path changes only in the sibling-decoding slice. - No unmerged external recipe or PR dependency. No
ignition/change, no recipe pin, nolocal-inference-lab/hyperflare-recipesreference. The verification toolchain stays on the pinnedtla2tools v1.7.4used by.github/workflows/helios-lifecycle.yml:34(not opened). - Cross-PR overlap is informational. #721 (merged, same author) is the direct predecessor this PR revises; #726/#723 touch
prepare_async_transfers/release_execution_resourcesand should be serialised if they land together. No textual conflict and no competing #722 fix. Info / Nit, per the calibration rule.
Gate 3 — Mandatory verification evidence & failing tests: one gap
What is satisfied (verified at head, not taken on faith). This PR touches async_transfer scheduler/lifecycle state and rank coordination, so check.py + mutations are mandatory (docs/design-review.md:209-240); the artifacts exist, not just the claim:
AsyncTransfer.tlagrew exactly as described:FlushIo(:83-87),UnflushedIoBoundedAt(:247-251),HwSignaledFaultedSafeAt(:252-255), aggregate:279-280, 16-slotProjection/Decode(:286,:304),StepincludesFlushIo(:186);AsyncTransfer.cfg:22-23enables both invariants.check.py:36widens theAsyncTransferprojection to 16 integers, and the new guards have both a model mutation (check.py:428-454:FlushIooverwrite → must violateUnflushedIoBounded;hwSignaledFaultedno-decrement → must violateHwSignaledFaultedSafe) and Rust mutations (check.py:771-780: "unflushed io completed ok before flush", "hardware-signaled faulted dma clobbered completion slot"). These are real assertions because the runner requires exactly one needle occurrence and the expected assertion text.- Conformance drives production entry points (
verification/helios-lifecycle/README.md:368-378listsstart/enqueue/cancel_epoch/dispatch_io/mark_io_flushed/complete_io/dispatch_dma/complete_dma/mark_dma_faulted/begin_drain/finish_drain/fail_drain), satisfying "not only hand-written replays". - Model/suite counts in the description check out: 9
CHECKS+RankDispatch= the "10 TLA+ models", and 9 Rust conformance suites (check.py:22-37). - Layer 3 Kani correctly not re-run. The harnesses cover completion-vector validation, state-view extent arithmetic, command bounds, pool geometry, and tagged-output parsing (
helios/src/async_transfer/kani_proofs.rs,execution/transport/kani_proofs.rs(not opened),model/{contract/,}kani_proofs.rs,output/tagged/kani_proofs.rs(not opened)). This diff changes none of those validators — it adds scheduling bookkeeping (flushed,hardware_signaled) andCommand/Replyenum variants that are Rust-internal control messages validated byDispatchRing/RankProtocol. Sodesign-review.md:247-251("does not excuse skipping runnable checks") is not triggered. CI does run Kani (.github/workflows/helios-lifecycle.yml:38-49(not opened),cargo kani --lib). - No performance gate. The PR states plainly: "No throughput speedup claim is made beyond deadlock/fault elimination." Numbers are offered as deadlock/lifetime evidence, so
design-review.md:106-115's A/B prong is not triggered. - No reported failing CI or failing test attributable to this PR. The only failing set is disclosed and environmental: 6
helios --libfrontend template tests blocked by HTTP 403 from the gatedmeta-models/Muse-Spark-Open-816B-A42B-NVFP4repo — an untouched path that fails identically onmain, disclosed rather than hidden, which is whatdesign-review.md:112-115requires. I did not flag "no observable CI run" (the Dossier reports lifecycle/kani/pytest green; the description reports the targeted and full runs).
The gap (Gate 3, live multi-GPU prong). docs/design-review.md:252-259 is explicit:
"Replacing or reordering cross-rank launch, commit, cancellation, or drain paths in
helios/src/execution/{threaded,parallel,roce}*requires ... live multi-GPU execution of real collective graphs (for example, serving a multi-GPU exported core throughflare run), not only independent per-rank synthetic graphs. Disclosing busy or unavailable GPUs does not waive this requirement for changes to TP execution paths."
best_effort_drain_peers — a peer drain path — was reordered in exactly this push, from per-peer sequential receive() with an individual deadline to a round-robin, non-blocking try_recv() sweep against one shared deadline (helios/src/execution/threaded.rs:1294-1358), with close_peers/best_effort_drain_peers gaining WatchdogState::record_progress() calls (threaded.rs:1281-1283, :1337-1339). The PR's own evidence places the multi-GPU live run before that change:
- multi-GPU evidence: "On
224fb403: Live SM120 PCIe TP4 serving ... 20/20 requests ...SIGTERMexited cleanly" (224fb403, not the head); - head evidence: "On
c9df77bd: ...live_cuda_async_transfer_end_to_end: passed (0.59s)" — that test is single-device (CUDA_VISIBLE_DEVICES=2), i.e. the independent-per-rank case the rule excludes.
So the reordered drain path has no live multi-GPU run at the head, and the rule says the disclosure of that gap does not waive it. The CPU side is covered (a mock-transport multi-peer test exists: best_effort_drain_peers_joins_healthy_peers_even_when_earlier_peer_is_wedged, threaded.rs:4175), which is why I am recording this as a gap to close by re-running the existing TP4 flare run sequence on c9df77bd — one command, not a design change — rather than as an architectural objection.
Gate 4 — Material scope / claim contradictions: PASS
- Every named artifact I spot-checked exists at head at the cited location:
copy_gate_policy_gates_pcie_kernel_peer_access_without_blocking_nvlink_or_single_rank(model.rs:1663), the twoteardown_model_ranks_*tests (model.rs:1680,:1719),hardware_signaled_faulted_dma_suppresses_completion_slot_sentinelandpartial_flush_preserves_sq_fifo_order_across_completions(scheduler.rs:1101,:1128),flush_queued_sqes_retries_eintr_handles_partial_submit_and_preserves_unsubmitted_count(io_backend.rs:420),finish_startup_peer_error_drains_mixed_peers_cleanly_without_abort(threaded.rs:3540), the threewatchdog_fires_*tests (threaded.rs:4057,:4092,:4121),async_transfer_metrics_label_true_rank_ids_not_flat_vector_indices(metrics.rs:1601). - All four review nits were in fact applied at this head: both-direction NVML (
model.rs:152-170), boundedEINTR(MAX_EINTR_RETRIES = 16,io_backend.rs:146-170, with the test asserting exactly 16 calls),rank()accessor removed (worker.rs:489-501now hasname/state/host_pool_bytes/device_pool_bytesonly), and theapi.mdwording. - No invented benchmark, no thousands of lines of unrelated tooling: the 17 files are all inside the change's own surface (runtime_core gate + payload scan + teardown,
execution/threaded.rs,async_transfer,server/metrics.rs, two design docs, and the matching lifecycle verification). The four defect clusters are disjoint but all on the same serving path, and the description gives each a before/after rationale — a coherent outcome underAGENTS.md:198-199. - The disclosed limitations are accurate as far as I can check: no core combining
Execution.async_transferswithoutNode::Copy(Memory::Peer)existed locally; SM103/SM121, multi-host RoCE, and local Kani were not run (CI runs Kani).
Findings by severity
| Severity | Finding |
|---|---|
| Blocker | None. |
| Major (gate) | Live multi-GPU execution is missing for the reordered peer-drain path at the head. best_effort_drain_peers was reordered (round-robin try_recv, one shared deadline) in c9df77bd (helios/src/execution/threaded.rs:1294-1358), and the only multi-GPU live run is dated 224fb403; the head's live test is single-device. docs/design-review.md:252-259 names drain paths explicitly and says disclosure does not waive live multi-GPU execution. Remedy: re-run the same SM120 PCIe TP4 flare run sequence (serve the exported 4-rank core, exercise SIGTERM teardown) on c9df77bd and report it. |
| Info / Nit | (1) std::process::abort() as the watchdog remedy (threaded.rs:1017-1028) has no docs/ entry, though it is now stated in the PR description; the charter's "don't just swallow/retry an unexplained error" tension is a disclosed design choice, not an omission. (2) docs/api.md:403-405 gives the new meaning of the rank label but not the migration fact that it was previously a flat per-process channel index. (3) #726/#723 overlap on prepare_async_transfers/release_execution_resources; serialise if #726 lands first. |
| Note | 6 frontend template tests failing on HTTP 403 from the gated HF repo are environmental and disclosed; Kani correctly not re-run because no validator it covers changed (CI covers it); the .github/ hunks seen in earlier rounds remain confirmed base drift, not this PR's. |
No contract or vendored-file gate blockers. One mandatory verification prong (Gate 3, live multi-GPU drain) needs a re-run at c9df77bd to clear.