Repository navigation
Fix scheduling-dependent settle tests failing post-merge CI - #19
Merged
Merged
Conversation
Inject the monotonic clock and asynchronous suspension into internal settle tests. Assert exact polling cadence and quiet deadlines, and cover delayed wakeups that legitimately coalesce both polling modes. Co-Authored-By: GPT-6.1 Sol <noreply@openai.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.
The post-merge CI run failed because
observerModeStillSamplesAndFallsBackWhenUnsupportedcompared sample counts from real sleeps. A delayed wakeup on a busy runner can make observer and fallback polling take the same number of samples even when both behave correctly.Inject a clock and async suspension into the internal settle loop so timing tests advance time deterministically. Verify the exact polling intervals, the remaining quiet-deadline wait, and notification-delivery accounting. Add delayed-wakeup coverage demonstrating that both modes may legitimately settle after two verified samples. Production defaults still use
ContinuousClockand cancellableTask.sleep; the existing real-clock settle and cancellation tests remain.Validation completed locally before pushing, using the CI workflow commands with the full Xcode toolchain:
swift build: passed.CI=1 swift test --skip IntegrationTests --no-parallel: 1,038 tests passed (183 server + 855 core).scripts/lint-blocking.shand whitespace checks: passed.GPT-6.1 Sol in cooperation with Trevor.