Repository navigation
fix: reject failed mock server startup - #137
Open
qinyingran-TT wants to merge 1 commit into
Open
qinyingran-TT wants to merge 1 commit into
qinyingran-TT wants to merge 1 commit into
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.
Description
AgentProfileServer.start()andMockWebhookServer.start()treat any HTTP 200 from the configured port's/healthzendpoint as a successful start. If another healthy service already owns that port, Uvicorn fails to bind and its thread exits, butstart()can still return successfully. The suite then runs without the intended agent profile server or webhook receiver.Require this Uvicorn instance to have started before accepting the health response. Stop polling when its thread exits, and stop the instance before raising the existing startup error after polling fails. Successful startup, profile routes, webhook capture and retry responses remain unchanged.
Five regression tests cover both servers: a healthy response before startup, a terminated thread, successful start and stop, connection failure, and a non-200 health response. The module is registered in the runner's
commonsuite so--suite=allruns it.Type of change
Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
N/A.
Is this a Breaking Change or Removal?
Not applicable: no protocol, schema, public API, file or field removal.
!to my PR title (e.g.,feat!: remove field).Breaking Changes / Removal Justification
Not applicable. This changes the failure path of local mock server startup.
Checklist
!for breaking changes).transitionannotation rather than changing field visibility or removing a field directly.Documentation, schema transitions and model generation are not applicable: no documented interface, schema or model changes. Applicable file-level checks pass; the aggregate pre-commit invocation cannot install the pinned Prettier environment, as noted below.
Repository checklist
No documentation or downstream dependency changes are required.
Pull Request Title
fix: reject failed mock server startupScreenshots / Logs (if applicable)
started=Falseand a terminated thread; the fix raises the existingRuntimeError. The occupying listener remains healthy.ucp-conformanceentry point is preserved.git diff --check, and all applicable pinned file-level pre-commit hooks pass.tiny-levenshtein@^1.1.0is unavailable. That hook matches JSON, Markdown and YAML; this change contains only Python files. Local containerized Super-Linter was not run because no Docker daemon or Podman is available.0.0.0.0listeners and a false positive on the runner'sallselector. No new findings or suppression comments.