Repository navigation
Description
What happened
The 2026-08-11 t3x upstream sync (daily) run (31475694151) did everything right and then could not push:
✓ sync clean and verified
Run git push --force-with-lease origin main
! [remote rejected] main -> main (refusing to allow a GitHub App to create or update
workflow `.github/workflows/release.yml` without `workflows` permission)
error: failed to push some refs
Rebase was clean (Successfully rebased and updated refs/heads/main), typecheck was 0 errors, and the full suite passed. This is not a conflict and not a test failure.
Root cause
.github/workflows/t3x-upstream-sync.yml:18 declares:
permissions:
contents: write
issues: writeand actions/checkout@v6 keeps default persist-credentials, so the final push authenticates as GITHUB_TOKEN. GITHUB_TOKEN is not permitted to create or update files under .github/workflows/ — and this is not fixable from the permissions: block, because workflows is not one of its available keys.
It has never mattered before because no absorbed upstream commit had touched a workflow file. This run's range includes upstream 1b120f352 — fix(ci): extend release publish timeout (pingdotgg#6034) — which edits .github/workflows/release.yml. That is the first one, and it will now block every sync that carries an upstream CI change.
Blast radius, and the one piece of good news
origin/mainis unchanged (29000937a). Nothing was force-landed.- Consequently the seven currently-open PRs are all still
MERGEABLE/CLEAN. The usual "sync force-rewrote main and orphaned every branch" hazard did not happen here. - A recovery tag was created:
t3x/last-good-20260811-090045. - The failure is silent in the sense that matters: no
t3x-syncissue was opened and not3x/sync-*branch was pushed, because the escalation path is wired to conflict, not to a failed push.
Fix — needs a credential, so it is not something an agent should do unattended
Push with a token that carries the workflow scope, and hand it to checkout so persist-credentials uses it:
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.T3X_SYNC_TOKEN }}T3X_SYNC_TOKEN must be either a classic PAT with repo + workflow scope, or a GitHub App installation token whose app is granted the Workflows: write permission. Creating that secret is the blocking step.
Worth doing at the same time, since this run proves the gap: make a failed push escalate. Right now only a conflict opens an issue, so a sync that verifies clean and then fails to land looks identical to a sync that never ran.
Activity
fix(t3x): push the sync as a workflow-scoped token, and escalate when…
fix(t3x): push the sync as a workflow-scoped token, and escalate when…
fix(t3x): push the sync as a workflow-scoped token, and escalate when…