Repository navigation
fix(serve): report the decision server's bound port - #259
Draft
shubhamsinnh wants to merge 1 commit into
Draft
shubhamsinnh wants to merge 1 commit into
shubhamsinnh wants to merge 1 commit into
Conversation
The decision server accepted --port 0 but printed the requested port, so startup advertised :0 instead of the port the OS assigned. Read the bound port from the listener's local_addr() and use it in the advertised endpoints. The requested host text and all other serve behavior are unchanged. Validated with the GLiNER 2.5 Decide model: --port 0 advertised and listened on the same non-zero port; /health and /v1/decisions both answered on it. The LLM path is SDK-owned and still reports :0; this change does not claim to fix that path.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
The decision server accepted
--port 0but printed URLs containing:0, rather than the port assigned by the OS.Both advertised URLs now use the bound port from
listener.local_addr(). This fixes the decision server only; the LLM server still needs an SDK change to report its assigned port.With a real decision model, the reported non-zero port accepted connections, and both
/healthand/v1/decisionsreturned 200.CI and formatting pass. The local full suite had 565 passes and two Windows symlink-privilege failures. Strict Clippy reports four pre-existing lints in untouched files.
Summary by cubic
Fixes the decision server advertising
:0when started with--port 0. The server now reads the port the OS actually assigned fromlistener.local_addr()and advertises it in both the/v1/decisionsand/healthendpoints.:0because it's owned by the pinned SDK.Written for commit af8d94c. Summary will update on new commits.