Correctness review — PR #502 "feat: add gb206 platform support"
Head 820abdb, 2 files, +18/−1: helios/src/core/naming.rs (+15/−1) and flare-cli/src/orbit/gpu.rs (+3/−0). Lens: correctness — does the change work everywhere it reaches (every caller, configuration, platform, persisted state)?
Key findings
Two blocking problems, both outside the two changed functions but caused by them:
- A CI test breaks. Adding
"gb206"toPLATFORMS(naming.rs:15) makes theflarecrate'spublished_build_match_uses_all_platform_branchestest fail, because its fixture hardcodes four platform branches. That suite is a CI step (.github/workflows/native-serving.yml:77(not opened)), and the PR description only reportsheliosandflare-clitest runs. - The Orbit half is half-done.
orbit/gpu.rs::platform()now saysgb206for nine PCI ids, so the agent publishesgb206; butdescribe()still derives the core's required revision from compute capability, andcapability_revision(12, 0)returnsgb202. Placement compares the two strings exactly, so a gb206 core can never be placed on a gb206 host — and gb206 hosts stop matchinggb202cores, which they matched before this diff.
Two should-fix items (duplicated PCI table; the user-visible error regression and unstated merge order) and two nits (stale docs; style/coverage).
Blocking
B1. flare crate test fails once PLATFORMS has five entries — helios/src/core/naming.rs:15
What is wrong. naming.rs:15 grows PLATFORMS from four to five names. flare/src/catalog.rs:549-569 published_build_match_uses_all_platform_branches loops for target in flare_helios::core::naming::PLATFORMS and, for each target, feeds one hardcoded four-branch fixture (ga102-tp1, gb10-tp1, gb202, gb300-tp8, catalog.rs:561-563) to apply_refs, then asserts entry.build_target_match == Some(true) (catalog.rs:566) and that select_revision(...) resolves back to target (catalog.rs:567).
For target == "gb206":
apply_refs(catalog.rs:315-322) buildsplatforms = {ga102, gb10, gb202, gb300}, sobuild_target_match = Some(false)→ the assert at catalog.rs:566 fails.select_revision(catalog.rs:292-303) finds nogb206branch and falls back to the first branch (ga102-tp1), sobranch_platform(...) == "ga102" != "gb206"→ the assert at catalog.rs:567 fails.
Why it matters. This is a real CI failure, not a theoretical one: .github/workflows/native-serving.yml:77 (not opened) runs cargo test --locked --release --manifest-path flare/Cargo.toml (not opened). The PR description cites only helios and flare-cli test runs, which is consistent with the failure being missed.
Fix. Add {"name": "gb206-tp1"} (ideally one branch per PLATFORMS entry) to the fixture at catalog.rs:561-563 — exactly what merged #300 did for ga102 and what open #469 does for gb203; the review of #469 flags this same fixture. If only a test update is needed, it is small, but it must land in this PR or the branch is red.
B2. A gb206 core can never be placed by Orbit — flare-cli/src/orbit/gpu.rs:319-321 with gpu.rs:224-231 and orbit/plan.rs:693-696
What is wrong. The new arm makes platform() (and therefore revision(), orbit/gpu.rs:297-307) return "gb206" for the nine ids, and the agent publishes that string in STATUS (orbit/agent.rs:1650). The core side is untouched: describe() derives the required revision from the deployment's compute capability via super::gpu::capability_revision(first.architecture[0], first.architecture[1]) (orbit/controller.rs:2294), and capability_revision (orbit/gpu.rs:224-231) has no gb206 arm — (12,0) -> "gb202", (10,3) -> "gb300", else sm{major}{minor}. plan::unfit then compares exact strings: if gpu.revision != revision (plan.rs:693-696); repository_revision also refuses mixed revisions (controller.rs:2220-2232).
Why it matters. A gb206 core (signed hardware_identity: "gb206", deployment gb206-tp1, exported by heliopause/src/export/core.rs:656-664) cannot be placed on the very host that exported it: every candidate GPU is rejected as gpu 0 … is gb206, not gb202. Symmetrically, a GB206 host in Orbit no longer matches a gb202 core, which it did before this diff (previously platform() returned None, so revision() fell through to the (12,0) arm and matched). Load-time validation will not catch the mismatch either: the arch gate in helios/src/runtime_core/mod.rs:337-346 compares only compute capability, so gb202 and gb206 cores are interchangeable at load — the label is the only discriminator, and it is now inconsistent between the two sides.
Fix. Take the core's revision from the signed device identity when it is a PLATFORMS name (AuthorizedCore::identity()?.hardware, helios/src/runtime_core/model.rs:1392-1405), keeping capability_revision only for legacy cores with empty hardware (model.rs:1358-1390) — the approach open PR #469 takes for gb203 (core_revision in its orbit/gpu.rs diff).
Should fix
S1. The new arm duplicates the PCI table that naming.rs declares the single source — flare-cli/src/orbit/gpu.rs:310-324
What is wrong. helios/src/core/naming.rs:17-20 states: "This table is the single source consumed by Flare's device detection and by core export naming; do not duplicate the identifiers elsewhere." The new gb206 arm copies those nine ids into orbit/gpu.rs:319-321. The duplication is not hypothetical drift: GB202_DEVICES (naming.rs:21-23) has nine ids while orbit/gpu.rs:316 lists ten — it adds 0x2bbc. The two copies already disagree for gb202, and the new arm replicates the pattern instead of inheriting the shared lookup.
Why it matters. Two tables must be edited in lockstep, and they already aren't. flare-cli depends on the shared table anyway (flare-cli/src/hardware.rs:2 re-exports flare::hardware::detect; flare/src/hardware.rs:18-21 delegates to platform_from_pci), so there is no dependency obstacle.
Fix. Call flare_helios::core::naming::platform_from_pci from orbit/gpu.rs and delete the private match, as #469 does ("the private copy of the table is gone").
S2. GB206 detection turns an actionable error into a hub 404, and the description does not say so — flare-cli/src/orbit/gpu.rs:319-321 / helios/src/core/naming.rs:53-56
What is wrong. Before this PR a GB206 card (e.g. RTX 5060 Ti, 0x2d04) was unknown to platform_from_pci, so flare run ORG/MODEL failed early with "GPU N has unsupported PCI ID 0x…; specify --revision" (flare/src/hardware.rs:95-100). After it, detect() returns "gb206", so download_for_model_at builds Repo::with_revision(id, Model, "gb206") (flare/src/hub.rs:314-317, :393) and, on 404, retries gb206-tp1 (hub.rs:3110-3122). No repository publishes a gb206 branch today, so the run fails with a hub missing-revision error instead. gb206 hosts also lose the previously implicit use of an existing gb202 core (nothing in the loader rejects it, per B2).
Why it matters. It is a strictly worse first-run experience for the hardware this PR targets, and the PR description (§2/§3) does not state the merge-order dependency. AGENTS.md forbids silently substituting execution paths, so the right answer is disclosure plus an explicit override, not a silent fallback.
Fix. State in the description that flare run ORG/MODEL now requests a gb206 branch that does not exist until a gb206 core is published, and that --revision gb202 remains the explicit override. Land the core publication before or with the detection change.
Nits
N1. Stale four-platform enumerations (text only)
After this PR the set is ga102, gb10, gb202, gb206, gb300 (naming.rs:15), and detection returns gb206 in both flare (flare/src/hardware.rs:18-21) and Orbit. Still saying four:
flare-cli/src/cli.rs:175—--revisionhelp text "detects ga102, gb10, gb202, or gb300", printed byflare run --help.flare-cli/src/orbit/gpu.rs:38and:222-223— doc comments listinggb10,gb202,gb300.flare-cli/src/orbit/plan.rs:38-39— same enumeration forNeeds::revision.docs/cli-design.md:887,:890,:923;docs/core-format-design.md:753-754;docs/orbit.md:321("gb10, gb202, gb300 from the PCI device id or compute capability").
The PR touches no docs. The project's convention when a platform is added is to update these (#300, #469).
N2. Style slips and thin coverage for the new table
naming.rs:54—return Some("gb206")lacks the terminating;the neighbouring arms have (:45, :48, :51); the file is otherwise rustfmt-clean, socargo fmtwould rewrite it.naming.rs:15—"gb202","gb206"is missing the space after the comma.- No literal-id assertion beside the looped test.
naming.rs:203-209testsfor device in GB206_DEVICES, which cannot catch a wrong entry inside the constant; the existing tests do assert literals for gb10 (:188) and gb300 (:195). flare-cli/src/orbit/gpu.rsgets no test at all: therevision/platformtests (:352-367) cover no gb206 id, so the Orbit half of the mapping is asserted only indirectly.- The untested ids are disclosed in the description (only
0x2d04validated), which satisfies AGENTS.md's "disclose material limitations".
Checked and found sound
Verified in code with no defect found:
- Id list and disjointness. The nine ids in
GB206_DEVICES(naming.rs:25-27) and in the orbit/gpu.rs arm (:319-321) are identical and mutually disjoint fromGB202_DEVICES(naming.rs:21-23),GB10_DEVICES(:30),GA102_DEVICES(:34) andGB300_DEVICES(:37). The vendor guard (naming.rs:40-43) still rejects non-NVIDIA ids, and the new check sits before the gb202 fallback (:53-56) with no ordering hazard. - Prefix matching.
branch_platform(flare/src/catalog.rs:271-280) requires equality orstrip_prefixfollowed by-, so noPLATFORMSentry shadows another ("gb202"/"gb206"/"gb300" diverge inside the digits). - Naming/derivation.
candidate(naming.rs:76-84) anddeployment_candidate(:108-131) accept the new platform unchanged; so do distributionroot()(flare-cli/src/distribution.rs:159-163) andreceiver_candidate(distribution.rs:717-727), hub acquisition (signed_hardwarehub.rs:2455-2515,acquisition_candidate:2517-2525, legacy import :2962-2968) and heliopause conversion (conversion.rs:386-417). - Export side.
current_platformalready callsplatform_from_pciand errors on unknown ids (heliopause/src/export/capture.rs:2079-2085); a gb206 export now yieldshardware_identity: "gb206"and deploymentgb206-tpN(core.rs:656-664) with no other change needed. - Compatibility with existing data. Already-published cores' signed
hardware_identityis unaffected; no bootstrapping or format change; theunknown-devicelabelling path (naming.rs:91-101) is untouched. - Surface area. No environment variables, resource lifetimes, concurrency or persisted-state transitions are touched; both changed functions are pure lookups.
Open questions / not verifiable here
- Whether a
gb206core has been published to any hub (would let S2 be dropped to a documentation nit). This cannot be settled from the repository; it needs a hub query or the author's statement. - Which of the nine ids are physically
GB206/GB206GL/GB206GLM/GB206Mcannot be checked from the repo; the author cites pci.ids and discloses eight as untested. This is only a test-coverage question, not a correctness one. - B2's fix direction assumes Orbit should trust the signed identity (as #469 does). If maintainers prefer a
capability_revisionarm mapping(12,0)togb206, that would break gb202 placement instead — the point is that the two sides must be made to agree before merge.
Rules cited: charter ("Check interactions across … every hardware target"; "Keep the runtime small and model-agnostic"), AGENTS.md (required PR-description scheme, "Reject weakened guarantees", "Require focused, meaningful validation", "do not silently substitute execution paths", disclose material limitations), docs/design-review.md principle 12 (validate the real path, disclose unrun checks) and principle 13 (core compatibility).