capabilities: retire vlan, lacp and stp, which no code read (#1526) #1635
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1635
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-0805"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1526.
CAPABILITIESadvertisedvlan,lacpandstpas behaviour ("supports 802.1Q", "supports link aggregation", "participates in spanning tree") and no source underengine/read any of them. VLANs, LAGs and spanning tree run on everyl2-forwardbox, so the token answeredtruefor 125 specs andfalsefor the 1,143 L2 specs that behave identically.What changed
engine/device.js: the three are out ofCAPABILITIES(12 tokens), with the reason and the remaining three unread tokens named in the comment.docs/DEVICE_SCHEMA.md: the three move from the capability table to the "kept, inert" class, alongside802.3af/passive-poe; the15 capabilitiessample becomes12.docs/SIMULATION.md: both lists that named them are corrected.test/capability-vocabulary.test.js(new, 13 assertions): every token inCAPABILITIESmust have a reader (hasCap / _capabilityRefusal / capability indexOf / SERVICE_PORTS); every token any spec declares must be honoured or named as a fact;dhcp-client,firewallandwirelessare listed as the pending decisions rather than passing silently; and a trunk builds with identical console output on a box that declares the three and one that does not.test/import-devices-capabilities.test.js: the "switch that says 802.1Q/LACP/STP" case now asserts the #1522 regression in its post-#1526 form - the declaration is kept and named, never stripped or moved intorole.Deliberately not done: the 125 specs still declare the three tokens. Dropping a datasheet fact is exactly the data loss #1522 fixed, and gating VLANs/LAGs/STP on the token would switch them off for almost the whole catalogue. They are now descriptive facts in the importer existing unknown-token class.
Tests:
node scripts/syntax-check.js344 files OK; fullnpm test274 suites, 9,831 assertions, 0 failed.CAPABILITIES advertised three tokens as behaviour - 'supports 802.1Q', 'supports link aggregation', 'participates in spanning tree' - and no engine source read any of them. VLANs, LAGs and STP run on every l2-forward box, so the token was true for 125 specs and false for 1,143 that behave identically; every caller that asked hasCap('vlan') to decide whether to offer a command was taught something false. They are now descriptive hardware facts rather than advertised capabilities: 125 specs keep declaring them verbatim (the importer names an unknown token and keeps it, #1522) and the docs list them in that class. Gating the features on the token instead would have switched VLANs off for almost the whole catalogue. test/capability-vocabulary.test.js is the guard the issue asks for: every token in CAPABILITIES must have a reader, every token a spec declares must be honoured or named as a fact, and a trunk builds identically on a box that declares the three and one that does not. The remaining unread tokens (dhcp-client, firewall, wireless) are listed in the test as pending decisions rather than concealed.a852afa7720317e39bea