? is a keypress in every prompt, and exit walks one level at a time #1504

Closed
jaylouisw wants to merge 1 commit from fix/help-key-every-prompt into main
Owner

Closes #1503

? is the index at > and # and a syntax error in (config)#, (config-if)# and (config-dhcp)#; exitat#did nothing. Both fixed inengine/cli.js, with test/help-key-works-in-every-prompt.test.js(9 checks, 4 passed / 5 failed against the old handler) and adocs/CLI.md` section.

Full suite 248 suites / 9137 assertions / 0 failed; syntax 318 files; help-completeness 8/8, config-undo 48/48, skip-audit 15/15.

The CI steps that have not run since the queue wedged were also run by hand on this tree: check-dockerfile ✓, examples/build-examples.js ✓ (four labs, ping OK), missing-devices.js examples --no-issues ✓, check-control-bytes ✓, check-node-surface ✓, smoke-http.js ✓.

Note for the merge: the host's data volume is full (see #1501/#1502), so mergeable may read false and the merge endpoint may answer 405 until space is freed. One attempt is enough — each failed attempt leaves a half-clone, as recorded in docs/FORGE_TROUBLESHOOTING.md.

Closes #1503 `?` is the index at `>` and `#` and a syntax error in `(config)#`, `(config-if)#` and (config-dhcp)#`; `exit` at `#` did nothing. Both fixed in `engine/cli.js`, with `test/help-key-works-in-every-prompt.test.js` (9 checks, 4 passed / 5 failed against the old handler) and a `docs/CLI.md` section. Full suite **248 suites / 9137 assertions / 0 failed**; syntax 318 files; `help-completeness` 8/8, `config-undo` 48/48, `skip-audit` 15/15. The CI steps that have not run since the queue wedged were also run by hand on this tree: `check-dockerfile` ✓, `examples/build-examples.js` ✓ (four labs, ping OK), `missing-devices.js examples --no-issues` ✓, `check-control-bytes` ✓, `check-node-surface` ✓, `smoke-http.js` ✓. Note for the merge: the host's data volume is full (see #1501/#1502), so `mergeable` may read `false` and the merge endpoint may answer `405` until space is freed. One attempt is enough — each failed attempt leaves a half-clone, as recorded in `docs/FORGE_TROUBLESHOOTING.md`.
? is a keypress in every prompt, and exit walks one level at a time
Some checks failed
CI / Test (Node 18) (pull_request) Blocked by required conditions
CI / Test (Node 20) (pull_request) Blocked by required conditions
CI / Test (Node 22) (pull_request) Blocked by required conditions
CI / Server smoke test (pull_request) Blocked by required conditions
CI / Docker build (pull_request) Blocked by required conditions
PR rebase / Rebase onto main and arm auto-merge (pull_request) Failing after 19s
CI / Classify the change (pull_request) Failing after 24s
8374a60925
The console prints the mode in its prompt - `>`, `#`, `(config)#`, `(config-if)#`, `(config-dhcp)#` - and `?` answered with the whole index at the first two and was a syntax error in the other three. The one key that means "I do not know what I can type here" was reported as though the key itself were a typo. The index already labels each row with its mode, so it is the right answer in all five prompts.

`exit` at `#` did nothing at all: exec and privileged EXEC share one dispatcher and only `exit` at `>` was handled. One level up from `#` is `>`, which this console always has underneath, so the ladder (config-if)# -> (config)# -> # -> > is now continuous and each step is one exit.

Not changed: an unknown word is still reported in every mode - the fix is the two help keys and one level, not a general amnesty.

test/help-key-works-in-every-prompt.test.js: 9 checks, 4 passed / 5 failed against the old handler.
Author
Owner

The auto-rebase job failed. This is a problem with the automation, not with this change.

the rebase job itself failed before it could report a reason - check the runner.

The run is at http://10.0.10.20:3000/jaylouisw/packetforge/actions/runs/2978. Nothing was pushed, so the branch is exactly as you wrote it.

**The auto-rebase job failed.** This is a problem with the automation, not with this change. ``` the rebase job itself failed before it could report a reason - check the runner. ``` The run is at http://10.0.10.20:3000/jaylouisw/packetforge/actions/runs/2978. Nothing was pushed, so the branch is exactly as you wrote it.
Author
Owner

Landed on main as 1b1e1287. Verified on the merge commit: help-key-works-in-every-prompt 9/9, help-completeness 8/8, config-undo 48/48, tree clean (the full suite was 248 suites / 9137 assertions / 0 failed on the branch, and 249 / 9144 / 0 with #1502's suite rebased on top).

The merge went through on the first attempt — mergeable was true, so the volume had a free window. #1502 is still stuck: mergeable reads false and a force-push of its rebased head was rejected with failed to update ref, which is the same disk pressure in a different place.

Landed on `main` as **`1b1e1287`**. Verified on the merge commit: `help-key-works-in-every-prompt` 9/9, `help-completeness` 8/8, `config-undo` 48/48, tree clean (the full suite was **248 suites / 9137 assertions / 0 failed** on the branch, and **249 / 9144 / 0** with #1502's suite rebased on top). The merge went through on the first attempt — `mergeable` was `true`, so the volume had a free window. #1502 is still stuck: `mergeable` reads `false` and a force-push of its rebased head was rejected with `failed to update ref`, which is the same disk pressure in a different place.
jaylouisw closed this pull request 2026-11-12 08:37:49 +00:00
Some checks failed
CI / Test (Node 18) (pull_request) Blocked by required conditions
CI / Test (Node 20) (pull_request) Blocked by required conditions
CI / Test (Node 22) (pull_request) Blocked by required conditions
CI / Server smoke test (pull_request) Blocked by required conditions
CI / Docker build (pull_request) Blocked by required conditions
PR rebase / Rebase onto main and arm auto-merge (pull_request) Failing after 19s
CI / Classify the change (pull_request) Failing after 24s

Pull request closed

Sign in to join this conversation.
No reviewers
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!1504
No description provided.