Correctness scratchpad · NVIDIA/hyperflare-inference #502

Raw Markdown for agents: https://autobot.eidonix.com/p/58087ab0-e773-4ddc-a448-795d16b6f003.md

#1 [high] Blocking: flare crate test published_build_match_uses_all_platform_branches fails once PLATFORMS grows to 5

helios/src/core/naming.rs:15 (PR) grows PLATFORMS from 4 to 5 entries by adding "gb206". flare/src/catalog.rs:549-569 published_build_match_uses_all_platform_branches loops for target in flare_helios::core::naming::PLATFORMS and, after the per-platform inner loops, feeds one hardcoded 4-branch fixture (ga102-tp1, gb10-tp1, gb202, gb300-tp8, catalog.rs:561-563) to apply_refs, then asserts entry.build_target_match == Some(true) (:566) and that select_revision(...) resolves to target (:567). For target == "gb206": apply_refs (catalog.rs:315-322) builds platforms = {ga102, gb10, gb202, gb300}, so build_target_match = Some(false) -> assert at :566 fails; and select_revision (catalog.rs:292-303) finds no gb206 branch and falls back to the first branch (ga102-tp1), so branch_platform(...) == "ga102" != "gb206" -> assert at :567 fails. This suite is a CI step: .github/workflows/native-serving.yml:77 cargo test --locked --release --manifest-path flare/Cargo.toml. The PR description only cites helios and flare-cli test runs, which is consistent with the failure being missed. Fix: add {"name": "gb206-tp1"} (and ideally every PLATFORMS name) to the fixture at catalog.rs:561-563, as merged #300 did for ga102 and open #469 does for gb203. Precedent: review of #469 lists exactly this fixture as a blocker.

#2 [high] Blocking: GB206 hosts report gb206 in Orbit but gb206 cores are described as needing gb202, so they never place

Change in flare-cli/src/orbit/gpu.rs:319-321 makes platform() (and therefore revision(), gpu.rs:297-307) return "gb206" for the 9 new PCI ids, and the agent publishes that string in STATUS (flare-cli/src/orbit/agent.rs:1650). The core side is unchanged: describe() derives the required revision from the deployment's compute capability, super::gpu::capability_revision(first.architecture[0], first.architecture[1]) (controller.rs:2294), and capability_revision (gpu.rs:224-231) has no gb206 arm: (12,0) -> "gb202", (10,3) -> "gb300", else sm{major}{minor}. plan::unfit compares exact strings: if gpu.revision != revision (plan.rs:693-696), and repository_revision also refuses mixed revisions (controller.rs:2220-2232). Consequence: a gb206 core (signed hardware_identity: "gb206", deployment gb206-tp1, exported by heliopause/src/export/core.rs:656-664) can never be placed by Orbit on the very host that produced 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 for these ids, so revision fell through to the 12.0 capability arm "gb202" and matched). helos load-time validation would not catch the reverse case either: the arch gate compares only compute capability (helios/src/runtime_core/mod.rs:337-346), 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) and keep capability_revision only for legacy cores (empty hardware, model.rs:1358-1390), i.e. exactly what open PR #469 does for gb203 (see #469 description and its orbit/gpu.rs core_revision).

#7 [high] Research summary

Reviewed both changed files in context through the correctness lens, following every consumer of PLATFORMS and platform_from_pci (flare detection, hub revision selection/naming, catalog discovery, Orbit agent/controller/plan, heliopause export, distribution naming). Six notes on the scratchpad: two blockers and two should-fix items, plus nits.

Blockers: (1) adding gb206 to PLATFORMS fails the flare crate's published_build_match_uses_all_platform_branches test (hardcoded four-platform fixture) — a CI step the PR description does not cover; (2) the Orbit agent now reports gb206 while describe() still derives a core's revision from compute capability (12,0) -> gb202, and plan::unfit compares strings exactly, so a gb206 core cannot be placed on the gb206 host that exported it and gb206 hosts stop matching gb202 cores.

Should fix: the new arm duplicates the PCI table that naming.rs declares the single source (that copy already disagrees on 0x2bbc), and detecting gb206 converts a clear "unsupported PCI ID" error into a missing-branch hub 404 with no merge-order note in the description. Nits: stale four-platform enumerations in CLI help, two doc comments and four docs; missing semicolon/spacing and no literal-id or Orbit-side test for the new ids. The ID list itself and the untested-hardware disclosure are as the description states.

#8 [high] Summary: correctness review of PR #502 (gb206), findings by severity with file:line

PR NVIDIA/hyperflare-inference#502 "feat: add gb206 platform support", head 820abdb, 2 files, +18/-1: helios/src/core/naming.rs and flare-cli/src/orbit/gpu.rs. Lens: correctness (all callers, configurations, persisted state, compat).

BLOCKING

  1. flare test breaks (CI step native-serving.yml:77). PLATFORMS 4->5 (naming.rs:15) vs hardcoded 4-branch fixture in flare/src/catalog.rs:549-569 (fixture :561-563, asserts :566-567). Details in entry 1.
  2. Orbit placement: agent reports gb206 (orbit/gpu.rs:319-321 via revision() :297-307, published at agent.rs:1650) while describe() sets the core's revision from capability_revision (controller.rs:2294; gpu.rs:224-231 -> (12,0) "gb202"), and plan::unfit compares strings (plan.rs:693-696). gb206 core never places; gb206 host stops matching gb202 cores it matched before. Load gate only checks compute capability (runtime_core/mod.rs:337-346), so nothing else catches it. Details in entry 2.

SHOULD FIX 3. Duplicated PCI table in orbit/gpu.rs:310-324 despite naming.rs:17-20 "single source ... do not duplicate"; the two copies already disagree (0x2bbc). Entry 3. 4. Behaviour/communication: gb206 detection replaces "unsupported PCI ID, specify --revision" with a gb206 (then gb206-tp1) hub 404 (hub.rs:314-317, :3110-3122); merge order and the --revision gb202 override are not stated in the description. Entry 5.

NITS 5. Stale four-platform enumerations: cli.rs:175; orbit/gpu.rs:38 and :222-223; orbit/plan.rs:38-39; docs/cli-design.md:887,890,923; docs/core-format-design.md:753-754; docs/orbit.md:321. Entry 4. 6. Style/coverage: naming.rs:54 missing ;, naming.rs:15 missing space; no literal-id assertion beside the looped test (contrast gb10 :188, gb300 :195); no orbit/gpu.rs test for any gb206 id. Entry 6.

Charter/rules cited: AGENTS.md required-PR-description scheme and "Reject weakened guarantees"/"Require focused, meaningful validation"; charter "Keep the runtime small" and "Check interactions across ... every hardware target"; docs/design-review.md principle 12 (validate the real path, disclose unrun checks) and principle 13 (core compatibility). No design-doc rule is violated by the table addition itself.

#11 [high] Should fix: GB206 hosts get two different revisions in one product (flare run vs Orbit) — the PR's separation does not reach Orbit

Head 8e2ea68. Previous blockers resolved:

New, verified inconsistency introduced by resolving it that way:

  1. Same host, two answers. flare hardware-revision and flare run/flare download detect platform through flare-cli/src/hardware.rs:2 -> flare/src/hardware.rs:18-21 -> flare_helios::core::naming::platform_from_pci (helios/src/core/naming.rs:41-59), which now returns "gb206" for 0x2d04. Orbit derives its revision from its own private match (flare-cli/src/orbit/gpu.rs:310-321), which has no gb206 arm, so revision() (:297-307) falls through to capability "gb202" for the identical PCI id. Consequence: on a 5060 Ti the CLI asks the Hub for gb206 (then gb206-tp1, flare/src/hub.rs:3110-3122) while Orbit's controller infers gb202 from the agents' GPU revisions (controller.rs:2220-2232) — two different branches and two different cache-entry names for one machine. flare orbit status/dashboard also label the card gb202 (dashboard.rs:651) while docs/cli-design.md:890 states GB206 devices select gb206.
  2. Orbit cannot separate the two platforms at all, so the PR's stated benefit ("cleanly separating GB206 cores from gb202 cores") does not hold for Orbit placement: describe() still derives the core's requirement from compute capability only, super::gpu::capability_revision(first.architecture[0], first.architecture[1]) (controller.rs:2293-2295), and capability_revision maps (12,0) -> "gb202" (gpu.rs:224-231), ignoring the core's signed hardware identity (helios/src/runtime_core/model.rs:1392-1405, set from the platform at heliopause/src/export/core.rs:656-664). plan::unfit compares exactly (plan.rs:693-696). The loader only checks compute capability (helios/src/runtime_core/mod.rs:337-346), so a gb202 core and a gb206 core are interchangeable at load: the label is the only discriminator and Orbit does not read it. That is pre-existing rather than new, but this PR is the change that gives GB206 a distinct identity, and it now claims a separation Orbit does not implement. Fix: in orbit/gpu.rs call flare_helios::core::naming::platform_from_pci instead of the private match (naming.rs:17-20 says "do not duplicate the identifiers elsewhere"; the private copy has already drifted: it lists 0x2bbc, which GB202_DEVICES omits, and has no ga102/gb300 arms), and take CoreNeeds::revision from the core's signed hardware when it is a PLATFORMS name, keeping capability_revision for legacy cores with an empty identity. Both are what open #469 does for gb203 (core_revision). Needs a placement test on a gb206 host plus a gb206 core — a test only settles it fully, but the code above shows the divergence today.

#15 [high] Research summary

Reviewed PR #502 at head 8e2ea68 (5 files, +25/−7) through the correctness lens, reading each changed function in context and following every consumer of PLATFORMS, platform_from_pci, and Orbit's revision derivation.

Both previous blockers are resolved. The flare catalog fixture now includes gb206 (flare/src/catalog.rs:562), so published_build_match_uses_all_platform_branches passes for all five targets in both of its bodies, clearing the CI failure at .github/workflows/native-serving.yml:77 (not opened). The Orbit gb206 arm was deleted (flare-cli/src/orbit/gpu.rs:314-320), so Orbit hosts keep reporting gb202 and nothing is left unplaceable.

What the fix leaves is a coherence problem, not a crash. The same 0x2d04 host now gets two different platform names inside one product: flare run/download/hardware-revision detect through platform_from_pci (flare-cli/src/hardware.rs:2 → flare/src/hardware.rs:18-21 → helios/src/core/naming.rs:41-59) and get gb206, while Orbit's private table has no gb206 arm and falls through to compute capability gb202 (gpu.rs:297-321). So the CLI requests gb206/gb206-tp1 from the Hub while Orbit infers gb202 from its agents, and the two produce different cache-entry names for one machine. More broadly, Orbit still derives a core's requirement from compute capability alone (controller.rs:2293-2295 → gpu.rs:224-231 → plan.rs:693-696 (not opened)) and never reads the core's signed hardware, so the separation the PR claims is not enforced anywhere placement happens; the loader only checks compute capability (helios/src/runtime_core/mod.rs:337-346), so the label is the sole discriminator. Recorded as should fix, with the fix being to call the shared platform_from_pci and take the revision from the signed identity.

Also recorded: docs/cli-design.md:901 still omits gb206 from the -tp1 404-retry list inside the very section the PR edited; remaining stale enumerations (docs/orbit.md:321, orbit/gpu.rs:38/222-223, orbit/plan.rs:38-39 (not opened)) and the missing semicolon at naming.rs:55 as nits; and the description still cites cargo test --manifest-path helios/Cargo.toml, which cannot run the cited test because helios defaults to no features. Verified and found sound: table disjointness, prefix-matching safety, the new literal assertions, and every naming/export/Acquisition consumer. Findings are in scratchpad entries #11–#14; entries #1–#10 describe the superseded state.

#16 [high] Report of 2026-11-26 (head 8e2ea68): correctness review of PR #502 — verdict, findings by severity, and what is now RESOLVED

Correctness review: PR #502 "feat: add gb206 platform support", head 8e2ea68 (2026-11-26)

IMPORTANT — this supersedes entries #1–#8 and #10. Those describe the pre-8e2ea68 head (commit 8e2ea68 is titled "fix: update catalog test, docs, and scope for gb206 platform"). Do NOT report the two blockers in #1 and #2 as open; both are fixed. Use the findings below.

Verdict: no blocking issues. 2 should-fix, 2 nits. The change is correct in what it does and ready apart from the coherence gaps below.

Scope reviewed

Diff vs main: helios/src/core/naming.rs (+19/−1), and in the fix commit flare/src/catalog.rs (1 line), flare-cli/src/cli.rs (1 line), docs/cli-design.md, docs/core-format-design.md. The flare-cli/src/orbit/gpu.rs hunk from the original description was removed by 8e2ea68 — the description still claims it, which is itself a description defect (see below).

RESOLVED by 8e2ea68 (previously blockers — state this explicitly)

Should fix 1 — one host, two platform names (see entry #11)

flare run/download/hardware-revision go through platform_from_pci (flare-cli/src/hardware.rs:2 → flare/src/hardware.rs:18-21 → helios/src/core/naming.rs:41-59) and return gb206 for 0x2d04; Orbit's private table (flare-cli/src/orbit/gpu.rs:310-321) has no gb206 arm and returns gb202 for the identical PCI id. Result on a 5060 Ti: the CLI asks the Hub for gb206 (then gb206-tp1, flare/src/hub.rs:3110-3122) while Orbit's controller infers gb202 from agent GPU revisions (controller.rs:2220-2232); flare orbit status/dashboard label the card gb202 (dashboard.rs:651) while docs/cli-design.md:890 says GB206 devices select gb206; and the two paths derive different cache-entry names for one machine. Also the claimed separation is nowhere enforced: CoreNeeds::revision still comes from compute capability only (controller.rs:2293-2295 → gpu.rs:224-231 → plan.rs:693-696), never from the core's signed hardware (helios/src/runtime_core/model.rs:1392-1405, set at heliopause/src/export/core.rs:656-664), and the loader only gates on compute capability (helios/src/runtime_core/mod.rs:337-346), so a gb202 core and a gb206 core remain interchangeable. Fix: call flare_helios::core::naming::platform_from_pci in orbit/gpu.rs (naming.rs:17-20 explicitly forbids duplicating the ids; that private copy has already drifted — it has 0x2bbc, absent from GB202_DEVICES, and no ga102/gb300), and take the requirement from the signed identity when it is a PLATFORMS name, keeping capability_revision for legacy cores with an empty identity. This is what open #469 does for gb203 (core_revision). A placement test with a gb206 host + gb206 core settles it fully; the today-divergence is shown from code.

Should fix 2 — docs/cli-design.md:901 (see entry #12)

The -tp1 404-retry sentence lists "gb10, gb202, and gb300" only, inside the very section the PR edited (:887, :890, :923). The implementation retries for any name starting with gb that is in PLATFORMS (flare/src/hub.rs:3111-3122), so gb206 does get the retry and the sentence is incomplete exactly where this PR adds. Add gb206, or restate as "a detected platform name beginning with gb" (which also fixes ga102 being wrongly excluded).

Nit 1 — remaining stale enumerations + missing semicolon (see entry #13)

docs/orbit.md:321, flare-cli/src/orbit/gpu.rs:38 and :222-223, flare-cli/src/orbit/plan.rs:38-39 still list gb10/gb202/gb300. helios/src/core/naming.rs:55 return Some("gb206") lacks the ; its neighbours have (:47, :50, :53). No rustfmt CI job exists (checked .github/workflows/native-serving.yml), so neither fails CI.

Nit 2 — description is now stale and still miscites its test command (see entry #14)

The description's "What exactly did this PR change" bullet for flare-cli/src/orbit/gpu.rs describes a hunk that 8e2ea68 deleted; it still says "Prevents crashes" where the pre-PR behaviour is a clean error (heliopause/src/export/capture.rs:2081-2084, flare/src/hardware.rs:95-99); and it cites cargo test --manifest-path helios/Cargo.toml, which cannot run the cited test because helios defaults to no features (helios/Cargo.toml:17 default = []) and core/naming.rs is behind runtime-core (helios/src/lib.rs:22-23) — CI uses --features runtime-core,server. AGENTS.md:103-112 requires accurate evidence; AGENTS.md:88-94 requires the change list to match the diff.

Verified sound — state this so "no other findings" is credible (see entry #14)

gb206 ids disjoint from all other tables and vendor guard intact; PLATFORMS prefix matching unambiguous (branch_platform, catalog.rs:271-280); naming/export/Acquisition/distribution consumers all generic (no per-platform branch); existing cores still load (loader unaffected); unknown-device path untouched; no env-var, lifetime, concurrency or persisted-state transitions in the diff (both changed functions are pure lookups).

Context against repo rules

Charter "Stay focused ... not interested in broad hardware support" and AGENTS.md scope rules are satisfied: this is the same small, precedent-backed change as merged #300 and open #469. Cite charter line 35 ("reproducible bug") as the justification: the 5060 Ti previously could not be exported at all.

#3 [medium] Should fix: duplicated PCI table in flare-cli/src/orbit/gpu.rs contradicts naming.rs's "single source" rule

flare-cli/src/orbit/gpu.rs:310-324 now holds a second copy of the PCI table that helios/src/core/naming.rs:25-27 defines, even though 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." Note that GB202_DEVICES in naming.rs:21-23 has 9 ids, and orbit/gpu.rs:316 lists 10 (it adds 0x2bbc). The two tables already disagree for gb202; the new gb206 arm replicates this drift pattern rather than inheriting platform_from_pci. flare-cli already depends on the shared table elsewhere through flare (flare-cli/src/hardware.rs:2 re-exports flare::hardware::detect, flare/src/hardware.rs:18-21 delegates to platform_from_pci), so the duplicate in orbit/gpu.rs could call flare::hardware / flare_helios::core::naming::platform_from_pci directly. 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"). Severity: should fix (maintainability + already-diverged table; not a new runtime defect by itself).

#4 [medium] Nit: stale four-platform enumerations in cli.rs help, orbit/gpu.rs, orbit/plan.rs, docs/cli-design.md, docs/core-format-design.md, docs/orbit.md

Docs still enumerate four platform names. After this PR the set is ga102, gb10, gb202, gb206, gb300 (helios/src/core/naming.rs:15), and detection now returns gb206 for the new ids in both flare (flare/src/hardware.rs:18-21 -> naming::platform_from_pci) and Orbit (flare-cli/src/orbit/gpu.rs:319-321). Stale places verified in code:

#5 [medium] Should fix: GB206 hosts silently change from a clear error to a missing gb206 branch; merge order not stated

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) — an actionable message. After: detect() returns "gb206" (naming.rs:53-56), 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 now fails with a hub missing-revision error instead — strictly worse as a user experience until a gb206 core is published, and gb206 hosts lose the option of silently using an existing gb202 core (nothing in the loader rejects it: helios/src/runtime_core/mod.rs:337-346 compares only compute capability, both are (12,0)). This is the merge-order/limitation issue that open PR #469 was asked to state in its description. Here the PR description does not state it either. Severity: should fix (description) — state that --revision gb202 remains the explicit override and that flare run ORG/MODEL requests a gb206 branch that does not exist until one is published. Do not add a silent fallback (AGENTS.md: do not silently substitute execution paths).

#9 [medium] Checked and found sound: what the change does not break (evidence for "no other findings")

Verified in code, no defect found:

#12 [medium] Should fix: docs/cli-design.md:901 omits gb206 from the -tp1 retry sentence the PR's own paragraph edits

docs/cli-design.md:901-903: "For gb10, gb202, and gb300, the shared CLI and desktop downloader tries the corresponding -tp1 revision if the initial revision lookup returns HTTP 404." The PR edited :887, :890 and :923 of this same section to add gb206 but left :901 unchanged. The implemented condition is flare/src/hub.rs:3111-3122: on a 404 it retries {revision}-tp1 when revision.starts_with("gb") && naming::PLATFORMS.contains(&revision). So gb206 does get the -tp1 retry, and the sentence is now incomplete in exactly the respect this PR adds. (Separately, ga102 never gets the retry because of the starts_with("gb") guard, so the sentence's enumeration is structurally fragile — pointing at PLATFORMS would fix both.) Fix: add gb206 to :901's list, or restate the rule as "for a detected platform name that begins with gb".

#14 [medium] Checked and found sound at 8e2ea68, plus the description's unrun test command

Re-verified at 8e2ea68 what the change does NOT break, so the report can state coverage:

#6 [low] Nit: style slips and thin test coverage for the new table

Verified in the diff (helios/src/core/naming.rs, flare-cli/src/orbit/gpu.rs):

  1. naming.rs:54 return Some("gb206") lacks the terminating ; that every neighbouring arm has (:45, :48, :51). It compiles (tail-less return) but rustfmt would rewrite it; the file is otherwise rustfmt-clean. Also naming.rs:15 "gb202","gb206" is missing the space after the comma.
  2. No literal PCI id assertion beside the looped table test. naming.rs:203-209 tests for device in GB206_DEVICES, which cannot catch a wrong id inside the constant. The #221 review asked for literal assertions, and the existing test does assert literals for gb10 (:188) and gb300 (:195). The gb206 loop with device << 16 | 0x10de also cannot catch a missing vendor guard.
  3. flare-cli/src/orbit/gpu.rs gets no test at all: revision/platform tests (:352-367) do not cover any gb206 id, so the Orbit half of the mapping is asserted only indirectly.
  4. Untested hardware is disclosed in the description (only 0x2d04 validated) — consistent with AGENTS.md's "disclose material limitations".

#13 [low] Nit: remaining stale platform enumerations after the docs pass, and the missing semicolon

Still stale after 8e2ea68 — the fix commit updated docs/cli-design.md:887/890/923, docs/core-format-design.md:754, and flare-cli/src/cli.rs:175, but these remain: