no spanning-tree portfast cleared the bridge priority, plus two smaller untruths in the console #1501

Closed
opened 2026-11-12 08:05:47 +00:00 by jaylouisw · 5 comments
Owner

What happened

no is the only undo a technician has. Three of them answered something other than what was asked, and one of them destroyed a setting the command never named.

1. no spanning-tree portfast cleared the bridge priority

The set form of spanning-tree was taught to read its verb before its value in #1493. The no form never read the word at all:

} else if (head === 'no' && tokens[1] === 'spanning-tree') {
  const dev = this.device;
  if (!dev.config.stpPriority && dev.config.stpPriority !== 0) { /* "No bridge priority set" */ }
  dev.config.stpPriority = null;      // whatever the third word said

On a switch with spanning-tree priority 4096:

typed answered
no spanning-tree portfast Bridge priority cleared (was 4096), back to the default 32768
no spanning-tree cost Bridge priority cleared (was 4096), back to the default 32768
no spanning-tree bpduguard Bridge priority cleared (was 4096), back to the default 32768
no spanning-tree flurbish Bridge priority cleared (was 4096), back to the default 32768

Four different questions, one answer, and the answer removed a setting none of them named. The root election is decided by exactly this number, so a lab reconverges to a different root after an operator tried to remove portfast — and no spanning-tree flurbish (a word that exists nowhere) does it too.

2. help promised a speed forced <mbps> form the parser refuses

Router(config-if)#speed forced 100
% Invalid rate "forced" - give a number of Mbps or auto

_speed() has never had a forced keyword: it parses auto or a rate (100, 1000, 1G), and its own usage line said speed auto | <mbps>. Only help promised the other spelling. A documented form the parser refuses is worse than a missing one, because the help is the first thing trusted.

3. no ip access-group answered with a sentence that was not one

% No an access list applied in or out on Gi0/0

No grammar, no subject, and phrased as though it had removed something.

What changes

  • engine/cli.js: the no spanning-tree branch reads the verb. portfast, cost, bpduguard, bpdufilter, edge, guard, loopguard, root, mst, mode, link-type, backbonefast, uplinkfast are named as not modelled, so there is nothing to remove; an unknown word is quoted back. Only no spanning-tree and no spanning-tree priority touch the priority. The list is hoisted to STP_UNMODELLED, shared with the set form, so the two cannot drift apart.
  • help: the row is now speed auto|<mbps> … e.g. \speed 100`, `speed 1G``.
  • no ip access-group: % No access list 101 applied in on Gi0/0 / % No access list applied in or out on Gi0/0 — the shape the sibling refusals already use (No hostname set, No DHCP pool named nope). My first attempt read better (Access list 101 is not applied in …) and failed test/config-undo.test.js, which had already pinned the house shape; the neighbours won.

Verification

test/no-command-touches-only-what-it-names.test.js — 7 checks:

  • the four destructive forms leave config.stpPriority at 4096, say nothing about clearing, name the word that was asked, name the tunable that does exist — and are checked through two more doors (show spanning-tree and show running-config);
  • portfast is refused as unmodelled, not as an unknown word;
  • no spanning-tree and no spanning-tree priority still clear, and say cleared (was 8192);
  • no spanning-tree with nothing set still says No bridge priority set;
  • help no longer contains speed auto|forced and does contain speed auto|<mbps>;
  • speed 100, speed auto accepted; speed forced 100 refused by naming what it takes;
  • both access-group sentences, plus the case that does remove something (unapplied in, binding actually gone).

With the old handler: 3 passed / 4 failed. With this change: 7/7.

Full suite 248 suites / 9135 assertions / 0 failed; syntax 318 files; canonical URLs 2857 files; config-undo 48/48, help-completeness 8/8, no-command-swallows-a-word 21/21, command-answers-the-question 27/27, stp-priority 41/41, skip-audit 15/15.

Not claimed

The stale no spanning-tree <verb> behaviour for sub-commands this console does not model is refused, not implemented: portfast still does not exist as a feature, and this change does not add it.

## What happened `no` is the only undo a technician has. Three of them answered something other than what was asked, and one of them destroyed a setting the command never named. ### 1. `no spanning-tree portfast` cleared the bridge priority The set form of `spanning-tree` was taught to read its verb before its value in #1493. The `no` form never read the word at all: ```js } else if (head === 'no' && tokens[1] === 'spanning-tree') { const dev = this.device; if (!dev.config.stpPriority && dev.config.stpPriority !== 0) { /* "No bridge priority set" */ } dev.config.stpPriority = null; // whatever the third word said ``` On a switch with `spanning-tree priority 4096`: | typed | answered | |---|---| | `no spanning-tree portfast` | `Bridge priority cleared (was 4096), back to the default 32768` | | `no spanning-tree cost` | `Bridge priority cleared (was 4096), back to the default 32768` | | `no spanning-tree bpduguard` | `Bridge priority cleared (was 4096), back to the default 32768` | | `no spanning-tree flurbish` | `Bridge priority cleared (was 4096), back to the default 32768` | Four different questions, one answer, and the answer removed a setting none of them named. The root election is decided by exactly this number, so a lab reconverges to a different root after an operator tried to remove portfast — and `no spanning-tree flurbish` (a word that exists nowhere) does it too. ### 2. `help` promised a `speed forced <mbps>` form the parser refuses ``` Router(config-if)#speed forced 100 % Invalid rate "forced" - give a number of Mbps or auto ``` `_speed()` has never had a `forced` keyword: it parses `auto` or a rate (`100`, `1000`, `1G`), and its own usage line said `speed auto | <mbps>`. Only `help` promised the other spelling. A documented form the parser refuses is worse than a missing one, because the help is the first thing trusted. ### 3. `no ip access-group` answered with a sentence that was not one ``` % No an access list applied in or out on Gi0/0 ``` No grammar, no subject, and phrased as though it had removed something. ## What changes - `engine/cli.js`: the `no spanning-tree` branch reads the verb. `portfast`, `cost`, `bpduguard`, `bpdufilter`, `edge`, `guard`, `loopguard`, `root`, `mst`, `mode`, `link-type`, `backbonefast`, `uplinkfast` are named as *not modelled, so there is nothing to remove*; an unknown word is quoted back. Only `no spanning-tree` and `no spanning-tree priority` touch the priority. The list is hoisted to `STP_UNMODELLED`, shared with the set form, so the two cannot drift apart. - `help`: the row is now `speed auto|<mbps> … e.g. \`speed 100\`, \`speed 1G\``. - `no ip access-group`: `% No access list 101 applied in on Gi0/0` / `% No access list applied in or out on Gi0/0` — the shape the sibling refusals already use (`No hostname set`, `No DHCP pool named nope`). My first attempt read better (`Access list 101 is not applied in …`) and failed `test/config-undo.test.js`, which had already pinned the house shape; the neighbours won. ## Verification `test/no-command-touches-only-what-it-names.test.js` — 7 checks: - the four destructive forms leave `config.stpPriority` at 4096, say nothing about clearing, name the word that was asked, name the tunable that does exist — and are checked through two more doors (`show spanning-tree` and `show running-config`); - `portfast` is refused as *unmodelled*, not as an unknown word; - `no spanning-tree` and `no spanning-tree priority` still clear, and say `cleared (was 8192)`; - `no spanning-tree` with nothing set still says `No bridge priority set`; - `help` no longer contains `speed auto|forced` and does contain `speed auto|<mbps>`; - `speed 100`, `speed auto` accepted; `speed forced 100` refused by naming what it takes; - both access-group sentences, plus the case that does remove something (`unapplied in`, binding actually gone). With the old handler: **3 passed / 4 failed**. With this change: 7/7. Full suite **248 suites / 9135 assertions / 0 failed**; syntax 318 files; canonical URLs 2857 files; `config-undo` 48/48, `help-completeness` 8/8, `no-command-swallows-a-word` 21/21, `command-answers-the-question` 27/27, `stp-priority` 41/41, `skip-audit` 15/15. ## Not claimed The stale `no spanning-tree <verb>` behaviour for sub-commands this console does not model is *refused*, not implemented: `portfast` still does not exist as a feature, and this change does not add it.
Author
Owner

Ready, and blocked on the host's disk - not on this change.

The tree is verified: 248 suites / 9135 assertions / 0 failed, syntax 318 files, canonical URLs 2857, config-undo 48/48, help-completeness 8/8, no-command-swallows-a-word 21/21, command-answers-the-question 27/27, stp-priority 41/41, skip-audit 15/15, and the new suite 7/7 (3 passed / 4 failed against the old handler).

Every route to main is closed at the moment, all of them by No space left on device:

route result
create this PR 500 - could not write config file .../pull.git4033333395/.git/config: No space left on device (succeeded on a retry 30 s later)
arm auto-merge 201, then Classify the change failed
cancel + squash merge 500 ENOSPC, then 405 Please try again later on fourteen consecutive attempts
close and reopen the PR, then merge still 405, mergeable=False
push the squashed tree to main directly ! [remote rejected] main -> main (pre-receive hook declined)

A merge needs a temporary clone to compute mergeability, and that clone cannot be written, so mergeable reads false and the endpoint answers 405 instead of saying why. The same thing happened on #1498 and #1500 earlier today; both landed once a free window appeared.

Nothing to fix here. This will land on the first attempt that finds space. The space itself needs the host: docker system df then docker builder prune - my #1500 change stops the next fill, it cannot reclaim what is already gone.

**Ready, and blocked on the host's disk - not on this change.** The tree is verified: **248 suites / 9135 assertions / 0 failed**, syntax 318 files, canonical URLs 2857, `config-undo` 48/48, `help-completeness` 8/8, `no-command-swallows-a-word` 21/21, `command-answers-the-question` 27/27, `stp-priority` 41/41, `skip-audit` 15/15, and the new suite 7/7 (3 passed / 4 failed against the old handler). Every route to `main` is closed at the moment, all of them by `No space left on device`: | route | result | |---|---| | create this PR | `500` - `could not write config file .../pull.git4033333395/.git/config: No space left on device` (succeeded on a retry 30 s later) | | arm auto-merge | `201`, then `Classify the change` **failed** | | cancel + squash merge | `500` ENOSPC, then `405 Please try again later` on fourteen consecutive attempts | | close and reopen the PR, then merge | still `405`, `mergeable=False` | | push the squashed tree to `main` directly | `! [remote rejected] main -> main (pre-receive hook declined)` | A merge needs a temporary clone to compute mergeability, and that clone cannot be written, so `mergeable` reads `false` and the endpoint answers 405 instead of saying why. The same thing happened on #1498 and #1500 earlier today; both landed once a free window appeared. Nothing to fix here. This will land on the first attempt that finds space. The space itself needs the host: `docker system df` then `docker builder prune` - my #1500 change stops the *next* fill, it cannot reclaim what is already gone.
Author
Owner

Amended: this PR now also records what it cost to discover, in docs/FORGE_TROUBLESHOOTING.md (§ When the volume is full, every retry leaves another half-clone).

The three defects are unchanged and still verified (suite 248 / 9135 / 0, syntax 318, no-command-touches-only-what-it-names 7/7). The addition is the operational half:

  • the four symptoms of a full volume, side by side, because they look unrelated — a rejected ref, a 500 from the clone path, a 405 Please try again later on merge with "mergeable": false, and a pull request whose needs: jobs are never created;
  • a merge is computed by cloning, so each failed attempt leaves a pull.git<random> half-clone under data/tmp/local-repo/. My own retry loop yesterday made the outage worse: a dozen attempts against a 48 MB repository is a few hundred megabytes of garbage. The page now says: one attempt tells you the answer, the tenth only lengthens the wait;
  • the host commands that actually reclaim (df, du -sh data/tmp/local-repo/*, docker system df, docker builder prune), and the reminder that the action queue does not recover without a restart.

docs/CI.md now points at that section from the docker-job rule, and the two _help() citations in docs/BGP-POLICY.md are repinned to cli.js:4305 (the hoisted STP_UNMODELLED list moved them). check:doc-citations reports only the known test/bgp.test.js:452 false positive.

Still cannot land: one merge attempt after this push returned 405, mergeable still false. Per the lesson above I am not retrying it in a loop; it will go on the first attempt that finds space.

**Amended: this PR now also records what it cost to discover, in `docs/FORGE_TROUBLESHOOTING.md` (§ *When the volume is full, every retry leaves another half-clone*).** The three defects are unchanged and still verified (suite **248 / 9135 / 0**, syntax 318, `no-command-touches-only-what-it-names` 7/7). The addition is the operational half: - the four symptoms of a full volume, side by side, because they look unrelated — a rejected ref, a `500` from the clone path, a `405 Please try again later` on merge with `"mergeable": false`, and a pull request whose `needs:` jobs are never created; - **a merge is computed by cloning**, so each failed attempt leaves a `pull.git<random>` half-clone under `data/tmp/local-repo/`. My own retry loop yesterday made the outage worse: a dozen attempts against a 48 MB repository is a few hundred megabytes of garbage. The page now says: one attempt tells you the answer, the tenth only lengthens the wait; - the host commands that actually reclaim (`df`, `du -sh data/tmp/local-repo/*`, `docker system df`, `docker builder prune`), and the reminder that the action queue does not recover without a restart. `docs/CI.md` now points at that section from the docker-job rule, and the two `_help()` citations in `docs/BGP-POLICY.md` are repinned to `cli.js:4305` (the hoisted `STP_UNMODELLED` list moved them). `check:doc-citations` reports only the known `test/bgp.test.js:452` false positive. Still cannot land: one merge attempt after this push returned `405`, `mergeable` still `false`. Per the lesson above I am not retrying it in a loop; it will go on the first attempt that finds space.
Author
Owner

Status of the fix while the volume is full.

The rebased, verified tree is on the server as branch fix/no-form-names-v2 at c97b11b6 (249 suites / 9144 assertions / 0 failed). Two things are blocked by the disk, and both are the same blocker seen from different sides:

operation result
update the existing branch ref ! [remote rejected] (failed to update ref) — three attempts
create a new branch ref works — this is how fix/no-form-names-v2 and fix/stated-range got there
create a pull request 500 ENOSPC — it needs a temp clone
merge 405 while mergeable reads false

That asymmetry is worth remembering: when refs will not update, a new branch name may still push. The work is not lost; only the pull request needs room.

**Status of the fix while the volume is full.** The rebased, verified tree is on the server as branch `fix/no-form-names-v2` at **`c97b11b6`** (249 suites / 9144 assertions / 0 failed). Two things are blocked by the disk, and both are the *same* blocker seen from different sides: | operation | result | |---|---| | update the existing branch ref | `! [remote rejected] (failed to update ref)` — three attempts | | create a new branch ref | **works** — this is how `fix/no-form-names-v2` and `fix/stated-range` got there | | create a pull request | `500` ENOSPC — it needs a temp clone | | merge | `405` while `mergeable` reads `false` | That asymmetry is worth remembering: when refs will not update, a **new branch name** may still push. The work is not lost; only the pull request needs room.
Author
Owner

The blocker has a cause and a size: #1507 — packetforge-firmware is 46.2 GiB of reachable history on the same volume, ~96% of everything Forgejo stores, while its current tree is 6.4 MB. git gc cannot reclaim reachable objects, which is why the housekeeping cron tasks changed nothing. Queued work is safe and unchanged (fix/no-form-names-v2 @ c97b11b6); it needs a decision on #1507, not another retry here.

The blocker has a cause and a size: **#1507** — `packetforge-firmware` is 46.2 GiB of reachable history on the same volume, ~96% of everything Forgejo stores, while its current tree is 6.4 MB. `git gc` cannot reclaim reachable objects, which is why the housekeeping cron tasks changed nothing. Queued work is safe and unchanged (`fix/no-form-names-v2` @ `c97b11b6`); it needs a decision on #1507, not another retry here.
Author
Owner

Reviewing this fix before it landed found one more of the same species — filed as #1509, fixed on the combined
branch.

spanning-tree vlan 10 and no spanning-tree vlan 10 are one question in two directions, and they disagreed:

spanning-tree vlan 10      → % This device runs one spanning tree, not one per VLAN: use `spanning-tree priority …`
no spanning-tree vlan 10   → % Unknown spanning-tree sub-command "vlan": the only form here is `no spanning-tree` …

Per-VLAN STP is a real IOS concept this model deliberately lacks; the set form says so, the no form said "never
heard of it". #1501 hoisted the unmodelled verbs into STP_UNMODELLED for both directions and left the one
sub-command that is not a verb — vlan — in the set branch only. Neither answer was destructive, so this is wording,
but it is exactly the split this issue is about: a no branch that does not know what its set branch knows.

Lands with the queue as land-all-v3 @ 785bcaaf (which supersedes land-all-v2, itself superseding the
per-issue branches — each supersede is a correction found in review, not a redesign). Verified: 251 suites / 9210
assertions / 0 failed
, syntax 321, no-command-touches-only-what-it-names 8/8 against 7/1 for the previous handler,
help-completeness 8/8, skip-audit 15/15.

Reviewing this fix before it landed found one more of the same species — filed as #1509, fixed on the combined branch. `spanning-tree vlan 10` and `no spanning-tree vlan 10` are one question in two directions, and they disagreed: ``` spanning-tree vlan 10 → % This device runs one spanning tree, not one per VLAN: use `spanning-tree priority …` no spanning-tree vlan 10 → % Unknown spanning-tree sub-command "vlan": the only form here is `no spanning-tree` … ``` Per-VLAN STP is a real IOS concept this model deliberately lacks; the set form says so, the `no` form said "never heard of it". #1501 hoisted the *unmodelled verbs* into `STP_UNMODELLED` for both directions and left the one sub-command that is not a verb — `vlan` — in the set branch only. Neither answer was destructive, so this is wording, but it is exactly the split this issue is about: a `no` branch that does not know what its set branch knows. Lands with the queue as `land-all-v3` **@ `785bcaaf`** (which supersedes `land-all-v2`, itself superseding the per-issue branches — each supersede is a correction found in review, not a redesign). Verified: **251 suites / 9210 assertions / 0 failed**, syntax 321, `no-command-touches-only-what-it-names` 8/8 against 7/1 for the previous handler, `help-completeness` 8/8, `skip-audit` 15/15.
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#1501
No description provided.