A short line is not a wrong value #1498
Closed
jaylouisw
wants to merge 1 commit from
fix/short-line into main
pull from: fix/short-line
merge into: jaylouisw:main
jaylouisw:main
jaylouisw:rev/1121-1812
jaylouisw:catalogue/1121-1822
jaylouisw:docs/1121-1817
jaylouisw:catalogue/1121-1752
jaylouisw:docs/1121-1747
jaylouisw:rev/1121-1742
jaylouisw:catalogue/1121-1722
jaylouisw:rev/1121-1712
jaylouisw:docs/1121-1717
jaylouisw:catalogue/1121-1652
jaylouisw:rev/1121-1642
jaylouisw:docs/1121-1647
jaylouisw:ci/1121-1646
jaylouisw:ci/1121-1427
jaylouisw:rev/1121-1412
jaylouisw:catalogue/1121-1422
jaylouisw:docs/1121-1417
jaylouisw:catalogue/1121-1352
jaylouisw:rev/1121-1342
jaylouisw:docs/1121-1347
jaylouisw:rev/1121-1212
jaylouisw:catalogue/1121-1222
jaylouisw:docs/1121-1217
jaylouisw:ci/1121-1027
jaylouisw:catalogue/1121-1022
jaylouisw:rev/1121-1013
jaylouisw:docs/1121-1017
jaylouisw:catalogue/1121-0852
jaylouisw:rev/1121-0842
jaylouisw:docs/1121-0847
jaylouisw:ci/1121-0827
jaylouisw:catalogue/1121-0822
jaylouisw:rev/1121-0812
jaylouisw:catalogue/1121-0752
jaylouisw:rev/1121-0742
jaylouisw:docs/1121-0747
jaylouisw:catalogue/1121-0722
jaylouisw:docs/1121-0717
jaylouisw:rev/1121-0712
jaylouisw:rev/1121-0642
jaylouisw:plan/1121-0637
jaylouisw:ci/1121-0627
jaylouisw:catalogue/1121-0622
jaylouisw:rev/1121-0612
jaylouisw:docs/1121-0617
jaylouisw:plan/1120-0337
jaylouisw:docs/1120-0347
jaylouisw:rev/1119-1942
jaylouisw:rev/1119-1912
jaylouisw:catalogue/1119-1752
jaylouisw:docs/1119-1347
jaylouisw:catalogue/1119-1352
jaylouisw:fix/1119-1232
jaylouisw:fix/1119-0602
jaylouisw:catalogue/1119-0452
jaylouisw:catalogue/1119-0422
jaylouisw:docs/1119-0417
jaylouisw:fix/1119-0202
jaylouisw:catalogue/1119-0222
jaylouisw:rev/1119-0042
jaylouisw:catalogue/1118-2252
jaylouisw:docs/1118-2047
jaylouisw:catalogue/1118-2152
jaylouisw:fix/1118-2037
jaylouisw:ci/1118-2027
jaylouisw:docs/1118-1416
jaylouisw:fix/1118-1006
jaylouisw:catalogue/1118-0326
jaylouisw:catalogue/1117-2326
jaylouisw:catalogue/1117-0025
jaylouisw:catalogue/1116-1730
jaylouisw:fix/1523-speed-downgrade-one-end
jaylouisw:fix/enable-required-and-empty-pipe-help
jaylouisw:land-all-v5
jaylouisw:land-all-v4
jaylouisw:land-all-v3
jaylouisw:land-all-v2
jaylouisw:land-all
jaylouisw:fix/board-id
jaylouisw:fix/stated-range
jaylouisw:fix/no-form-names-v2
jaylouisw:fix/voice-vlan
jaylouisw:devices/catalogue-batch
jaylouisw:devices/powerline-moca
jaylouisw:devices/firewalls-enterprise
jaylouisw:devices/pon-splitters
jaylouisw:devices/nvr-and-taps
jaylouisw:devices/four-nvr-models
jaylouisw:fix/contributing-exemption
jaylouisw:fix/stale-github-urls
jaylouisw:ci/cancel-superseded-runs
jaylouisw:gh/1438
jaylouisw:device/uisp-console-lbe-xr
jaylouisw:gh/1442
jaylouisw:docs/readme-current-counts
jaylouisw:feat/device-ubiquiti-wave-fiber-onu
jaylouisw:fix/address-ownership
jaylouisw:feat/vrrp-in-path
jaylouisw:fix/merge-research-duplicate
jaylouisw:docs/hybrid-patch-current
jaylouisw:fix/audit-port-template
jaylouisw:fix/2930f-jl256a-uplinks
jaylouisw:feat/dhcp-in-path
jaylouisw:feat/hackgpon-ubiquiti-uisp-fiber-xgs
jaylouisw:feat/hackgpon-adtran-sdx-621
jaylouisw:tool/issue-duplicate-sweep
jaylouisw:feat/device-mikrotik-rb433ah
jaylouisw:feat/hackgpon-ma5671a
jaylouisw:issues/categories-and-labels
jaylouisw:ci/run-every-suite-locally
jaylouisw:chore/http-smoke
No reviewers
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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!1498
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/short-line"
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?
The question
Fifteen commands were asked what they do with no argument at all. Two answered by doing something, and three answered a question nobody had asked.
1.
hostnamewith no name erased the nameNo output, and
config.hostnamebecamenull— a destructive command with no receipt, on the one command whose whole job is the value it just discarded. The only way to find out was to look at a surface that renders the name, and those surfaces render it from the same field.It now refuses, and says the name is unchanged:
2.
descriptionwith no text cleared it and reported successA change the receipt did not name. Clearing is
no description, so a baredescriptionis refused now, and both directions name what moved:3. Three commands called a missing value an invalid one
Same shape as
ip route flurbishin #1495: the empty string was validated as a value.ip name-server% Invalid name server "": not an IPv4 address% Incomplete command: ip name-server <address>ipv6 address% Invalid IPv6 address ""% Incomplete command: ipv6 address <address>/<prefix> (oripv6 address autoconfig)vrrp 1 ip% Invalid address: (none)% Incomplete command: vrrp <vrid> ip <address>A genuinely bad value is still quoted back (
Invalid name server "flurbish"), so a short line and a wrong value now read differently — which is the whole point.Two things measured and deliberately left alone
Whitespace is already robust. Labs are pasted, not typed, so every command in the sweep was also run with double spaces, a tab, a leading space, a trailing space, and a mix: 108 variant runs, 0 differences in the answer or the resulting config. Nothing to fix — but it had never been measured, so it is now pinned by a test instead of assumed.
A global command at an interface prompt is applied in global config — deliberately, so a pasted running-config block works without
exitlines between blocks (#1230). Leniency by design; what it costs is that the answer does not say where the configuration landed. The reverse direction is refused by name, and where the console knows better it says so:The test pins the leniency so it stays a decision, and pins the reverse refusal so strictness does not spread by accident.
Evidence
test/missing-argument-is-not-a-value.test.js— 29 checks, 29 passed / 0 failed. With the old handler: 13 passed / 16 failed, naming both silent commands, all three empty-string-as-value messages, and the erased hostname.Docs:
docs/CLI.md, new section "A short line is not a wrong value".Full suite: 246 suites, 9,120 assertions, 0 failed. Syntax 315 files.
State: green locally; CI is blocked on infrastructure, not on this change.
The full suite passes on this branch (246 suites / 9120 assertions / 0 failed, syntax 315 files) and
missing-argument-is-not-a-valueis 29/29 (13/16 against the oldengine/cli.js).CI cannot confirm it right now because the Forgejo host ran out of disk during this session:
main's own CI has been failing since ~06:32 for the same reason (Test (Node 18/20/22),audit,Classify the change, and theRebase open PRsworkflow all failing onmain, which this change does not touch). The push succeeded on a retry, and a branch create/delete probe returned 201/204, so the volume fluctuates rather than being permanently full.This PR is armed for squash auto-merge and should land once CI can run.
hostnameerased the name,descriptioncleared itself #1497nothat names one thing must not remove another #1502no spanning-tree portfastcleared the bridge priority, plus two smaller untruths in the console #1501Pull request closed