Skip to content

ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors) - #122

Merged
bketelsen merged 1 commit into
mainfrom
ci/pr-triage-pin-f99acfd
Nov 22, 2026
Merged

bketelsen merged 1 commit into
mainfrom
ci/pr-triage-pin-f99acfd

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

Moves the PR triage caller .github/workflows/risk-paths.yml from core 981e7ae to f99acfddee0a5466990b72e6292a5b1642444a25, the merge of frostyard/core#288. That is the first core main commit with:

This repository is the canary of the rollout in frostyard/core#287 (target pin posted there).

Only the pin and its comment change. The job grant stays contents: read + pull-requests: write, which is what rule A of core's docs/specs/pr-triage.md asks of a public repository. tests/baseline/baseline_test.go checks the pin's form (40 hex characters), not the SHA, so no test moves.

Risk paths

This PR touches .github/workflows/risk-paths.yml (matched by .github/workflows/risk-paths.yml, L2, and .github/workflows/**, L1). Why it is safe: the caller still runs on pull_request_target from the base branch, the reusable workflow checks out nothing and runs no pull-request code, and the job grant does not change. The new core commit is on core main with green CI.

Note: pull_request_target runs the base branch's caller, so this PR's own triage run still uses 981e7ae. The first run at the new pin is on the next pull request after this one merges.

Checks

  • make ci (with BASE=origin/main): passed locally.

@github-actions github-actions Bot added level:L1 Read every line risk:high Touches a path in .github/risk-paths.json labels Nov 22, 2026
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Upstream check of the reusable workflow, 981e7ae → f99acfd (git diff 981e7aeb014cbd3efee710e99a5043fcc4763446 f99acfddee0a5466990b72e6292a5b1642444a25 -- .github/workflows/pr-triage.yml in frostyard/core: 145 insertions, 37 deletions; commits #255, #256, #264, #278, #288):

  • Trigger and inputs: still on: workflow_call with the same 2 inputs, dependabot-shadow (boolean, default true) and pr (string, default "", new in #278 for a workflow_dispatch caller). This caller passes no input, so pr stays empty; the script throws if a pull_request_target caller sets it. No secrets: block.
  • Permissions: the top-level permissions: {} and the job's contents: read + pull-requests: write were removed (#278, core ADR-0086). The job now takes the calling job's grant, which in this repository is the same contents: read + pull-requests: write. A called workflow can only reduce a grant, never widen it, so the effective token is unchanged.
  • Code from the PR: still none. No actions/checkout; the steps write the embedded scripts to $RUNNER_TEMP and run them with Node. The list is read at github.event.pull_request.base.sha through the contents API.
  • Third-party actions: unchanged and SHA-pinned: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 (v7.1.0), dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 (v3.1.0).
  • Conditions: the job gains if: that skips an edited event without a base change and a labeled event with a label other than ready-for-human (#264). The readiness and shadow steps gain github.event_name == 'pull_request_target', which is always true for this caller.
  • Retry (#288): a GitHub API 5xx or network error is retried before the step fails; no new API call or scope.
  • Core CI at f99acfd: both CI runs on that commit concluded success.

This PR's own triage run used the base branch's caller (981e7ae, as pull_request_target does); the first run at f99acfd is the next pull request after the merge (frostyard/core#287, rollout step 4).

@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Follow-up for the review's evidence gap ("old-to-new core workflow diff, including invoked scripts"): core's pr-triage.yml invokes no external script. Its 2 scripts (scripts/lib/risk-paths.mjs and scripts/lib/pr-triage.mjs) are embedded verbatim as heredocs in the workflow file and written to $RUNNER_TEMP (npm run check:risk-paths in core fails when a copy drifts), so the workflow diff 981e7ae..f99acfd is the whole change; its summary is in the comment above.

The retry change itself, frostyard/core#288 (f99acfd, closes frostyard/core#286), in createGitHubApi.request of the embedded risk-paths.mjs:

  • API_MAX_ATTEMPTS = 3, API_RETRY_BASE_MS = 1000; backoff 1000 * 2 ** (attempt - 2), so 1 s, then 2 s. Worst case adds 3 s per call, inside the job's timeout-minutes: 5.
  • Retried: a response with status 500 to 599, or a thrown network error, while attempt < 3. A 4xx is never retried.
  • retry defaults to method !== "POST": GET and DELETE retry; the add-labels POST opts in (retry: true, idempotent); the comment POST does not retry, so a retry cannot write a second comment.
  • No new endpoint, scope or input; core CI at f99acfd is green.

@bketelsen
bketelsen added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit c196974 Nov 22, 2026
10 checks passed
@bketelsen
bketelsen deleted the ci/pr-triage-pin-f99acfd branch November 22, 2026 05:05
This was referenced Nov 22, 2026
This was referenced Nov 22, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L1 Read every line risk:high Touches a path in .github/risk-paths.json

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants