Skip to content

Fix scheduling-dependent settle tests failing post-merge CI - #19

Merged
trevoedwards merged 1 commit into
mainfrom
fix/deterministic-settle-tests
Nov 19, 2026
Merged

trevoedwards merged 1 commit into
mainfrom
fix/deterministic-settle-tests

Conversation

@trevoedwards

Copy link
Copy Markdown
Collaborator

The post-merge CI run failed because observerModeStillSamplesAndFallsBackWhenUnsupported compared 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 ContinuousClock and cancellable Task.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.sh and whitespace checks: passed.
  • Focused settle/workflow tests: 16 passed, including the delayed-wakeup regression.

GPT-6.1 Sol in cooperation with Trevor.

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>
@trevoedwards trevoedwards self-assigned this Nov 19, 2026
@trevoedwards
trevoedwards merged commit d8e9bee into main Nov 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant