Skip to content

audit_usb_registry.py has no VID:PID query mode, but the docs tell you to use it as one #3996

Closed

Description

@zackees

Problem

ci/util/audit_usb_registry.py checks a fixed list — AUDITED_LITERALS, the 15 VID:PIDs still hardcoded in ci/. It has no way to ask "is this arbitrary pair published?"

But the docs added in #3976 instruct exactly that use. agents/docs/hardware-autoresearch.md tells you that when fbuild port scan cannot name a board, you should confirm against the published catalogue by running the audit — and agents/docs/usb-vid-pid-registry.md says to validate an identity before publishing it the same way.

Neither works. An unknown 1234:5678 from a port scan is not in AUDITED_LITERALS, so the audit never looks at it and exits 0 — reporting "all good" for a pair that is genuinely absent upstream.

Why it matters

This defeats the purpose of the instruction it appears in. The step exists to stop people filing false gaps against FastLED/boards for what is really a stale cache or an old fbuild — but as written it will also wave through a real gap, because a clean exit says nothing about the pair you actually care about.

Caught in review on #3976 (CodeRabbit, Major); the docs were merged with the instruction still pointing at a check that cannot answer the question.

Suggested fix

Add a query mode:

uv run python ci/util/audit_usb_registry.py --lookup 1234:5678

Resolving the pair against the published catalogue and exiting non-zero when absent. The fetch/parse code is already there — fetch_catalogue() returns {vid: (vendor, {pid: product})} — so this is mostly argument plumbing.

Then update both doc sites to use --lookup <observed pair> rather than the bare audit.

Alternative: drop the instruction and point at the portal (https://fastled.github.io/boards/), which already does exact VID:PID lookup interactively. Cheaper, but loses the scriptable path.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions