Repository navigation
Conversation
ymichael
deleted the
bb/ci-flake-fix-desktop-preload-import-timeout-cont-thr_teg7bzhy4s
branch
August 24, 2026 22:48
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
preload-browser-api.test.tsreset Vitest's module registry and dynamically imported the preload inside every test body. Under contention, that import crossed the first test's 10-second timeout. Vitest reported the timeout but did not cancel the pending async body, so it resumed later and appended its 14 IPC sends to the sharedelectronMockafter the following zoom test had reset it. That produced the observed 16 calls instead of 2. The failing packages job and the successful same-SHA rerun show this is timing-dependent rather than a regression from PR #2346.What changed
Moved the per-test preload reset/import into a
beforeEachhook with a setup-specific 30-second timeout. Test command bodies now begin only after preload setup completes, so a slow transform cannot release stale commands into a later test. Module state is still reset for every test, and all production behavior and assertions are unchanged.How you verified
preload.tsby 10.5 seconds: the first test timed out at 10 seconds and the next test received 16 sends.pnpm exec vitest run --config vitest.config.ts test/preload-browser-api.test.ts— 5 tests passed.pnpm exec turbo run test typecheck build lint --filter=@bb/desktop --force— 15/15 Turbo tasks passed; desktop test suite 35 files / 230 tests passed.