api: wait for readiness before testing cancellation - #7368
Draft
Flo4604 wants to merge 1 commit into
Draft
Conversation
Cold schema validation exceeds the fixture polling budget under the race detector. Wait on a bounded request to the already-bound listener before cancelling. Preserve the 90-second shutdown deadline and stopped-server assertion, and cancel on setup failure. Amp-Thread-ID: https://ampcode.com/threads/T-01a08089-bc34-7278-9e04-d691e62b07f9 Co-authored-by: Amp <amp@ampcode.com>
Flo4604
added this pull request to stack #7369
September 9, 2026 08:42
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.
Problem:
Cold schema validation exceeded the cancellation test's 10-second setup polling budget under the race detector, before cancellation was exercised.
Solution:
Wait on a bounded readiness request to the already-bound listener and cancel the context on setup failure.
Impact:
The readiness request has a 60-second timeout. The original 90-second shutdown bound and stopped-server assertion remain unchanged. Production startup and shutdown behavior are unchanged.
Draft stack prerequisites: #7330 and #7320 through #7326.
deps/integration-baseis a merge-only review anchor, not implementation work to merge separately. Do not merge this stack into that anchor. After both prerequisites land, rebase the dependency stack onto currentmainand retarget bottom PR #7353 tomain; keep later PRs based on the preceding layer. Existing prerequisite PRs are unchanged.Testing:
The API package passed 36 normal tests and 36 race tests. Final combined verification then passed all 303 suites in both modes.
Final combined compatible stack (not an independent run of every intermediate PR):
mise run test --concurrency=4: 303 suites, 24,506 passed, zero failed, 7,875 ignored; 186 cached.GOFLAGS=-race mise run test --concurrency=4: 303 suites, 24,506 passed, zero failed, 7,875 ignored; 279 cached.mise run build: passed; lint reported zero issues.Full normal and race runs used separate test-container scopes. The race run resumed after fixing the cancellation fixture. An earlier analytics-count timeout did not recur; its cause remains unconfirmed. These are local verification results, not a claim that draft CI ran or passed.