cli(hostname): a name past 63 characters is refused, and the old name kept #2532
No reviewers
Labels
No labels
blocked-on-build
bug
device
device-request
enhancement
from-github
needs-datasheet
needs-info
needs-triage
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2532
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1124-0412"
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?
One narrow question: what does an IOS-like box do with a
hostnamelonger than the 63 characters every reference calls the ceiling — refuse it, truncate it, or store it anyway?Verdict: refused, in a fixed sentence, and the name is left alone. The console had no length rule, so
hostname <64 chars>renamed the device everywhere (config line,device.name, prompt, canvas label) into a name no box will hold.The first line is the vendor's, verbatim. The second is this console's: the count, and the name that survived, following the same rule as the existing missing-argument refusal (#1497).
Evidence
hostnamehostnamehostnameChanges
engine/cli.js:HOSTNAME_MAX = 63+hostnameLengthRefusal(), asked after the help-key refusal and before the all-numeric warning — a 64-digit name breaches both, and the box answers the one that stops the command. A refusal changes no state.test/hostname-length-limit.test.js(new): 25 assertions — 63 taken whole (config,device.name, prompt, running-config), 64 refused with both lines and all state unchanged, 200-character count, 64-digit precedence, spaces counted at the boundary,no hostnamestill working after a refusal.test/config-roundtrip.test.js: the four catalogue models whose default name is a >63-character model string (three Huawei NetEngine 8000 M14 variants, one Aruba Instant On 1830) now seed a legal name — the sweep was replaying ahostnameline a real box refuses. Fixture, not rule.docs/CLI.md,research/hostname-length-limit.md: the rule, the citations, and what is still unmodelled.Quality gates
node scripts/syntax-check.js: 563 files (554 JS, 9 TS), all OK.npm test: 479 suites, 16,089 assertions, 0 failed (763 s).Remaining unresolved
hostnameline at all — the printer writesconfig.hostname || device.name, which is what put a 100-character line in those four configs. A printer question, left for its own run.no dns zoneand two IPv6 handlers #2551