Skip to content

feat(ci): check board USB IDs against the Dronecode registry#27865

Open
mrpollo wants to merge 3 commits into
mainfrom
mrpollo/usb-ids-check
Open

feat(ci): check board USB IDs against the Dronecode registry#27865
mrpollo wants to merge 3 commits into
mainfrom
mrpollo/usb-ids-check

Conversation

@mrpollo

@mrpollo mrpollo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Dronecode owns USB VID 0x3643 and assigns PIDs to member companies through the new Dronecode/usb-ids registry, which replaces the old spreadsheet. This PR wires that registry into CI so a board can't merge with an unregistered PID or one belonging to another manufacturer. We've already caught real cases of boards copying USB IDs from other vendors' defconfigs (most recently a PR shipping Auterion's VID with ZeroOne's PID), and today nothing stops that from landing.

Tools/check_usb_ids.py parses the CONFIG_CDCACM_* values from the given defconfigs and, for boards declaring VID 0x3643, enforces three rules: the PID is registered, the board lives under the vendor directory registered to that manufacturer, and CONFIG_CDCACM_VENDORSTR is either the canonical "Dronecode Project, Inc." or the registered manufacturer name. Boards with other VIDs are ignored entirely. It also has a lookup mode to resolve a PID or a board path to its owner.

The workflow only triggers on boards/** changes, checks just the defconfigs touched by the PR (fetched via the GitHub API, no toolchain, runs in seconds), and skips the Python steps when no defconfig changed. Verified locally against all in-tree defconfigs: the current tree passes clean (FMU-v6XRT and ZeroOne X6 are the two in-tree 0x3643 users), and unregistered PIDs, PIDs used from the wrong vendor directory, and wrong vendor strings each fail with a one-line error pointing at the offending defconfig.

Boards declaring the Dronecode USB VID (0x3643) must use a product ID
registered to their manufacturer in https://github.com/Dronecode/usb-ids.
CI checks only the defconfigs changed by a PR; other vendor IDs are
ignored.
@github-actions github-actions Bot added scope:infrastructure CI workflows, checks, automation, or build infrastructure. scope:tools Scripts, developer tools, packaging, or setup helpers. labels Jul 10, 2026
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

💡 Commit messages could be improved

Not blocking, but these commit messages could use some cleanup.

Commit Message Suggestion
9fc332b791 tooling: check board USB IDs against the Dronecode registry Missing conventional commit format (e.g. "feat(ekf2): add something")
14ee22689c tooling: move USB ID CI logic into Tools/ci/usb_ids_runner.sh Missing conventional commit format (e.g. "feat(ekf2): add something")
a12809a2f5 tooling: name the USB ID workflow after the Dronecode registry Missing conventional commit format (e.g. "feat(ekf2): add something")

See the commit message convention for details.


This comment will be automatically removed once the issues are resolved.

@mrpollo mrpollo changed the title tooling: check board USB IDs against the Dronecode registry feat(ci): check board USB IDs against the Dronecode registry Jul 10, 2026
@github-actions github-actions Bot added the kind:feature Request or change that adds new functionality. label Jul 10, 2026
Keep the workflow file trivial; the changed-file detection and checker
invocation live in a script named after the workflow, following the
build_all_runner.sh convention.
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 0 byte (0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +55  [ = ]       0    .debug_abbrev
  -0.0%      -2  [ = ]       0    .debug_info
  -0.0%     -13  [ = ]       0    .debug_line
   -85.7%      -6  [ = ]       0    [Unmapped]
    -0.0%      -7  [ = ]       0    [section .debug_line]
  +0.0%     +40  [ = ]       0    TOTAL

px4_fmu-v6x [Total VM Diff: -8 byte (-0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +55  [ = ]       0    .debug_abbrev
  -0.0%      -2  [ = ]       0    .debug_info
  -0.0%      -5  [ = ]       0    .debug_line
     +67%      +2  [ = ]       0    [Unmapped]
    -0.0%      -7  [ = ]       0    [section .debug_line]
  +0.1%      +8  [ = ]       0    [Unmapped]
  -0.0%      -8  -0.0%      -8    .text
    -0.0%      -4  -0.0%      -4    [section .text]
   -30.8%      -4 -30.8%      -4    g_nullstring
  +0.0%     +48  -0.0%      -8    TOTAL

Updated: 2026-07-10T19:58:49

Make the status check self-explanatory in the PR checks list so
maintainers treat failures as registry violations, not routine lint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature Request or change that adds new functionality. scope:infrastructure CI workflows, checks, automation, or build infrastructure. scope:tools Scripts, developer tools, packaging, or setup helpers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant