Skip to content

ci: auto-update-prs must use RELEASE_PAT, not GITHUB_TOKEN - #676

Merged
cuttlefisch merged 1 commit into
mainfrom
ci/auto-update-uses-pat
Aug 7, 2026
Merged

ci: auto-update-prs must use RELEASE_PAT, not GITHUB_TOKEN#676
cuttlefisch merged 1 commit into
mainfrom
ci/auto-update-uses-pat

Conversation

@cuttlefisch

Copy link
Copy Markdown
Owner

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_TOKEN raises its pull_request event with
actor = github-actions[bot], and GitHub gates bot-actored runs at
action_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, only
the actor differs:

15:12  action_required  actor=github-actions[bot]   <- the auto-update
14:37  failure          actor=cuttlefisch
11:36  success          actor=cuttlefisch

The fix

Use 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 missing. Without it the job
would fall back to unauthenticated gh, report 0 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

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>
@cuttlefisch cuttlefisch added the release:none Skip version bump on merge label Aug 6, 2026
@cuttlefisch
cuttlefisch enabled auto-merge August 6, 2026 16:14
@cuttlefisch
cuttlefisch merged commit 49961c1 into main Aug 7, 2026
59 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:none Skip version bump on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant