π― Repository Quality Improvement Report β TODO Policy Compliance
Analysis Date: 2026-06-04
Focus Area: TODO Comment Policy Compliance
Strategy Type: Custom
Executive Summary
The repository's CONTRIBUTING.md enforces a clear TODO comment policy: every TODO must reference a GitHub issue (e.g., // TODO(#1234): ...), and comments that don't warrant a tracking issue must be converted to plain explanatory comments. This analysis found 61 non-compliant TODO/FIXME comments in src/ and 17 more in test/, for a total of 78 policy violations across the codebase.
Only 2 source-level TODOs follow the required format (TODO(#NNN) or // TODO: ... tracked by #NNN). The violations are concentrated in the Platform component (30) and Adapter (20), but span every major area. Several comments reference work that has clear remediation paths and would benefit from proper issue tracking, while others are design questions or exploratory notes that should simply be reworded as plain comments.
The immediate risk is twofold: (1) legitimate technical debt is invisible to issue-tracking and may be forgotten, and (2) new contributors following existing patterns will perpetuate non-compliant TODOs. Addressing this in batches by component would improve both code hygiene and technical debt visibility.
Full Analysis Report
Focus Area: TODO Comment Policy Compliance
Current State Assessment
Metrics Collected:
| Metric |
Value |
Status |
Non-compliant TODOs in src/ |
61 |
β |
Non-compliant TODOs in test/ |
17 |
β |
Compliant TODOs (TODO(#NNN) format) in src/ |
2 |
β οΈ |
| Platform component violations |
30 |
β |
| Adapter component violations |
20 |
β |
| Analyzers/SourceGeneration violations |
8 |
β οΈ |
| TestFramework violations |
3 |
β οΈ |
| Policy documented in CONTRIBUTING.md |
β
|
β
|
Findings
Strengths
- The TODO policy is clearly documented in
CONTRIBUTING.md
- The two compliant TODOs (
TODO(#8772) and TODO(#8086) style) show that contributors know the correct format
- Several violations reference GitHub issues inline (e.g.,
issue: https://github.com/microsoft/testfx/issues/2999), demonstrating partial awareness of the policy
Areas for Improvement
Platform (30 violations β High severity):
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.cs:83 β VSTest compatibility gap (no issue)
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.Metadata.cs:12,46,62,63 β Multiple TRX compatibility TODOs
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.Results.cs:176,177,290 β TRX result format gaps
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.Results.Definitions.cs:96 β Missing Workitems support
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:213 β Logic duplication
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SimpleTerminalBase.cs:167 β Refactoring note
src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs:22 β Non-public API note
src/Platform/Microsoft.Testing.Platform/Hosts/ToolsTestHost.cs:53,54 β Two untracked design questions
src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/SerializerUtilities.cs:150 β Incomplete implementation note
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/RunSettingsHelpers.cs:13 β Dual code path issue
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/ObjectModelConverters.cs:153 β TRX generic class question
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsAdapter.cs:54 β Unimplemented stub note
src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/QuarantineFile.cs:16 β Feature design note
src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsRunIdCoordinator.cs:87 β Race condition concern
Adapter (20 violations β High severity):
src/Adapter/MSTestAdapter.PlatformServices/Execution/TestExecutionManager.cs:576 β AppDomain removal blocker
src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:104 β DRY violation note
src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:365,379 β Context propagation + blocking
src/Adapter/MSTestAdapter.PlatformServices/Execution/ExceptionHelper.cs:34 β Stack trace bug
src/Adapter/MSTestAdapter.PlatformServices/Discovery/TypeEnumerator.cs:151,198 β Perf + test fixup notes
src/Adapter/MSTestAdapter.PlatformServices/Discovery/AssemblyEnumerator.cs:250 β Architecture TODO
src/Adapter/MSTestAdapter.PlatformServices/Utilities/DeploymentItemUtility.cs:130 β Potential NRE
src/Adapter/MSTestAdapter.PlatformServices/Utilities/AppDomainUtilities.cs:60 β Missing test coverage
src/Adapter/MSTest.TestAdapter/VSTestAdapter/MSTestExecutor.cs:122,165 β Duplicate nullable concern
src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/MSTestBridgedTestFramework.cs:103 β API question
src/Adapter/MSTestAdapter.PlatformServices/Helpers/RuntimeContext.cs:9 β Architecture concern
src/Adapter/MSTest.Engine/Engine/TestExecutionContext.cs:65,69 β Two design TODOs
Analyzers / SourceGeneration (8 violations β Medium severity):
src/Analyzers/MSTest.Analyzers/RoslynAnalyzerHelpers/DiagnosticExtensions.cs:140 β Old reflection workaround
src/Analyzers/MSTest.Analyzers/AssertThrowsShouldContainSingleStatementAnalyzer.cs:103 β Design question
src/Analyzers/MSTest.Analyzers/AssertionArgsShouldAvoidConditionalAccessAnalyzer.cs:37,38 β Two design questions
src/Analyzers/MSTest.SourceGeneration/Generators/TestNodesGenerator.cs:65 β Namespace resolution
src/Analyzers/MSTest.SourceGeneration/ObjectModels/TestTypeInfo.cs:130 β Same namespace issue
src/Analyzers/MSTest.SourceGeneration/ObjectModels/TestMethodInfo.cs:136 β DataRow+DynamicData gap
TestFramework (3 violations β Low severity):
src/TestFramework/TestFramework.Extensions/Attributes/WinUI_UITestMethodAttribute.cs:46 β Nullable assumption
src/TestFramework/TestFramework.Extensions/Attributes/DeploymentItemAttribute.cs:26 β API availability note
src/TestFramework/TestFramework.Extensions/PrivateObject.Helpers.cs:84 β Nullable concern
π€ Suggested Improvement Tasks
The following actionable tasks address the findings above.
Task 1: Remediate non-compliant TODOs in src/Platform/ (TrxReport)
Priority: High
Estimated Effort: Medium
The TrxReport component has the highest concentration of non-compliant TODOs (β₯8), many describing known gaps relative to VSTest's TRX output format. These represent real behavioral differences that users may observe.
For each TODO in src/Platform/Microsoft.Testing.Extensions.TrxReport/:
- Open a GitHub issue describing the gap (e.g., "TrxReport: missing
runUser attribute", "TrxReport: ResultFiles support")
- Replace the bare
// TODO: ... with // TODO(#NNNN): ... referencing the new issue, or β if the gap is intentional/out-of-scope β reword it as a plain comment explaining why
Files to address:
TrxReportEngine.cs:83
TrxReportEngine.Metadata.cs:12,46,62,63
TrxReportEngine.Results.cs:176,177,290
TrxReportEngine.Results.Definitions.cs:96
TrxDataConsumer.cs:175
Task 2: Remediate non-compliant TODOs in src/Platform/ (MTP core + extensions)
Priority: High
Estimated Effort: Medium
The remaining Platform TODOs span Microsoft.Testing.Platform, VSTestBridge, and AzureDevOpsReport. Several describe architecture concerns or missing features that should be tracked.
Files to address:
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:213
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SimpleTerminalBase.cs:167
src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs:22
src/Platform/Microsoft.Testing.Platform/Hosts/ToolsTestHost.cs:53,54
src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/SerializerUtilities.cs:150
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/RunSettingsHelpers.cs:13
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/ObjectModelConverters.cs:153
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsAdapter.cs:54
src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/QuarantineFile.cs:16
src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsRunIdCoordinator.cs:87
For design-question TODOs (e.g., "Should TRX className have arity?"), either file an issue for the decision or convert to a plain comment.
Task 3: Remediate non-compliant TODOs in src/Adapter/
Priority: High
Estimated Effort: Medium
The Adapter has 20 violations spanning discovery, execution, and utilities. Notable ones include a potential NRE (DeploymentItemUtility.cs:130), a DRY violation note (TestMethodInfo.Execution.cs:104), a stack trace bug (ExceptionHelper.cs:34), and a blocking-call concern (TestMethodInfo.Execution.cs:379).
For concrete bugs/improvements: open a tracking issue and update the comment format.
For design questions without a clear path: convert to plain // comments explaining the context.
Files to address: all 20 occurrences in src/Adapter/ listed in the analysis above.
Task 4: Remediate non-compliant TODOs in src/Analyzers/ and src/TestFramework/
Priority: Medium
Estimated Effort: Small
The Analyzers and TestFramework components have 11 combined violations. The SourceGeneration namespace has a recurring issue around assembly default namespace resolution (3 TODOs referencing the same problem) β these should share a single tracking issue.
Key items:
DiagnosticExtensions.cs:140 β "Revert reflection workaround once CodeAnalysis 3.0" is shipped: verify if CodeAnalysis 3.0+ is already in use, and either remove the workaround or open/link an issue
AssertionArgsShouldAvoidConditionalAccessAnalyzer.cs:37,38 β Convert open design questions to plain comments or open a discussion issue
TestNodesGenerator.cs:65 + TestTypeInfo.cs:130 β Share one issue for the namespace resolution gap
Task 5: Add automated enforcement to prevent future policy regressions
Priority: Medium
Estimated Effort: Small
Once all existing violations are cleared, add a CI gate to prevent new non-compliant TODOs from being merged. Options:
- Roslyn analyzer rule: Add or configure an existing analyzer to warn on bare
// TODO comments lacking (#NNN). The repo already ships MSTest.Analyzers and has the tooling in place.
- EditorConfig + build warning: Enable
SA1113 (StyleCop) or configure a custom Roslyn suppressor/diagnostic.
- Simple grep-based CI step: Add a step to the PR validation workflow that runs
grep -rn "TODO\|FIXME" src/ test/ --include="*.cs" | grep -v "#[0-9]\+" | grep -v "obj\|bin" and fails if the output is non-empty.
The grep-based approach is the fastest to implement and would catch regressions immediately.
π Historical Context
Previous Focus Areas
| Date |
Focus Area |
Type |
| 2026-06-04 |
TODO Policy Compliance |
Custom |
π― Recommendations
Immediate Actions (This Week)
- Triage and batch the 61 source TODOs β assign owners by component (Platform, Adapter, Analyzers) β Priority: High
- Convert untracked design-question TODOs to plain comments for ones that clearly don't warrant issues β Priority: High
Short-term Actions (This Month)
- Open tracking issues for substantive tech debt (NRE risks, DRY violations, architecture concerns) referenced in Tasks 1β4 β Priority: High
- Add CI enforcement (Task 5) to prevent regression once existing violations are resolved β Priority: Medium
- Apply the same cleanup pass to
test/ (17 more violations) β Priority: Low
Generated by Repository Quality Improvement Agent
Next analysis: 2026-06-05 β Focus area selected based on diversity algorithm
Generated by Repository Quality Improver Β· sonnet46 2.4M Β· β·
Add this agentic workflows to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repository-quality-improver.md@main
π― Repository Quality Improvement Report β TODO Policy Compliance
Analysis Date: 2026-06-04
Focus Area: TODO Comment Policy Compliance
Strategy Type: Custom
Executive Summary
The repository's
CONTRIBUTING.mdenforces a clear TODO comment policy: everyTODOmust reference a GitHub issue (e.g.,// TODO(#1234): ...), and comments that don't warrant a tracking issue must be converted to plain explanatory comments. This analysis found 61 non-compliant TODO/FIXME comments insrc/and 17 more intest/, for a total of 78 policy violations across the codebase.Only 2 source-level TODOs follow the required format (
TODO(#NNN)or// TODO: ... tracked by #NNN). The violations are concentrated in thePlatformcomponent (30) andAdapter(20), but span every major area. Several comments reference work that has clear remediation paths and would benefit from proper issue tracking, while others are design questions or exploratory notes that should simply be reworded as plain comments.The immediate risk is twofold: (1) legitimate technical debt is invisible to issue-tracking and may be forgotten, and (2) new contributors following existing patterns will perpetuate non-compliant TODOs. Addressing this in batches by component would improve both code hygiene and technical debt visibility.
Full Analysis Report
Focus Area: TODO Comment Policy Compliance
Current State Assessment
Metrics Collected:
src/test/TODO(#NNN)format) insrc/Findings
Strengths
CONTRIBUTING.mdTODO(#8772)andTODO(#8086)style) show that contributors know the correct formatissue: https://github.com/microsoft/testfx/issues/2999), demonstrating partial awareness of the policyAreas for Improvement
Platform (30 violations β High severity):
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.cs:83β VSTest compatibility gap (no issue)src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.Metadata.cs:12,46,62,63β Multiple TRX compatibility TODOssrc/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.Results.cs:176,177,290β TRX result format gapssrc/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.Results.Definitions.cs:96β Missing Workitems supportsrc/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:213β Logic duplicationsrc/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SimpleTerminalBase.cs:167β Refactoring notesrc/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs:22β Non-public API notesrc/Platform/Microsoft.Testing.Platform/Hosts/ToolsTestHost.cs:53,54β Two untracked design questionssrc/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/SerializerUtilities.cs:150β Incomplete implementation notesrc/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/RunSettingsHelpers.cs:13β Dual code path issuesrc/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/ObjectModelConverters.cs:153β TRX generic class questionsrc/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsAdapter.cs:54β Unimplemented stub notesrc/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/QuarantineFile.cs:16β Feature design notesrc/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsRunIdCoordinator.cs:87β Race condition concernAdapter (20 violations β High severity):
src/Adapter/MSTestAdapter.PlatformServices/Execution/TestExecutionManager.cs:576β AppDomain removal blockersrc/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:104β DRY violation notesrc/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:365,379β Context propagation + blockingsrc/Adapter/MSTestAdapter.PlatformServices/Execution/ExceptionHelper.cs:34β Stack trace bugsrc/Adapter/MSTestAdapter.PlatformServices/Discovery/TypeEnumerator.cs:151,198β Perf + test fixup notessrc/Adapter/MSTestAdapter.PlatformServices/Discovery/AssemblyEnumerator.cs:250β Architecture TODOsrc/Adapter/MSTestAdapter.PlatformServices/Utilities/DeploymentItemUtility.cs:130β Potential NREsrc/Adapter/MSTestAdapter.PlatformServices/Utilities/AppDomainUtilities.cs:60β Missing test coveragesrc/Adapter/MSTest.TestAdapter/VSTestAdapter/MSTestExecutor.cs:122,165β Duplicate nullable concernsrc/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/MSTestBridgedTestFramework.cs:103β API questionsrc/Adapter/MSTestAdapter.PlatformServices/Helpers/RuntimeContext.cs:9β Architecture concernsrc/Adapter/MSTest.Engine/Engine/TestExecutionContext.cs:65,69β Two design TODOsAnalyzers / SourceGeneration (8 violations β Medium severity):
src/Analyzers/MSTest.Analyzers/RoslynAnalyzerHelpers/DiagnosticExtensions.cs:140β Old reflection workaroundsrc/Analyzers/MSTest.Analyzers/AssertThrowsShouldContainSingleStatementAnalyzer.cs:103β Design questionsrc/Analyzers/MSTest.Analyzers/AssertionArgsShouldAvoidConditionalAccessAnalyzer.cs:37,38β Two design questionssrc/Analyzers/MSTest.SourceGeneration/Generators/TestNodesGenerator.cs:65β Namespace resolutionsrc/Analyzers/MSTest.SourceGeneration/ObjectModels/TestTypeInfo.cs:130β Same namespace issuesrc/Analyzers/MSTest.SourceGeneration/ObjectModels/TestMethodInfo.cs:136β DataRow+DynamicData gapTestFramework (3 violations β Low severity):
src/TestFramework/TestFramework.Extensions/Attributes/WinUI_UITestMethodAttribute.cs:46β Nullable assumptionsrc/TestFramework/TestFramework.Extensions/Attributes/DeploymentItemAttribute.cs:26β API availability notesrc/TestFramework/TestFramework.Extensions/PrivateObject.Helpers.cs:84β Nullable concernπ€ Suggested Improvement Tasks
The following actionable tasks address the findings above.
Task 1: Remediate non-compliant TODOs in
src/Platform/(TrxReport)Priority: High
Estimated Effort: Medium
The TrxReport component has the highest concentration of non-compliant TODOs (β₯8), many describing known gaps relative to VSTest's TRX output format. These represent real behavioral differences that users may observe.
For each TODO in
src/Platform/Microsoft.Testing.Extensions.TrxReport/:runUserattribute", "TrxReport: ResultFiles support")// TODO: ...with// TODO(#NNNN): ...referencing the new issue, or β if the gap is intentional/out-of-scope β reword it as a plain comment explaining whyFiles to address:
TrxReportEngine.cs:83TrxReportEngine.Metadata.cs:12,46,62,63TrxReportEngine.Results.cs:176,177,290TrxReportEngine.Results.Definitions.cs:96TrxDataConsumer.cs:175Task 2: Remediate non-compliant TODOs in
src/Platform/(MTP core + extensions)Priority: High
Estimated Effort: Medium
The remaining Platform TODOs span
Microsoft.Testing.Platform,VSTestBridge, andAzureDevOpsReport. Several describe architecture concerns or missing features that should be tracked.Files to address:
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:213src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SimpleTerminalBase.cs:167src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs:22src/Platform/Microsoft.Testing.Platform/Hosts/ToolsTestHost.cs:53,54src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/SerializerUtilities.cs:150src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/RunSettingsHelpers.cs:13src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/ObjectModelConverters.cs:153src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsAdapter.cs:54src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/QuarantineFile.cs:16src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsRunIdCoordinator.cs:87For design-question TODOs (e.g., "Should TRX className have arity?"), either file an issue for the decision or convert to a plain comment.
Task 3: Remediate non-compliant TODOs in
src/Adapter/Priority: High
Estimated Effort: Medium
The Adapter has 20 violations spanning discovery, execution, and utilities. Notable ones include a potential NRE (
DeploymentItemUtility.cs:130), a DRY violation note (TestMethodInfo.Execution.cs:104), a stack trace bug (ExceptionHelper.cs:34), and a blocking-call concern (TestMethodInfo.Execution.cs:379).For concrete bugs/improvements: open a tracking issue and update the comment format.
For design questions without a clear path: convert to plain
//comments explaining the context.Files to address: all 20 occurrences in
src/Adapter/listed in the analysis above.Task 4: Remediate non-compliant TODOs in
src/Analyzers/andsrc/TestFramework/Priority: Medium
Estimated Effort: Small
The Analyzers and TestFramework components have 11 combined violations. The SourceGeneration namespace has a recurring issue around assembly default namespace resolution (3 TODOs referencing the same problem) β these should share a single tracking issue.
Key items:
DiagnosticExtensions.cs:140β "Revert reflection workaround once CodeAnalysis 3.0" is shipped: verify if CodeAnalysis 3.0+ is already in use, and either remove the workaround or open/link an issueAssertionArgsShouldAvoidConditionalAccessAnalyzer.cs:37,38β Convert open design questions to plain comments or open a discussion issueTestNodesGenerator.cs:65+TestTypeInfo.cs:130β Share one issue for the namespace resolution gapTask 5: Add automated enforcement to prevent future policy regressions
Priority: Medium
Estimated Effort: Small
Once all existing violations are cleared, add a CI gate to prevent new non-compliant TODOs from being merged. Options:
// TODOcomments lacking(#NNN). The repo already shipsMSTest.Analyzersand has the tooling in place.SA1113(StyleCop) or configure a custom Roslyn suppressor/diagnostic.grep -rn "TODO\|FIXME" src/ test/ --include="*.cs" | grep -v "#[0-9]\+" | grep -v "obj\|bin"and fails if the output is non-empty.The grep-based approach is the fastest to implement and would catch regressions immediately.
π Historical Context
Previous Focus Areas
π― Recommendations
Immediate Actions (This Week)
Short-term Actions (This Month)
test/(17 more violations) β Priority: LowGenerated by Repository Quality Improvement Agent
Next analysis: 2026-06-05 β Focus area selected based on diversity algorithm
Add this agentic workflows to your repo
To install this agentic workflow, run