Skip to content

test(sdk): wait for configured providers - #46614

Closed
kitlangton wants to merge 1 commit into
v2from
sdk-provider-readiness
Closed

test(sdk): wait for configured providers#46614
kitlangton wants to merge 1 commit into
v2from
sdk-provider-readiness

Conversation

@kitlangton

@kitlangton kitlangton commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Why

Existing SDK generation and websearch tests assume catalog operations wait for plugin initialization. Upstream made these operations nonblocking, so the old forced supervisor gate and immediate query can fail before the configured provider is available.

What Changes

The two generation cases wait for their exact enabled inline model, then still assert explicit/default selection, the generated response, and exactly one model request. The websearch case waits for its provider in the same Location before asserting the query result.

Remove the obsolete supervisor gate rather than restoring blocking production behavior. Readiness waits are bounded and observe actual provider inventory, not a fixed sleep.

Scope

Test-only adaptation extracted from #46496, following the same nonblocking-catalog change addressed for Server fixtures in #46567. This does not depend on session-selected SDK instances or strict Core activation waits.

The former shared build prerequisite landed independently in 43d09b9d75; this PR now targets v2 directly.

Verification

Using Bun 1.4.0, from packages/sdk:

# Run the focused command five times with fresh test homes
bun run ../core/script/test.ts --timeout 5000 ./test/embedded.test.ts --test-name-pattern '^(generate\.text uses inline providers with (explicit|default) model selection|embedded client exposes plugin-backed web search)$'
bun run ../core/script/test.ts --timeout 5000 ./test
bun typecheck

All three affected cases failed at runtime before the change. Afterward they passed 15/15 repeated runs. Full SDK suite: 25 passed, 1 failed. The failure is the unchanged cancellation assertion at test/promise.test.ts:73: the aborted iterator completes instead of rejecting with ClientError/Transport. That assertion was also reproduced before these edits.

These results were reproduced after rebasing onto v2 at e2e82f18e2. SDK typechecking and diff checks passed; range-diff confirms that the fixture patch is unchanged by the rebase. The normal pre-push workspace typecheck passed all 33 tasks.

At the rebased head, run 33550743501 passed Windows CI and the Linux unit suites. Linux failed only the generated-documentation check: the website OpenAPI copies in base v2 omit the diagnostic ref added in #46594. This test-only PR does not change those documents or their generator inputs.

@kitlangton
kitlangton force-pushed the sdk-provider-readiness branch from 7cc7462 to b11674c Compare September 1, 2026 15:44
@kitlangton
kitlangton changed the base branch from activation-check to v2 September 1, 2026 15:46
@kitlangton
kitlangton force-pushed the sdk-provider-readiness branch from b11674c to b177cde Compare September 1, 2026 19:39
@kitlangton

Copy link
Copy Markdown
Contributor Author

Superseded: #46639 rewrote the same generate/websearch tests to wait for the configured provider, so this adaptation is no longer needed.

@kitlangton kitlangton closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant