Skip to content

policy: dump_usb_ids must remain (tier-1 source for online-data aggregation) #720

Description

@zackees

Policy: keep crates/fbuild-core/examples/dump_usb_ids.rs

Recording an explicit anti-removal policy after coming close to dropping
this in #719.

Why it must stay

dump_usb_ids runs inside the Update data workflow (.github/workflows/update-data.yml)
as tier-1 of the USB-VID name merge. It exports the bundled
usb-ids Rust crate's snapshot as
JSON, which tools/merge_sources.py then unions with linux-usb.org,
the usbids GitHub mirror, and the curated vendor_names_inlined.py
overlay to produce the published online-data/data/usb-vid.json.

Removing the example would:

  • Drop a fourth independent source of truth from the aggregator (we
    go from 4 → 3, losing whatever the usb-ids crate carries that the
    text mirrors don't).
  • Force the usb-ids workspace dep to go too (since nothing else uses
    it), losing the ability to cross-check the curated overlay against
    the upstream Rust snapshot.

Decoupling that's already in place (#719)

The fbuild runtime USB resolver (fbuild-core::usb::resolver) no
longer reaches for the usb-ids crate at all — it uses the compile-time-
embedded usb-vendors.tar.zst (fbuild-core::usb::embedded). The
usb-ids dependency is now only pulled by the dump_usb_ids example,
which is built solely by the nightly workflow.

Action

This is a documentation-only issue. Add a banner comment to
crates/fbuild-core/examples/dump_usb_ids.rs referencing this issue
(so future LLM-driven cleanup passes don't try to remove it), and
mention it in crates/CLAUDE.md under "Crate Responsibilities".

No code changes required beyond the banner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions