test(analyzers): raise compiler tooling coverage - #10894
Merged
ReubenBond merged 4 commits intoAug 28, 2026
Merged
Conversation
6 tasks
11 tasks
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Lite
Findings: None
What changed in this PR
This PR increases test coverage for Orleans compiler tooling (analyzers/code fixes and code generator type resolution) while also tightening TypeSymbolResolver behavior around assembly-name ambiguity and proxy-interface validation.
Changes:
- Adds a comprehensive new test suite for
TypeSymbolResolver, covering metadata identity resolution, fallback behavior, ambiguity handling, and cancellation. - Expands analyzer/code-fix tests to cover code-fix registration guards, CRLF preservation, and additional
ConfigureAwaitOptionsexpression scenarios. - Refactors
TypeSymbolResolverprimitive-type handling via shared lookup tables and removes an unused overload; makes simple-name assembly ambiguity terminal and clears failed proxy results.
| File | Description |
|---|---|
| test/Orleans.CodeGenerator.Tests/TypeSymbolResolverTests.cs | New direct unit tests covering TypeSymbolResolver high-complexity and edge-case paths. |
| test/Orleans.Analyzers.Tests/GrainInterfaceVersionAnalyzerTest.cs | Adds tests for code-fix guard behavior and CRLF-preserving contract file updates. |
| test/Orleans.Analyzers.Tests/ConfigureAwaitAnalyzerTest.cs | Adds diagnostic/no-diagnostic coverage for non-constant and partially-known ConfigureAwaitOptions expressions. |
| test/Orleans.Analyzers.Tests/AssemblyInfo.cs | Adds canonical test suite/provider/area traits so analyzer tests participate in the intended CI lanes. |
| src/Orleans.CodeGenerator/TypeSymbolResolver.cs | Refines assembly/type resolution semantics, proxy resolution output behavior, and consolidates primitive-type mappings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Code coverage79.41% line coverage - 100,568 / 126,644 lines Coverage details
|
This was referenced Aug 29, 2026
Merged
This was referenced Sep 7, 2026
This was referenced Sep 9, 2026
Closed
Closed
This was referenced Sep 16, 2026
Open
Merged
Merged
This was referenced Sep 23, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
Compiler-tooling coverage misses substantial analyzer/code-fix behavior and leaves
TypeSymbolResolver's highest-complexity paths largely unverified. The analyzer project also lacks first-class CI traits, so its existing contract-version suite does not participate in the canonical coverage selection.Solution
ConfigureAwaitOptionsexpressions.Rationale
The three named hotspot files move from 14.8% line / 3.9% branch coverage to 86.3% line / 77.7% branch coverage, with CRAP>30 methods reduced from 23 to 6.
TypeSymbolResolver.csreaches 90.9% line / 85.7% branch coverage, while its primitive helper complexity drops from 80/72 to 10/1.Part of #10857.
Microsoft Reviewers: Open in CodeFlow