no spanning-tree vlan 10 calls a real IOS concept an unknown word #1509

Closed
opened 2026-11-12 09:53:13 +00:00 by jaylouisw · 0 comments
Owner

What happens

spanning-tree vlan 10 and no spanning-tree vlan 10 are the same question in two directions, and they answered
differently:

sw1(config)#spanning-tree vlan 10
% This device runs one spanning tree, not one per VLAN: use `spanning-tree priority <0-61440>`

sw1(config)#no spanning-tree vlan 10
% Unknown spanning-tree sub-command "vlan": the only form here is `no spanning-tree` (clears the bridge priority), or `no spanning-tree priority`

Per-VLAN STP is a real IOS concept that this model deliberately does not have; the set form says exactly that. The no
form calls it an unknown word, so an operator reading the second answer concludes the console has never heard of
per-VLAN STP — which is not what the other door says, and not true.

Neither answer is destructive (stpPriority survives both), so this is a wording defect, not a state one. It matters
because it is the same mechanism that #1501 exists for: the no branch not knowing what the set branch knows. #1501
hoisted the unmodelled verbs into one list for both directions and left the one sub-command that is not a verb —
vlan — duplicated in the set branch only.

Found by reviewing the queued #1501 fix before it landed, by typing both directions at the same device rather than
reading the diff.

What changes

  • engine/cli.js: the no spanning-tree branch answers vlan in the same terms the set form uses — one spanning
    tree, not one per VLAN — and names no spanning-tree priority as the removal that does exist.
  • test/no-command-touches-only-what-it-names.test.js: a check that both directions agree about the concept, that
    neither says "unknown sub-command", and that neither touches the priority.

Verification

no-command-touches-only-what-it-names 8/8; with the previous handler 7 passed / 1 failed, the failure being
exactly this check. Lands with the queue as land-all-v3.

## What happens `spanning-tree vlan 10` and `no spanning-tree vlan 10` are the same question in two directions, and they answered differently: ``` sw1(config)#spanning-tree vlan 10 % This device runs one spanning tree, not one per VLAN: use `spanning-tree priority <0-61440>` sw1(config)#no spanning-tree vlan 10 % Unknown spanning-tree sub-command "vlan": the only form here is `no spanning-tree` (clears the bridge priority), or `no spanning-tree priority` ``` Per-VLAN STP is a real IOS concept that this model deliberately does not have; the set form says exactly that. The `no` form calls it an **unknown word**, so an operator reading the second answer concludes the console has never heard of per-VLAN STP — which is not what the other door says, and not true. Neither answer is destructive (`stpPriority` survives both), so this is a wording defect, not a state one. It matters because it is the same mechanism that #1501 exists for: the `no` branch not knowing what the set branch knows. #1501 hoisted the *unmodelled verbs* into one list for both directions and left the one sub-command that is not a verb — `vlan` — duplicated in the set branch only. Found by reviewing the queued #1501 fix before it landed, by typing both directions at the same device rather than reading the diff. ## What changes - `engine/cli.js`: the `no spanning-tree` branch answers `vlan` in the same terms the set form uses — one spanning tree, not one per VLAN — and names `no spanning-tree priority` as the removal that does exist. - `test/no-command-touches-only-what-it-names.test.js`: a check that both directions agree about the concept, that neither says "unknown sub-command", and that neither touches the priority. ## Verification `no-command-touches-only-what-it-names` **8/8**; with the previous handler **7 passed / 1 failed**, the failure being exactly this check. Lands with the queue as `land-all-v3`.
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#1509
No description provided.