Skip to content

fix(ci): remove the invalid workflows permission that killed every sweep - #288

Merged
catomean merged 1 commit into
mainfrom
ci/fix-invalid-workflows-scope
Aug 7, 2026
Merged

fix(ci): remove the invalid workflows permission that killed every sweep#288
catomean merged 1 commit into
mainfrom
ci/fix-invalid-workflows-scope

Conversation

@catomean

@catomean catomean commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What happened

#287 added workflows: write to auto-merge.yml's permissions. That key does not exist — GitHub refuses to parse the file:

HTTP 422: failed to parse workflow: (Line: 35, Col: 3): Unexpected value 'workflows'

A workflow that fails to parse fires on no trigger at all: no cron, no workflow_run, no dispatch. Auto-merge has been dead since #287 merged at 14:08Z — the run list confirms zero sweeps in 5 hours on a */10 cron.

The truth #287 was reaching for

GITHUB_TOKEN has no scope of any kind that permits writing workflow files. A PR editing .github/workflows/ therefore reads as MERGEABLE/BLOCKED to the bot (per-viewer status) and every merge path — gh pr merge, --auto, REST — refuses. That is a platform limit, not a config gap; no permissions line fixes it.

Policy, now documented at the permissions block: workflow-editing PRs take one gh pr merge --squash with a personal token; everything else self-merges via the sweep.

🤖 Generated with Claude Code

`workflows: write` is not a valid GITHUB_TOKEN permissions key. GitHub
refuses to parse the file at all — "Unexpected value 'workflows'" — which
silently disabled every trigger: no cron sweep, no workflow_run sweep, no
dispatch. Auto-merge was dead from the moment #287 landed (14:08Z) until now.

The underlying truth #287 was reaching for: GITHUB_TOKEN has NO scope that
permits writing workflow files, so a PR that edits .github/workflows/ can
never be merged by the sweep — it reads as MERGEABLE/BLOCKED to the bot and
every merge path refuses. That is a platform limit, not a config gap. Such
PRs take one `gh pr merge --squash` with a personal token; everything else
self-merges. Documented at the permissions block.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@catomean
catomean merged commit ca34959 into main Aug 7, 2026
8 checks passed
@catomean
catomean deleted the ci/fix-invalid-workflows-scope branch August 7, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant