scripts/import-devices.js advertises 17 capabilities while the engine has 15 #1522

Closed
opened 2026-11-15 18:01:11 +00:00 by jaylouisw · 0 comments
Owner

scripts/import-devices.js:38 lists 17 capability tokens against the engine's 15 (CAPABILITIES, engine/device.js:89), and :156 strips vlan, lacp and stp and moves them into spec.role.

Measured end to end on a fixture: a switch declaring 802.1Q, LACP and STP imports with capabilities [l2-forward, l3-forward, cli], and the run reports only "1 spec(s) had minor warnings".

Why it matters: the importer silently reduces what a device can do, and reports success while doing it. Any device data routed through this script - including catalogue sweeps - is quietly poorer than the source.

Suggested fix: import CAPABILITIES from the engine rather than restating the list, and let the three tokens through. Where a token is genuinely not a capability, remove it from the engine set instead of stripping it in one script.

`scripts/import-devices.js:38` lists 17 capability tokens against the engine's 15 (`CAPABILITIES`, `engine/device.js:89`), and `:156` strips `vlan`, `lacp` and `stp` and moves them into `spec.role`. Measured end to end on a fixture: a switch declaring 802.1Q, LACP and STP imports with capabilities `[l2-forward, l3-forward, cli]`, and the run reports only "1 spec(s) had minor warnings". **Why it matters:** the importer silently reduces what a device can do, and reports success while doing it. Any device data routed through this script - including catalogue sweeps - is quietly poorer than the source. **Suggested fix:** import `CAPABILITIES` from the engine rather than restating the list, and let the three tokens through. Where a token is genuinely not a capability, remove it from the engine set instead of stripping it in one script.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1522
No description provided.