Repository navigation
fix(setup): remove post-install gateway port ownership heuristic - #1334
Elliot-Construct wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 5, 2026, 9:41 AM ET / 13:41 UTC. ClawSweeper reviewWhat this changesRemoves setup’s process-name-based gateway port check and adds a regression test so startup proceeds through the existing service-start and health-check path. Merge readiness⛔ Blocked before merge - 4 items remain This remains a useful, focused fix: the faulty check is present on main and in the latest release, while the related earlier PR closed unmerged. No definite introduced code defect was found, but the submitted evidence does not establish real Windows/WSL behavior. Priority: P0 Review scores
Verification
How this fits togetherWindows setup installs the gateway service inside WSL, starts it, and checks HTTP readiness before pairing the operator and node. Initial port availability and credential endpoint authorization have separate checks. flowchart TD
A[Setup configuration] --> B[Initial port availability check]
B --> C[Install gateway service in WSL]
C --> D[Start gateway service]
D --> E{Startup and health succeed?}
E -->|Yes| F[Verify endpoint and pair]
E -->|No| G[Report failure and roll back]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the managed service lifecycle with proven fresh and existing-service behavior, genuine-conflict detection, and actionable in-app recovery for startup failures. Do we have a high-confidence way to reproduce the issue? Yes, from source: a matching listener line without openclaw causes main to reject startup before invoking the gateway CLI. No live reproduction was executed during this read-only review. Is this the best way to solve the issue? Yes, provisionally: using the existing service lifecycle is narrower than expanding the process-name allowlist, provided real setup evidence confirms already-running services and genuine conflicts behave correctly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 305bb4ef5334. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Also I was messaging one of the maintainers in the contributor channel in discord and all of a sudden I got kicked out of the server? Not sure why? I was specifically answering questions he had. @ngutman |
|
Closing as superseded. #1349 preserved the diagnosis and replaced this PR's removal of ownership verification with a safer PID-based service ownership check. #1349 has now been superseded by #1382, which transplants that fix onto current main with strengthened diagnostics, coverage, and real setup E2E proof. |
Summary
Remove the post-install
ss -tlnpprocess-name ownership heuristic fromStartGatewayStep.openclaw gateway install --forcecan already start/restart the managed gateway service. The subsequent start step should therefore use the idempotentopenclaw gateway startpath and existing health polling instead of rejecting a listener purely becausessdoes not expose a process name.This avoids false
Port 18789 is already in use by another processfailures when the listener is the gateway service just installed by setup.Regression
The first commit intentionally adds a failing regression test only. It asserts that normal startup does not run the
ss -tlnpownership probe and still invokesopenclaw gateway startfollowed by health checking.Intended lifecycle
install -> gateway start -> health checkThis supersedes the narrower process-name workaround discussed in #547, because
ssmay exposenode,openclaw, or no process identity at all.