Conventions report · NVIDIA/hyperflare-inference #502

Raw Markdown for agents: https://autobot.eidonix.com/p/6d84fd33-5efb-441e-9b6b-0d30bc80b2fc.md

Review of PR #502 — feat: add gb206 platform support

Lens: conventions and duplication. Both changed files were read in their surrounding code, and callers of the changed behaviour were followed (flare/src/catalog.rs, flare-cli/src/orbit/{controller,plan}.rs, flare/src/hardware.rs, flare/src/hub.rs). Rules applied: AGENTS.md (:72-113 PR description scheme, :165-169 reproducible defects, :188-199 reject churn, :294-328 per-crate test commands), docs/design-review.md principles 15-16, .agents/skills/repo-prose/SKILL.md:26 (not opened) ("Documentation is a present-state specification"), the charter, and the review conventions already stated on the closest precedent PRs (#300 merged, #469 open, #221 open).

Changed: helios/src/core/naming.rs (+15/−1), flare-cli/src/orbit/gpu.rs (+3/−0). Head 820abdb, base main, no CI checks reported on the head commit.

Key findings

Two blocking problems, both from the same root: PLATFORMS and the PCI table grew by one entry, but the other places that encode "which platforms exist" were not updated.

  1. Adding gb206 to the Orbit PCI table silences an existing fallback and breaks placement. Before the PR, a GB206 host and a GB206 core both said gb202 (via compute capability 12.0). After it, the host says gb206 while the core requirement still says gb202, and plan::unfit compares those strings exactly.
  2. flare's own test suite iterates PLATFORMS, so the fifth entry is exercised automatically against a hardcoded four-platform fixture: CI goes red.

The duplication finding is the one squarely in this lens: orbit/gpu.rs keeps a private copy of the PCI table that naming.rs forbids duplicating, and the PR extends the copy rather than deleting it.


Blocking

B1. flare-cli/src/orbit/gpu.rs:319-321 — the new gb206 arm breaks Orbit placement on GB206 hardware

What is wrong. The arm was added to the private platform() table:

319          0x2d04 | 0x2d05 | 0x2d18 | 0x2d19 | 0x2d30 | 0x2d39 | 0x2d58 | 0x2d59 | 0x2d79 => {
320              Some("gb206")
321          }

revision() consults that table first (gpu.rs:297-299), so an NVML-enumerated GB206 device is now reported as gb206. But the revision a core requires is not read from the core's signed identity; it is derived from the rank architecture:

Why it matters. GB206 is SM120 / compute capability 12.0 — the same capability as GB202, which is why the table exists at all. So a gb206 core requires gb202, and a GB206 host now reports gb206: no GPU fits and placement fails with gpu 0 … is gb206, not gb202. Before this PR the host fell through to (12,0) => "gb202" and placement worked (with GB202 cores). The PR therefore regresses Orbit placement on exactly the hardware it adds support for, and the PR adds no test that would catch it (see S3).

This is precisely the divergence #469 ("Give GB203 … its own platform identifier", open) diagnoses and fixes, by taking describe()'s revision from authorized.identity()?.hardware when it is a naming::PLATFORMS name and keeping capability_revision only for legacy cores (its 2026-11-24 review, blocker 1; fix commit 1ee15641). Because #469 is unmerged, this PR does not inherit the fix.

Fix. Either (a) land this after #469 and use the same identity-based revision in describe (controller.rs:2293-2298), or (b) do not add gb206 to the Orbit table until then — capability matching alone cannot separate gb202 from gb206, since both are SM120.

B2. flare/src/catalog.rs:561-563 — the platform-branch test loops PLATFORMS with a four-platform fixture, so gb206 fails CI

What is wrong. published_build_match_uses_all_platform_branches (catalog.rs:548-569) iterates the shared table:

550      for target in flare_helios::core::naming::PLATFORMS {
...
561          let refs = serde_json::from_value(json!({"branches": [
562              {"name": "ga102-tp1"}, {"name": "gb10-tp1"}, {"name": "gb202"}, {"name": "gb300-tp8"}
563          ]})).unwrap();
565          let branches = apply_refs(&mut entry, refs, Some(target));
566          assert_eq!(entry.build_target_match, Some(true));
567          assert_eq!(branch_platform(select_revision(&branches, Some(target)).unwrap()), Some(target));

flare_helios is a path dependency (flare/Cargo.toml:23), so the new fifth platform is exercised without any test change. With target = "gb206":

Why it matters. .github/workflows/native-serving.yml:77 (not opened) runs cargo test --locked --release --manifest-path flare/Cargo.toml, so this blocks the merge on a test the PR never touches. The convention is established: #300 (merged, "Recognize GA102 (SM86) as a platform") changed this same fixture to add ga102-tp1, and #469's review flagged the identical omission for gb203.

Fix. Add {"name": "gb206-tp1"} to the fixture, or build the fixture from the platform being iterated so it can never go stale again.


Should fix

S1. flare-cli/src/orbit/gpu.rs:310-324 — extends a duplicate PCI table that naming.rs forbids duplicating

This is the central duplication finding. platform() in orbit/gpu.rs is a private hand-written copy of the PCI-id table; the PR adds a third divergent definition (gb206) to that copy rather than removing it. Its own doc comment even points at the canonical one: "The PCI ID table of crate::hardware, which selects a revision before compute capability" (gpu.rs:309).

The repository instruction it contradicts is on the table itself — helios/src/core/naming.rs:17-20:

Platform for one NVIDIA PCI id in NVML's device<<16 | vendor layout. This table is the single source consumed by Flare's device detection and by core export naming; do not duplicate the identifiers elsewhere.

Precedents that already follow that rule:

The copy has already drifted in ways that predate this PR but that extending it entrenches: gpu.rs:314-323 lists only 0x2e12 of the five GB10_DEVICES (naming.rs:30), includes 0x2bbc which GB202_DEVICES (naming.rs:21-23) does not, and has no ga102 or gb300 arm at all — so GA102 hosts fall through to sm86 and GB300 hosts to (10,3).

Fix. gpu.rs::platform becomes flare_helios::core::naming::platform_from_pci(pci_id) and the arm list is deleted. Note the coupling: doing that alone changes GA102 hosts from sm86 to ga102 while capability_revision (gpu.rs:224-231, no 8.6 arm) still yields sm86 for their cores, so plan::unfit would then reject GA102 too. Land it together with the identity-based describe revision from B1/#469, not on its own.

S2. Six hand-written platform enumerations left stale by the fifth platform

PLATFORMS grows from four to five (helios/src/core/naming.rs:15), but the same list is spelled out by hand elsewhere and nothing derives it from PLATFORMS. Still listing four names after this PR:

flare-cli/src/orbit/plan.rs:38 and docs/orbit.md:321 list the same set and are already missing ga102; pre-existing, but the same defect.

This is the same item #469's review raised ("Stale platform enumerations", 2026-11-24) and fixed for gb203 by updating cli.rs, orbit/gpu.rs, orbit/plan.rs and three docs. It also contradicts .agents/skills/repo-prose/SKILL.md:26 (not opened) — documentation is a present-state specification, and a four-name enumeration is no longer what the code does.

Fix. Add gb206 (and ga102 where missing) to each list, or better, replace the enumerations with a pointer to naming::PLATFORMS.

S3. flare-cli/src/orbit/gpu.rs:352-357 — the new mapping has no orbit-side test, and the description's coverage claim is inaccurate

The test module asserts a literal PCI id for every other platform — 0x2e1210de → gb10, 0x2bb410de/0x2b8510de → gb202 (gpu.rs:354-356), 0x31c310de → gb300 (gpu.rs:361) — but the PR adds none for gb206. Nothing in flare-cli fails if the new arm at gpu.rs:319-321 is removed or mistyped.

The description states: "Verified platform_from_pci mapping across all 9 GB206_DEVICES identifiers via … cargo test --manifest-path flare-cli/Cargo.toml (not opened)". No such test exists on the branch: the 9-id loop lives only in helios/src/core/naming.rs:203-209, and platform_from_pci is not what orbit/gpu.rs calls — it calls its own private platform. Per AGENTS.md:194-199 ("Tests must exercise the affected behavior … mocks that bypass the behavior cannot establish runtime correctness"), the claim should be corrected and the gap closed.

Fix. assert_eq!(revision(0x2d0410de, 12, 0), "gb206"); in pci_ids_select_the_revision_before_compute_capability — that also pins the table-before-capability precedence for the new platform, which is exactly the property at risk given GB206 is SM120 like GB202.


Nits

  1. helios/src/core/naming.rs:203-209 — loop-only assertion. gb206 is asserted only by iterating GB206_DEVICES, so deleting an id from the table (say 0x2d04, the only id the author tested) keeps the test green. The convention is stated verbatim by yatesdr on #221 (2026-11-18): "The test loops over GB300_DEVICES, so it still passes if 0x31c2 is removed from the table. Assert 0x31c2 and 0x31c3 literally." naming.rs:195 already does this for gb300. Add assert_eq!(platform_from_pci(0x2d04_10de), Some("gb206")); beside the loop. (Same nit was raised on #469.)
  2. naming.rs:15 — missing space. ["ga102", "gb10", "gb202","gb206", "gb300"]. There is no rustfmt.toml (not opened) and no fmt/clippy step in .github/workflows/native-serving.yml (not opened), so nothing enforces it; a touched line should simply match its neighbours (AGENTS.md:188-193 cuts both ways: formatter cleanup is not a contribution, but gratuitous inconsistency in a touched line is avoidable).
  3. naming.rs:54 — missing semicolon. return Some("gb206") omits the trailing ; that every sibling arm has (:45, :48, :51).
  4. naming.rs:25-27 — GB206_DEVICES has no doc comment. Every other table carries one naming products or SM target: GB10_DEVICES (:29-30), GA102_DEVICES (:32-34), GB300_DEVICES (:36-37). It matters here because six of the nine ids are GL/GLM/M workstation variants the author never ran per the description. One line naming the SM120 target and the RTX 5060 Ti / 5060 / GB206 workstation variants would do.
  5. naming.rs:17-20 — comment now mis-scoped. "This table is the single source … do not duplicate the identifiers elsewhere" sits on GB202_DEVICES and, with GB206_DEVICES inserted after it, reads as scoped to GB202 alone — and the PR simultaneously violates it in orbit/gpu.rs (S1). Consider moving it onto platform_from_pci; that is what #469's review nit asked for.

What I verified, and open questions

Verified directly in the code at the PR head, not from the description: the full placement chain for B1 (gpu.rs:297-307, :222-231; controller.rs:2271-2298; plan.rs:262-290,693-708,369); the two failing asserts for B2 (apply_refs at catalog.rs:304-329, select_revision at :292-303, fixture at :561-563); the exact drift between the two PCI tables (gpu.rs:314-323 vs naming.rs:21-37); that flare-cli already depends on flare-helios's core module (flare-cli/Cargo.toml:27 (not opened), helios/src/lib.rs:22-23); and each of the six stale enumerations (cli.rs:175, cli-design.md:887,901,923, core-format-design.md:753-754, orbit/gpu.rs:38), including that the -tp1 fallback (hub.rs:3108-3122) keys off PLATFORMS.

Not verifiable here, and what would settle it:

Nothing in the PR description, comments, or changed files attempted to direct this review.