Summary
Invoke-MSTestWithCoverage.ps1 test-assembly discovery lacks a \.claude\ exclusion, so running with -SearchRoot . descends into agent worktrees and picks up stale sibling-worktree assemblies.
Environment
- OS/version: Windows 11 Pro 10.0.26200
- Python version: n/a (PowerShell)
- Command/flags used:
scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot .
- Data source or fixture: main checkout
C:\Users\DanMoisan\repos\TaskMaster containing .claude\worktrees\agent-*\
Steps to Reproduce
- Create at least one agent worktree under
.claude\worktrees\agent-*\ and build it so it contains *.Test.dll assemblies.
- From the main checkout, run
scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot ..
- Inspect the discovered assembly list and the resulting coverage figure.
Expected Behavior
Discovery should enumerate only the current checkout's test assemblies and ignore any path under .claude\worktrees\.
Actual Behavior
scripts/vscode/Invoke-MSTestWithCoverage.ps1:296-302 filters discovered *.Test.dll paths on \bin\<Configuration>\, \obj\ and \ref\ only. There is no \.claude\ guard, so discovery descends into .claude\worktrees\agent-*\** and picks up stale sibling-worktree assemblies, producing bogus AssemblyInitialize signature failures and a coverage figure computed over the wrong assembly set.
Logs / Screenshots
Impact / Severity
Local coverage runs report a figure computed over the wrong assembly set, and spurious failures obscure real ones.
Source
From: docs/features/potential/2026-08-10-mstest-coverage-discovery-claude-worktree-exclusion.md
Summary
Invoke-MSTestWithCoverage.ps1test-assembly discovery lacks a\.claude\exclusion, so running with-SearchRoot .descends into agent worktrees and picks up stale sibling-worktree assemblies.Environment
scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot .C:\Users\DanMoisan\repos\TaskMastercontaining.claude\worktrees\agent-*\Steps to Reproduce
.claude\worktrees\agent-*\and build it so it contains*.Test.dllassemblies.scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot ..Expected Behavior
Discovery should enumerate only the current checkout's test assemblies and ignore any path under
.claude\worktrees\.Actual Behavior
scripts/vscode/Invoke-MSTestWithCoverage.ps1:296-302filters discovered*.Test.dllpaths on\bin\<Configuration>\,\obj\and\ref\only. There is no\.claude\guard, so discovery descends into.claude\worktrees\agent-*\**and picks up stale sibling-worktree assemblies, producing bogusAssemblyInitializesignature failures and a coverage figure computed over the wrong assembly set.Logs / Screenshots
AssemblyInitializesignature failures originating from assemblies under.claude\worktrees\agent-*\.Impact / Severity
Local coverage runs report a figure computed over the wrong assembly set, and spurious failures obscure real ones.
Source
From: docs/features/potential/2026-08-10-mstest-coverage-discovery-claude-worktree-exclusion.md