Skip to content

Isolate console-sensitive tests from concurrent logging - #4813

Merged
Widthdom merged 5 commits into
mainfrom
fix-issue4798
Jul 24, 2026
Merged

Isolate console-sensitive tests from concurrent logging#4813
Widthdom merged 5 commits into
mainfrom
fix-issue4798

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • mark the shared console-sensitive xUnit collection as non-parallel
  • enroll every remaining process-global console capture owner in that collection
  • pin the collection assignments with a reflection regression contract
  • document the isolation rule in both English and Japanese

Root cause

ConsoleCapture serialized writer replacement through ConsoleStreamOwnership.Gate, but the console-sensitive xUnit collection itself could still run beside independent test classes. An unrelated MCP request-id or global diagnostic write could therefore land in the temporarily captured process-wide stderr stream.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --framework net8.0 --no-build -p:UseSharedCompilation=false — 10,373 passed, 7 skipped, 0 failed
  • final latest-main sync: net8.0 console/issue filter — 9 passed
  • final latest-main sync: net9.0 console filter — 8 passed
  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false — 0 warnings, 0 errors
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • changelog fragment validation — 48 fragments
  • CodeIndex workspace check — 1,014/1,014 files matched
  • Codex adversarial review: first-round P2 fixed; second round found no actionable regression

Documentation and changelog

  • updated the English and Japanese sections of TESTING_GUIDE.md
  • added changelog.d/unreleased/4798.fixed.md

Follow-up candidates

None.

Fixes #4798

@Widthdom
Widthdom marked this pull request as ready for review July 24, 2026 17:44
@Widthdom
Widthdom merged commit fc7e302 into main Jul 24, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4798 branch July 24, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Isolate request-id logging from console-sensitive validation tests

1 participant