fix(analysis): analyzer validation checks source project success instead of test project success - #3391
Closed
rouke-broersma with Copilot wants to merge 2 commits into
Closed
fix(analysis): analyzer validation checks source project success instead of test project success#3391rouke-broersma with Copilot wants to merge 2 commits into
rouke-broersma with Copilot wants to merge 2 commits into
Conversation
…st projects The previous implementation incorrectly checked if test projects succeeded instead of checking if the mutable/target projects succeeded. This caused valid projects to be rejected when test projects failed to analyze but the source project succeeded. Changed the condition at line 112 from checking p.Value (test projects) to checking p.Key (mutable projects). Added two tests: - ShouldSucceedWhenTestProjectFailsButSourceProjectSucceeds: Verifies that when test project fails but source succeeds, no exception is thrown - ShouldThrowWhenSourceProjectFailsAnalysis: Verifies that when source project fails, an exception is thrown Co-authored-by: rouke-broersma <3595932+rouke-broersma@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix invalid analyzer results handling for mutation tests
Fix analyzer validation to check source project success instead of test project success
Jan 6, 2026
rouke-broersma
marked this pull request as ready for review
January 6, 2026 07:28
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical logic error in analyzer validation that incorrectly rejected source projects for mutation when test project analysis failed, even though the source projects succeeded. The fix changes the validation to check source project success status instead of test project success status, which aligns with the error message that was already reporting failed source projects.
Key Changes
- Changed the validation condition from checking test project success to checking source project success
- Updated test name to better reflect the new behavior
- Added comprehensive test coverage for both scenarios (test failure with source success, and source failure)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| InputFileResolver.cs | Fixed validation logic at line 112 to check !p.Key.Succeeded (source project) instead of p.Value.All(r => !r.Succeeded) (test projects) |
| InputFileResolverTests.cs | Renamed test from ShouldHandleFailedAnalysis to ShouldSucceedWhenTestProjectFailsButSourceProjectSucceeds and added new test ShouldThrowWhenSourceProjectFailsAnalysis for comprehensive coverage |
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.



The analyzer validation incorrectly rejected projects for mutation when test projects failed analysis, even though the source project succeeded.
Root Cause
findMutableAnalyzerResultsis aDictionary<IAnalyzerResult, List<IAnalyzerResult>>where:The validation at line 112 checked if test projects succeeded:
This conflicted with the error message which correctly reported the source projects as failed.
Changes
!p.Key.SucceededThe fix allows mutation testing when test project analysis fails but source project analysis succeeds, which is the common case for many valid projects.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.