Skip to content

Repository Quality: Track and resolve 60 TODO comments missing GitHub issue referencesΒ #8694

Description

@Evangelink

🎯 Repository Quality Improvement Report β€” TODO Comment Policy Compliance

Analysis Date: 2026-05-29
Focus Area: TODO Comment Policy Compliance (Custom)
Strategy Type: Custom

Executive Summary

The repository enforces a strict TODO comment policy: every TODO must reference a GitHub issue (e.g., // TODO(#1234): explanation). Without a tracked issue, reviewers should block the comment during PR review. However, analysis found 61 TODO/FIXME comments in src/ that do not reference any GitHub issue number, distributed across all major product areas.

These untracked TODOs represent undocumented technical debt β€” deferred decisions and known issues that exist only in code comments, invisible to issue trackers, sprint planning, and contributor search. Some describe genuine design concerns (nullable annotations, async execution, DRY violations) while others reflect platform parity gaps with VSTest.

Bringing all TODOs into compliance will improve codebase maintainability, make technical debt visible and trackable, and align the codebase with the stated contributor guidelines.

Full Analysis Report

Focus Area: TODO Comment Policy Compliance

Current State Assessment

Metrics Collected:

Metric Value Status
Total TODO/FIXME in src/ 61 ❌
TODOs with issue references 1 ⚠️
TODOs without issue references 60 ❌
Components affected 10 ❌
Test/sample TODOs (informational) ~12 ⚠️

Breakdown by component (src/ only):

Component Non-compliant TODOs
Adapter/MSTestAdapter.PlatformServices 16
Platform/Microsoft.Testing.Extensions.TrxReport 13
Platform/Microsoft.Testing.Platform 12
Analyzers/MSTest.Analyzers 4
TestFramework/TestFramework.Extensions 3
Platform/Microsoft.Testing.Extensions.VSTestBridge 3
Analyzers/MSTest.SourceGeneration 3
Adapter/MSTest.TestAdapter 3
Platform/Microsoft.Testing.Extensions.AzureDevOpsReport 2
Adapter/MSTest.Engine 2

Findings

Strengths

  • Policy is clearly documented in contributor guidelines
  • Only 1 TODO already has a proper issue reference β€” sets a good example
  • Most TODOs are thoughtful observations, not stale noise β€” they deserve tracking

Areas for Improvement

  • [CRITICAL] 60 TODOs in src/ violate the issue-reference policy and would be rejected in review if introduced today, but they predate enforcement
  • [HIGH] MSTestAdapter.PlatformServices (16 TODOs) is the highest-debt component; several describe nullable-safety issues, async blocking, and design problems
  • [HIGH] TrxReport (13 TODOs) tracks VSTest parity gaps β€” these are actual missing features, not just reminders
  • [MEDIUM] Microsoft.Testing.Platform (12 TODOs) has refactoring debts (terminal output, server-mode JSON serialization)
  • [LOW] Test files and samples contain TODOs that are either test-data strings (intentional) or integration test annotations β€” these should be reviewed case-by-case

πŸ€– Suggested Improvement Tasks

Task 1: Track and resolve TODOs in Adapter/MSTestAdapter.PlatformServices (16 items)

Priority: High
Estimated Effort: Large

src/Adapter/MSTestAdapter.PlatformServices/ contains the most non-compliant TODOs (16). Each should be converted to a GitHub issue or β€” if the concern has already been addressed β€” removed.

Key instances to address:

  • Execution/TestMethodInfo.Execution.cs:104 β€” DRY violation with TestMethodRunner
  • Execution/TestMethodInfo.Execution.cs:379 β€” // TODO: Avoid blocking.
  • Execution/TestExecutionManager.cs:576 β€” AppDomain async upgrade
  • Discovery/TypeEnumerator.cs:151,198 β€” reflection cache and uncommitted asserts
  • Discovery/AssemblyEnumerator.cs:250 β€” multi-source design
  • Utilities/DeploymentItemUtility.cs:130 β€” potential NRE
  • Utilities/AppDomainUtilities.cs:60 β€” missing E2E test coverage

For each: either open a dedicated issue and update the comment to // TODO(#NNNN): ..., or remove the comment if it is no longer relevant.


Task 2: Track and resolve TODOs in Platform/Microsoft.Testing.Extensions.TrxReport (13 items)

Priority: High
Estimated Effort: Medium

src/Platform/Microsoft.Testing.Extensions.TrxReport/ has 13 TODOs that describe known VSTest parity gaps β€” real feature gaps that deserve tracking:

  • TrxReportEngine.cs:83 β€” missing runUser attribute
  • TrxReportEngine.Metadata.cs:12,46,62,63 β€” missing Output/StdOut, RunInfos, ResultFiles, CollectorDataEntries
  • TrxReportEngine.Results.cs:154,155,268 β€” path sorting, attachment classification, generic method arity
  • TrxReportEngine.Results.Definitions.cs:96 β€” missing Workitems element
  • TrxDataConsumer.cs:175 β€” ITestFramework access from TestHostController

Create one tracking issue per meaningful gap (or a single umbrella issue for TRX parity), then update each comment.


Task 3: Track and resolve TODOs in Platform/Microsoft.Testing.Platform (12 items)

Priority: Medium
Estimated Effort: Medium

src/Platform/Microsoft.Testing.Platform/ has 12 TODOs covering refactoring debts and design decisions:

  • OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:213 β€” duplicated terminal summary logic
  • OutputDevice/Terminal/SimpleTerminalBase.cs:167 β€” StartUpdate/StopUpdate refactoring
  • OutputDevice/OutputDeviceManager.cs:22 β€” SetPlatformOutputDevice not yet public
  • ServerMode/JsonRpc/SerializerUtilities.cs:150 β€” incomplete test node properties
  • Hosts/ToolsTestHost.cs:53,54 β€” tool name override/reservation concerns

Each item should become a GitHub issue or have the concern resolved and the comment replaced with a rationale comment.


Task 4: Resolve remaining TODOs in Analyzers, TestFramework, and Engine (12 items)

Priority: Medium
Estimated Effort: Small

src/Analyzers/ (7 TODOs):

  • DiagnosticExtensions.cs:140 β€” CodeAnalysis version migration workaround
  • AssertThrowsShouldContainSingleStatementAnalyzer.cs:103 β€” implicit operation bail-out design decision
  • AssertionArgsShouldAvoidConditionalAccessAnalyzer.cs:37,38 β€” collection assertion scope
  • MSTest.SourceGeneration (3 items) β€” assembly namespace resolution

src/TestFramework/TestFramework.Extensions/ (3 TODOs):

  • WinUI_UITestMethodAttribute.cs:46 β€” DeclaringType null assumption
  • DeploymentItemAttribute.cs:26 β€” netstandard2.0 build concern
  • PrivateObject.cs:724 β€” nullable assertion

src/Adapter/MSTest.Engine/Engine/TestExecutionContext.cs (2 TODOs):

  • Exception filtering classification and test execution state modification

For each item: open a GitHub issue or convert the comment to a plain rationale comment if no action is needed.


πŸ“Š Historical Context

Previous Focus Areas
Date Focus Area Type
2026-05-29 TODO Comment Policy Compliance Custom (this run)

🎯 Recommendations

Immediate Actions (This Week)

  1. Start with TrxReport (Task 2) β€” concrete feature gaps, each naturally becomes a small issue β€” Priority: High
  2. Address MSTest.Engine and analyzer TODOs (Task 4) β€” smallest scope, quick wins β€” Priority: Medium

Short-term Actions (This Month)

  1. Complete MSTestAdapter.PlatformServices (Task 1) β€” largest component, most impactful β€” Priority: High
  2. Complete Microsoft.Testing.Platform (Task 3) β€” refactoring items benefit from dedicated tracking β€” Priority: Medium
  3. Add a CI lint check that fails PRs introducing TODO without an issue reference to prevent regression β€” Priority: Medium

Generated by Repository Quality Improvement Agent
Next analysis: 2026-05-30 β€” Focus area selected based on diversity algorithm

Generated by Repository Quality Improver Β· sonnet46 1M Β· β—·

Add this agentic workflows to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repository-quality-improver.md@main
  • expires on May 31, 2026, 10:49 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/automationCreated or maintained by an agentic workflow.type/tech-debtCode health, refactoring, simplification.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions