Repository navigation
Make the permission rejoin test deterministic under load - #260
Merged
Merged
Conversation
…nd of the receipt's timing The test stopped the fake heed as soon as it had queued the ask, which is before the receipt is written, and ran the restart (sleep, start) as Swift tasks whose resumption a loaded suite can hold past the hook's five second ceiling. Both read as heed losing the ask. It now waits for the receipt to be handed to the server and restarts heed from its own thread. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
The CI failure of
aHookRejoinsAHeedThatRestartedAndGetsItsAnswer(answer.pass,second.queued == 0) is a test-only timing assumption, not a loss in the product: PermissionHook, PermissionBroker and the control socket behave as documented (no rejoin before a receipt; rejoin after one).Two causes in the test, both reproduced:
queued == 1, which rises before the receipt is written (the write is queued on the server queue). Stopping in that gap drops the connection before the hook has a receipt, so it correctly does not rejoin. With a 5 ms gap injected it failed in most of 300 cases..ceiling).Now it waits on
receipted(set after the receipt is queued, which is ahead ofstop()on the serial queue) and restarts heed from its own thread. The product is unchanged, the test stays strict, no timeout was widened.Verified: fmt, lint and the full suite (2270 tests) pass. Not merged.
🤖 Generated with Claude Code