Skip to content

api: wait for readiness before testing cancellation - #7368

Draft
Flo4604 wants to merge 1 commit into
deps/exhaustruct-v5from
deps/combined-verified
Draft

api: wait for readiness before testing cancellation#7368
Flo4604 wants to merge 1 commit into
deps/exhaustruct-v5from
deps/combined-verified

Conversation

@Flo4604

@Flo4604 Flo4604 commented Sep 9, 2026

Copy link
Copy Markdown
Member

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-base is 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 current main and retarget bottom PR #7353 to main; 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.
  • Tagged control-plane suite: 25 passed.

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.

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
Flo4604 added this pull request to stack #7369 September 9, 2026 08:42
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dashboard Ready Ready Preview Sep 9, 2026 9:10am UTC
design Ready Ready Preview Sep 9, 2026 9:10am UTC

Request Review

@Flo4604 Flo4604 changed the title api: await readiness before testing cancellation api: wait for readiness before testing cancellation Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant