Don't let parallel per-file workers reuse their request's checker - #64513
Open
Mateusz Burzyński (Andarist) wants to merge 2 commits into
Open
Mateusz Burzyński (Andarist) wants to merge 2 commits into
Mateusz Burzyński (Andarist) wants to merge 2 commits into
Conversation
Contributor
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Copilot started reviewing on behalf of
Mateusz Burzyński (Andarist)
September 28, 2026 19:22
View session
Contributor
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Mateusz Burzyński (Andarist)
force-pushed
the
fix-64458-parallel-workers-share-checker
branch
from
September 29, 2026 07:00
14ff7e8 to
4be194f
Compare
This branch has not been deployed
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.
fixes a bunch of crashes reported in this issue, including this one: #64458 (comment)
This PR fixes a wrong context reuse (with request id) within a parallel work created within a request handler (mainly when triggering flaky diagnostic detection).
By keeping the request id on the context paralell workers were all able to work concurrently using the same checker and the checker's state isn't concurrent-safe. By stripping the request id from the context passed down to workers, we can avoid this hazard - each worker awaits the checker to become free.
It's worth noting that in tsc and the API, parallel workers are independent callers by default - because no request ID exists there. The language server is the only place a request ID exists, so it's the only place that needs to strip it away to get the same~ behavior.