Convert the last bounded test handshake to an awaited signal - #2010
Merged
Aaronontheweb merged 1 commit intoAug 19, 2026
Merged
Conversation
Aaronontheweb
force-pushed
the
chore/test-sync-over-async
branch
from
August 19, 2026 02:52
a0f2dfd to
c1a9454
Compare
Aaronontheweb
force-pushed
the
chore/test-sync-over-async
branch
from
August 19, 2026 03:39
c1a9454 to
a0f2dfd
Compare
Aaronontheweb
marked this pull request as ready for review
August 19, 2026 06:23
Aaronontheweb
force-pushed
the
chore/test-sync-over-async
branch
3 times, most recently
from
August 19, 2026 15:13
07143b0 to
6e832d4
Compare
Aaronontheweb
commented
Aug 19, 2026
Aaronontheweb
left a comment
Collaborator
Author
There was a problem hiding this comment.
LGTM - just a simple test fix to eliminate sync-over-async
Aaronontheweb
force-pushed
the
chore/test-sync-over-async
branch
from
August 19, 2026 15:21
6e832d4 to
1aea355
Compare
An audit of all sync-over-async patterns in the test suites (43 .Result hits, 7 ManualResetEventSlim, 5 Thread.Sleep) found the suites already async-clean: every .Result is a record property, not a blocked task, and the TestKit layer uses only Task-returning assertions. One genuine conversion remained: InitExistingInstallViewModelTests used a bounded ManualResetEventSlim handshake. It now awaits an unbounded TaskCompletionSource governed by the test cancellation token. Deliberate holdouts, each with a recorded reason: the WebhookRouteStoreTests choreography (superseded by the webhook-route-actor-ownership change), the DaemonClientReconnectTests blocking subscriber (the block is the behavior under test), and DisposableTempDir's Dispose retry (needs an IAsyncDisposable pass).
Aaronontheweb
force-pushed
the
chore/test-sync-over-async
branch
from
August 19, 2026 16:41
1aea355 to
3d07182
Compare
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.
What
PR 8 of the stack. Result of a full audit of sync-over-async patterns across every test project, per the maintainer directive that TestKit assertions and test orchestration must never block threads (sync-over-async is the root mechanism behind the recent Windows CI dispatch-starvation flakes).
Audit result: the suites were already async-clean. Verified:
ExpectMsg/AwaitAssert/ExpectNoMsg/Within/… — all usage is the*Asyncvariants).Resulthits are record/DTO properties namedResult(FunctionResultContent.Result,ToolCompletedUpdate.Result, …), notTask.ResultThread.Sleephits are comment or test-data textOne genuine conversion (this PR's diff):
InitExistingInstallViewModelTests.Dispose_WhileDeleteIsRunning_CancelsCompletionNavigation— a boundedManualResetEventSlim.Wait(10s)handshake becomes an unboundedTaskCompletionSourceawait governed by the test cancellation token. No assertion depends on scheduling latency.Deliberate holdouts, each with a recorded reason:
WebhookRouteStoreTests(5 MRES hits): superseded — thewebhook-route-actor-ownershipOpenSpec change replaces those tests with actor message-order testsDaemonClientReconnectTests:227: the synchronous block is the behavior under test (proves a blockingIObservablesubscriber cannot stall the async pump)DisposableTempDir.Disposeretry: syncIDisposableconstraint; needs anIAsyncDisposablemigration across all call sites — follow-up passVerification
Full solution build 0 warnings;
Netclaw.Cli.Tests1,370/0; slopwatch 0 issues; headers clean.Stack
Base:
fix/approval-text-match-order(#2008).