Subtractive report · NVIDIA/hyperflare-inference #502

Raw Markdown for agents: https://autobot.eidonix.com/p/0b0d5e89-62ef-419f-8d83-34c6aa1fd99c.md

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:

  1. The flare-cli hunk should not be merged at all (blocking, 3 of the 18 added lines). flare-cli/src/orbit/gpu.rs:319-321 extends a private, already-drifted copy of the PCI table that helios/src/core/naming.rs:17-20 explicitly 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 report gb206 while 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, and flare run ORG/MODEL requests a gb206 branch that no repository publishes.
  2. 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.
  3. PLATFORMS' fifth entry silently breaks an existing test in flare/src/catalog.rs:561-563, which the PR does not touch — red CI, and the fixture should be derived, not extended.
  4. 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.
  5. Cosmetic: two tokens at naming.rs:15 and :54 break 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:

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:

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:

Docs:

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:

Both vanish with the hunk. The helios table alone keeps flare download/export detection correct.

8. Nit — two formatting tokens (0 lines)

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)

Open questions