converge at <ms> — the form help prints — answers "converged" instead of refusing #1726

Closed
opened 2026-11-16 20:38:41 +00:00 by jaylouisw · 0 comments
Owner

The command the console tells you to type does not do what it says

help has advertised converge [at <ms>] (engine/cli.js:5272) for as long as the command has existed, and
_converge() read Number(tokens[0]) and nothing else. So the advertised form was never refused — it was
answered as if no instant had been named.

Number('at') is NaN; a NaN instant fails the per-row e.readyAtMs > atMs test, so every (pending) mark
disappears
. On a lab whose OSPF is ready at 16000 ms:

r1#converge 1000
Process   Device                 Ready   Basis
ospf      ISR 4331 branch router-r1 16000 ms  hello 10 s + exchange, then SPF hold  (pending)

r1#converge at 1000
Process   Device                 Ready   Basis
ospf      ISR 4331 branch router-r1 16000 ms  hello 10 s + exchange, then SPF hold

The second answer is converge with no instant at all: the lab is reported converged at an instant before it
converges. Nothing fails, nothing warns, and the operator has no way to see that a different question was answered.
The (pending) column is the entire output of this command, so the whole answer is wrong.

The rest of the argument parser drops words too

typed today
converge wibble answers as converge — the word is ignored
converge at wibble same
converge at same
converge 1000 wibble answers as converge 1000 — the word is ignored
converge -5 accepted as an instant of −5 ms, so every row is (pending)

link <up|down> <id> at <ms> has parsed at since #1049, and ping refuses a stray word by name since #1379.
converge is the one lab operation that does neither.

Note on the page that already said so

docs/CLI.md carried a paragraph admitting the discrepancy and telling the reader to type the bare form, ending
"the fix belongs in the parser (take at the way link does); until it lands, this line names the spelling that
works". This issue is that fix.

Found while walking the open queue; the loop's test asserts the behaviour, so the assertion fails on main and
passes with the change in the pull request that closes this.

## The command the console tells you to type does not do what it says `help` has advertised `converge [at <ms>]` (`engine/cli.js:5272`) for as long as the command has existed, and `_converge()` read `Number(tokens[0])` and nothing else. So the advertised form was never refused — it was answered as if no instant had been named. `Number('at')` is `NaN`; a `NaN` instant fails the per-row `e.readyAtMs > atMs` test, so **every `(pending)` mark disappears**. On a lab whose OSPF is ready at 16000 ms: ``` r1#converge 1000 Process Device Ready Basis ospf ISR 4331 branch router-r1 16000 ms hello 10 s + exchange, then SPF hold (pending) r1#converge at 1000 Process Device Ready Basis ospf ISR 4331 branch router-r1 16000 ms hello 10 s + exchange, then SPF hold ``` The second answer is `converge` with no instant at all: the lab is reported converged at an instant **before** it converges. Nothing fails, nothing warns, and the operator has no way to see that a different question was answered. The `(pending)` column is the entire output of this command, so the whole answer is wrong. ## The rest of the argument parser drops words too | typed | today | |---|---| | `converge wibble` | answers as `converge` — the word is ignored | | `converge at wibble` | same | | `converge at` | same | | `converge 1000 wibble` | answers as `converge 1000` — the word is ignored | | `converge -5` | accepted as an instant of −5 ms, so every row is `(pending)` | `link <up|down> <id> at <ms>` has parsed `at` since #1049, and `ping` refuses a stray word by name since #1379. `converge` is the one lab operation that does neither. ## Note on the page that already said so `docs/CLI.md` carried a paragraph admitting the discrepancy and telling the reader to type the bare form, ending "the fix belongs in the parser (take `at` the way `link` does); until it lands, this line names the spelling that works". This issue is that fix. Found while walking the open queue; the loop's test asserts the behaviour, so the assertion fails on `main` and passes with the change in the pull request that closes this.
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#1726
No description provided.