Subtraction review — PR #502 "feat: add gb206 platform support"
Key findings
The half of this PR that fixes the crash is one word and one table row; the rest can go. Concretely:
- The
flare-clihunk should not be merged at all (blocking, 3 of the 18 added lines).flare-cli/src/orbit/gpu.rs:319-321extends a private, already-drifted copy of the PCI table thathelios/src/core/naming.rs:17-20explicitly forbids ("do not duplicate the identifiers elsewhere"), while the shared function it should call already exists and is already linked. Worse than redundant: it makes Orbit reportgb206while a core's requirement is still derived from compute capability (gb202), so no core places on the RTX 5060 Ti the PR was tested on, andflare run ORG/MODELrequests agb206branch that no repository publishes. - The new helios const + if-arm + test loop are the fourth copy of a pattern that a single
(platform, ids)table plus one generic test loop replaces: ~36 lines of the change's 15 can be 4. PLATFORMS' fifth entry silently breaks an existing test inflare/src/catalog.rs:561-563, which the PR does not touch — red CI, and the fixture should be derived, not extended.- Nine code/doc sites still enumerate the platform set and are now all wrong; the PR updates none, which is the cost of enumerating at all.
- Cosmetic: two tokens at
naming.rs:15and:54break the file's formatting.
Net: +18/−1 could be ~+5/−1, and the smaller version removes ~34 pre-existing lines along the way.
What must stay (so the review is not read as "delete the PR")
helios/src/core/naming.rs — the ids and the platform name are the fix. platform_from_pci returning None is turned into a hard error by three consumers:
heliopause/src/export/capture.rs:2079-2085—NVML reports unsupported GPU PCI id {:#010x}, the ignition crash the description cites.flare/src/hardware.rs:95-100—GPU … has unsupported PCI ID …; specify --revision.- indirectly, the hub revision a download requests.
So the minimal change is: ids in the table, "gb206" in PLATFORMS. Five lines. Everything below is about the other thirteen.
Charter grounding (read_charter): "Solve the right problem in the right place … Look for the smallest footprint in shared code, or a way to solve it without new code at all"; "We're not interested in piling on extra model aliases, random switches, or broad hardware support"; Non-goals: "Broad production coverage across arbitrary models, GPUs". The description's own evidence marks eight of the nine ids as untested (0x2d05, 0x2d18, 0x2d19, 0x2d30, 0x2d39, 0x2d58, 0x2d59, 0x2d79, "sourced from pciutils/pci.ids"). Keeping the other eight in the shared table is defensible (one row, and they are GB206 by die); duplicating them into a second table in flare-cli is not.
Findings, ranked by lines saved
1. Should fix / blocking for the hunk — delete flare-cli's private PCI table (≈19 lines)
Files: flare-cli/src/orbit/gpu.rs:309-324 (the table) and the PR's gpu.rs:319-321 (the added arm).
The PR adds a GB206 arm to fn platform (gpu.rs:309-324), a hand-maintained copy of the shared table:
fn platform(pci_id: u32) -> Option<&'static str> {
if pci_id & 0xffff != 0x10de { return None; }
match pci_id >> 16 {
0x2e12 => Some("gb10"),
0x2b85 | … | 0x2bbc => Some("gb202"),
0x2d04 | 0x2d05 | 0x2d18 | 0x2d19 | 0x2d30 | 0x2d39 | 0x2d58 | 0x2d59 | 0x2d79 => {
Some("gb206")
}
_ => None,
}
}
It must not exist:
helios/src/core/naming.rs:17-20: "This table is the single source consumed by Flare's device detection and by core export naming; do not duplicate the identifiers elsewhere." This PR duplicates nine identifiers there.- The shared function exists:
flare_helios::core::naming::platform_from_pci(naming.rs:39-57), already used byflare/src/hardware.rs:18-21("Single mapping table shared with core export naming.") andheliopause/src/export/capture.rs:2079. - No new dependency:
flare-cli/Cargo.toml:27already depends onflare-helios, andflare-cli/src/distribution.rs:718-721already callsnaming::PLATFORMS/naming::candidate. - It has already drifted: gpu.rs:316 lists
0x2bbc, whichGB202_DEVICES(naming.rs:21-23) does not; gpu.rs:315 maps one of the fiveGB10_DEVICES(naming.rs:30); ga102 and gb300 are absent entirely.
Smaller version (net −19: 16 old + 3 added):
fn revision(pci_device_id: u32, major: c_int, minor: c_int) -> String {
match flare_helios::core::naming::platform_from_pci(pci_device_id) {
Some(platform) => platform.into(),
None => capability_revision(major, minor),
}
}
capability_revision (gpu.rs:224-231) stays as the fallback for ids the table lacks (0x2bbc, sm{major}{minor}). The one honest behaviour note: GA102 ids then report ga102 instead of sm86 — which is what docs/cli-design.md:887 names, and exactly the reconciliation open PR #469 carries (its own review, #469 comment of 2026-11-24 18:48, and the author's reply at 19:11, both do this deletion + capability_revision map 8.6 → ga102). So this hunk also collides with #469.
2. Blocking for the hunk — it regresses Orbit placement on the tested card (0 extra lines; the 3 above)
Files: flare-cli/src/orbit/gpu.rs:319-321 (added), read against flare-cli/src/orbit/controller.rs:2293-2294, flare-cli/src/orbit/gpu.rs:224-231, flare-cli/src/orbit/plan.rs:693-696.
With the hunk, the agent reports gb206 for a GB206 host, but a core's requirement is still revision: super::gpu::capability_revision(first.architecture[0], first.architecture[1]) (controller.rs:2294), and capability_revision maps (12,0) — what every GB206 part reports — to "gb202" (gpu.rs:227). unfit then compares strings exactly and returns gpu N <name> is gb206, not gb202 (plan.rs:695-696). So after this PR, on the very card in the description (RTX 5060 Ti, cc 12.0), no core prepared on that host places through Orbit; before the PR both sides said gb202 and placement worked.
Nothing in the description's evidence (export/serve on a 5060 Ti) goes through Orbit's table: the crash it cites is heliopause/src/export/capture.rs:2079-2085, which reads only helios's platform_from_pci. Deleting the 3 lines loses nothing the PR claims and restores placement. If Orbit is meant to report gb206, that needs the core-requirement change (gpu.rs core_revision, controller.rs describe) that #469 carries — not a 3-line addition to a crash fix.
The hunk also has no test: gpu.rs:352-367 asserts neither 0x2d04 nor any GB206 id.
3. Should fix — collapse the naming test's four copies into one loop (≈23 lines)
File: helios/src/core/naming.rs:186-216.
pci_ids_select_the_platform_identifier now holds an inline literal GB10 list (188-194, duplicating GB10_DEVICES at line 30), a literal 0x31c3_10de for GB300 (195, duplicating GB300_DEVICES at 37), then loops over GB202_DEVICES (196-202), GB206_DEVICES (203-209, added by this PR) and GA102_DEVICES (210-216). 29 lines for one assertion; every future platform (#469 GB203, #221 GB300) adds 7 more.
Smaller version (~6 lines, −23, once finding 4's table exists):
for (platform, devices) in DEVICES {
for device in devices {
assert_eq!(platform_from_pci(device << 16 | 0x10de), Some(platform), "{device:#06x}");
}
}
Without the table, the same shape over [(&GB10_DEVICES[..], "gb10"), (&GB300_DEVICES[..], "gb300"), (&GA102_DEVICES[..], "ga102"), (&GB206_DEVICES[..], "gb206"), (&GB202_DEVICES[..], "gb202")] saves ~19 and at least removes the two literal copies that can drift. The vendor-mask and negative cases at 217-223 stay untouched; every id currently asserted is still asserted.
4. Should fix — one (platform, ids) table instead of five consts and four if-arms (≈13 lines)
File: helios/src/core/naming.rs:21-57.
The PR adds a fifth pub const *_DEVICES: [u32; N] array (25-27, +4 lines) and a fourth if X_DEVICES.contains(&device) { return Some("x") } arm (53-55, +3) to a structure already holding four of each (21-37, 44-56). Per-platform cost today: const + arm + 7-line test block. That cost is being paid three times in flight (#469 GB203, #221 GB300, this PR).
Smaller version (~37 lines → ~24, −13; the id sets are disjoint, so the ladder's order is arbitrary and can go):
/// Platforms a core may be named for, with the PCI device ids that select each
/// one. Flare's device detection and core export naming both read this table;
/// do not duplicate the identifiers elsewhere.
pub const DEVICES: [(&str, &[u32]); 5] = [
// GB10 and RTX Spark N1X, the SM121 platform.
("gb10", &[0x2e02, 0x2e03, 0x2e06, 0x2e12, 0x2e2a]),
// 0x31c3 is the SM103 GPU of DGX Station GB300.
("gb300", &[0x31c3]),
// GeForce RTX 3090 Ti, 3090, 3080, 3080 Ti, 3080 12 GB and 3080 LHR.
("ga102", &[0x2203, 0x2204, 0x2206, 0x2208, 0x220a, 0x2216]),
("gb206", &[0x2d04, 0x2d05, 0x2d18, 0x2d19, 0x2d30, 0x2d39, 0x2d58, 0x2d59, 0x2d79]),
("gb202", &[0x2b85, 0x2b87, 0x2b8c, 0x2bb1, 0x2bb2, 0x2bb3, 0x2bb4, 0x2bb5, 0x2bb9]),
];
pub const PLATFORMS: [&str; 5] = ["ga102", "gb10", "gb202", "gb206", "gb300"];
pub fn platform_from_pci(pci_id: u32) -> Option<&'static str> {
if pci_id & 0xffff != 0x10de { return None; }
let device = pci_id >> 16;
DEVICES.iter().find(|(_, ids)| ids.contains(&device)).map(|(p, _)| *p)
}
Each platform's doc-comment moves onto its row; nothing else changes. If the maintainers prefer not to restructure now, the PR as written is still a net +7 lines that this table would make +1.
5. Should fix — PLATFORMS +1 leaves flare/src/catalog.rs:561-563 stale and CI red (0 net lines)
flare/src/catalog.rs:548-568 loops for target in flare_helios::core::naming::PLATFORMS (550) but asserts against a hardcoded branch list at 561-563: {"name":"ga102-tp1"}, {"name":"gb10-tp1"}, {"name":"gb202"}, {"name":"gb300-tp8"}. For target = "gb206", apply_refs sets build_target_match = Some(false) (catalog.rs:319-322: hardware is a PLATFORMS name but the branch set lacks the target) and line 566 asserts Some(true) — so published_build_match_uses_all_platform_branches fails. .github/workflows/native-serving.yml:77 (not opened) runs cargo test --locked --release --manifest-path flare/Cargo.toml (not opened), so this is red CI on a head commit that reports no checks. #300 edited this same fixture for ga102; #469 was required to edit it for gb203.
Smaller than adding a branch name (0 net lines, and the fixture stops needing an edit per platform):
let branches: Vec<_> = flare_helios::core::naming::PLATFORMS
.iter().map(|platform| json!({ "name": platform })).collect();
let refs = serde_json::from_value(json!({ "branches": branches })).unwrap();
Separately, a literal platform_from_pci(0x2d04_10de) == Some("gb206") beside the loop is worth having (the loop proves the table agrees with itself, not that it holds the id the description tested) — the same ask #221's and #469's reviews made. That is 1 line, not a feature.
6. Should fix — stop enumerating the platform set at eleven sites (0 net lines today, the root of finding 5)
The PR adds a fifth platform name and updates none of the places that list the set, so all become wrong at once:
Code:
flare-cli/src/orbit/gpu.rs:38and:222-223(doc comments: "gb10,gb202,gb300, orsm{major}{minor}")flare-cli/src/orbit/plan.rs:38-39(same list)flare-cli/src/cli.rs:175—--revisionhelp, printed byflare run --help: "detects ga102, gb10, gb202, or gb300"flare-cli/src/distribution.rs:66(gb202/gb10)
Docs:
docs/cli-design.md:887,:890,:901,:923docs/orbit.md:321docs/core-format-design.md:753-754
Smaller version: each says "a PLATFORMS name" / "the detected platform" instead of listing names, so the list lives only at helios/src/core/naming.rs:15. That is the same edit #469 had to make in six files.
One substance note for the description (not a code addition): docs/cli-design.md:891-892 promises that an unknown identifier "requires an explicit revision". After this PR a GB206 host resolves gb206 and no repository publishes a gb206 branch, so flare run ORG/MODEL fails with the hub's missing-revision error where the actionable message was. #469's review required the author to state exactly this merge-order caveat; this description does not.
7. Supplement (same lines as finding 1) — gpu.revision is the Hub revision, not a display label
Two further consequences of gpu.rs:319-321:
controller.rs:2210-2233repository_revisioninfersORG/MODEL@<revision>from the nodes'gpu.revision(.map(|gpu| gpu.revision.as_str()), line 2224). With the hunk,flare run ORG/MODELon a GB206 node requests agb206branch that does not exist.- A fleet mixing GB202 and GB206 nodes hits
revisions.len() > 1(controller.rs:2229-2231) and errors "candidate GPUs do not identify one hardware revision", where before the PR every node reportedgb202.
Both vanish with the hunk. The helios table alone keeps flare download/export detection correct.
8. Nit — two formatting tokens (0 lines)
helios/src/core/naming.rs:15—"gb202","gb206"is missing the space every other separator uses.helios/src/core/naming.rs:54—return Some("gb206")has no semicolon, while the sibling arm at:51does. It compiles (a!-typed tail in statement position) but differs from the file.
No cargo fmt job exists (.github/workflows/ holds only helios-lifecycle.yml (not opened), native-serving.yml (not opened), release.yml (not opened)), so this is cosmetic only.
Ledger
| added lines | site | what it should be |
|---|---|---|
| 1 (replacing 1) | naming.rs:15 PLATFORMS |
keep — but derive the catalog fixture and stop re-listing names |
| 4 | naming.rs:25-27 GB206_DEVICES |
1 table row (−4 here, −13 over the pattern) |
| 3 | naming.rs:53-55 if-arm |
folded into the table lookup |
| 7 | naming.rs:203-209 test loop |
1 generic loop (−23 over the test) |
| 3 | gpu.rs:319-321 |
delete (blocking) |
Change's own added lines: 18 → ~5. Pre-existing lines removable by the same smaller version: gpu.rs:309-324 (16), naming.rs:21-57 (37 → ~24), naming.rs:186-216 (29 → ~6) ≈ 34. Gross saving ≈ 47, net of what replaces it ≈ 39 lines in 4 places (conservatively "about 39 removed, about 5 added").
Checked and found already minimal (no finding)
heliopause/src/export/capture.rs:2079-2085— reads the shared table, needs no edit.flare/src/hardware.rs:18-21,:95-100— already delegates toplatform_from_pci; unchanged.flare/src/catalog.rs:271-280branch_platform— already table-driven overPLATFORMS.- Other
PLATFORMSconsumers —flare-cli/src/distribution.rs:159,:720-725,flare/src/hub.rs:2473 (not opened)/2490/2963/3115— are table-driven and need no edit; they inherit the new name for free.
Open questions
- Is Orbit placement meant to be capability-based at all? If not, the gb206 label belongs with #469's
core_revisionchange, not here (finding 2). - Does any repository publish a
gb206branch? If not, the description must say so (finding 6) and--revision gb202stays the explicit override — no silent fallback. - No CI checks were reported on head
820abdb; the PR's twocargo testcommands do not coverflare/Cargo.toml(not opened), which is where finding 5's failure lives. - The eight untested ids: singular addition of
0x2d04only would be smaller still, but nine ids in one shared row cost nothing extra and I did not find code that suffers from them; the duplication intoflare-cliis the part to cut.