fix(gateway): validate TCP port range - #1540
Open
Elioooon wants to merge 1 commit into
Open
Conversation
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.
Scope
Scope boundary: Validate persisted gateway ports and gateway CLI
--portoverrides before persistence or process startup.Non-goals: Change valid-port lifecycle behavior or replace the existing readiness/error model.
Branch
Base branch: main
Target exception: N/A
Issue
Linked issue: Fixes #1539
Release Note
Release note: Reject gateway ports outside 0-65535 before saving configuration or starting a process.
Tests
Ruff:
uv run ruff check src tests(passed)Pytest:
uv run pytest -q tests/test_cli/test_config_set_key_validation.py tests/test_cli/test_gateway_cmd.py(84 passed)Build:
npm --prefix opensquilla-webui run buildanduv build --wheel(passed)Regression tests: added
Notes: The full
uv run pytest -qreached 1,529 passed and 61 skipped before hitting the pre-existingtests/test_ci/test_migrations_packaged.py::test_usage_query_client_source_is_part_of_webui_build_inputsfailure. The same assertion fails on a detached, unmodifiedorigin/mainworktree becauseuseUsageQuery.tsno longer contains the expectedUSAGE_QUERY_METHODconstant.The default test path remains offline, deterministic, credential-free, and safe for forks.
Maintainer Live Check
Maintainer live check: no
Surface: gateway
Maintainer-only note: contributors are not expected to provide secrets or run credentialed live checks. Maintainers may run
Live Release E2Efor provider, browser, gateway, channel, or release smoke coverage.Safety
No secrets, local-only artifacts, private prompts/transcripts, channel identifiers, AI session artifacts, non-public fixtures, or
tests/_private/contents are included.Third-Party Origin
Third-party origin: none
Details if non-none: N/A
Documentation Changes