You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several UtilitiesCS.Test file-system wrapper tests locate the repository root at run time and open or enumerate the real TaskMaster.sln. This is the same defect class that #931 (PR #939) fixed in FileInfoWrapper_Tests: the outcome of a unit test depends on repository layout and on whether another process holds the solution file open.
Environment
OS/version: Windows 11 (local) and windows-latest (CI)
Data source or fixture: the repository's own TaskMaster.sln
Steps to Reproduce
Hold TaskMaster.sln open with a share mode that excludes readers (for example a resident MSBuild node or an IDE).
Run UtilitiesCS.Test with the standard coverage route.
Alternatively, run the test assembly from a location whose ancestors contain no TaskMaster.sln.
Expected Behavior
The wrapper tests verify wrapper delegation through test-owned fixtures or mocks, independent of repository layout and of other processes.
Actual Behavior
UtilitiesCS.Test/HelperClasses/PhysicalFileSystemAdapters_Tests.cs walks up to the repository root (line ~361), builds a FileInfo over TaskMaster.sln (line ~376), asserts it is enumerated (lines 110-129), and swallows IOException in places, which hides the contention instead of removing it.
UtilitiesCS.Test/HelperClasses/DirectoryInfoWrapper_Tests.cs asserts that TaskMaster.sln is enumerated from the repository root (lines 60 and 79, root walk at line ~381).
Restoring sections dropped by the promotion tooling.
Suspected Cause / Notes
A unit test depends on environment state it does not control, which is the root cause recorded for #931 (PR #939). Other root-walk sites to triage under the same fix:
Reuse the Bug: tests-depend-on-uncontrolled-environment #931 pattern: exercise delegation through the internal IFileInfo/IDirectoryInfo seams with Moq, or through a test-owned stream opened with FileShare.ReadWrite. Use no temporary files.
Remove the IOException swallowing in PhysicalFileSystemAdapters_Tests.
Negative control: show that each rewritten test fails against a deliberately broken wrapper.
Delivered by PR 955 (merge commit 039cf77), parallel run bugs-2026-09-28. All 8 acceptance criteria in issue.md are checked off (AC8 amended per coordinator ruling to the per-file no-regression rule, with a dated note); all seven checks green on head b95a061 (run 36740921329) before merge. Follow-ups are filed separately by the run coordinator.
Activity
drmoisan commentedon Sep 30, 2026
Restoring sections dropped by the promotion tooling.
Suspected Cause / Notes
A unit test depends on environment state it does not control, which is the root cause recorded for #931 (PR #939). Other root-walk sites to triage under the same fix:
TaskMaster.Test/Ribbon/RibbonControllerTests.cs:429TaskMaster.Test/Bootstrap/FSharpCoreHintPathAlignmentTests.cs:27UtilitiesCS.Test/EmailIntelligence/SortEmail_Tests.cs:405Some of these may legitimately read repository files, for example build-configuration alignment tests. Classify each one before changing it.
Source:
docs/features/active/2026-09-28-tests-depend-on-uncontrolled-environment-931/evidence/qa-gates/p4-t13-follow-up-handoff.2026-09-29T09-46.md.Proposed Fix / Validation Ideas
IFileInfo/IDirectoryInfoseams with Moq, or through a test-owned stream opened withFileShare.ReadWrite. Use no temporary files.IOExceptionswallowing inPhysicalFileSystemAdapters_Tests.drmoisan commentedon Sep 30, 2026
Delivered by PR 955 (merge commit 039cf77), parallel run bugs-2026-09-28. All 8 acceptance criteria in issue.md are checked off (AC8 amended per coordinator ruling to the per-file no-regression rule, with a dated note); all seven checks green on head b95a061 (run 36740921329) before merge. Follow-ups are filed separately by the run coordinator.