Uh oh!
There was an error while loading. Please reload this page.
fix(extract): derive compile identity from hwids[0] when build.vid/pid absent - #55
Conversation
…d absent PlatformIO platform builders fall back to build.hwids[0] for USB_VID/USB_PID when a board manifest has no explicit build.vid/pid (atmelsam is the canonical case). The extractor only honored explicit keys, so every hwids-only manifest published primary_compile_identity: null — and consumers that source USB_VID/USB_PID from this registry (FastLED/fbuild#1061) fail to compile USB cores such as ArduinoCore-samd USBCore.cpp, breaking all SAMD board builds in fbuild CI. Mirror the hwids[0] fallback and tag that identity with the compile purpose so validate_profiles accepts it as primary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPlatformIO board extraction now derives a compile identity from the first HWID VID:PID pair when explicit build identifiers are absent. Regression tests cover downstream profile preservation, explicit identifier precedence, and manifests without USB identities. ChangesPlatformIO identity extraction
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
…t allowlist, fmt toolchain, SAMD USB defines) (#1084) * test(ci): align policy tests with blessed workflows and non-Windows hosts The xwin CRT fixes changed template_native_build.yml's Windows MSVC branches to 'soldr --no-cache build' without updating the pyo3 policy test, failing Check Windows on every main commit since. The picotool combined-failure test asserted the Windows-only WinUSB hint on every platform, failing Check Ubuntu/macOS. Update the policy expectations and make format_failure platform-injectable so both hint variants are asserted on every host. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(serial): unlink rustdoc references to private consts ENVIRONMENT_TO_VCOM and BOARD_FINGERPRINTS are private; intra-doc links to them fail 'cargo doc -D warnings' (the Documentation job) from fbuild-cli and fbuild-serial. Plain code spans instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(dylint): allowlist rp2040_picotool.rs for ban_std_pathbuf The module was split out of rp2040_pqt.rs (which is allowlisted) without carrying an allowlist entry, failing the Dylint job on every main commit. NormalizedPath migration remains tracked by the allowlist-shrink effort. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): provision rustfmt for the pinned toolchain in the fmt job setup-soldr installs the pinned toolchain with profile=minimal, which omits rustfmt; on toolchain-cache misses 'cargo fmt' silently fell back to the runner's newer stable rustfmt and failed with diffs the pinned 1.94.1 does not produce. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(config): PlatformIO USB define parity for boards without registry vid/pid #1061 sources USB_VID/USB_PID from the boards registry; complement it with the rest of PlatformIO's USB define surface: USB_PRODUCT/USB_MANUFACTURER from board data (gated on usb_product, quotes stripped, atmelsam arduino-common.py semantics), build.hwids parsing for project-local PlatformIO-format manifests (bundled snapshots stay hwids-free — guard extended), usb_product strings for the five bundled SAMD boards, and SAM fingerprint coverage so define changes invalidate cached artifacts. The SAMD CI healing itself ships via the registry (FastLED/boards#55). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): pin formatting style and test quote expectations * style: format workspace with pinned rustfmt --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
PlatformIO platform builders fall back to
build.hwids[0]forUSB_VID/USB_PIDwhen a board manifest has no explicitbuild.vid/build.pid— atmelsam is the canonical case. The extractor only honored explicit keys, so every hwids-only manifest publishedprimary_compile_identity: null.Consequence downstream: FastLED/fbuild#1061 made fbuild source
USB_VID/USB_PIDexclusively from this registry, so all SAMD board builds in fbuild CI now fail with'USB_VID' was not declared in this scopein ArduinoCore-samdUSBCore.cpp(adafruit_feather_m0, zeroUSB, adafruit_qt_py_m0, adafruit_feather_m4, adafruit_grandcentral_m4 — all null in the publishedusb-profiles.json, verified against the live artifact; their hwids[0] values match PlatformIO's canonical manifests exactly).This mirrors the hwids[0] fallback in
_extract_platformioand tags that identity with thecompilepurpose sovalidate_profilesaccepts it as primary. Explicitbuild.vid/build.pidstill win; manifests with no USB identity still publish null; secondary hwids stay runtime-only. Follows the per-board precedent of #53/#54 but fixes the whole class.Tests: new
tests/test_extract_boards.py(hwids-only → primary; explicit keys win; no-identity stays null; fullbuild_profiles+validate_profilesround-trip). All 17 USB/extractor tests pass; the 4 failing live-site search tests fail identically on main without this change.After merge, the site workflow needs a
workflow_dispatch(main is not a trigger branch) to republishusb-profiles.json, which heals the fbuild SAMD workflows with zero further fbuild changes.🤖 Generated with Claude Code
Summary by CodeRabbit