Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 12, 2026, 5:42 AM ET / 09:42 UTC. Summary PR surface: Source +84, Tests +154, Docs +4. Total +242 across 9 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against d4819948f37d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +84, Tests +154, Docs +4. Total +242 across 9 files. View PR surface stats
What I checked:
Likely related people:
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. How this review workflow works
|
a8e6bec to
ddc12ac
Compare
|
Thanks — addressed all three review points:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review I pushed commit
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review I pushed commit
Validation: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
`gateway run --port` accepts a port, but the adjacent query subcommands `gateway health` and `gateway probe` rejected the same flag, so scripts targeting a non-default local port had to hand-build a WebSocket URL (and then also pass --token/--password, since --url disables config credential fallback). Accept `--port` on the gateway query commands in both spellings — before the subcommand (`gateway --port 18789 health`, inherited from the parent) and after it (`gateway health --port 18789`, the spelling the issue reports) — by patching `config.gateway.port` rather than synthesizing a ws:// URL, so configured local auth and the TLS scheme (ws:// vs wss://) are preserved: - gatewayCallOpts gains a --port option (covers health, call, usage-cost, stability) and resolveGatewayRpcOptions still inherits the parent --port - callGatewayCli loads the real config and overrides only gateway.port - gateway probe gains its own --port and passes a numeric port to gatewayStatusCommand, which patches config.gateway.port before resolveTargets derives the scheme Invalid ports are rejected via the shared strict parsePort. Fixes openclaw#79100 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
6a8196b to
93e0ead
Compare
|
Closing to keep my queue focused — this one was flagged off-meta + compatibility-risk and hasn't drawn maintainer interest. Happy to revisit if the gateway |
Summary
gateway run --port 18789accepts--port, but the adjacent query subcommands rejected the same flag:openclaw gateway health --port 18789->error: unknown option '--port'openclaw gateway probe --port 18789->error: unknown option '--port'So scripts that start a gateway on a controlled local port could not target it through
health/probewith the same visible flag shape asrun, and the--urlworkaround disables config credential fallback (forcing explicit--token/--password).Fix
Accept
--porton the gateway query commands in both spellings: before the subcommand (gateway --port 18789 health, inherited from the parent) and after it (gateway health --port 18789, the exact spelling the issue reports).gatewayCallOptsaccepts--port, sohealth,call,usage-cost, andstabilityaccept the flag after the subcommand.resolveGatewayRpcOptionsstill inherits the parent--portfor the before-subcommand spelling.callGatewayCliloads the real config and overrides onlygateway.port, then marks that explicit CLI port as preferred soOPENCLAW_GATEWAY_PORTcannot silently retarget the request.gateway probepasses a numericporttogatewayStatusCommand; target/network-hint resolution ignoresOPENCLAW_GATEWAY_PORTonly for that explicit-port path, while preserving the normal env-over-config behavior when--portis omitted.ws://URL.Fixes #79100
Real behavior proof
Behavior addressed:
openclaw gateway health --port <N>andopenclaw gateway probe --port <N>should accept the subcommand-position port flag and connect to a real gateway on that non-default local port. WhenOPENCLAW_GATEWAY_PORTis also set to a different port, the explicit CLI--portmust win.Real environment tested: Local Linux source checkout on commit
09ae914c7c, using an isolated temporary OpenClaw home/config under/media/vdc/0668001470/workSpace/claw-campaign/.proof-89623/env-port-precedence-dist-1780485149, a realgateway runprocess listening on loopback port19323, and the builtnode dist/entry.jsCLI entry for the client commands. The temporary config wasgateway.mode=local,gateway.bind=loopback, andgateway.auth.mode=none;OPENCLAW_SKIP_CHANNELS=1/OPENCLAW_SKIP_PROVIDERS=1only skipped external channel sidecars.Exact steps or command run after this patch:
Evidence after fix:
Gateway startup reached the real listener on port
19323:With
OPENCLAW_GATEWAY_PORT=19001, the subcommand-position health command still returned a real gateway health payload for the explicit--port 19323target:With the same conflicting environment variable, the probe command targeted
19323, not19001:The probe was marked degraded because one follow-up read diagnostic timed out under an 8s probe timeout, but the connection and target-selection evidence is the behavior under test: both
network.localLoopbackUrland the target URL arews://127.0.0.1:19323whileOPENCLAW_GATEWAY_PORT=19001was set.Focused tests also cover the env-precedence regression:
Observed result after fix: Both
gateway health --port 19323andgateway probe --port 19323accepted the port after the subcommand. In a conflicting environment withOPENCLAW_GATEWAY_PORT=19001,healthreturnedok: trueandprobereportednetwork.localLoopbackUrlplus the local target URL asws://127.0.0.1:19323, proving the explicit CLI port wins for both RPC calls and probe/status target resolution.What was not tested: TLS (
wss://) and token/password auth variants were not live-tested in this proof; focused tests cover that the implementation preserves config-based auth/TLS selection by patchingconfig.gateway.portinstead of forcing a--urloverride. The normal env-over-config behavior when--portis omitted remains covered by existing config/daemon tests and the newbuildGatewayConnectionDetailsregression test.