Skip to content

Fix two timing-dependent tests that fail CI on unrelated PRs - #118

Merged
leonardoaraujosantos merged 1 commit into
mainfrom
fix/flaky-ci-tests
Nov 8, 2026
Merged

leonardoaraujosantos merged 1 commit into
mainfrom
fix/flaky-ci-tests

Conversation

@leonardoaraujosantos

Copy link
Copy Markdown
Contributor

Summary

Two tests failed intermittently on unrelated PRs (#113, #115, #116), and one of them failed main's own Windows build at db9e171e. Both are test timing problems, not product bugs.

disposed_binary_request_retains_worker_ownership_until_actual_exit (and its sibling check)

The binary worker returns its path permit before its activity Scope drops. Dropping the scope is what removes the activity from the registry, and it happens on the worker's own thread. The test asserted available_permits() == 1 and then read activities.is_empty() once, so a loaded runner could still see the entry. The test now waits up to 5 s for the registry to empty (activities_drained), at both places it checked. The ownership guarantees under test are unchanged.

reviewed_recovery_busy_confirmation_requires_interrupt_ack_and_a_new_review (Windows)

The test starts a background cyber exec … GATE and gave it 10 s to reach the scripted model. On a loaded Windows runner, starting exec and its first request can take longer. That failed main's Windows build, while the same test passed on other runs (e.g. #117's).

  • The deadline is now 60 s, the bound other Windows paths use.
  • The exec's stderr is now captured. If exec exits before reaching the model, the test fails with its exit status and stderr instead of a bare "GATE never reached provider".

Tests

Not addressed: a one-off Windows failure in mcp_oauth::a_refresh_timeout_fires_during_a_blocked_write_which_keeps_the_lock seen once on #115; it passed on rerun.

…time

The binary worker returns its path permit before its activity scope
drops and deregisters on the worker thread, so a single read of the
registry right after shutdown could still see it on a loaded runner.
Wait up to 5 s for it to empty, at both checks.

reviewed_recovery_busy_confirmation_requires_interrupt_ack_and_a_new_review
gave a background exec 10 s to reach the scripted model, which a loaded
Windows runner can exceed (it failed main's Windows build and passed on
others). Allow 60 s, as other Windows paths do, and report the exec's
exit status and stderr if it ends first.
@leonardoaraujosantos
leonardoaraujosantos merged commit 2188d0a into main Nov 8, 2026
16 checks 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