channel-group flurbish created a channel group, and shutdown flurbish closed the port #1495

Closed
opened 2026-11-12 06:39:28 +00:00 by jaylouisw · 1 comment
Owner

The question

Three handlers answering a neighbouring command's question (#1493) suggested a wider one: what does each command family do when it is handed a word that does not exist? Thirty-three families, one nonsense word each, every answer sorted into three classes:

class meaning
silent nothing objected — and a typo that changes state with no witness is the worst answer there is
unquoted an objection that does not name the word; acceptable only when it names the capability the device lacks, or lists the values the command does take
quoted names the word back — the shortest route from a typo to a correction

3 silent, 16 unquoted, 31 good. The silent ones were the real finds.

1. channel-group flurbish created a channel group called "flurbish"

sw1(config-if)#channel-group flurbish
Interface Fa0/2 added to channel group flurbish (mode active)

and in configuration:

config.lags = { "flurbish": { "mode": "lacp-active", "hashPolicy": "l2", "members": ["Fa0/2"] } }

The mode was validated — channel-group 5 mode flurbish answers % Invalid mode: flurbish — and the id was not. So a typo became configuration, with a receipt: show etherchannel lists a group whose id is a word, and no other port can ever join it. This is the same failure as the VLAN-id doors that once answered VLAN NaN created (name: VLAN0NaN), in the one door that was left open.

2. shutdown flurbish closed the port and said nothing

sw1(config-if)#shutdown flurbish
Fa0/2 administratively down

The extra word was ignored and the port went down — a typo that costs a link with no witness at all. Same on a router port.

Both now refuse, quote the word, and change nothing:

% Invalid channel group id "flurbish": a channel group is identified by a number, 1-4096 (e.g. `channel-group 1 mode active`)
% `shutdown` takes no argument: it closes this port, `no shutdown` opens it (the word "flurbish" was not used)

3. ip route flurbish was reported as a missing argument

Router(config)#ip route flurbish
% Incomplete command: ip route <dest> <mask> <gateway|interface>

That sends the reader to add a mask to something that is not an address. The shape of the destination is now checked before the rest of the line:

Router(config)#ip route flurbish
% Invalid destination "flurbish": not an IPv4 address (the form is `ip route <dest> <mask> <next-hop|interface>`)
Router(config)#ip route 10.9.0.0
% Incomplete command: ip route <dest> <mask> <gateway|interface>

A genuinely short line is still called incomplete — the two answers are now different because the two problems are.

The sixteen unquoted answers are left alone, deliberately

duplex flurbish → % Usage: duplex auto | full | half; switchport flurbish on a router → % ... cannot switch frames: it has no l2-forward capability; clock rate flurbish on an RJ45 port → % clock rate is only configurable on a serial interface. None names the word, and all three tell the reader what to do instead — the alternatives, or the capability that is missing. That distinction is now written down as a rule in the test rather than left to judgement: an unquoted refusal must name a capability or list the alternatives.

Evidence

test/no-command-swallows-a-word.test.js — the sweep as a guard: 33 families, three classes, the rule above, plus "no refused command wrote configuration". 21 checks, 21 passed / 0 failed. With the old handler: 12 passed / 9 failed, naming both silent families and the misleading route answer.

Those flat assertions also pin what must not regress: channel-group 5 mode active still bundles the port and records group 5, shutdown alone still closes the port, no shutdown still opens it, a valid route is installed and stored, a non-contiguous mask is still refused with its reason, and channel-group 5 mode flurbish still names the mode.

Docs: docs/CLI.md, new section "A word the console does not know is never swallowed".

Full suite: 245 suites, 9,091 assertions, 0 failed. Syntax 314 files.

## The question Three handlers answering a neighbouring command's question (#1493) suggested a wider one: what does *each* command family do when it is handed a word that does not exist? Thirty-three families, one nonsense word each, every answer sorted into three classes: | class | meaning | |---|---| | **silent** | nothing objected — and a typo that changes state with no witness is the worst answer there is | | **unquoted** | an objection that does not name the word; acceptable only when it names the *capability* the device lacks, or lists the values the command does take | | **quoted** | names the word back — the shortest route from a typo to a correction | **3 silent, 16 unquoted, 31 good.** The silent ones were the real finds. ## 1. `channel-group flurbish` created a channel group called "flurbish" ``` sw1(config-if)#channel-group flurbish Interface Fa0/2 added to channel group flurbish (mode active) ``` and in configuration: ``` config.lags = { "flurbish": { "mode": "lacp-active", "hashPolicy": "l2", "members": ["Fa0/2"] } } ``` The **mode** was validated — `channel-group 5 mode flurbish` answers `% Invalid mode: flurbish` — and the **id** was not. So a typo became configuration, with a receipt: `show etherchannel` lists a group whose id is a word, and no other port can ever join it. This is the same failure as the VLAN-id doors that once answered `VLAN NaN created (name: VLAN0NaN)`, in the one door that was left open. ## 2. `shutdown flurbish` closed the port and said nothing ``` sw1(config-if)#shutdown flurbish Fa0/2 administratively down ``` The extra word was ignored and the port went down — a typo that costs a link with no witness at all. Same on a router port. Both now refuse, quote the word, and change nothing: ``` % Invalid channel group id "flurbish": a channel group is identified by a number, 1-4096 (e.g. `channel-group 1 mode active`) % `shutdown` takes no argument: it closes this port, `no shutdown` opens it (the word "flurbish" was not used) ``` ## 3. `ip route flurbish` was reported as a missing argument ``` Router(config)#ip route flurbish % Incomplete command: ip route <dest> <mask> <gateway|interface> ``` That sends the reader to add a mask to something that is not an address. The shape of the destination is now checked before the rest of the line: ``` Router(config)#ip route flurbish % Invalid destination "flurbish": not an IPv4 address (the form is `ip route <dest> <mask> <next-hop|interface>`) Router(config)#ip route 10.9.0.0 % Incomplete command: ip route <dest> <mask> <gateway|interface> ``` A genuinely short line is still called incomplete — the two answers are now different because the two problems are. ## The sixteen unquoted answers are left alone, deliberately `duplex flurbish` → `% Usage: duplex auto | full | half`; `switchport flurbish` on a router → `% ... cannot switch frames: it has no l2-forward capability`; `clock rate flurbish` on an RJ45 port → `% clock rate is only configurable on a serial interface`. None names the word, and all three tell the reader what to do instead — the alternatives, or the capability that is missing. That distinction is now written down as a rule in the test rather than left to judgement: an unquoted refusal must name a capability or list the alternatives. ## Evidence `test/no-command-swallows-a-word.test.js` — the sweep as a guard: 33 families, three classes, the rule above, plus "no refused command wrote configuration". **21 checks, 21 passed / 0 failed.** With the old handler: **12 passed / 9 failed**, naming both silent families and the misleading route answer. Those flat assertions also pin what must not regress: `channel-group 5 mode active` still bundles the port and records group 5, `shutdown` alone still closes the port, `no shutdown` still opens it, a valid route is installed and stored, a non-contiguous mask is still refused with its reason, and `channel-group 5 mode flurbish` still names the mode. Docs: `docs/CLI.md`, new section "A word the console does not know is never swallowed". Full suite: 245 suites, 9,091 assertions, 0 failed. Syntax 314 files.
Author
Owner

Landed as #1496 (8e0d6330). Post-merge on main: no-command-swallows-a-word 21/21, command-answers-the-question 27/27, lag 57/57, show-vlan 29/29, tree clean, 0 open PRs.

The audit is the part worth keeping: 33 command families, one nonsense word each, answers sorted into silent / unquoted / quoted. Silent was 3 and is now 0. The rule for what an unquoted refusal may be -- it names a missing capability, or lists the values the command takes -- is written into the test, so the next family that accepts a word it does not know fails by measurement rather than by someone noticing.

One operational note: the branch is fix/word-audit, not fix/no-swallowed-words -- the server refused to create that ref (remote: error: couldn't set 'refs/heads/fix/no-swallowed-words'). Same commit, different name; nothing about the change depends on it.

Landed as #1496 (`8e0d6330`). Post-merge on `main`: `no-command-swallows-a-word` 21/21, `command-answers-the-question` 27/27, `lag` 57/57, `show-vlan` 29/29, tree clean, 0 open PRs. The audit is the part worth keeping: 33 command families, one nonsense word each, answers sorted into silent / unquoted / quoted. Silent was 3 and is now 0. The rule for what an unquoted refusal may be -- it names a missing capability, or lists the values the command takes -- is written into the test, so the next family that accepts a word it does not know fails by measurement rather than by someone noticing. One operational note: the branch is `fix/word-audit`, not `fix/no-swallowed-words` -- the server refused to create that ref (`remote: error: couldn't set 'refs/heads/fix/no-swallowed-words'`). Same commit, different name; nothing about the change depends on it.
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#1495
No description provided.