Repository navigation
Fix request-order flake in GitHub PR batching tests - #6471
Merged
Merged
Conversation
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.
Human comments
What was wrong
The GitHub PR batching tests returned canned GraphQL data for aliases p0/p1, assuming credential-file reads always completed in request order. They can complete in either order. When PR 2 is enqueued first, the fake incorrectly attaches PR 1's success to p0 and its error to PR 1's actual alias p1. This produced the
expected found, got unavailablefailure in CI 40688135091.What changed
The fake gh command now supports responses keyed by PR URL and uses the aliases in the actual GraphQL document. URL-batching fixtures use this mode; existing fixed responses remain for other test scenarios. The partial-error test runs with both request orders, and the 26-PR cap test verifies every returned PR number, including the second document.
Only tests and their fake-gh helper change. Production batching, credential handling, deadlines and retry behavior are unchanged. The existing direct API, real subprocess boundary, deduplication and batch-count assertions remain.
How you verified
pnpm exec turbo run test --filter=bb-plugin-bb--github-pr-status: 180 tests pass across all 10 files.pnpm exec turbo run lint typecheck --filter=bb-plugin-bb--github-pr-status: passes, zero lint warnings/errors.3743b49573, including the Windows plugin shard, without a rerun.This fixes the observed alias-order fixture defect; it does not claim to resolve the separate profiler worker exits or Windows load-related timeouts found during the flake sweep.