🤖 tests: isolate CoderOauthService catalog concurrency test from cross-file fetch-mock pollution - #4006
Merged
Merged
Conversation
Ignore catalog calls from stale test services so their post-login refreshes cannot participate in the current flow's concurrency gate. Run the file in an isolated CI process as defense in depth. --- _Generated with • Model: • Thinking: _ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=high -->
Contributor
Author
|
@codex review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Summary
Fixes the last remaining order-dependent unit test breaking merge-queue runs:
CoderOauthService > startDesktopFlow > fetches origin catalogs concurrently so a stalled origin cannot starve a healthy onefailed pr-4003's merge-group composition twice in a row while passing standalone. Same class as #4005's unit leg (shared bun process + unsortedfindfile order), different mechanism.Background
waitForDesktopFlow()resolves whencommitDesktopLogin()callsdesktopFlows.finish(), before the background task awaitsrefreshBridgeModels();dispose()only shuts down registered flows, so an already-finished flow's catalog retries survive the test. A 250ms retry then calls a LATER test'sglobalThis.fetchmock: the victim observed 4 catalog calls instead of 2, with stale Authorization tokens from three earlier tests in the same file (confirmed via temporary diagnostics; deterministic with a 300ms window).Implementation
/aibridge/requests whose Authorization is not its ownBearer at_concurrent, so stale services from earlier tests cannot release its gate or inflate its signal count.coderOauthService.test.tsinpr.yml'sisolated_unit_tests(same precedent asWorkspaceFooterBar.test.tsxfrom 🤖 tests: fix test-order pollution and review e2e race that block the merge queue #4005).Validation
make static-checkgreen locally.Risks
Test-only + CI quarantine entry; no production code changed.
Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh• Cost:$107.70