test: give AI thread-boundary checks a dedicated caller - #209
Merged
mikhalchankasm merged 1 commit intoOct 4, 2026
Merged
Conversation
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI 37188784054 exposed a false failure in the AI off-thread assertion: an async xUnit test returned its caller thread to the pool at await, then Task.Run legitimately reused that thread ID. Use a dedicated caller held alive through the assertions in all three tests that require a stable UI-thread identity. The helper releases blocked fakes and joins the owned caller on success, failure and cancellation.
Closes #208; unblocks #207. Production code, all existing assertions, the 15-second deadlock watchdog, collection isolation and test counts are unchanged.
Validation: all 9 AISettingsInfrastructureExecutor tests passed with no skips or build/analyzer warnings after a clean normal rebuild. A temporary MSBuild override outside Git compiled an inline-execution mutant of RunBlockingAsync/RunTransportAsync into the test assembly: all three boundary tests failed immediately on their intended thread assertions (not timeouts), proving they still detect UI-thread work. The normal test assembly was then rebuilt without the override and passed. Incremental output retained the mutant during the first restoration attempt; its owned test processes were stopped and the successful forced rebuild removed that experimental output. No production source or installed bundle was altered by the experiment. Final clean SHA 4266fa8 passed Release2024/2025/2026/2027 x64 L2. Both CI runs passed (37189510391 / 37189499330), including the full 2,358-test suite with zero skips and all repository/distribution guards.