Repository navigation
test(client): stabilize ready reconciliation observation - #615
Merged
Merged
Conversation
SunSi12138
force-pushed
the
fix/issue-387-ready-reconciliation-followup
branch
from
September 8, 2026 17:29
43d5793 to
81290fe
Compare
This was referenced Sep 8, 2026
Owner
Author
|
CI attribution for review: final head |
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.
Refs #387
Scope
Test-only follow-up for the remaining recurrent #387 record:
SharpLinkReconnectPolicyLifecycleRaceTests.FailedReadyPublicationShouldNotStartDynamicStableResetWindowObserved again on #608 PR Fast #1337 / run
34253679133after #604. The failure was the exact-count assertion immediately after the third candidate became observable as Ready.Root cause
The test treated
ReadyConnectionCount == 1as proof that the third response-compression Ready-reconciliation hook had already executed.Production ordering is intentionally different:
ConnectOneAsyncadds the candidate and publishes the Ready snapshot first, then invokesReconcileResponseCompressionPreferenceAfterReadyPublication. If that hook throws, the candidate is removed and the Ready snapshot is rolled back. Therefore a test observer may legally seeReadyConnectionCount == 1in the interval after Ready publication but before the third hook invocation incrementsreconciliationAttempt.That makes the immediate
reconciliationAttempt == 3assertion scheduler-sensitive even though reconnect ownership and Ready rollback behavior are correct.Fix
Add one test-local
TaskCompletionSourcecompleted by the first non-throwing reconciliation-hook entry. After the direct transportConnectAsyncentry barrier for reconnect #3, await that hook-entry signal before checking Ready and retaining the exactreconciliationAttempt == 3assertion.This preserves the intended lifecycle contract:
== 3, so duplicate reconciliation is not hidden;Diff
Restacked base:
dev@042c63bd036bdab38b2202eda096e6d59dfb3e0c(merged #613)Head:
81290febf0749d712411bc38300d7164e18bc8dc1 commit / 1 test file / +4/-0.
No production, workflow, timeout-widening, retry, quarantine, sleep, or polling changes.
Validation history
The first #615 run started against pre-#613
dev@f265492f...and its only Unit Test failure wasFixedReconnectSuccessShouldResetTheNextFailureSequenceAfterPolicyUpdate, the separate flake fixed by #613. #613 merged while that run was already executing, so the branch was cleanly restacked afterward rather than mixing #613 into this PR's diff.Final-head validation is from the post-restack CI only.
No local .NET SDK execution is available; validation is delegated to normal PR CI.