[quality-improver] AOTSG0001–AOTSG0005 (AOT reflection source generator) diagnostics have no HelpLinkUri, unlike MSTEST0xxx rules
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 40/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp, markdown
- Domain
- documentation, tooling
Research direction
Start in src/Analyzers/MSTest.SourceGeneration/Diagnostics/DiagnosticDescriptors.cs, where the five AOTSG new DiagnosticDescriptor(...) calls omit helpLinkUri, and compare with DiagnosticDescriptorHelper.Create in src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticDescriptorHelper.cs. The docs destination must be decided first (Task 1), so ask maintainers before editing. Done means all five descriptors have a working helpLinkUri, a doc page exists for AOTSG0001–AOTSG0005, and docs/glossary.md has an entry.
Written by the indexing model from the issue text.
Description
🎯 Repository Quality Improvement Report — AOT Source-Generator Diagnostic Documentation Parity
Analysis Date: 2026-10-13
Focus Area: aotsg-diagnostic-documentation-parity (custom)
Strategy Type: Custom
Executive Summary
MSTest.SourceGeneration ships five AOT-reflection diagnostics — AOTSG0001...AOTSG0005 — that fire when the source generator encounters a [TestClass] shape it cannot materialize (static class, open generic, inaccessible type, generic method, by-ref parameter). Unlike every MSTEST0xxx analyzer rule, which goes through DiagnosticDescriptorHelper.Create and automatically gets a helpLinkUri of (learn.microsoft.com/redacted), the five AOTSGdescriptors insrc/Analyzers/MSTest.SourceGeneration/Diagnostics/DiagnosticDescriptors.csare constructed directly vianew DiagnosticDescriptor(...)without ahelpLinkUriargument at all. EveryDiagnosticDescriptorin that file therefore hasHelpLinkUri == null`.
This means a developer who hits, say, AOTSG0003: InaccessibleTestClass in an IDE or build log has no click-through documentation link — the one discoverability affordance every other first-party MSTest/analyzer diagnostic in this repo provides. The gap is structural (no helper reused) rather than an oversight on a single rule, so all five IDs are affected identically.
Three concrete, independently fixable gaps were found:
- None of the five
AOTSGdescriptors sethelpLinkUri. - There is no
docs/page (or glossary entry) describing theAOTSGrule category at all, so even if ahelpLinkUriwere added it would 404 against the existingmstest-analyzersdoc tree, which only coversMSTEST0xxxIDs. docs/glossary.mdhas no entry for "AOT reflection source generator" /AOTSG, even though the glossary tracks other MTP/MSTest-specific terms likeAzureFoundry,AssemblyFixtureProviderAttribute, etc.
Full Analysis Report
Focus Area: AOT Source-Generator Diagnostic Documentation Parity
Current State Assessment
Metrics Collected:
| Metric | Value | Status |
|---|---|---|
AOTSG descriptors defined |
5 (AOTSG0001–AOTSG0005) |
⚠️ |
AOTSG descriptors with helpLinkUri |
0 / 5 | ❌ |
MSTEST0xxx descriptors with helpLinkUri |
effectively all (via DiagnosticDescriptorHelper.Create) |
✅ |
Doc pages referencing AOTSG |
0 | ❌ |
| Glossary entries for AOT reflection source generator | 0 | ❌ |
AnalyzerReleases.Shipped.md tracking for AOTSG0001–0005 |
present (Release 4.4.0) | ✅ |
Unit test coverage exercising AOTSG ids |
yes (MSTestReflectionMetadataGeneratorTests.cs, 27 references) |
✅ |
Findings
Strengths
- All five
AOTSGrule IDs are correctly registered inAnalyzerReleases.Shipped.md(Release 4.4.0) — no release-tracking gap here. - Each descriptor already carries a clear
descriptionstring explaining the remediation (e.g. "Remove the 'static' modifier or use a non-static container."), so the raw information for a docs page already exists verbatim in source. MSTestReflectionMetadataGeneratorTests.cshas solid coverage exercising these diagnostics (27 references toAOTSGids).
Areas for Improvement
- ❌ No
helpLinkUrion anyAOTSGdescriptor. Source:src/Analyzers/MSTest.SourceGeneration/Diagnostics/DiagnosticDescriptors.cs, lines definingStaticTestClass,GenericTestClass,InaccessibleTestClass,GenericTestMethod,ByRefParameter— all fivenew DiagnosticDescriptor(...)calls omit thehelpLinkUripositional/named argument, so it defaults tonull. - ⚠️ No reusable helper, unlike
MSTest.Analyzers'DiagnosticDescriptorHelper.Create, which centralizeshelpLinkUrigeneration for everyMSTEST0xxxrule (src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticDescriptorHelper.cs).MSTest.SourceGenerationconstructs descriptors ad hoc, so there is nowhere a futureAOTSG0006could inherit link generation from. - ⚠️ No documentation tree for
AOTSG. The existingmstest-analyzers/{id}URL scheme is specific toMSTEST0xxx; a straight reuse of that helper forAOTSGIDs would point at nonexistentlearn.microsoft.compages. A distinct, owned URL scheme (or a dedicated section underdocs/) is needed before wiring up links. - ⚠️ No glossary entry.
docs/glossary.mddocuments dozens of MTP/MSTest-specific terms but has nothing for the AOT reflection source generator or theAOTSGdiagnostic category, so a reader hitting these new 4.4.0-era warnings has no in-repo starting point either.
🤖 Suggested Improvement Tasks
Task 1: Decide the AOTSG documentation destination before adding links
Priority: High
Estimated Effort: Small
Before wiring up helpLinkUri, decide where AOTSG rule documentation will live: a new docs/mstest-analyzers-style subsection, a dedicated docs/aot-source-generator-diagnostics.md, or inline repo documentation (since these are generator diagnostics, not Roslyn analyzer rules shipped to learn.microsoft.com the same way). Record the decision so Task 2 and 3 use a real, working URL scheme instead of guessing at the existing mstest-analyzers/{id} pattern.
Task 2: Add helpLinkUri to the five AOTSG descriptors
Priority: Medium
Estimated Effort: Small
In src/Analyzers/MSTest.SourceGeneration/Diagnostics/DiagnosticDescriptors.cs, add a helpLinkUri argument to each of the five new DiagnosticDescriptor(...) calls (StaticTestClass, GenericTestClass, InaccessibleTestClass, GenericTestMethod, ByRefParameter), pointing at the destination chosen in Task 1. Consider introducing a small local helper (mirroring DiagnosticDescriptorHelper.Create in MSTest.Analyzers) so a future AOTSG0006 inherits the link pattern automatically instead of needing another manual edit.
Task 3: Write the corresponding documentation page(s)
Priority: Medium
Estimated Effort: Medium
Author the doc content for AOTSG0001–AOTSG0005 at the destination from Task 1. Each descriptor's existing description string (e.g. "Open generic test classes ... have no closed type at generation time. Use a concrete subclass that closes every type parameter.") already contains the core remediation guidance and can be the starting point for each rule's page/section, minimizing new authoring effort.
Task 4: Add a glossary entry for the AOT reflection source generator
Priority: Low
Estimated Effort: Small
Add a short entry to docs/glossary.md (alphabetically under "A") describing the AOT reflection source generator and the AOTSG diagnostic category, with a pointer to the new documentation from Task 3 once it exists.
📊 Historical Context
Previous Focus Areas (last 5 runs)
| Date | Focus Area | Type |
|---|---|---|
| 2026-10-06 | dependency-health-followup | Standard (reused via follow-up) |
| 2026-10-07 | objectdisposedexception-throwif-polyfill-gap | Custom |
| 2026-10-08 | experimental-api-diagnostic-url-consistency | Custom |
| 2026-10-09 | central-package-management-dead-entries | Custom |
| 2026-10-12 | mutation-testing-manifest-coverage-gap | Custom |
A related run on 2026-10-05 (analyzer-release-tracking-and-suppressor-resource-fidelity, filed as #11760) audited AnalyzerReleases.*.md tracking completeness and suppressor justification-resource correctness for MSTEST0xxx rules; it did not examine helpLinkUri coverage, and did not touch the MSTest.SourceGeneration project at all. This report is a distinct finding in a different project and dimension (link/documentation parity, not release tracking).
🎯 Recommendations
Immediate Actions (This Week)
- Decide the documentation destination for
AOTSGrules (Task 1) — Priority: High
Short-term Actions (This Month)
- Wire up
helpLinkUriand publish the documentation (Tasks 2–3) — Priority: Medium - Add the glossary entry (Task 4) — Priority: Low
Next analysis: 2026-10-14 — Focus area selected based on diversity algorithm
🤖 Automated content by GitHub Copilot. Generated by the Repository Quality Improver workflow. · copilot · auto · 252 AIC · ⌖ 7.94 AIC · ⊞ 17.5K · [◷]( · ◷)
Add this agentic workflow to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repository-quality-improver.md@main
- expires on Oct 15, 2026, 10:30 PM UTC
- Dominant language
- C#
- Stars
- 1k
- Forks
- 314
- Avg merge
- 8h 49m
- Merged PRs (30d)
- 442
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/testfx
-
type/automation type/tech-debt
Difficulty 3/5 Half a day Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
type/automation type/tech-debt
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
area/server-mode-jsonrpc
Difficulty 5/5 Over a week Newbie friendliness 8/100
Maintainers usually reply within 1 day
-
testing type/automation type/test-gap
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
area/performance type/automation
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
All issues in microsoft/testfx
Similar issues
-
area-signalr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/aspnetcore#69842 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 2 days
-
bug needs-triage
Difficulty 2/5 Under an hour Newbie friendliness 78/100
microsoft/microsoft-ui-reactor#1373 ·
Maintainers usually reply within 1 day
-
Client customer-reported KeyVault needs-team-attention question Service Attention
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-sdk-for-net#63861 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
:watch: Not Triaged dotnet-csharp/svc fundamentals/subsvc
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day