feat(2036): the remaining board writers authenticate as the App, tranche 3 - #273
Merged
Conversation
…che 3 (backend#2036)
Four workflows, seven token sites:
kanban-closure-router 3 card + sibling-merge label + closure comment
fr-pass-comment 2 card + outcome comment + reaction
kanban-reconcile 1 job-level env, expanded to 6 per-step
customer-priority-bump 1 priority label on the issue
All four need `issues: write` as well as `organization_projects: write`, which the
App gained after tranche 2 -- that is why they are here rather than in tranche 1.
`add-to-kanban` is deliberately NOT here. It is a COPY, duplicated byte-for-byte
into all 19 repos with caller-drift comparing blob shas against .github's copy, so
migrating it is a 19-PR sweep where every other repo must merge BEFORE .github or
the org audit goes red on main until the last one lands. It gets its own tranche
for that reason alone.
In kanban-reconcile, GH_TOKEN moves from job-level env to the six steps that
actually call gh, because a job-level env cannot read a step output. Three of its
nine steps never needed a credential and no longer carry one.
THREE STALE PROSE REFERENCES FIXED IN THE SAME CHANGE, because leaving them is the
defect this epic is about -- a document that describes behaviour the code no longer
has:
- The MIN_SCOPE guard's ERROR MESSAGE told operators to "Check
PROJECTS_KANBAN_TOKEN still has org-wide contents:read". That is remediation
for a credential this workflow no longer uses. It now names the App, and names
the new failure mode: an App is installed on SELECTED repos, so a repo added to
the org but never added to the installation reads as absent exactly the way an
exhausted PAT did.
- "the PROJECTS_KANBAN_TOKEN write rule" is now "the board-write rule". A rule
named after a secret goes stale the moment the secret does.
- The counted-not-fatal rationale cited the shared-PAT 5,000/hr budget as the
likeliest cause of a 403. The App removes that cause but not the class, so the
comment now says which part changed and which part did not.
NO FALLBACK TO THE PAT, consistent with tranches 1 and 2.
Still on PROJECTS_KANBAN_TOKEN after this: add-to-kanban (the copy sweep), fr-gate
(its own tranche, last -- it is a required check on every promotion, so if its
board reads break, the train that would carry the fix is the broken thing), and the
four audits caller-drift / standards-sync / merge-settings-drift / bricked-prs.
Verified: actionlint clean on all four; all four parse; kanban-columns selftest
10/10; caller-drift selftest 176/176; no GH_TOKEN in these files resolves to the
PAT.
Refs backend#2036
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2036. Third tranche — the board writers that also need
issues: write.kanban-closure-routerfr-pass-commentkanban-reconcilekeep-openshieldcustomer-priority-bumpprioritylabel on the issueThese need
issues: writeas well asorganization_projects: write, which is why they weren't in tranche 1 — the App only gained it after tranche 2.add-to-kanbanis deliberately not hereIt is a copy, not a reusable — duplicated byte-for-byte into all 19 repos, with
caller-driftcomparing blob shas against.github's copy. Migrating it is a 19-PR sweep where every other repo must merge before.github, or the org audit goes red onmainuntil the last one lands. That earns its own tranche.Three stale prose references fixed in the same change
Leaving these would be the exact defect this epic is about — a document describing behaviour the code no longer has.
MIN_SCOPEguard's error message told operators to "Check PROJECTS_KANBAN_TOKEN still has org-wide contents:read" — remediation for a credential this workflow no longer uses. It now names the App and the new failure mode: an App is installed on selected repos, so a repo added to the org but never added to the installation reads as absent exactly the way an exhausted PAT did.kanban-reconcile's env moveGH_TOKENmoves from job-level to the six steps that actually callgh. A job-level env can't read a step output, and the upside is that three of its nine steps never needed a credential and no longer carry one.What's still on the PAT after this
add-to-kanban(copy sweep) ·fr-gate(its own tranche, last) · the four auditscaller-drift/standards-sync/merge-settings-drift/bricked-prs.fr-gategoes last on purpose: it's a required check on every promotion, so if its board reads break, the train that would carry the fix is the broken thing.skip-fr-gateis the escape hatch, and that's worth knowing before it's needed.Verification
actionlintclean on all four · all four parse ·kanban-columnsselftest 10/10 ·caller-driftselftest 176/176 · noGH_TOKENin these files resolves to the PAT.Same limit as before: callers pin
@mainand this isdevelop, so merging is inert fleet-wide until.githubpromotes.fr-pass-commentandkanban-closure-routerare event-driven andkanban-reconcileis a cron — none is exercised by a PR check, so CI green here is lint-and-parse strength, not proof.Note
Medium Risk
These workflows drive live kanban moves, issue labels, and
/fr-passreporting; a misconfigured App installation or missingissues: writewould break automation org-wide, though the deliberate lack of PAT fallback makes failures visible rather than silent.Overview
Tranche 3 of backend#2036 moves the remaining board workflows that need both
organization_projects: writeandissues: writeoff the shared human PAT onto the tracebloc-release-train GitHub App.Each of
customer-priority-bump,fr-pass-comment,kanban-closure-router, andkanban-reconcileadds a Mint an installation token step (actions/create-github-app-tokenwithRELEASE_TRAIN_APP_*secrets andowner: ${{ github.repository_owner }}for org-scoped ProjectV2 access). Every formerGH_TOKEN: ${{ secrets.PROJECTS_KANBAN_TOKEN }}site now uses${{ steps.app-token.outputs.token }}only—no PAT fallback, so a broken App path cannot masquerade as a successful migration.In
kanban-reconcile,GH_TOKENis removed from job-levelenvand set on the six steps that callgh, since job env cannot reference the mint step output.kanban-closure-routeralso wires the App token into the Determine target Status step (alongside the update/label steps), enabling the cross-repo closer GraphQL lookup that previously had no token.Operator-facing comments are refreshed:
MIN_SCOPEerrors now point at App installation coverage andcontents:read; PROJECTS_KANBAN_TOKEN write rule wording becomes the credential-neutral board-write rule; the sibling-merge counted-not-fatal note explains App installation gaps as the new 403 class after the PAT budget cause is gone.Reviewed by Cursor Bugbot for commit 8557d36. Bugbot is set up for automated code reviews on this repo. Configure here.