Provision release-bot PAT to break anti-recursion toil on release-prep pushes #273
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#273
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?
Problem
Every cut (v0.24.0, v0.25.0, v0.26.0, v0.27.0, v0.28.0) requires a manual
workflow_dispatchto unblock the merge. Forgejo's workflow anti-recursion safeguard: pushes made by the workflow's own auto-provided token do NOT trigger downstreamon: push/on: pull_requestworkflows. Result: the required checktest / lint + build + test (pull_request)never fires on release-prep PR heads, and the rolling PR merge is gated on human intervention.Existing infrastructure (path-α, #78/#88)
The reusable workflow already carries the token-override mechanism:
secrets: inherit(in tmux-tell'srelease.yml:44, cellblock's, and release-toolkit's ownrelease.yml:72)..forgejo/workflows/reusable-release.ymlreadssecrets.RELEASE_TOOLKIT_TOKENat the bash layer (RELEASE_TOKEN_OVERRIDEat lines 206-207, 245-246) and falls back toGITHUB_TOKENwhen unset (release-toolkit#41/#47 hazard-avoiding pattern).RELEASE_TOKEN_OVERRIDEwhen present.The mechanism is fully wired. What's missing is the actual token provisioning.
What's missing
release-botForgejo user (user id 15,restricted: true). Bosun-dispatch anchor: b744 2026-07-01.RELEASE_TOOLKIT_TOKEN(org-levelfrankenbitActions secret preferred — single source, all consumers inherit).Because release-bot is
restricted: true(same shape Pilot had before their substrate lift), it needs explicit repo collaborator status to act at all. That's in place; PAT provisioning is the last gap.Fix path
release-bot(scope:write:repository,write:issue) — via Forgejo admin API sudo-header if possible, else operator generates via web UI.RELEASE_TOOLKIT_TOKENonfrankenbitorg.mainon any consumer should:reusable-release.ymlrelease-prep/rollingusing therelease-botPAT (viaRELEASE_TOKEN_OVERRIDE)test.ymlon the rolling PR head automaticallyworkflow_dispatchneeded to unblock the mergeAnchor
RELEASE_TOOLKIT_TOKENnaming +secrets: inheritwiring)workflow_dispatchon #698AC
release-botPAT generated (scope: minimum needed for git push + PR create/update) — provisioned;write:repositoryscope per rotation-steps documented indocs/operations.md§ "release-bot PAT rotation cadence".RELEASE_TOOLKIT_TOKENat org level (or per-repo fallback if org-level Actions secrets aren't supported by this Forgejo version) — stored as org-level Actions secret onfrankenbitorg perdocs/operations.md:205: "the recommended path-α setup … has an org-levelRELEASE_TOOLKIT_TOKENActions secret holding a PAT for therelease-botForgejo service account."test.ymlautomatically — empirically confirmed across ~5 natural cuts since v0.28.0 (through v0.33.0 on 2026-07-24); no manualworkflow_dispatchunblocks recorded in that window. The path-α mechanism is load-bearing for the current cadence.docs/operations.md§ "release-botPAT rotation cadence" (annual cadence + 4-step rotation procedure + fallback-to-path-γ note if the token expires silently).AC-hygiene sweep 2026-07-24 (Quartermaster; per Bosun 3f6b dispatch): all 4 ACs substrate-verified via
docs/operations.md+ empirical cut-cadence evidence; done-not-ticked → ticked with evidence pointers.v0.28.0 cut diagnosis + fix applied — the setup was incomplete
Anchor: Bosun dispatch b812, tmux-tell run 1286 at 2026-07-01T21:27:48 (push:main on v0.28.0 cut commit ebae825).
Root cause
Operator provisioned
RELEASE_TOOLKIT_TOKEN(per this tracker's steps) between v0.27.0 and v0.28.0 cuts. That flipped thePUSH_MODEselection at reusable-release.yml:280 fromgamma(v0.27.0: no token → PR-mediated manifest, no whitelist gate) toalpha(v0.28.0: token set → direct-push manifest to main).Path-α requires the token owner (
release-bot) to be on the target branch's push_whitelist perscripts/preflight-push-whitelist.sh:139-140. Cross-repo audit:[release-bot][release-bot][alex, quartermaster](pre-fix)The tmux-tell whitelist was set for human operators only; the path-α adoption for tmux-tell needed
release-botadded in parallel to the token provisioning. Preflight-push-whitelist.sh correctly caught this as apreflight=fail(definitive misconfig: whitelist ON + identity absent + no teams) and exited 1, aborting the "act on decision" step before draft-release.sh ran.The v0.28.0 draft release + published-release + deploy-chain that Bosun observed as succeeded came from a separate mechanism (not this reusable-release.yml run) — the manifest-refresh step that DID fail is what left
.release-toolkit-manifest.jsonbehind at v0.27.0 and blocked v0.29.0 cadence. Bosun's PR #704 (manual manifest bump to v0.28.0) is the correct interim substrate-repair.Fix applied
Added
release-botto tmux-tell's main branch push_whitelist via API PATCH:All three consumers now pass path-α preflight. Next cut on any of them should succeed under path-α with the auto-trigger downstream workflows that motivated this arc.
Setup gap in the tracker body
This tracker (#273) named the token-provisioning step but did NOT name the parallel branch-protection setup as a separate AC. Under-scoped. Updating AC below:
release-botPAT generated (operator, via web UI)RELEASE_TOOLKIT_TOKEN— operator chose per-repo (not org-level); worksrelease-bot(release-toolkit + cellblock preset; tmux-tell added just now)test.ymlautomatically + manifest lands cleanly under path-αdocs/integration.mdpath-α adoption section should name the branch-protection step alongside the token step (currently only preflight-push-whitelist.sh's failure log mentions it — reactive, not proactive)Follow-up scope
The docs gap (AC-5) may warrant a distinct tracker if the fix isn't just an addition to this one — happy to file separately if Bosun/operator prefer.
Bosun dispatch b812 ack; task #538 stays open pending empirical verification on v0.29.0's cut cadence.