Repository navigation
fix(pr-triage): retry a GitHub API 5xx or network error before the step fails - #288
Merged
bketelsen merged 1 commit intoNov 22, 2026
Conversation
…ep fails createGitHubApi.request made 1 attempt, so a transient HTTP 500 from GitHub turned the pr-triage check red (frostyard/snowkit#21). GET, DELETE and the add-labels POST now make at most 3 attempts on a 5xx or a network error, with 1 s and 2 s backoff. A 4xx and the comment POST are never retried. The embedded copy in pr-triage.yml comes from npm run sync:risk-paths-workflow. Closes #286
bketelsen
approved these changes
Nov 22, 2026
bketelsen
deleted the
lucilla/night-core-pr-triage-retries-a-github-t168-muyilqg6ky7oqxh5
branch
November 22, 2026 04:24
This was referenced Nov 22, 2026
Merged
Merged
Merged
Merged
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors)
frostyard/frostmail#369
Merged
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors)
frostyard/frostmarks#13
Merged
Merged
Merged
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors)
bketelsen/trimlights#86
Merged
Merged
Merged
Merged
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors)
frostyard/testsuite#100
Merged
Merged
This was referenced Nov 22, 2026
Merged
Merged
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors)
frostyard/chairlift#330
Merged
Merged
Merged
Merged
Merged
bketelsen
pushed a commit
to frostyard/frostui
that referenced
this pull request
Nov 22, 2026
Advance the reusable `pr-triage.yml` pin to `f99acfddee0a5466990b72e6292a5b1642444a25` for the [core#287 rollout](frostyard/core#287). [core#288](frostyard/core#288) adds bounded retries for GitHub API 5xx responses and network errors on reads, deletes and idempotent label adds. It never retries the comment POST. **Risk path:** `.github/workflows/risk-paths.yml` matches `.github/workflows/**` (L2). Only the full SHA and its comment change. The caller's trigger and permissions are unchanged; the pinned workflow still runs no PR code and reads the risk list at the PR's base SHA. Canary runs in [clix#136](frostyard/clix#136) and [std#122](frostyard/std#122) validated the exact pin after merge. See the [canary run evidence](frostyard/core#287 (comment)) and the [upstream workflow diff review](frostyard/clix#136 (comment)). `make ci BASE=origin/main` passed locally before push. The existing pin checks validate the SHA format, not the specific SHA. Revert test: exempt (reusable workflow pin only; no local implementation or test changes). This PR's own `pull_request_target` runs use the base branch pin, not the new one.
bketelsen
pushed a commit
to frostyard/lodge
that referenced
this pull request
Nov 22, 2026
…errors) (#114) Moves the PR triage caller from core 981e7ae to f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried, never the comment POST. Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/porter
that referenced
this pull request
Nov 22, 2026
…errors) (#55) Moves the PR triage caller from core 981e7ae to f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried, never the comment POST. Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/apt-publisher
that referenced
this pull request
Nov 22, 2026
…errors) (#69) Moves the PR triage caller to the merge of frostyard/core#288, the first core main commit with the retry of a GitHub API 5xx or network error (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/igloo
that referenced
this pull request
Nov 22, 2026
…errors) (#30) Moves the PR triage caller to frostyard/core f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/nsl
that referenced
this pull request
Nov 22, 2026
…errors) (#125) Moves the PR triage caller to frostyard/core f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/pilothouse
that referenced
this pull request
Nov 22, 2026
…errors) (#285) Moves the PR triage caller to frostyard/core f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/snowkit
that referenced
this pull request
Nov 22, 2026
…errors) (#24) Moves the PR triage caller to frostyard/core f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/chairlift
that referenced
this pull request
Nov 22, 2026
…errors) (#330) Moves the PR triage caller to frostyard/core f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/frostmail
that referenced
this pull request
Nov 22, 2026
…errors) (#369) Moves the PR triage caller from core 981e7ae to f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried, never the comment POST. Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/frostnotes
that referenced
this pull request
Nov 22, 2026
…errors) (#258) Moves the PR triage caller from core 981e7ae to f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried, never the comment POST. Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/homebrew-tap
that referenced
this pull request
Nov 22, 2026
…errors) (#58) Moves the PR triage caller to the merge of frostyard/core#288, the first core main commit with the retry of a GitHub API 5xx or network error (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/bootc-debian
that referenced
this pull request
Nov 22, 2026
…errors) (#35) Moves the PR triage caller to the merge of frostyard/core#288, the first core main commit with the retry of a GitHub API 5xx or network error (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/flatpak-index
that referenced
this pull request
Nov 22, 2026
…errors) (#25) Moves the PR triage caller to the merge of frostyard/core#288, the first core main commit with the retry of a GitHub API 5xx or network error (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/omarchy-apps
that referenced
this pull request
Nov 22, 2026
…errors) (#29) Moves the PR triage caller to the merge of frostyard/core#288, the first core main commit with the retry of a GitHub API 5xx or network error (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
bketelsen
pushed a commit
to frostyard/intuneme
that referenced
this pull request
Nov 22, 2026
…errors) (#306) Moves the PR triage caller to frostyard/core f99acfd, the merge of frostyard/core#288: a GitHub API 5xx or network error is retried (frostyard/core#286). Rollout: frostyard/core#287. Co-authored-by: frostyard-machines <[email protected]>
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.
Summary
Closes #286.
createGitHubApi.request(scripts/lib/risk-paths.mjs) made 1 attempt per GitHub API call. A transient HTTP 500 failed thelevelsstep and turned thepr-triage / pr-triagecheck red until a person re-ran it (frostyard/snowkit#21, run 42858589083 attempt 1:GitHub API GET /repos/frostyard/snowkit/pulls/16/files failed: HTTP 500; attempt 2 passed on the same SHA).requestretries an HTTP 5xx answer or a network error (fetch throws), at mostAPI_MAX_ATTEMPTS = 3attempts, with backoffAPI_RETRY_BASE_MS * 2^(n-1): 1 s, then 2 s. The worst case adds 3 s per call; the job keepstimeout-minutes: 5.unknown, and 404 withallow404still returnsnullafter 1 attempt.GET,DELETE, and the add-labelsPOST(retry: true; adding a label the issue has is a no-op). The commentPOSTmakes 1 attempt, since a 5xx can still have written the comment (a re-run finds the readiness marker; the shadow step removes duplicates).error.status.createGitHubApitakes an optionalsleep(ms)(defaultsetTimeout), so the tests do not wait for real..github/workflows/pr-triage.ymlwas rewritten only bynpm run sync:risk-paths-workflow.docs/specs/pr-triage.md(rule D) anddocs/specs/risk-paths.md(job rules) state the retry contract.Callers get the fix when they move their pin: #287.
Risk tier
Risk tier: 3 —
risk:high. Matched paths in.github/risk-paths.json, and why the change is safe:scripts/lib/risk-paths.mjs(L2, quality-gates): onlycreateGitHubApi.requestandaddLabelschange. The validator, matcher and levels are untouched. The retry adds no new request, URL, header or token use; it repeats the same request at most 2 more times, and only on a 5xx or a network error. Every 2xx and 4xx path behaves as before (tests below)..github/workflows/**(L2, workflow-and-permissions):pr-triage.ymlchanges only inside theRISK_PATHS_EOFheredoc, regenerated by the sync script; no step,if:, permission or action pin changes.npm run check:risk-pathspasses.Verification
make ciat8378246: 1079 tests, 1079 pass, 0 fail (check:docs,check:organization,check:scripts,check:corrections,check:risk-pathsgreen).test/risk-paths.test.mjs: 500 then 200 passes after 2 fetches with sleeps[1000]; a network error then 200 passes; 503 ×3 fails after exactly 3 fetches with sleeps[1000, 2000], the same message andstatus: 503; network error ×3 fails after 3; 400, 403, 404, 422 and 429 make 1 fetch and no sleep;getFileAtRef404 givesnullafter 1 fetch; the commentPOSTon 500 makes 1 fetch;addLabelsandremoveIssueLabelretry; a non-functionsleepis refused.sleep;npm testtime is unchanged (28.9 s before, 28.7 s after).const attempts = 1;inrequest(no retry),node --test test/risk-paths.test.mjsfails 6 retry tests on their assertions (plus 4 workflow-copy drift tests, as expected for an unsynced edit):Restored: 145 pass, 0 fail.
permissionsand checkout settings unchanged.Not tested: no live 5xx on GitHub; the retry is covered by unit tests with a fake fetch.