Repository navigation
fix: time the pacing pause from inside it, so a slow runner cannot fail the recovery test - #54
Merged
Merged
Conversation
…il the recovery test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
adapters::tests::recovery_hints_do_not_bypass_http_or_command_pacingfailed on macOS CI for #53, which changes nothing in chatd (run):The test started a 150 ms
pause, sent a recovery hint, then required that the pause not finish within the next 50 ms. That window began at the hint, not at the pause's start. If the main thread stalls for about 100 ms after spawning, which happens on a loaded runner, the pause finishes on time inside the window and the test fails.pauseitself is correct:wait_timeout_whileonly returns early on stop.Now the spawned thread times its own pause and the test asserts it lasted at least 150 ms. Delays in scheduling can only lengthen that, so it no longer flakes.
Validation:
cargo test -p chatd --lib recoverypassed 3 of 3, and 5 repeated runs of the changed test passed.🤖 Generated with Claude Code