release-bot should use a PAT instead of system token so rolling-PR pushes trigger downstream CI #257
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#257
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Empirical anchor
tmux-tell's first-ever release-toolkit-driven cut (tmux-tell#630, v0.23.0) hit a substrate-gap on 2026-06-29: release-bot pushed
chore(release): prepare v0.23.0at SHA 43cb30 torelease-prep/rolling, but no CI ran on that SHA — the required checktest / lint + build + test (pull_request)stays unsatisfied → PR can't merge.Root cause
Release-bot pushes use the system token (the equivalent of GitHub Actions'
GITHUB_TOKEN). Forgejo Actions follows the GitHub-style anti-recursion safeguard: workflows triggered by system-token pushes are suppressed to avoid infinite loops (release-bot push → workflow runs → workflow pushes → workflow runs → ...).This is a documented Forgejo Actions behavior and intentional at the platform level. The consequence for release-toolkit: every rolling-PR update via release-bot leaves the consumer's required CI checks unsatisfied, blocking merge.
Verified empirically:
test.ymlworkflow run on tmux-tell was at SHA 441f39 (aquartermaster-identity push) — fired.release-bot— did NOT fire any workflow runs.Mitigation paths
Short-term (already shipped on consumer)
tmux-tell PR #TBD adds
workflow_dispatch:to test.yml so operators can manually re-run CI from the Forgejo Actions UI when this class fires. Mitigation, not fix.Long-term (this tracker)
Release-toolkit's release-bot should push using a Personal Access Token (PAT) instead of the system token. PAT-authored pushes are treated as user pushes by Forgejo Actions and DO trigger downstream workflows.
Implementation surface:
reusable-release.ymllikely, or wherever thechore(release): prepare vX.Y.Zcommit gets created + pushed) should authenticate using a PAT secret instead ofsecrets.GITHUB_TOKEN/ system tokenRELEASE_BOT_PATwithrepo:writescope, owned by a non-system user (the existingrelease-botForgejo user works perfectly)docs/integration.mdadopter walkthrough to include the PAT setup stepAlternative: workflow-level token override
Forgejo Actions may support
permissions:or token overrides at the workflow level to allow specific triggers. Worth surveying that surface before committing to PAT — it might be a cleaner fix (no new secret).Composition
workflow_dispatchshort-term mitigation (every adopter that hits the class can short-term-fix with that, long-term-fix with this)What this issue does NOT do
Refs
priority/medium · size/M (substantive but bounded — secret-handling + reusable workflow update + docs)
preparecommit -> cut skipped, falls through to a wrong new rolling PR #259preparecommit -> cut skipped, falls through to a wrong new rolling PR #259Sub-finding: release-bot identity needs
push_whitelist_usernamesmembership, not just a PATSurfaced during the tmux-tell#630 recovery (release-toolkit#259's sibling investigation): the toolkit's path-α design assumes release-bot can direct-push manifest commits to
mainpast branch protection. That requires the release-bot account to be in the consumer repo'spush_whitelist_usernamesformain.Empirical anchor: tmux-tell's
mainbranch protection haspush_whitelist_usernames: ["alex", "quartermaster"]— release-bot is NOT in the list. When Engineer's #635 recovery runbook attempted Step 3 (manifest push as release-bot identity), the push got rejected withForgejo: Not allowed to push to protected branch main. Workaround for the recovery: push from a whitelisted user (quartermaster) with author=release-bot. But in the normal automated cut flow, the workflow's release-bot push would have hit the same rejection if the cut had fired properly.Same root as the original #257 framing: "toolkit assumes a release-bot identity provisioned with push + CI-trigger rights the adopter must actually grant." The PAT (this issue's primary scope) covers the CI-trigger half; the push_whitelist membership covers the branch-protection-bypass half. Both are adopter-setup responsibilities the toolkit currently doesn't surface explicitly.
Suggested scope extension for this tracker:
docs/integration.md: "release-bot user (or whatever identity the toolkit's pushes use) must be added to the consumer repo's branch protectionpush_whitelist_usernamesfor the default branch."reusable-release.yml, probe the consumer repo's branch protection config + fail-loud at workflow start if the configured release-bot identity isn't in the whitelist. Same shape as #124's structural backstop for self-bootstrap re-pin.The two gaps compose well: PAT enables CI-trigger via PR/synchronize events; whitelist membership enables the direct-push manifest commits. An adopter who provisions one but not the other would see asymmetric failures (cuts firing but manifest stuck, OR manifests pushing but CI not triggering).
Refs:
This brings the today-surfaced gap count from #630 to 6:
push_whitelist_usernamesmembership for direct-push manifest path #260Follow-up to 76476 — on operator review the push_whitelist sub-finding has been split out into its own tracker: release-toolkit#260.
The two gaps share root framing ("release-bot identity needs rights the adopter must grant") but are mechanically distinct: #257 is HTTP-token-auth (fixes CI-trigger), #260 is Forgejo branch-protection-allowlist (fixes direct-push). Separate fix paths, separate verification, asymmetric failure modes. The original folded-comment text stays here as cross-ref context; #260 is the dedicated home for the whitelist work going forward.
engineer referenced this issue2026-06-29 20:44:27 +02:00
engineer referenced this issue2026-06-29 21:05:51 +02:00
release-bot referenced this issue2026-06-29 21:22:51 +02:00
Closed by PR #263 merge at
9075ff3(rebased combined head). Bosun manually closing since Do=rebase preserved head commit message (close-keyword not in commit body). All ACs verified clean: 4 #257 bats + 8 dedup bats + release-prep.bats 34/0 on combined-tree per Surveyor 3277 re-pin (verified #262 dedup-wiring filename-keyed version + #257 push hunk byte-identical via API diff).