Skip to content

fix(cli): honor configured gateway port#188

Open
MicroMilo wants to merge 1 commit into
OpenBMB:mainfrom
MicroMilo:codex/honor-configured-gateway-port
Open

fix(cli): honor configured gateway port#188
MicroMilo wants to merge 1 commit into
OpenBMB:mainfrom
MicroMilo:codex/honor-configured-gateway-port

Conversation

@MicroMilo

Copy link
Copy Markdown

Summary

  • use gateway.port from the loaded config snapshot when no CLI --port or PILOTDECK_GATEWAY_PORT is provided
  • preserve existing precedence: CLI flag, environment variable, config, default 18789

Verification

  • npm exec -- tsc --noEmit -p tsconfig.json

Notes

This is a real config/runtime mismatch: gateway.port was parsed into the config snapshot but the server startup path ignored it.

@MicroMilo

Copy link
Copy Markdown
Author

Validation note:

This PR fixes a real config/runtime mismatch.

gateway.port is already part of the parsed config snapshot, but the previous server startup path did not consume it. Startup only respected the CLI port, PILOTDECK_GATEWAY_PORT, or the hardcoded default 18789. Therefore, a configured gateway.port value was accepted by config parsing but ignored by the actual gateway startup path.

This PR updates the startup precedence to:

CLI --port > PILOTDECK_GATEWAY_PORT > gateway.port > 18789

Validation command currently listed by this PR:

npm exec -- tsc --noEmit -p tsconfig.json

The behavior change is clear, but the validation should be strengthened. A small unit test around port resolution would make this PR much easier to review. It should cover:

  • CLI port wins over all other sources;
  • environment port wins over config;
  • gateway.port is used when CLI/env are absent;
  • 18789 is used when no source provides a port.

This would turn the precedence rule into executable self-validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant