Contracts, Charter & Verification Gates Audit — PR #725 (helios: rotate RoCE proxy peer send order by rank)
Head da7abad · perf/roce-rotate-peer-order → main · pr_files: helios/native/roce_proxy.c (+227/−46), pyproject.toml (+1/−1).
Scope note. pr_diff against this checkout returns a phantom ~2 MB diff (KIND_RING_RS/AG/RSAG, ring_window, roce_create_with_gids, ROCE_RESERVE_OPS, RING_WINDOW 16, .github/workflows/*, docs/*, AGENTS.md). That is a stale local main predating merged #707, not #725: search_code ref=main finds no KIND_RING_RS/roce_create_with_gids and shows RING_WINDOW 8, while head has KIND_RING_RS 7 (:194) and RING_WINDOW 16. I attribute none of it to this PR. Real content: four rotated loops + absorbed hairpin pacing + pin bump.
Round-2 handling. The 14:19 Autobot review raised two blockers at 8b06cda; the 19:07 author response and the rewritten description claim both resolved. I re-verified each in the tree rather than restating them.
Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: CLEAR
- No wire, ABI, core-format, captured-graph, CLI, config, or default change.
ROCE_ABI_VERSIONstill14(roce_proxy.c:160);ROCE_SEND_DEPTH 512(:150),ROCE_MAX_CHUNKS 64(:161),ROCE_VARLEN_MAX_CHUNKS 512(:162),ROCE_CTRL_BYTES 4096(:163) untouched. Rust side untouched:PROXY_ABI = 14(helios/src/execution/roce.rs:23), accepted set9 | 10 | 11 | 14(:131), blob-size contractassert_eq!(size, 1176)(:444). The two newroce_ctx_tfields (roce_proxy.c:354-357) are host-side, outsideroce_blob_t, soroce_blob_bytes()and the wire layout are unchanged; existing ABI-14 cores load unmodified (satisfiesdocs/design-review.md:116-123). - No normative doc contradicted, so no doc-update obligation. The "rank order" statements in
docs/roce-ring.md(:4,:32-37,:80,:223,:229) describe ring topology, node order and relay direction — none pins the proxy's intra-op peer posting order.docs/scheduling-theory.md(not opened),docs/scheduling-runtime-design.md(not opened),docs/core-format-design.md(not opened) are not implicated.docs/roce-ring.md:29("ConnectX hardware hairpin forwarding is not implemented") stays accurate: the new path is software pacing of direct QP writes, not hardware forwarding — and it is unreachable here anyway (Gate 2/3). AGENTS.md: nothing governsroce_proxy.cposting order;AGENTS.md:404-407(coupled to FlashInfer/b12x) is satisfied. No owner-approval contract triggered — no new captured-graph op family, no new wire kind.
Gate 2 — Vendored upstream dependency & cross-PR conflicts: CLEAR (prior blocker genuinely resolved)
pyproject.toml:47@head:rev = "3c5c7b14886a7b8904e2963f7d678dbf3a4a755e", changed by this PR from5a8ceed80ccc58e11a4d49ccc910f52967699c09(confirmed viaread_file ref=main:47 and thepr_diffhunk). Exact 40-char SHA — satisfies "pin everything (#215)".- The parity gate is now satisfiable in form, verified line by line in
tests/preparation/test_roce_proxy_parity.py:PROVENANCE_LINES = 9(:17); header assertions SPDX (:42), upstream path substring (:43),lines[8] == b"\n"(:44); body islines[9:]byte-compared to installed upstream (:48-51).roce_proxy.c:1-9matches all four exactly (I read lines 1-30: line 9 is the blank separator, line 10 starts the body). It runs every PR via.github/workflows/python-cpu.yml:29 (not opened),33(uv sync --extra prepare --extra test;pytest tests/ -q) — thetests/preparationLayer-1 duty indocs/design-review.md:180-186. - The vendored-file rule is what pulls the pacing in:
docs/roce-ring.md:363-365requires the body to stay identical to the dependency after its provenance header, androce_proxy.c:6-8repeats it. Bumping the pin is the compliant path; the file no longer sits ahead of an unmerged upstream PR. - Residual limitation, not a blocker: byte identity with external flashinfer
3c5c7b148is unverifiable from this checkout (external git dep; test only runs in the preparation env). Consistent with the pin; the author reportstest_roce_proxy.py(not opened): 24 passed. - Info / Nit: open #731 (avifenesh) pins the same
pyproject.toml:47line to6aff33c4…— mutually exclusive, whichever merges second rebases and #725 must re-verify parity against a different upstream commit. Merge-order coordination only. - Info / Nit:
items_touching helios/native/roce_proxy.cunchanged — open #725, #712, #672, #649, #577; merged #707, #643, #251, #325, #279. #672/#649/#577 still open despite #707 claiming consolidation: pre-existing bookkeeping.
Gate 3 — Mandatory verification evidence & failing tests: CLEAR (both prior blockers resolved)
- No failing CI or failing test is reported on
da7abadin the description or discussion. Reported:cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features roce --lib execution::roce35 passed / 0 failed (mechanism = real CI step.github/workflows/native-serving.yml:115(not opened)), andtest_roce_proxy.py(not opened) 24 passed. I make no claim about Actions check-run status (unobservable, not flagged per calibration). - Charter #210 /
docs/design-review.md:106-115(principle 12) — MET in form. Matchedmain-vs-branch served-workload A/B on the stated target: 4-node GB10 SM121, switched dual-rail 200 GbE ConnectX-7,Shape::Mesh, DeepSeek-V4.1-Flash TP4, unmodified ABI-14 runtime package,mainf705086bvs branch8b06cdac, one cold boot per arm, identical prompts/concurrency, 0 failed requests both arms. Prefill +1.05% (42,430 tok,11,605.5 → 11,726.8tok/s) and +1.50% (4×10,618 concurrent,10,077.7 → 10,228.4agg tok/s); decode C=1/4/16 explicitly self-described as within pass-to-pass variance. This is aflare-served comparison, notignition debug-servediagnostics. docs/design-review.md:252-259— both limbs present: before/after cross-rank happens-before analysis in the description (source-keyed slots, per-QP ordering, ring mailbox serial ordering,ring_serviceascending-serial sort), plus live multi-GPU collective execution of a real exported core across 4 nodes. Substance of the analysis belongs to the Code Correctness lens; as a mandatory-evidence gate it is satisfied.docs/design-review.md:247-251no longer in tension — the pin bump makes the CPU parity check runnable/green instead of knowingly red.- Measured-arm caveat is legitimate and verified. The A/B used
8b06cdac(rotation only), not shippedda7abad. I confirmed the shipped mesh path is identical: repo-widesearch_code "hairpin"returns onlyhelios/native/roce_proxy.c(:206-213,:354-357,:870-891,:1307,:1599-1607,:2112-2117) anddocs/roce-ring.md:29— no caller ofroce_set_hairpin_peers(:874-892) exists anywhere in this repo (helios/src/execution/roce.rshere exports onlyroce_start/roce_connect/…;roce_proxy_dlopen.cis a bare#includeshim). Withroce_ctx_tzero-initialised (:588),hairpin_pacingstays 0 →passes == 1(:1599,:2112) →post_striped_pacednever runs. The author's equivalence claim is correct. - Statistical weakness (n=2–3 passes, no SD, arms not interleaved, the 10,618-token row's per-pass ranges overlapping, no PFC/
rx_out_of_buffercounters behind "eliminating") is a strength-of-evidence matter, already carried in the case file — not a missing gate, so not re-flagged here.
Gate 4 — Material scope / claim contradictions: CLEAR on contradictions; one genuine scope finding
No contradiction: every checkable claim matches the tree. Rotations at exactly :1460, :1602, :1729, :2115 (each for (int step = 1; step < c->world; step++) / int p = (c->rank + step) % c->world;); ROCE_ABI_VERSION still 14; pin bumped; 9-line header satisfies the parity test. The absorbed pacing is disclosed in the description ("also includes the roce_set_hairpin_peers pacing path, which is inactive unless called by a hairpin topology") and the A/B arm caveat resting on it is correct. No nonexistent test/benchmark claimed; no bundled standalone tooling.
Should Fix (non-blocking) — ~150 lines of unreachable C bundled into a byte-parity-pinned file, against docs/design-review.md:135-146 (principle 15, "Reject scope expansion"). The rotation is 11 lines; alongside it this PR lands HAIRPIN_SEG_BYTES/HAIRPIN_MAX_INFLIGHT_SEGS + static assert (:206-213), two ctx fields (:354-357), roce_set_hairpin_peers (:870-892), peer_outstanding (:1299-1305), post_striped_paced (:1307-1420), and the two-pass passes/want_paced splits (:1599-1609, :2112-2130) — with no in-repo caller, in a file required to stay byte-identical to a moving external dependency, maintained in two repositories.
- Duplication with #712 (open, same author): #712 owns the only call site (
helios/src/execution/roce.rs:64,240-241,hairpin_transit_mask:377, test:632-653) but keeps the un-rotated loops at:1458,:1602,:1728,:2116. #725 is thus a strict superset of #712's proxy delta minus the rotation, while #712 holds the wiring and the hardware evidence. The pacing belongs where it has a consumer. - Untested interaction to name: if #712 lands,
hairpin_pacinggoes live onShape::HairpinRing/Chainand thewant_pacedfilters (:1607,:2117) interleave with the rotation. Neither PR tests rotation × pacing (#725 measuredShape::Meshwith pacing dead; #712 measured pacing with un-rotated loops). Post-merge follow-up risk, not a defect.
Resolution (either suffices): reduce #725 to the four rotated loops + pin bump (justified as satisfying the parity gate), leaving pacing to #712; or record that #725 is now a two-feature PR with a stated merge order vs #712 and #731.
Verdict
No contract or verification gate blockers.
- Gate 1: CLEAR — no ABI/wire/core-format/captured-graph/CLI/config change;
ROCE_ABI_VERSION 14+PROXY_ABI 14+ 1176-byte blob intact; no normative doc contradicted. - Gate 2: CLEAR — the vendored-file blocker from the 14:19 review is resolved:
pyproject.toml:47pins merged upstream3c5c7b148…, androce_proxy.c:1-9satisfiestest_roce_proxy_parity.py:42-46exactly, making thepython-cpu.yml:33(not opened) parity check passable. Residual: external byte identity unverifiable here. Info/Nit: pin-SHA contention with #731; overlap with #712. - Gate 3: CLEAR — no failing test/CI reported on
da7abad; Charter #210 anddocs/design-review.md:106-115met by a real 4-nodeShape::Meshflare-served A/B vsmainwith 0 failed requests;:252-259both limbs present;:247-251no longer in tension. Measured-arm-vs-head gap is legitimate (noroce_set_hairpin_peerscaller ⇒ identical mesh path). - Gate 4: CLEAR on contradictions — all checkable claims match the tree; absorbed code disclosed; nothing fabricated.
One Should Fix, non-blocking: ~150 lines of unreachable hairpin-pacing C in a byte-parity-pinned file, duplicating open #712 where the sole call site lives (docs/design-review.md:135-146); resolve by deferring it to #712 or by documenting the two-feature scope, the #712/#731 merge order, and the untested rotation × pacing combination.