A short line is not a wrong value: hostname erased the name, description cleared itself #1497
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1497
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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.
Landed on
mainase7d18ce8("A short line is not a wrong value (#1498)"). Verified on the merge commit:missing-argument-is-not-a-value29/29,no-command-swallows-a-word21/21,command-answers-the-question27/27, tree clean.How it landed is worth recording, because the pipeline is not healthy. The
pull_requestevent for this branch produced no run at all: two force-pushes left the run list unchanged, and aworkflow_dispatchon the same branch created only theClassify the changejob (which succeeded) with none of the jobs that carryneeds:ever being enqueued. The PR sat armed, waiting on checks that Forgejo would never create, andmain's own runs have been failing since ~06:32.The cause is the host, not the code: while pushing this branch the API returned
No space left on devicefrom Forgejo's own clone path, git receive answeredcouldn't set 'refs/heads/...', and a branch create/delete probe later returned 201/204, so the volume fluctuates. The action queue has not recovered from that window - hence dependent jobs never being scheduled, and the PR's own state in the UI lagging (it readsopenalthough the commit is onmain).Root-cause follow-up for the next iteration: the CI
dockerjob runsdocker build -t packetforge:ci .against the host daemon on every code push and never prunes, so build cache accumulates on the same volume Forgejo stores its data on. A boundeddocker builder prune --keep-storageplusdocker system dfreporting in that job is the change that would stop this recurring.?in a free-text position is stored as the name:hostname ?renames the box to "?" #1685hostname ?,dns zone ?andvlan <id> name ?refuse it (#1685) #1686?in a free-text position is stored as the name:hostname ?renames the box to "?" #1685?at the end of anoline is not a question:no vlan 42 name ?deletes VLAN 42 andno hostname ?clears the name #1694