Repository navigation
fix(gateway): honor custom ports for usage and stability queries - #126832
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 20, 2026 20:39
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 21, 2026
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where operators querying a custom-port Gateway through
gateway usage-costor livegateway stabilitywould silently contact the default Gateway instead, even when--portwas supplied before or after the nested command.Why This Change Was Made
Gateway command registration duplicated the canonical shared client-option set, omitted its local-port option on two RPC leaves, and dispatched those leaves through an authentication-only resolver. Reuse the existing shared Gateway client options for every applicable RPC command, delete redundant leaf option declarations, and route usage-cost plus live stability through the existing parent-aware local-port resolver. Offline stability bundles, support exports, managed service status, and discovery retain their distinct owners and existing behavior.
User Impact
Operators can reliably run
gateway --port 19001 usage-cost,gateway usage-cost --port 19001,gateway --port 19001 stability, andgateway stability --port 19001against the intended local Gateway. Explicit child ports override parent ports; conflicting--urland--portvalues fail visibly. Offline bundle inspection, diagnostics export, service-managed status targeting, authentication, JSON output, and command-specific timeouts remain unchanged.Evidence
localPortOverride.OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_FS_MODULE_CACHE=0 node scripts/run-vitest.mjs src/cli/gateway-cli/register.option-collisions.test.ts src/cli/gateway-cli.coverage.test.ts src/cli/daemon-cli/register-service-commands.test.ts --configLoader runner— 76 tests passed across three suites.--urlconflicts, existing call/health/suspend/resume RPC siblings, offline bundle reads, service-owned stability exports, distinct export timeout contracts, and managed Gateway service commands.86edb055437cfbb9adc0018a6ee655242e05636d.