ci: auto-update-prs must use RELEASE_PAT, not GITHUB_TOKEN - #676
Merged
Conversation
The workflow shipped in #675 worked on its first live run — it found three PRs behind main and updated all three, reporting `updated: 3, conflicted: 0`. The PRs then sat unmergeable for an hour. A branch update made with GITHUB_TOKEN raises its `pull_request` event with `actor = github-actions[bot]`, and GitHub gates bot-actored runs at `action_required`, waiting for a human approval nobody is watching for. The failure mode is worse than "it didn't work". The branch really is brought up to date and the workflow really does report success, but the PR's checks never run — so it can never go green, auto-merge never fires, and the PR sits looking healthy and current while being permanently stuck. Every signal says fine. Measured directly on `fix/hub-authorization`: 15:12 action_required actor=github-actions[bot] <- the auto-update 14:37 failure actor=cuttlefisch 11:36 success actor=cuttlefisch Same branch, same workflow; only the actor differs. Fixed by using RELEASE_PAT, which `version-bump.yml` and `release.yml` already use for the same underlying reason — a token whose writes must trigger downstream workflows. Plus a preflight that fails loudly if the secret is absent: without it the job would fall back to unauthenticated `gh`, report "0 updated" and exit green, which is indistinguishable from "nothing needed updating" — the one outcome this workflow must never fake. The three runs stranded by the original version were approved by hand. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Follow-up to #675, which shipped a real defect.
What happened
The workflow's first live run worked exactly as designed — it found three PRs
behind main and updated all three, reporting
updated: 3, skipped: 0, conflicted: 0. The three PRs then sat unmergeable for an hour.A branch update made with
GITHUB_TOKENraises itspull_requestevent withactor = github-actions[bot], and GitHub gates bot-actored runs ataction_required— awaiting a human approval nobody is watching for.Why this was worse than a plain failure
The branch really is brought up to date. The workflow really does report
success. But the PR's checks never run, so it can never go green, auto-merge
never fires, and the PR sits looking healthy and current while being
permanently stuck. Every signal available says everything is fine.
Measured directly on
fix/hub-authorization— same branch, same workflow, onlythe actor differs:
The fix
Use
RELEASE_PAT, whichversion-bump.ymlandrelease.ymlalready use for thesame underlying reason: a token whose writes must trigger downstream workflows.
Plus a preflight that fails loudly if the secret is missing. Without it the job
would fall back to unauthenticated
gh, report0 updated, and exit green —indistinguishable from "nothing needed updating", which is the one outcome this
workflow must never fake.
The three runs stranded by the original version have been approved by hand, so
the queue is moving again.
🤖 Generated with Claude Code