Repository navigation
feat: wait for Codecov by default, up to two minutes - #26
Merged
Merged
Conversation
Codecov reports on five of the six SDKs, so listing its checks in each repository's policy repeated one decision per repository. Its checks are now the default, with a two-minute cap instead of five, and the wait is skipped for a pull request whose every changed file matches ignore_paths, which the review skips anyway. A repository whose CI does not report to Codecov, sdk-js today, sets `wait_for_checks: []`. The bot cannot tell ahead of time whether Codecov will report on a head: on the default branch it posts commit statuses, which the App cannot read, and GitHub creates a queued Codecov check suite on every head whether or not it ever reports. So where it does not report, a review waits the cap.
✅ Ready — Code reviewThis changes the default policy to wait up to 120 seconds for the two Codecov checks and skips that wait when all changed paths are ignored. It updates the setup documentation and extends coverage for defaults, opt-out, timeout, path filtering, and real-client requests. Rating patch 5/6 (solid) · proof 5/6 (reproducible) · overall 5/6 Reviewed |
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.
Why
After #25 each SDK had to list
codecov/patchandcodecov/projectin its own policy, as sdk-py #163 did. Codecov reports on sdk-py, sdk-csharp, sdk-php, sdk-go and sdk-java, so that line repeated one decision five times. It belongs in the bot.The change
reviewbot/defaults/policy.yml:wait_for_checks: ["codecov/patch", "codecov/project"]andwait_for_checks_seconds: 120, where they were[]and 300.reviewbot wait-for-checksdoes not wait when every changed file matchesignore_paths, since the review skips that pull request anyway. It reads the changed files once to tell.docs/setup.md: the default;wait_for_checks: []to turn it off; and that a failing check, listed or not, skips the review, soinformational: truein a repository's Codecov configuration keeps coverage from holding a review back.Why the bot does not detect Codecov per repository
Checked on the six SDKs:
statusespermission, so it cannot read them.codecovcheck suite on every head, sdk-js included, and it stays queued where Codecov never reports.So where Codecov does not report, a review waits the cap, which is why the default is two minutes rather than five. Codecov reported 35 to 50 seconds after
Testson sdk-py, well inside it.Rollout
wait_for_checks: []to its policy. The key exists since feat: wait for the checks another app reports after CI, before reading it #25, so this can land before or after this pull request._lease_minutesalready reserves the wait in the job budget, now two minutes for every repository that waits. That shortens a lease wait only fromtimeout_minutes18 up.codecov/patchandcodecov/projectpassed, so the default skips no review today.Tests
tests/test_wait_for_checks.py: Codecov is waited for by default; the default gives up after two minutes; a pull request whose files all matchignore_pathsneither waits nor pins its head; one file outside them keeps the wait; the real client reads the changed files; an explicitwait_for_checks: []reads no check run.tests/test_config.py: the new defaults, and an empty list turning the wait off.uv run pytest: 760 passed on Windows. The other 54 fail on an unmodifiedmainon Windows too, because their fakeclaudeandcodexexecutables are POSIX scripts; ubuntu CI runs them.ruff check .andruff format --check .are clean.