Contracts, Charter & Verification Gates Audit — PR #727
Verdict: No contract, vendored-file, or mandatory verification gate blockers.
Four hard gates checked against docs/design-review.md (incl. the Layer 1–3 testing hierarchy and Mandatory Enforcement section), AGENTS.md, docs/verification.md, docs/core-format-design.md, docs/scheduling-theory.md, docs/scheduling-runtime-design.md, and the head diff.
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 prior owner approval for a new captured-graph operation family, and this PR adds none. TheCopyEngineGatechange is classification of existing graph content, not a new op contract:node_peer_usage()(helios/src/runtime_core/mod.rs:278) inspects existingNode::Copy, memsets, kernel arg/attribute relocations, and module globals;peer_copy_graphs/peer_access_graphs(mod.rs:119-122, pushed at:1478-1479) are internalVec<bool>fields onNativeResources, not metadata or wire fields.graph_uses_copy_gate()(mod.rs:1608-1614) is a selector over those internal flags; the only consumer-side change ishelios/src/runtime_core/serving.rs:59(peer_copy_graphs.push(self.graph_uses_copy_gate(index))). - No Protobuf/wire change. Gate 1's trigger is "new proto/core-format/captured-graph enums, wire kinds." None of the 16 changed files is a
.protoorformat.rs(not opened)/schema file;helios/src/runtime_core/protobuf.rs(not opened),core/schema.rs(not opened),core/protection.rs(not opened),core/export.rs(not opened), andcore/conversion.rs(not opened) are not inpr_files.Core,Allocation,Execution.async_transfers,ExternalExtentTable, andRangeBody.external_extentskeep their recorded shapes. Principle 13 (design-review.md:116-123) — load previously exported cores without re-export — is therefore not stressed: no new required field, no reserved-identifier removal, no ABI gate added. - The signature-verified payload path is reused, not weakened. The new
payload::loadscan (helios/src/runtime_core/payload.rs:246-260, scan at:377-386) reads only bytes the loader has already authenticated and is about to copy; it feeds the pre-existing relocation collector (mod.rs:227-269, call at:1036) rather than replacing descriptor-based validation.contains_interval_address/peer_address_intervals/merge_sorted_intervals(mod.rs:148-269) are additive helpers with unit coverage (mod.rs:2236peer_usage_tests,:2287,:2340-2344). - Normative docs are consistent with the code, not contradicted. The PR updates the docs it contradicts:
docs/prefix-cache-offload.md(diff at theCopyEngineGateparagraph) now states both trigger sets — explicitNode::Copy(Memory::Peer)and single-host PCIe multi-rank graphs whose kernels, memsets, globals, or indirect pointer tables reachMemory::Peer— replacing the old peer-copy-only framing. Verified on disk atdocs/prefix-cache-offload.md:994-1010.docs/runtime-core-design.mddiff adds the three-phase teardown, the load-timeasync_transfers+ peer-copy rejection, and theExecutionError::Drain/resource-retention semantics; on disk atdocs/runtime-core-design.md:~700-750.- Neither
docs/scheduling-theory.mdnordocs/scheduling-runtime-design.mdstates any invariant aboutCopyEngineGate, peer access, or teardown ordering (searched: zero matches forCopyEngineGate,async_transfers,peer_access). Nothing normative was contradicted without an update.
- No new CLI flag, config key, or environment-variable behavior switch (
AGENTS.md:452-477).ChannelConfig.rank/AsyncTransferSnapshot.rank(helios/src/async_transfer/worker.rs:92-111) carry data, not configuration. Noenv::varadded to production paths — the only occurrences in the touched area are the existing test opt-inFLARE_RUN_CUDA_TESTS(worker.rs:1353) and the conformance traceFLARE_ASYNC_TRANSFER_TRACE(lifecycle_tests.rs:454), both permitted byAGENTS.md:475-477. - No per-model branch or
supports_*flag (design-review.md:58-61). The gate is decided by 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:166-175), fed by a pairwise NVMLP2P_CAPS_INDEX_NVLINKquery (model.rs:132-162; the constant is the documentedNVML_P2P_CAPS_INDEX_NVLINK = 2athelios/src/nvml.rs:20-23). Nothing keys on model identity. - Public-contract note for operators (not a gate violation, but worth recording): the
ranklabel onflare_async_transfer_*changes meaning from the flat local-channel index to the true global rank id (helios/src/server/metrics.rs:1566-1567, testasync_transfer_metrics_label_true_rank_ids_not_flat_vector_indicesat:1596-1640).docs/api.md:403-415documents the series as "labeled bychannelandrank" but does not state thatrankis the global rank id. That is a documentation-precision gap on a metrics contract, not a wire/core-format violation and not a shipped-default behavior change (the previous label was a defect introduced hours earlier in #721). Raise as an editorial follow-up, not a blocker.
Gate 2 — Vendored upstream dependencies and cross-PR conflicts: PASS
- No vendored-upstream fork.
helios/native/roce_proxy.c(not opened) — the repository's vendored-artifact case — is not inpr_filesand is untouched by this PR. Nothing underhelios/native/changes. The only external dependency touched is NVML, and this repo loads it dynamically through its own wrapper (helios/src/nvml.rs, existingdevice_p2p_status/P2P_STATUS_OK), not a vendored copy. - No unmerged external recipe or PR dependency. No recipe, no
ignition/change, nolocal-inference-lab/hyperflare-recipespin. Theverification/helios-lifecycleTLA+ toolchain stays on the pinnedtla2tools v1.7.4already referenced by.github/workflows/helios-lifecycle.yml(not opened). - Cross-PR overlap is informational only. #721 (merged, same author) is the direct predecessor — this PR rewrites its teardown, metrics label, and flush path; that is a same-day self-follow-up and the diff applies cleanly on top of it. #726/#723 are sibling open PRs by the same author touching
release_execution_resources/prepare_async_transfers; if #726 lands first, the two should be serialized, but there is no textual conflict in this diff and no competing fix for #722 exists. Info / Nit only, no gate. - Note on scoping: the raw per-file diff carries base-drift from a stale local
main(it rendersasync_transfer/{worker,scheduler}.rsanddocs/TODO.txt,docs/api.md,docs/cli-design.md(not opened),docs/core-design.md(not opened),.github/workflows/*.ymlas changed).pr_files— the trustworthy scope — lists 16 files and none of those excepthelios/src/async_transfer/{io_backend,lifecycle_tests,scheduler,worker}.rs. I therefore did not attribute the workflow edits or thedocs/TODO.txt/docs/api.md/docs/cli-design.md(not opened) /docs/core-design.md(not opened) hunks to this PR. Even if they were this PR's, they are benign:helios-lifecycle.yml(not opened) addscargo test --lib --no-runandnative-serving.yml(not opened) adds a native RoCE transport test — additions to the mandatory gate suite, not removals.
Gate 3 — Mandatory verification evidence and failing tests: PASS
This change touches all three gate-requiring surfaces: scheduler/cache/worker lifecycle, GPU/VMM teardown paths, and cross-rank dispatch. Each applicable layer is satisfied and was reported in this round's evidence, with the formal artifacts present in the diff:
- Layer 3 formal lifecycle conformance (
design-review.md:209-230) — run, and the models were updated in-step.verification/helios-lifecycle/check.py --tlc-jar … --mutationsreported exit0: all 10 TLA+ models and all 9 Rust↔TLA+ conformance suites pass, including 431 observedAsyncTransfertransitions and 7,940DispatchRingtransitions. The supporting artifacts exist at head, not merely in the claim:AsyncTransfer.tlaextends to the 16-integer projection (hwSignaledFaultedat:30,FlushIoat:83,hwSignaledFaultedtransfer at:132-148, invariantsUnflushedIoBoundedAt:247-251andHwSignaledFaultedSafeAt:252-255, aggregate:279-280, projection:304);AsyncTransfer.cfg:22-23enables both.- Rust mutations for both new guards exist in
check.py:742-780(unflushed io completed ok before flush,hardware-signaled faulted dma clobbered completion slot) plus model mutations at:428-454. - The conformance harness drives production entry points, not hand-written replays:
lifecycle_tests.rs:73async_transfer_scheduler_matches_lifecycle_modelexercisesstart/enqueue/dispatch_io/mark_io_flushed/complete_io/dispatch_dma/mark_dma_faulted/begin_drain/finish_drain/fail_drain(README:368-378). - This satisfies "update the model, conformance fixture, or Kani harness to cover the added domain rather than leaving it unverified" (
design-review.md:241-246).
- Layer 1 crate/release tests — run at
--release --lockedon every affected crate:eos(12 passed),seleneandselene-managerwith--features test-support,flare,flare-cli(incl. release build and--features rocecheck),heliopausecheck,helios --features runtime-core,server --test '*', andhelios --libwithRUSTFLAGS="-D warnings"→ 0 warnings, 1,920 passed. Pythontests/cli206 passed. - New unit tests exist exactly where claimed (verified at head, not taken on faith):
mod.rs:2287/:2541(node_peer_usage_…,stop_rank_workers_evaluates_both_stops_without_short_circuiting),model.rs:1661-regioncopy_gate_policy_*plus:1670/:1709(teardown_model_ranks_*),io_backend.rs:413(not opened) (flush_queued_sqes_retries_eintr_handles_partial_submit_and_preserves_unsubmitted_count),scheduler.rs:1101(hardware_signaled_faulted_dma_suppresses_completion_slot_sentinel),threaded.rs:3498(finish_startup_peer_error_drains_mixed_peers_cleanly_without_abort) and threeRankWedgeWatchdogtests at:4019/:4054/:4083. - Cross-rank transport coordination test requirement (
design-review.md:189-194): satisfied by the mock-transport multi-peer tests exercisingclose_peers/best_effort_drain_peers/cleanup_failed_startup(threaded.rs:3322-3560), including the mixed peer-failure matrix that asserts noabort()and that every surviving peer reachesReply::Drained. - Kani (
design-review.md:221-225) — correctly not re-run, and disclosed. The PR statescargo-kaniis not onPATHand that completion/state-view validators were not modified. Confirmed: the Kani harnesses athelios/src/async_transfer/kani_proofs.rs,execution/transport.rs:219(not opened),model/*, andoutput/tagged/kani_proofs.rs(not opened) cover completion-vector validation, extent arithmetic, and command bounds — none of which this diff changes (Command/Replyinthreaded.rsare Rust-internal control-channel enums validated byDispatchRing/RankProtocolTLA+ and the observed-edge suite, not by a Kani harness).design-review.md:247-251blocks skipping applicable Kani proofs; none is applicable here. - Multi-GPU collective execution (
design-review.md:252-259): reported live —FLARE_RUN_CUDA_TESTS=1 CUDA_VISIBLE_DEVICES=2 cargo test … live_cuda_async_transfer_end_to_endpassed on SM120, and a 4-rank exported core served TP4 throughflare run(135 graphs/rank) with 20/20 requests and cleanSIGTERM(status=0). Not merely per-rank synthetic graphs. - No performance claim, so no A/B benchmark gate.
design-review.md:106-115/principle 12 requires an attributablemain-vs-branch served-workload A/B only for a performance claim. The PR states explicitly: "No throughput regression claim or speedup claim is made beyond deadlock/fault elimination." The live TP4 numbers are offered as deadlock/lifetime evidence, and the PR does not attribute any speedup to this change. Gate 3's benchmark prong is therefore not triggered. - FAILING tests on
224fb40— none that this PR introduces. The one failing set is disclosed and environmental: 6helios --libfrontend template tests fail becausetests/frontend/prepare_templates.py(not opened) gets HTTP 403 from the gated HF repometa-models/Muse-Spark-Open-816B-A42B-NVFP4. That is a checkpoint-licensing/network failure in an untouched path, present identically onmain, and it is disclosed in the description rather than hidden — satisfyingdesign-review.md:106-115("keep material failures … visible") andAGENTS.md:106-112("Never invent evidence"). It is not a gate violation. - CI status: not flagged. Per the calibration rules I will not flag "no observable CI run"; the description shows no CI failure and does not state that tests were never run — on the contrary, it enumerates the runs above.
- Declared unrun checks are appropriate and disclosed, not silently skipped: SM103/SM121 hardware, multi-host RoCE, and the unavailable core combining
Execution.async_transferswithoutNode::Copy(Memory::Peer). Of these, only the last bears on a mandatory gate, and the PR names it plainly ("No multi-GPU core combining … was available locally"), whichdesign-review.md:106-115andAGENTS.md:193-199require; it does not leave an applicable CPU check unrun (design-review.md:247-251).
Gate 4 — Material scope / claim contradictions: PASS
- No invented test or benchmark. Every named test, invariant, and file I spot-checked exists at head at the cited location (list above; plus
verification/helios-lifecycle/README.md:349-380describing the extendedAsyncTransferprojection). - No thousands of lines of unrelated standalone tooling. The 16 files are all in the change's own surface:
runtime_core(gate predicate, payload scan, three-phase teardown),execution/threaded.rs(watchdog + startup drain handshake),async_transfer(flush, fault sentinel, rank labels),server/metrics.rs, two design docs, and the matching lifecycle verification. Nothing is bolted on. - The four fix clusters are logically independent but not scope abuse. They are 4 deleted-defect classes on largely disjoint files, all four tied to the same serving path;
AGENTS.md:198-199asks a PR to have "one coherent outcome and describe its problem, resulting behavior, validation, and material limitations," and the description does exactly that for each cluster with before/after framing. - Two description gaps worth naming, neither a gate violation: (a)
RankWedgeWatchdog's terminal action isstd::process::abort()afterTIMEOUT + 30 s(helios/src/execution/threaded.rs:547-753, abort at:1027), which the description calls "bounds wedged-rank hangs" without saying the process dies — accurate but under-specified prose (design-review.md:147-162). Note this abort is strictly better than the status quo #722 documents, and the PR's actual root-cause fix is the gate widening; the watchdog is an additional bound. (b) Theranklabel semantics change noted under Gate 1. - The live-evidence workload differs from #722's reproduction (13k tokens/20-way/4G/135 graphs vs 32k/c4/256G/177 graphs). This weakens the strength of the evidence for the #722 claim; it does not make the claim absent from the diff, which is what Gate 4 targets. Belongs to the Value/Correctness lenses, not here.
Summary of what I would record, by severity
| Severity | Finding |
|---|---|
| Blocker | None. |
| Major | None. |
| Info / Nit | (1) RankWedgeWatchdog ends in std::process::abort() after ≈150 s; the description says "bounds wedged-rank hangs" without stating the process terminates — worth one clarifying sentence in the description. (2) docs/api.md:403-415 should state that the flare_async_transfer_* rank label is the global rank ID, since its meaning changed. (3) #726/#723 overlap on prepare_async_transfers/release_execution_resources; serialize if #726 lands first. |
| Note | The 6 frontend template tests failing on HTTP 403 from the gated meta-models/Muse-Spark-Open-816B-A42B-NVFP4 repo are disclosed in the "1,920 passed" run and are environmental; they do not block. Kani correctly not re-run (no applicable validator changed). |
No contract or verification gate blockers.