feat(koinon): hardware asset registry with USB device identification#12
Merged
forkwright merged 1 commit intomainfrom Mar 14, 2026
Merged
feat(koinon): hardware asset registry with USB device identification#12forkwright merged 1 commit intomainfrom
forkwright merged 1 commit intomainfrom
Conversation
- HardwareAsset, HardwareKind, RadioKind, SdrKind, MeshNodeKind types - ConnectionType enum (UsbSerial, Tcp, Ble, I2c, Spi, UsbDirect) - AssetRegistry: in-memory add/remove/query with snafu error handling - Known USB VID:PID table (PL2303, CH340, CP2102, FTDI, RTL-SDR, ESP32-S3) - PL2303 clone risk flagging - USB detection stub for future udev/nusb integration - 21 unit tests covering all acceptance criteria
Contributor
|
Consider splitting into smaller PRs for easier review. Not a blocker, just a signal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HardwareAsset,HardwareKind,RadioKind,SdrKind,MeshNodeKindtypesConnectionTypeenum (UsbSerial, Tcp, Ble, I2c, Spi, UsbDirect)AssetRegistry: in-memory add/remove/query with snafu error handlingTest plan
cargo test --workspace— all 72 tests pass (21 new hardware registry + USB lookup tests)cargo clippy --workspace --all-targets -- -D warnings— zero warningslookup_usb_deviceObservations
Out-of-scope findings noted for future tracking:
crates/koinon/src/tamper_log.rs: Test module uses#[allow]instead of#[expect]per RUST.md convention. Applies to all existing test modules. Consistent with current codebase practice but diverges from the standard.AssetRegistry::all()iterator andget_mut()have no dedicated tests. Both are exercised indirectly but could use explicit coverage.// TODO:comment convention in the prompt conflicts with STANDARDS.md (which requiresTODO(#NNN)with a tracking issue). Resolved here by using// NOTE:for the USB stub comment.