Repository navigation
Preserve virtual task environments in TaskHosts - #15032
Merged
Merged
Conversation
Restrict startup reconciliation to documented Windows architecture variables so virtualized task environments, including coordinator grant IDs, survive task-host execution. Preserve legacy reconciliation behind the Wave 18.12 opt-out. Cover snapshot changes, host reuse, concurrent builds, cross-bitness execution, nested grants, and static-graph restore; document the corrected behavior. Fixes #14986 Co-authored-by: Copilot App <[email protected]>
…gwald-coordinator-restore-deadlock
…gwald-coordinator-restore-deadlock
…gwald-coordinator-restore-deadlock
…gwald-coordinator-restore-deadlock
…gwald-coordinator-restore-deadlock
…gwald-coordinator-restore-deadlock
…gwald-coordinator-restore-deadlock
Co-authored-by: Copilot App <[email protected]>
Replace overlapping BuildManagers, which MT strict mode now rejects, with concurrent project requests in a single build. Use enlightened setters followed by TaskHost readers to verify that distinct per-project environment values survive reconciliation without leaking into the parent process. Assert the execution PIDs to cover the in-process-to-TaskHost boundary directly. Co-authored-by: Copilot App <[email protected]>
rainersigwald
marked this pull request as ready for review
October 15, 2026 02:02
rainersigwald
temporarily deployed
to
copilot-pat-pool
October 15, 2026 02:02 — with
GitHub Actions
Inactive
rainersigwald
temporarily deployed
to
copilot-pat-pool
October 15, 2026 02:02 — with
GitHub Actions
Inactive
rainersigwald
temporarily deployed
to
copilot-pat-pool
October 15, 2026 02:03 — with
GitHub Actions
Inactive
rainersigwald
temporarily deployed
to
copilot-pat-pool
October 15, 2026 02:10 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-process environment changes need human sign-off, with post-merge validation and actual Unix execution still outstanding.
0 open findings
What changed in this PR
Preserves virtual task environments in TaskHosts to prevent the coordinator/static-graph restore deadlock described in #14986.
Changes:
- Limits reconciliation to Windows architecture variables, with legacy behavior available through the Wave 18.12 opt-out.
- Adds environment, host-reuse, cross-bitness, and coordinator regression coverage.
- Documents environment propagation and compatibility behavior.
| File | Description |
|---|---|
| src/MSBuild/TaskHostEnvironment.cs | Introduces scoped environment reconciliation. |
| src/MSBuild/OutOfProcTaskHostNode.cs | Applies the wave-gated reconciliation policy. |
| src/MSBuild/MSBuild.csproj | Includes the new helper. |
| src/MSBuild.UnitTests/TaskHostEnvironment_Tests.cs | Tests platform and legacy policies. |
| src/MSBuild.Coordinator.UnitTests/CoordinatorIntegration_Tests.cs | Covers nested grants and static-graph restore. |
| src/Build.UnitTests/BackEnd/TaskHostEnvironment_E2E_Tests.cs | Tests propagation, isolation, reuse, and cross-bitness execution. |
| documentation/wiki/ChangeWaves.md | Records Wave 18.12 behavior and opt-out risks. |
| documentation/specs/multithreading/taskhost-threading.md | Documents reconciliation and retained state. |
| documentation/MSBuild-Coordinator.md | Clarifies grant-token propagation and deadlock prevention. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
rainersigwald
temporarily deployed
to
copilot-pat-pool
October 15, 2026 02:11 — with
GitHub Actions
Inactive
rainersigwald
temporarily deployed
to
copilot-pat-pool
October 15, 2026 02:11 — with
GitHub Actions
Inactive
JanProvaznik
requested changes
Oct 15, 2026
JanProvaznik
left a comment
Member
There was a problem hiding this comment.
wrong changewave, and I'd tune down the tests a bit, strategy ok
Use Change Wave 18.13, trim redundant process-test combinations, and shorten coordinator documentation. Co-authored-by: Copilot App <[email protected]>
JanProvaznik
approved these changes
Oct 19, 2026
AR-May
approved these changes
Oct 19, 2026
Keep the change-wave check inside TaskHostEnvironment so the legacy branch and its gate can be retired together. Exercise the actual wave opt-out in policy tests and retain coverage for earlier-wave opt-outs. Update the coordinator and threading documentation to identify the correct wave. Co-authored-by: Copilot App <[email protected]>
Keep the upstream-focused process regressions and shortened documentation while retaining the helper-local Wave 18.13 check and its policy tests. Co-authored-by: Copilot App <[email protected]>
JanProvaznik
approved these changes
Oct 19, 2026
This was referenced Oct 20, 2026
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.
Related issue(s):
Fixes: #14986
copilot writes: