feat(config): embed MCU→VID heuristic so null-vid boards resolve offline (#959)#1012
Conversation
…ine (#959) Boards whose PlatformIO JSON carries no `build.vid`/`build.pid` (native-USB SoCs — ESP32-C6, LPC845-BRK, UNO R4 / RA4M1, plain ESP32) previously resolved a VID only via the `online-data` `mcu_to_vid` pipeline fetched over the network at runtime. That online fallback made offline / air-gapped / CI resolution impossible for those boards (PR #925 had to drop all six from the static `FIRST_PARTY_VID_PID_ROWS` freeze test for exactly this reason). Bake the same curated MCU-family→VID table (`online-data-tools/seed_mcu_to_vid.json`, the seed the online pipeline publishes from) into the binary via `include_str!`, and apply the same match rule the pipeline's SQLite view uses (`family == mcu OR mcu LIKE family%`, highest score wins). Single source of truth — one JSON feeds both the online publish and the embedded copy. - `board::mcu_vid::vid_for_mcu()` — the offline lookup. - `BoardConfig::resolved_vid()` — explicit `build.vid`, else the heuristic. Resolution/display only; deliberately does NOT feed `-DUSB_VID`, so no board's compiled output changes. - New `issue_959_null_vid_boards_resolve_via_embedded_mcu_heuristic` freeze test pins all six boards resolving offline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 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 |
Fixes #959.
Problem
Six boards with null
build.vid/build.pid(esp32-c3-devkitm-1,esp32-c6-devkitc-1,esp32-p4-evboard,esp32doit-devkit-v1,uno_r4_wifi,lpc845brk) resolved a USB VID only via theonline-datamcu_to_vidpipeline fetched at runtime. That online fallback (flagged in PR #925, which had to drop all six from the static freeze test) breaks offline / air-gapped / CI resolution.Fix
Ingest the mapping at build time:
include_str!the in-repo seed (online-data-tools/seed_mcu_to_vid.json— the same table the online pipeline publishes) intofbuild-configand apply the pipeline's exact rule (family == mcu OR mcu LIKE family%, highest score wins). Single source of truth; no network.board::mcu_vid::vid_for_mcu()— offline lookup.BoardConfig::resolved_vid()— explicitbuild.vid, else the heuristic. Resolution/display only — does not feed-DUSB_VID, so no board's compiled output changes.issue_959_null_vid_boards_resolve_via_embedded_mcu_heuristicpins all six resolving offline.Verified locally
soldr cargo test -p fbuild-config --lib→ 185 passed / 0 failed (5 new). clippy + fmt clean.🤖 Generated with Claude Code