Skip to content

[Bug]: opensquilla config set port 65536 succeeds and persists an invalid TCP port. gateway start --json then waits for readiness and reports HEALTH_TIMEOUT; the real OverflowError is only visible in the log. #1539

Description

@shamoluotuo2027

OpenSquilla version or commit

0.5.4

Area

CLI

Reproduction steps

Use a disposable config and state directory:

opensquilla config set port 65536 --config .\invalid-port.toml
opensquilla gateway start --config .\invalid-port.toml --timeout 3 --json

Expected behavior

  • Reject configured and CLI port values outside the supported service range before persisting or spawning a process.
  • If an invalid value reaches startup, surface a stable configuration/bind error immediately instead of HEALTH_TIMEOUT.

Actual behavior

The config command exits 0 and persists port = 65536. Start returns:

{
  "ok": false,
  "state": "start_failed",
  "port": 65536,
  "code": "HEALTH_TIMEOUT",
  "message": "Gateway did not become ready before the timeout."
}

The Gateway log contains the actual cause:

OverflowError: bind(): port must be 0-65535.

The configuration model currently treats the port as an unconstrained integer.

Environment

windows 11

Diagnostic bundle and error reference

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas-linked-prAn open pull request is linked to this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions