Repository navigation
fix(moq-c): hold the wait so the end-gap follow test sees the gap - #5886
Conversation
consume_announced_delivers_the_instance_again_after_an_end flaked about one run in six. The C wait follows on its own task, so it could take the route above the path before the test unannounced the path. The cursor then knew that route stood before the path's own route left, which is no gap, and reported an update: the instance rides on and correctly is not delivered again. The test timed out waiting for a delivery it never earned. Hold the wait inside its first delivery until both changes are made, so they are on hand together and the cursor reports the end and the start the test is about. The follow loop is unchanged; the moq-ffi twin already makes both changes between available() calls, when nothing is following. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fixes a flake from #5700:
test::consume_announced_delivers_the_instance_again_after_an_endtimed out on its second delivery about one run in six.Root cause
The test, not the follow loop. The C wait follows on its own task, so it can take the route above the path (
"", same epoch) and run dry before the test unannounceslive. TheFollowcursor then knows that route stood before the path's own route left, which proves no gap, so it reports anUpdate. The instance rides on through the front, and correctly is not delivered again. Instrumentingapplyshowed exactly that in every failing run:Start(live)thenUpdate(""), noEnd. The test only gets theEndthenStartit is about when both changes are on hand when the wait next looks.Fix
A gated callback holds the wait inside its first delivery (the C runtime is one current-thread runtime, so nothing follows meanwhile) while the test adds the route above and unannounces the path, then releases it. Both changes are on hand together, so the cursor reports the gap every run. The test still fails when the follow loop's
Endhandling is removed.The moq-ffi twin,
announced_broadcast_hands_out_the_instance_again_after_an_end, has no such race: it makes both changes betweenavailable()calls, when nothing is following.Loops
Run directly from the test binary, 4 at a time:
*_the_instance_again_after_an_end,*_gap_while_resolving_once,*_freed_takeover_again,*_held_takeover_once,*_takeover_once_while_resolving,consume_announced_follows_a_restart): 0 failures of 200 each.just checkpasses.Public API and wire impact
None: test-only.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code