fix(cli): reject invalid node run port#84307
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection on current main shows invalid explicit PR rating What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the focused fail-fast validation after maintainer acceptance of the compatibility impact, then let the merge close #83923. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows invalid explicit Is this the best way to solve the issue? Yes. The patch is the narrow maintainable fix: reject only explicit invalid Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7f4462e5c06d. |
|
@clawsweeper hatch |
|
🦞👀 I queued a comment sync for this PR. If the egg is hatchable, ClawSweeper will generate the image once and update the existing review comment. |
|
ClawSweeper could not hatch this PR egg yet. Reason: there is no current durable ClawSweeper review record for this PR, so there is no PR egg state record to update. |
c9cbddd to
b354f03
Compare
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Signal Puff Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
b354f03 to
b98b16b
Compare
b98b16b to
c6a8ad8
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Added the requested real CLI behavior proof to the PR body: the WSL checkout at @clawsweeper re-review |
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Summary
openclaw node run --portvalues instead of falling back to the configured or default port.--portvalues.Fixes #83923.
Verification
git diff --check HEAD~1..HEAD -- CHANGELOG.md src/cli/node-cli/register.ts src/cli/node-cli/register.test.tscbx_b19076fdaf79, runrun_26642c3eee98: regression failed before the source patch, thennode scripts/run-vitest.mjs src/cli/node-cli/register.test.ts -- --reporter=verbosepassed after the patch (4/4).c6a8ad803a48e4f19577b3c9ed9942fedfd707f5:timeout 10s node scripts/run-node.mjs node run --port abcexited before starting the node host.Behavior addressed:
openclaw node run --port abcnow reportsInvalid --portand exits before starting the node host.Real environment tested: AWS Crabbox Linux lease
cbx_b19076fdaf79, runrun_26642c3eee98; WSL Ubuntu 24.04 checkout at PR headc6a8ad803a48e4f19577b3c9ed9942fedfd707f5.Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/cli/node-cli/register.test.ts -- --reporter=verbose;OPENCLAW_HOME="$(mktemp -d)" timeout 10s node scripts/run-node.mjs node run --port abc.Evidence after fix: focused Vitest passed with
4 passed; scopedgit diff --checkpassed; the foreground CLI proof returnedexit_status=1, stderrInvalid --port. Use a port number from 1 to 65535, for example 18789., andpgrep -af 'openclaw node run|node-host|src/node-host|run-node.mjs node run'printed no matching process afterward.Observed result after fix: invalid explicit
--portfails fast with the user-facing validation error and does not leave a node host running; valid explicit and omitted ports still dispatch with the expected gateway port in focused registration coverage.What was not tested: no live gateway connection was attempted, because the invalid explicit port path should exit before connecting.