Skip to content

feat: ingest typed USB transport profiles#1053

Merged
zackees merged 1 commit into
mainfrom
feat/boards-usb-profiles
Jul 15, 2026
Merged

feat: ingest typed USB transport profiles#1053
zackees merged 1 commit into
mainfrom
feat/boards-usb-profiles

Conversation

@zackees

@zackees zackees commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

  • add a typed, SHA-verified FastLED/boards USB transport-profile consumer with fresh/stale cache handling and no embedded VID/PID fallback
  • install the profile catalog at daemon startup and require it for RP2040/RP2350 CDC handoff
  • replace product-name heuristics with typed purpose/role/interface/family matching
  • fail closed on ambiguous case-folded board aliases and refresh an existing cache correctly on Windows
  • serialize an existing daemon environment test that was racing the full suite

This is a milestone for #1047 and the USB-identity phase of #1049. It intentionally does not close either issue; repo-wide literal migration and attached-board acceptance remain.

Validation

  • live FastLED/boards publication: schema/SHA verified; curated 2e8a:0003 ROM UF2 and 2e8a:000a runtime CDC roles resolved
  • soldr cargo test -p fbuild-core usb::profiles (5 passed, one live smoke ignored by default)
  • explicit live publication smoke (1 passed)
  • soldr cargo test -p fbuild-deploy rp2040 (13 passed)
  • soldr cargo test -p fbuild-daemon (194 passed; expected hardware/process tests ignored)
  • soldr cargo clippy -p fbuild-core -p fbuild-deploy -p fbuild-daemon --all-targets -- -D warnings
  • git diff --check

Depends on FastLED/boards#48, #49, #50, and #51 (all merged; public artifact verified).

Summary by CodeRabbit

  • New Features
    • Added verified USB transport profiles for identifying device purposes, roles, boards, and aliases.
    • Added profile lookup by USB identifiers and board name or alias.
    • Added secure profile cache installation with integrity and schema validation.
  • Improvements
    • USB profiles are loaded automatically from the daemon cache when available.
    • RP2040/RP2350 deployment now uses typed USB profiles to locate runtime CDC ports more reliably.

@zackees
zackees merged commit d5516d0 into main Jul 15, 2026
87 of 93 checks passed
@zackees
zackees deleted the feat/boards-usb-profiles branch July 15, 2026 02:47
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 96c24845-7b3e-4562-bb22-022411604b94

📥 Commits

Reviewing files that changed from the base of the PR and between 1f843fa and 06a7e40.

📒 Files selected for processing (5)
  • crates/fbuild-core/src/usb/mod.rs
  • crates/fbuild-core/src/usb/profiles.rs
  • crates/fbuild-daemon/src/broker/service.rs
  • crates/fbuild-daemon/src/main.rs
  • crates/fbuild-deploy/src/rp2040.rs

📝 Walkthrough

Walkthrough

Adds verified typed USB profile ingestion and caching, exposes profile and board lookups, initializes profiles in the daemon, and uses runtime profile data for RP2040/RP2350 CDC port discovery.

Changes

Typed USB profile integration

Layer / File(s) Summary
Profile contracts and lookups
crates/fbuild-core/src/usb/mod.rs, crates/fbuild-core/src/usb/profiles.rs
Adds public USB profile types, artifact schemas, VID/PID filtering, and case-normalized board or alias lookup.
Verification and cache installation
crates/fbuild-core/src/usb/profiles.rs
Fetches or reads profile data, validates metadata, canonical content hashes, identities, provenance, aliases, and atomically installs verified cache files with test coverage.
Daemon profile initialization
crates/fbuild-daemon/src/main.rs, crates/fbuild-daemon/src/broker/service.rs
Loads verified USB profiles from daemon cache paths during startup and serializes the environment-dependent cache-root test.
Typed RP2040 CDC discovery
crates/fbuild-deploy/src/rp2040.rs
Requires verified profiles before deployment and selects runtime CDC ports using profile purpose, role, interface, and family fields.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

Possibly related PRs

  • FastLED/fbuild#1050 — Both changes update RP2040 CDC-port selection and USB identity matching in crates/fbuild-deploy/src/rp2040.rs.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/boards-usb-profiles

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant