fix(ssh-tunnel): pass host to ensurePortAvailable for correct address-family check#94897
fix(ssh-tunnel): pass host to ensurePortAvailable for correct address-family check#94897zhangqueping wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the PR targets a real SSH tunnel bug, but its fix binds the local preflight to the remote SSH hostname, while the stronger open sibling uses loopback, handles the fallback error path, and has better proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this branch and keep maintainer review focused on #94607 as the canonical SSH tunnel fix path. So I’m closing this here and keeping the remaining discussion on #94607. Review detailsBest possible solution: Close this branch and keep maintainer review focused on #94607 as the canonical SSH tunnel fix path. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the PR passes the remote SSH target host to a helper that binds a local listener, while the SSH tunnel itself uses Is this the best way to solve the issue? No. The narrow maintainable fix is to probe Security review: Security review cleared: The diff only changes a local SSH tunnel port-preflight argument and does not add a concrete security or supply-chain concern. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against bf872b30cda2. |
Real behavior proofTest command: Result: The fix passes |
- ensurePortAvailable was called without the host parameter, defaulting to "localhost" which can miss IPv4-only occupants on dual-stack hosts - Pass parsed.host to ensurePortAvailable to match the expected address family for port availability checks Fixes openclaw#94596
f73b5e5 to
dd44ca0
Compare
|
Superseded by #94607, landed as 583829a. The landed fix probes the actual local loopback listener rather than the parsed remote SSH host, handles the domain |
Summary
startSshPortForwardcalledensurePortAvailable(localPort)without thehostparameter, defaulting to"localhost"which can miss IPv4-only occupants on dual-stack hosts when the SSH target resolves to an IPv4 address.Pass
parsed.hosttoensurePortAvailableso the port availability check uses the correct address family.Fixes #94596
Tests and validation
$ node scripts/run-vitest.mjs src/infra/ssh-tunnel.test.ts Test Files 1 passed (1) Tests 3 passed (3)