fix: don't fail the check group on transient GitHub API errors - #44
Merged
ethanwharris merged 1 commit intoAug 18, 2026
Merged
Conversation
A GitHub incident could fail `check-group` on a PR whose required checks were all green. In gridai/grid run 32048244470 the loop logged "All required checks were successful!" and then crashed, because the PATCH updating the PR comment came back 503 after octokit had exhausted its own retries. Three things went wrong, all fixed here: - `notifyProgress` was called without `await`, so the rethrow of a non-403 error became an unhandled rejection that took the process down. It is now awaited, and a failure to write the comment is only warned about — the comment is informational, and the check statuses it summarises are unaffected by GitHub refusing to store it. - Any error inside the poll loop went straight to `core.setFailed`, so a single blip ended a run that had 40 minutes of budget left. Transient errors now warn and poll again on the next interval; the timeout timer still bounds the run, and names the API error if one was the last thing seen. - The 403 branch tested `e instanceof RequestError`, which never matched: several copies of `@octokit/request-error` are installed side by side and the throwing one is a different class. Transient and 403 classification now duck-type on `status`. The one-shot calls made before the loop starts — listing the PR's files and reading checkgroup.yml — have no later poll to fall back on, so they retry with backoff. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ethanwharris
approved these changes
Aug 18, 2026
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 are we doing this work?
During the GitHub incident on 17 Aug,
check-groupfailed PRs whose required checks were all green — this run loggedAll required checks were successful!and then crashed, because thePATCHupdating the PR comment came back 503 after octokit had exhausted its own retries. The action has a 40-minute budget to poll through exactly this kind of blip, and wasn't using it.What does this PR change?
Makes the check-group action ride out GitHub API errors that say nothing about the PR:
notifyProgressis now awaited — the unawaited call turned a rethrown error into an unhandled rejection that killed the process.core.setFailedimmediately.checkgroup.yml) retry with backoff.statusrather thaninstanceof RequestError.Why
instanceof RequestErrorhad to goThe existing 403 branch could never match. Several copies of
@octokit/request-errorare installed side by side, and the one that throws is not the onesrc/imports:So every comment failure — including the expected 403 on fork PRs — took the
throw epath.Verification
There's no test harness in this repo, so I drove
CheckGroupfrom a script with a stubbed octokit that reproduces the failure and its neighbours. Against the pre-fixdist, the 503-on-comment case crashes with an unhandled rejection and exits 1; after the change:yarn lint,yarn buildandpre-commit runall pass.yarn formatis deliberately not run — prettier is not clean on master and would rewrite every file.Follow-up
Once this lands,
gridai/grid's.github/workflows/probot-check-group.ymlshould be repinned from08fa537to the merge commit.