vlan, lacp and stp are documented capabilities that no code reads #1526

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

engine/device.js:98-100 documents vlan, lacp and stp as capabilities ("supports 802.1Q" etc.), but no code branches on any of them - spanning-tree is gated on isL2 (engine/cli.js:13429-13431) - and all 1,661 catalogue specs contain zero occurrences of the three tokens.

A capability census on 2026-11-11 found the same thing from the data side: 19 distinct capability strings across the specs, only 12 of the engine's 15 tokens used by any spec, and these three set by nothing.

Why it matters: hasCap('802.3af')-style questions are how callers decide whether to offer a command. Three tokens that answer true for nobody, and are documented as behaviour, teach every future reader something false.

Suggested fix: either wire them to the behaviour they name (and let a device refuse switchport mode trunk when it lacks vlan), or remove them from CAPABILITIES and from the documentation. Keeping them documented-and-inert is the one option to avoid.

`engine/device.js:98-100` documents `vlan`, `lacp` and `stp` as capabilities ("supports 802.1Q" etc.), but no code branches on any of them - spanning-tree is gated on `isL2` (`engine/cli.js:13429-13431`) - and all 1,661 catalogue specs contain zero occurrences of the three tokens. A capability census on 2026-11-11 found the same thing from the data side: 19 distinct capability strings across the specs, only 12 of the engine's 15 tokens used by any spec, and these three set by nothing. **Why it matters:** `hasCap('802.3af')`-style questions are how callers decide whether to offer a command. Three tokens that answer `true` for nobody, and are documented as behaviour, teach every future reader something false. **Suggested fix:** either wire them to the behaviour they name (and let a device refuse `switchport mode trunk` when it lacks `vlan`), or remove them from `CAPABILITIES` and from the documentation. Keeping them documented-and-inert is the one option to avoid.
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#1526
No description provided.