Repository navigation
Fix BuildCheck registration crashes in solution and graph evaluation - #15576
Merged
baronfel merged 1 commit intoNov 17, 2026
Merged
Conversation
MattKotsenas
temporarily deployed
to
copilot-pat-pool
November 16, 2026 23:05 — with
GitHub Actions
Inactive
MattKotsenas
temporarily deployed
to
copilot-pat-pool
November 16, 2026 23:05 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The full Release test run reports 111 failures without an unchanged-source comparison, requiring human validation to determine whether they predate the build-infrastructure behavior change.
No open issues 🎉
What changed in this PR
Fixes #15548 by allowing the central BuildCheck logger to consume custom-check registrations during solution evaluation and graph construction, preventing recursive event routing before execution starts.
Changes:
- Use the
EventArgsdata-source role to determine whether to consume acquisitions locally or forward them. - Add four regression cases covering custom-check execution and forwarding, with build execution enabled and disabled.
- Shut down the test manager and logging service after each test.
| File | Description |
|---|---|
src/BuildCheck.UnitTests/BuildCheckManagerProviderTests.cs |
Adds acquisition and forwarding regression tests, plus cleanup. |
src/Build/BuildCheck/Infrastructure/BuildCheckManagerProvider.cs |
Consumes acquisitions based on the EventArgs role rather than execution state. |
Review effort: Balanced
baronfel
approved these changes
Nov 17, 2026
This was referenced Nov 18, 2026
This branch was previously 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 #15548.
Context
Custom BuildCheck registration can reach the central logger before build execution starts, including
during solution evaluation and graph construction. The acquisition handler uses
IsInProcNode, whichrequires both event and execution data sources to be enabled. Before execution starts, the central
logger forwards the acquisition event back into its own logging path, causing recursive routing and
a stack overflow.
Changes Made
EventArgsdata-source role to consume acquisitions in the central logger andreplay, including before build execution starts. Workers without that role continue forwarding.
forwarding preserves the acquisition paths and event context when
EventArgsis disabled.Compatibility
No public API, event serialization, configuration format, or default changes. Existing acquisition
during build execution and worker-to-central forwarding are preserved.
Testing
Release BuildPack succeeded. Windows
net11.0BuildCheck tests passed (268/268, including four addedcases), and 12 patched-CLI controls passed, covering solution registration, project/solution graph
builds, and out-of-process forwarding. The full repository Release run completed with 111 failures;
no unchanged-source comparison was completed.