Summary
scripts/vscode/Invoke-MSTestWithCoverage.ps1 excludes test assemblies whose absolute FullName matches \.claude\. When the script is run from a checkout that is itself located under .claude/worktrees/, every discovered assembly matches the exclusion, the discovered set is empty, and the script throws a misleading "No test assemblies found ... Build first." error.
Environment
- OS/version: Windows 11 Pro 10.0.26200, PowerShell 7.
- Python version: n/a (PowerShell).
- Command/flags used:
pwsh -File scripts/vscode/Invoke-MSTestWithCoverage.ps1 (default -Configuration Debug) run with the repo root at C:\Users\<user>\repos\TaskMaster\.claude\worktrees\agent-<id>\.
- Data source or fixture: any built
*.Test.dll under <worktree>\<Project>\bin\Debug\.
Steps to Reproduce
- Create an agent worktree under
.claude/worktrees/ (the location used by every parallel-run and epic-run child) and build the solution there so *.Test.dll assemblies exist under bin\Debug\.
- From that worktree, run
pwsh -File scripts/vscode/Invoke-MSTestWithCoverage.ps1.
- Observe the script throw
No test assemblies found under '<worktree>' for configuration 'Debug'. Build first. even though the assemblies exist.
Expected Behavior
Assembly discovery excludes only sibling agent worktrees nested beneath the search root (the intent of the filter added by #733), and finds the test assemblies of the checkout the script is running from, regardless of where that checkout lives on disk.
Actual Behavior
The Where-Object predicate at scripts/vscode/Invoke-MSTestWithCoverage.ps1:301 on main ($_.FullName -notmatch '\\\.claude\\') tests the absolute path. When the search root is itself under .claude\worktrees\, every candidate path contains the segment and is excluded, so $testAssemblies is empty and the script throws with a message that misattributes the cause to a missing build.
Logs / Screenshots
Impact / Severity
High for agent-driven development: every in-place coverage run from an agent worktree fails, which affects every C# item executed by the parallel and epic orchestration surfaces. CI is unaffected because the runner checkout path contains no .claude segment.
Source
From: docs/features/potential/2026-09-03-coverage-assembly-discovery-excludes-own-worktree-root.md
Summary
scripts/vscode/Invoke-MSTestWithCoverage.ps1excludes test assemblies whose absoluteFullNamematches\.claude\. When the script is run from a checkout that is itself located under.claude/worktrees/, every discovered assembly matches the exclusion, the discovered set is empty, and the script throws a misleading "No test assemblies found ... Build first." error.Environment
pwsh -File scripts/vscode/Invoke-MSTestWithCoverage.ps1(default-Configuration Debug) run with the repo root atC:\Users\<user>\repos\TaskMaster\.claude\worktrees\agent-<id>\.*.Test.dllunder<worktree>\<Project>\bin\Debug\.Steps to Reproduce
.claude/worktrees/(the location used by every parallel-run and epic-run child) and build the solution there so*.Test.dllassemblies exist underbin\Debug\.pwsh -File scripts/vscode/Invoke-MSTestWithCoverage.ps1.No test assemblies found under '<worktree>' for configuration 'Debug'. Build first.even though the assemblies exist.Expected Behavior
Assembly discovery excludes only sibling agent worktrees nested beneath the search root (the intent of the filter added by #733), and finds the test assemblies of the checkout the script is running from, regardless of where that checkout lives on disk.
Actual Behavior
The
Where-Objectpredicate atscripts/vscode/Invoke-MSTestWithCoverage.ps1:301onmain($_.FullName -notmatch '\\\.claude\\') tests the absolute path. When the search root is itself under.claude\worktrees\, every candidate path contains the segment and is excluded, so$testAssembliesis empty and the script throws with a message that misattributes the cause to a missing build.Logs / Screenshots
No test assemblies found under 'C:\Users\...\repos\TaskMaster\.claude\worktrees\agent-...' for configuration 'Debug'. Build first.(reported by the item Bug: ribbon-engine-toggle-defects #735 child orchestration during parallel runbugs-2026-09-02; recorded inartifacts/orchestration/parallel-orchestrator-state.jsonunderenvironment_regression_from_item_733).Impact / Severity
High for agent-driven development: every in-place coverage run from an agent worktree fails, which affects every C# item executed by the parallel and epic orchestration surfaces. CI is unaffected because the runner checkout path contains no
.claudesegment.Source
From: docs/features/potential/2026-09-03-coverage-assembly-discovery-excludes-own-worktree-root.md