Harden plugin host watch test startup wait - #2339
Merged
ymichael merged 1 commit intoAug 24, 2026
Merged
Conversation
ymichael
deleted the
bb/ci-flake-fix-plugin-host-watch-readiness-and-idl-thr_65ryz5fzcq
branch
August 24, 2026 16:58
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.
What was wrong
The
PluginHostManagernative-watch test launches a real plugin host worker, but it waited for host watch registration with Vitest's default one-second budget. Under scheduler and process contention, worker startup crossed that boundary before the watch could register. Test teardown then disposed the manager whilemanager.callwas still pending, so the worker rejected that call and Vitest reported a secondary unhandled rejection. That rejection is test-cleanup fallout, not evidence of a production watch-disposal defect.This matches the failure in PR #2337's unrelated CI run: readiness timed out at line 553, followed by the disposal rejection.
What changed
Give only the cross-process watch-registration wait an explicit five-second budget. The 20 ms idle timeout, 100 ms dwell, backpressure checks, disposal assertion, and all production behavior remain unchanged.
There are no host-daemon wire changes, so
HOST_DAEMON_PROTOCOL_VERSIONis unchanged. No CLI or documentation surfaces changed.How you verified
plugin-host-manager.test.ts: 19/19 passed.pnpm exec turbo run build --filter=@bb/host-daemonpnpm exec turbo run typecheck --filter=@bb/host-daemonpnpm exec turbo run test --filter=@bb/host-daemon --force: 44 files and 534 tests passed.