#1 [high] #672 verified findings — RoCEv2 per-HCA GID index
Head pr/672. pr_files/pr_diff still return the stale 4-file c582b10 diff; real tree also changes heliopause/src/python.rs, ignition/preparation/collectives.py, docs/cli-design.md.
SOUND (verified):
- Per-HCA index alignment is sound end-to-end. Fabric::topology (roce_fabric.rs:1019-1048) builds hcas from self.endpoints and gid_indices from self.gid_indices in the same order; roce.rs:181-187 rejects length mismatch before touching region; C uses gid_indices[h] for HCA h (roce_proxy.c:576). GID index is local-only: peer GID value travels in blob.gid[h] (roce_proxy.c:239,644), sgid_index is local (roce_proxy.c:674). So ranks need not agree on indices — no wire/PROXY_ABI change needed (str.final ABO stays 14 at roce.rs:23, roce_proxy.c:141).
- C validation order is correct: roce_proxy.c:537-549 checks NULL gid_indices and 0..=255 bounds before calloc/region/ibverbs; test roce.rs:536-599 exercises it.
- Doctor Pass and Warn both use format_gid_indices (spark.rs:190, :246) — old "Warn prints one scalar" issue closed.
- Test count accurate: filter execution::roce prefix also selects roce_fabric::tests; 7 tests in roce.rs (410,416,440,464,499,522,536) + 28 in roce_fabric.rs tests = 35. Matches description. Doctor "RoCEv2 GID indices [3, 5]" string matches spark.rs:192.
#2 [high] Research summary
Reviewed PR #672 at head 5fa291d (per-HCA RoCEv2 IPv4 GID index selection) for correctness, contracts and system-level consequences. Note: pr_files/pr_diff still return the stale 4-file c582b10 diff; the real tree also changes heliopause/src/python.rs, ignition/preparation/collectives.py and docs/cli-design.md, so I worked from the files at pr/672 directly.
Verdict: the core correctness of this change is sound. The index alignment is consistent across every layer. Fabric::topology (roce_fabric.rs:1019-1048) builds hcas from self.endpoints and gid_indices from self.gid_indices in one pass, so index i always pairs with device i; roce.rs:181-187 hard-rejects a length mismatch before the region is touched; the C side uses gid_indices[h] for HCA h (roce_proxy.c:576). Crucially the GID index is purely local — only the peer's GID value crosses the wire (roce_proxy.c:239, :644) while sgid_index is applied locally (:674), so ranks genuinely need not share an index and no wire/ABI change is required (ABI still 14). The C guard order is right: roce_proxy.c:537-549 validates gid_indices == NULL and the 0..=255 bounds before calloc, region access or any libibverbs call, and roce.rs:536-599 exercises exactly that. flare doctor now routes both the Pass and the Warn path through format_gid_indices (spark.rs:190, :246), closing the earlier "Warn still prints one scalar" defect. The description's test counts check out: the execution::roce prefix filter also selects roce_fabric::tests (7 tests in roce.rs + 28 in roce_fabric.rs = 35), and the quoted doctor string matches spark.rs:192 verbatim.
Findings I did verify (all about evidence and contracts, not the algorithm). The preparation path now branches on the installed library: ignition/preparation/collectives.py:83-93 uses inspect.signature(roce.AllReduce.__init__).parameters to choose between per-HCA arrays and a single roce_gid_index() scalar, while pyproject.toml:47 still tracks FlashInfer main, not a pinned revision. That is both an unpinned dependency against the charter's pin-everything rule (#215) and a behavioral split with no test in this repo (no test anywhere reaches create_roce_runtime). Until flashinfer#209 is pinned, the scalar fallback still returns only the first device's index, so the prep/serving divergence this PR claims to fix persists on mixed-index hosts — the PR text and docs should say that, or the revision should be pinned. Second, the risky part of this change still cannot be run in CI: the only --features roce job is a cargo check (.github/workflows/native-serving.yml:113 (not opened)), helios tests run --features runtime-core,server (:63), so the C/FFI test at roce.rs:536 remains human-run-only proof, and the vendored-file byte-identity claim (roce_proxy.c:6-8, restated as a rule in docs/roce-ring.md:362-363) is asserted but not verifiable in-repo. Third, roce_create (roce_proxy.c:585-595) is now a forwarding shim with no in-tree caller — low severity, but it is dead ABI surface that must be kept in sync with the vendored upstream for no local benefit.
I found no concurrency, hot-path, memory-amplification or failure-blast-radius regression: discovery runs once at startup, the added validation is O(n_hca) with n_hca ≤ 4, and nothing in the posting thread or queue-pair path changed beyond which index is queried. Tests and platform parity (Linux-only paths, Windows unchanged) are fine. Full detail with citations is in the scratchpad.
#3 [high] #672 findings: prep version-sniff, unpinned FlashInfer, CI gap, dead shim
FINDING 1 — Major: preparation sniffs the installed b12x API; FlashInfer is unpinned and the scalar fallback keeps the bug.
- ignition/preparation/collectives.py:83-93
import inspect gid_kwargs: dict[str, object] if "gid_indices" in inspect.signature(roce.AllReduce.__init__).parameters: devices = flare_heliopause.roce_devices() gid_kwargs = { "hca_names": [name for name, _ in devices], "gid_indices": [gid for _, gid in devices], } else: gid_kwargs = {"gid_index": flare_heliopause.roce_gid_index()} - pyproject.toml:47
flashinfer-python = { git = ".../flashinfer.git", branch = "main" }— branch, not a pinned rev/sha (charter #215 pin-everything). - Impact: two live prep code paths keyed on whatever library is installed; on the scalar path
roce_gid_index()returns only the first device's index (heliopause/src/python.rs:693-706,fabric.gid_index()= first entry or 3), so on a mixed-index host (index 3 + index 5) preparation still opens both HCAs at index 3 while serving uses 3 and 5 — the prep/serving divergence is only closed once flashinfer#209 is pinned. No test in this repo reachescreate_roce_runtime(searched tests/: onlyWARMUP_SPIN_LIMIT,CollectivePreparation,_CollectiveTuningHeaderare imported from this module). - Fix: pin the flashinfer rev that carries
gid_indicesand drop the fallback branch; or, if the fallback must stay, state in the PR and docs/multi-host.md that the split persists on mixed-index hosts until the pin lands.
FINDING 2 — Major (evidence/claim accuracy): the new C/FFI and preflight behaviour is not executed by CI.
- .github/workflows/native-serving.yml:113
cargo check --locked --manifest-path flare-cli/Cargo.toml --tests --features roce,rdmais the onlyroceinvocation; :63 runs helios tests with--features runtime-core,serveronly, sopub mod roce(#[cfg(feature = "roce")], helios/src/execution.rs:16-17) is not compiled there. - Impact:
roce_create_with_gids_rejects_null_and_out_of_range_gid_indices(roce.rs:536) and the case-10 preflight (roce.rs:483-485) only run when a human types--features roce; the description's helios command omits--features roce, so that exact quoted command cannot execute them. - Fix: add a Linux job step
cargo test --manifest-path helios/Cargo.toml --features roce --lib execution::roce(libibverbs-dev is already installed at :108).
FINDING 3 — Minor: vendored parity is asserted, not verifiable in-repo.
- helios/native/roce_proxy.c:6-8 header claims byte-identity with flashinfer
_roce_proxy.c; docs/roce-ring.md:362-363 states the rule ("keep the vendored source identical to the dependency after its provenance header"). No submodule/checksum in the tree (third_party has no b12x/roce copy;list_files third_party/**/roce*= none). - Impact:
roce_create_with_gidsis now a new exported symbol in the vendored file; if flashinfer#209 differs, prep and serving compile different proxies under the same ABI 14. - Fix: cite the flashinfer#209 merge SHA in the PR and record a checksum, or gate the claim behind the companion PR landing first.
FINDING 4 — Minor: dead ABI surface.
- helios/native/roce_proxy.c:585-595
roce_create(...)is now a thin wrapper (fills gids[ROCE_MAX_HCAS] then delegates); the Rust side declares onlyroce_create_with_gids(roce.rs:46-61), and searching the tree finds no other caller. Kept only for upstream byte-parity; note it as such so it is not "cleaned up" by a later PR that breaks parity.
DOC/CONTRACT notes (verified):
- docs/cli-design.md:1696-1697 updated to "serving's per-device RoCEv2 GID indices" — matches spark.rs:161-190. But docs/cli-design.md:1713-1715 still reads "RoCEv2 GID index 3" (historical cluster description, acceptable), and documents/multi-host.md was not updated to mention per-device indices or the prep caveat (only :42 and :565 mention IPv4 RoCEv2 GIDs generically).
- No proto/wire change: RoceTransport reserves 11..15 ("Formerly the preparing hosts' devices, GID index…", helios/proto/runtime_core.proto:734-736) and each serving host discovers its own fabric — consistent with per-HCA indices staying local. No owner sign-off needed.
- heliopause/src/python.rs:668 registers
roce_devices; :708-727 returns name-sorted(name, gid)viafabric.endpoints.into_iter().zip(fabric.gid_indices)— sound because discover_in builds both in that order (roce_fabric.rs:413-429,468-472).roce_gid_indexdocs at :693-695 correctly narrowed to "first selected device". - No telemetry/metric shift: doctor detail string changes from "at RoCEv2 GID index {n}" to "at RoCEv2 GID {label}" (spark.rs:192); no metric/rate/admission field touched anywhere in this PR.
- Concurrency/hot path: discovery is once-at-startup;
pick_gid_indexreads at most 2 files per HCA instead of 1 when index 3 is not the answer (roce_fabric.rs:406-412) — negligible, bounded by MAX_DEVICES=4 / GID_TABLE=16. Posting thread, queue pairs and region layout unchanged.