Repository navigation
test(auth): wait for the reconcile's whole batch before draining access events - #373
Merged
Merged
Conversation
…ss events The revoke-in-the-gap test read the marker link's event and then drained the channel without waiting. A reconcile sends its changes one by one under the state lock, and a receiver sees each send at once, so the drain could run before the ClientRemoved of the same batch was sent. The test then reported a resurrected client that the stream removed a moment later. Seen once on main in the Test job. With the watcher's batch slowed by a temporary probe the test failed 20 of 20 times; with the lock wait it passed 20 of 20 under the same probe and 100 of 100 without it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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. |
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.
Fixes #372
What
One line in the revoke-in-the-gap test: before it drains the access events, it takes the state lock once. A reconcile sends its changes one by one under that lock, and a receiver sees each send at once, so the marker could arrive while the
ClientRemovedof the same batch was still unsent.No product code changes.
Evidence
mainfailed once on this test with "the access stream resurrected the revoked client" (linked in Flaky: the revoke-in-the-gap auth test reports a resurrected client #372).Validation
cargo fmt --all --checkcargo clippy -p bibcode-server --lib --tests -- -D warningsvp check --no-fmt,vp run typecheckNot run: native Windows and Linux test runs (CI covers them). Testing runbooks reviewed and remain accurate. Profiler coverage: none applies (test only).
🤖 Generated with Claude Code