fix(cli): add IPv4 loopback host to isPortBusy#94448
Conversation
Same address-family flaw as openclaw#94379: isPortBusy uses bare {port} without specifying host, missing IPv4-only port occupants. Closes: openclaw#94426 Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: #94949 is the cleaner open landing path for the same Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land #94949 as the canonical fix, then close the linked issue and duplicate PR candidates after merge. So I’m closing this here and keeping the remaining discussion on #94949. Review detailsBest possible solution: Land #94949 as the canonical fix, then close the linked issue and duplicate PR candidates after merge. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main still uses a hostless Is this the best way to solve the issue? No. Reusing a multi-address probe is the right direction, but this branch loses the Security review: Security review cleared: The diff only changes local TypeScript port-probe control flow and exports an existing helper; it adds no dependency, workflow, secret, permission, or supply-chain surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against fcedd37067ec. |
…PortBusy Export checkPortInUse from ports-inspect.ts and reuse it in isPortBusy instead of hard-coding host: "127.0.0.1". checkPortInUse already iterates over all hosts (127.0.0.1, 0.0.0.0, ::1, ::), providing a more complete port-busy check that handles both IPv4-only and IPv6-only occupants. Closes: openclaw#94426
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 Reason: re-review requires an open issue or PR. |
|
@clawsweeper re-review |
2 similar comments
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
ClawSweeper applied the proposed close for this PR.
|
|
@clawsweeper re-review |
Closes #94426
What Problem This Solves
isPortBusy()used a host-less probe (IPv6-first default) which missed IPv4-only port occupants on dual-stack hosts. Port detection returnedfreefor an occupied port when the listener was IPv4-only.Why This Change Was Made
Changed
isPortBusyto usecheckPortInUsefromports-inspect.tswhich probes with explicit host resolution, correctly detecting IPv4-only occupants.Evidence
An IPv4-only listener on port 19876 is correctly detected as
busybycheckPortInUse.