GeezerVison is showing github.com — test(analyzers): raise compiler tooling coverage by ReubenBond · Pull Request #10894 · dotnet/orleans
Conversation
ReubenBond
commented
Aug 28, 2026
•
edited by dotnet-policy-service
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
- Tag analyzer tests with the canonical BVT, provider, and area traits.
- Add behavior-focused coverage for contract code-fix guards, CRLF preservation, and non-constant
ConfigureAwaitOptions expressions.
- Add direct resolver tests for aliases, nested/generic syntax, fallback indexing, metadata identity, ambiguity, cancellation, and proxy invariants.
- Make simple-name assembly ambiguity terminal and clear failed proxy results.
- Replace duplicated primitive-type switches with shared lookups and remove an unused resolver overload.
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.cs reaches 90.9% line / 85.7% branch coverage, while its primitive helper complexity drops from 80/72 to 10/1.
Part of #10857.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ConfigureAwaitOptions expression scenarios.
- Refactors
TypeSymbolResolver primitive-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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Code coverage
79.41% line coverage - 100,568 / 126,644 lines
Coverage details
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 29, 2026
This was referenced Sep 7, 2026
This was referenced Sep 9, 2026
This was referenced Sep 16, 2026
This was referenced Sep 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|