Skip to content

fix(gateway): accept --port for health and probe - #95181

Closed
arkyu2077 wants to merge 1 commit into
openclaw:mainfrom
arkyu2077:fix/issue-79100
Closed

arkyu2077 wants to merge 1 commit into
openclaw:mainfrom
arkyu2077:fix/issue-79100

Conversation

@arkyu2077

Copy link
Copy Markdown
Contributor

Summary

Allow gateway health and gateway probe to accept the same --port override already supported by gateway run, so loopback checks can target non-default gateway ports.

Changes

  • add --port support to gateway health command registration
  • thread the parsed port override through gateway probe target resolution and remote port inference
  • extend CLI coverage for the new flag on health/probe paths

Testing

  • ./node_modules/.bin/vitest run --config test/vitest/vitest.cli.config.ts src/cli/gateway-cli/register.option-collisions.test.ts --reporter=dot

Fixes #79100

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes commands Command implementations size: S triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jun 20, 2026
@clawsweeper

clawsweeper Bot commented Jun 20, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: the same gateway health/probe port behavior already landed on current main through the merged canonical PR, with broader wiring, docs, tests, and live proof than this conflicting branch.

Root-cause cluster
Relationship: superseded
Canonical: #94687
Summary: This PR is a later duplicate/superseded implementation attempt for the same gateway health/probe --port issue now fixed by the merged canonical PR.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Keep the merged current-main implementation from #94687 and close this superseded branch.

So I’m closing this here and keeping the remaining discussion on #94687.

Review details

Best possible solution:

Keep the merged current-main implementation from #94687 and close this superseded branch.

Do we have a high-confidence way to reproduce the issue?

No current-main failure remains. The linked report was release/source reproducible, but current main now registers and tests gateway health --port and gateway probe --port.

Is this the best way to solve the issue?

No. This branch is no longer the best fix because #94687 already merged a broader implementation with docs, tests, diagnostics wiring, and live proof.

Security review:

Security review cleared: The diff touches CLI option registration, gateway status option plumbing, and tests only; it adds no dependency, workflow, lockfile, secret, permission, package, or third-party execution surface.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: Root AGENTS.md was read fully; its duplicate/supersession, PR proof, CLI compatibility, and full-surface review guidance affected this decision. No scoped AGENTS.md owns the touched src/cli or src/commands paths, and the only maintainer note found was Telegram-specific. (AGENTS.md:1, d1b917120a47)
  • Current main implements health/probe port support: Current main registers gateway health --port, resolves that port into local gateway config and localPortOverride, registers gateway probe --port, and passes the option into gatewayStatusCommand. (src/cli/gateway-cli/register.ts:597, d1b917120a47)
  • Current main threads the port through status targeting: gatewayStatusCommand parses the port override and uses it for target resolution, network hints, and SSH remote-port inference, which is broader than this PR's status wiring. (src/commands/gateway-status.ts:60, d1b917120a47)
  • Current main documents the shipped user contract: Docs now show openclaw gateway health --port 18789 and openclaw gateway probe --port 18789, including the config/env precedence behavior for each command. Public docs: docs/cli/gateway.md. (docs/cli/gateway.md:168, d1b917120a47)
  • Regression coverage exists on current main: Current tests cover child and parent --port spellings for health/probe, health auth diagnostics receiving the selected port, and status helpers using local port overrides for targets and network hints. (src/cli/gateway-cli/register.option-collisions.test.ts:199, d1b917120a47)
  • Canonical PR merged: Live GitHub data shows fix(gateway): accept port for health and probe #94687 merged on 2026-06-22 with merge commit 8e4213b, closed the same linked issue, and included live CLI proof against a real loopback gateway. (8e4213b1c418)

Likely related people:

  • BryanTegomoh: Authored the merged canonical PR that implemented the same gateway health/probe --port behavior and supplied live CLI proof. (role: canonical merged fix author; confidence: high; commits: 8e4213b1c418, 2c91dba836a7; files: src/cli/gateway-cli/register.ts, src/commands/gateway-status.ts, src/commands/gateway-status/helpers.ts)
  • vincentkoc: Live PR discussion shows this member armed the canonical fix path and Clownfish/ClawSweeper repair loop before the PR merged. (role: automation sponsor and recent reviewer; confidence: medium; files: src/cli/gateway-cli/register.ts, src/commands/gateway-status.ts, src/gateway/call.ts)
  • lin-hongkuan: Current checkout blame on the relevant gateway CLI/status lines points to a broad later snapshot commit, so this is a weak routing signal rather than the original feature provenance. (role: current-line history signal; confidence: low; commits: 67118d5ab912; files: src/cli/gateway-cli/register.ts, src/commands/gateway-status.ts, src/commands/gateway-status/helpers.ts)

Codex review notes: model internal, reasoning high; reviewed against d1b917120a47; fix evidence: commit 8e4213b1c418, main fix timestamp 2026-06-22T14:00:57+08:00.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 20, 2026
@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@arkyu2077 thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

@steipete steipete closed this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gateway health/probe reject --port while gateway run accepts it

2 participants