Skip to content

Stabilize import cancellation console capture - #4701

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue4625-4650
Jul 20, 2026
Merged

Stabilize import cancellation console capture#4701
Widthdom merged 3 commits into
mainfrom
fix-issue4625-4650

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Serialize the pre-cancelled JSON import fixture with the existing non-parallel console-sensitive collection.
  • Keep the pure bounded-stream cancellation check parallel-safe in a separate fixture.
  • Add a cross-framework reflection contract that pins the console-sensitive assignment.

Root cause

The test captured process-wide Console.Error while it still ran in parallel with tests that emitted request-id diagnostics without taking the capture lock. Those unrelated diagnostics could therefore enter the captured stderr stream in full-suite runs.

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • Focused cancellation and collection-contract tests on net8.0 and net9.0
  • Full net8.0 suite: 9,744 passed, 6 skipped, 0 failed
  • Full net9.0 suite: 9,279 passed, 410 skipped, 0 failed
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Codex adversarial review: no blocking/actionable issues found

Documentation and changelog

  • Updated the English and Japanese shared-state guidance in TESTING_GUIDE.md.
  • Added changelog.d/unreleased/4625.fixed.md.
  • Added changelog.d/unreleased/4650.fixed.md.

Follow-up candidates

None.

Fixes #4625
Fixes #4650

@Widthdom
Widthdom marked this pull request as ready for review July 20, 2026 05:14
@Widthdom
Widthdom merged commit 6f8f61f into main Jul 20, 2026
8 checks passed
@Widthdom
Widthdom deleted the fix-issue4625-4650 branch July 20, 2026 05:14
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.

Full test suite leaks request-id diagnostics into import cancellation stderr Serialize console capture in import cancellation test

1 participant