.NET: Workflows: quarantine flaky InputWaiter timeout test (#7360) - #7361
Merged
rogerbarreto merged 1 commit intoJul 28, 2026
Merged
Conversation
InputWaiter_WaitForInputAsync_CompletesWhenTimeoutExpiresAsync races a 300ms SemaphoreSlim timeout against a 5s Task.Delay guard and asserts which one won by object identity. On the loaded net472/windows-latest leg, thread pool starvation can delay the 300ms continuation past the 5s guard, so Task.Delay wins and the assertion fails. It failed in 7 of the last 18 failed dotnet-build-and-test runs, always on net472/windows-latest and always in merge_group, blocking PRs that do not touch the workflows code. Quarantine it following the existing convention used for microsoft#5845, and track the real fix in microsoft#7360. Copilot-Session: 0be6f810-51de-4f49-b9c7-8d1c7efa2c43
rogerbarreto
temporarily deployed
to
github-app-auth
July 28, 2026 11:00 — with
GitHub Actions
Inactive
rogerbarreto
temporarily deployed
to
github-app-auth
July 28, 2026 11:00 — with
GitHub Actions
Inactive
rogerbarreto
temporarily deployed
to
github-app-auth
July 28, 2026 11:00 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
Quarantines a known-flaky .NET workflows unit test to stop merge_group runs (notably net472/windows-latest) from being blocked by intermittent timing/scheduling races in the test harness rather than product behavior.
Changes:
- Marks
InputWaiter_WaitForInputAsync_CompletesWhenTimeoutExpiresAsyncas skipped with a link to issue #7360. - Adds an inline comment documenting why the existing
Task.WhenAnyouter-bound guard is still insufficient under load.
SergeyMenshykh
approved these changes
Jul 28, 2026
westey-m
approved these changes
Jul 28, 2026
peibekwe
approved these changes
Jul 28, 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.
Summary
Quarantines the flaky workflows unit test
InputWaiterTests.InputWaiter_WaitForInputAsync_CompletesWhenTimeoutExpiresAsyncso the merge_group queue stops blocking on it. Tracking issue: #7360.Why
Across the last 18 failed
dotnet-build-and-testruns, this test failed 7 times, always on thenet472/windows-latestleg and always in amerge_grouprun. It blocks PRs that do not touch the workflows code at all: the most recent occurrence blocked #7337, which only adds a sample.Failure signature:
The test races a 300 ms
SemaphoreSlimtimeout against a 5 sTask.Delayguard and then asserts which one won by object identity. On the loadednet472leg, thread pool starvation can delay the 300 ms continuation past the 5 s guard, soTask.Delaywins theWhenAnyandBeSameAsfails.InputWaiteritself is behaving correctly, the test just cannot guarantee it observes the timeout in time. See #7360 for the full hypothesis.Change
Replace
[Fact]with[Fact(Skip = "Flaky in merge_group; see https://github.com/microsoft/agent-framework/issues/7360")]on the affected test, matching the convention already used for #5845, and add a short comment explaining why the existing outer bound is not sufficient.No product code changes.
Validation
dotnet build --tl:off --framework net472onMicrosoft.Agents.AI.Workflows.UnitTestssucceeds with 0 warnings, 0 errors.net472reportstotal: 7, failed: 0, skipped: 1, with the skipped test being the quarantined one.dotnet format --verify-no-changeson the changed file passes.Follow-up
The assertion should be rewritten so it no longer depends on scheduling latency, then the test re-enabled. Note that
Task.WaitAsync(TimeSpan)is not available onnet472, so any replacement has to work on .NET Framework as well. Tracked in #7360.