You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Propagate GH_PAT_DON_PETRY credential rename into standards/workflows/pr-review-mention.yml (unblocks fleet template-drift) #791
The persona-identity fix (#1316 / merged in .github-private#1317) renamed the
dev-lead/persona credential secret GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY
(keeping || secrets.GH_PAT_WORKFLOWS as a transition fallback). #1317 lived in petry-projects/.github-private and updated the seeded stub .github/workflows/pr-review-mention.yml, but it could not touch that stub's canonical source here — standards/workflows/pr-review-mention.yml.
Result: the seeded stub now diverges from the standards baseline, so the template-drift check goes RED on every new .github-private PR (e.g.
.github-private#1324). Per the canary channel rule, the pr-review agent skips
approval on any red CI — so this single drift stalls dev-lead auto-merge
fleet-wide.
Decision on record (maintainer): the rename is intended fleet-wide → propagate it
into the standards source (this issue), not revert the stub.
Change
In standards/workflows/pr-review-mention.yml, mirror the merged stub's
credential wiring:
Credential line → GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}
Update the top-of-file # Requires: comment block to name GH_PAT_DON_PETRY
(canonical) with GH_PAT_WORKFLOWS as the deprecated transition alias.
Reference the merged stub for exact form: petry-projects/.github-private .github/workflows/pr-review-mention.yml (lines ~22-23 and ~42-43, at
main after 8f1c4716). No other behavioral change.
Ordering
This BLOCKS the companion re-seed issue in petry-projects/.github-private.
That re-seed must land only after this merges, or it will revert pr-review-mention.yml back to GH_PAT_WORKFLOWS.
Acceptance criteria
standards/workflows/pr-review-mention.yml credential + Requires block match
the intended GH_PAT_DON_PETRY form.
No behavioral change beyond the secret-name reconcile.
Change fails closed (no step silently reports success if the secret is absent —
the || fallback preserves the old path).
Issue:#791 — Propagate GH_PAT_DON_PETRY credential rename into standards/workflows/pr-review-mention.yml
Scope
Reconcile the credential wiring in the canonical standards/workflows/pr-review-mention.yml so it matches the merged .github-private stub: source the workflows PAT from GH_PAT_DON_PETRY (canonical) with GH_PAT_WORKFLOWS as the || transition fallback, retaining DON_PETRY_BOT_GH_PAT. Secret-name reconcile only — no behavioral change.
Findings (verified against the merged stub + seed pipeline)
The canonical stub currently uses secrets: inherit — it has no explicit credential line. The merged .github-private stub (.github/workflows/pr-review-mention.yml, lines 41–43) switched to an explicit secrets: block with two entries.
The reusable (pr-review-mention-reusable.yml) declares tworequired: true secrets: GH_PAT_WORKFLOWSandDON_PETRY_BOT_GH_PAT. An explicit secrets: block passes only what it lists, so DON_PETRY_BOT_GH_PATmust be carried too, or the ack step breaks. This is why the fix keeps both.
The template-drift guard compares byte-identity of seed-repo-template.sh --emit-workflow, which repins only the uses:/agent_ref: lines and passes comments + secrets: through verbatim. So the uses: ref must stay @pr-review-mention/stable (repin handles per-repo channels) and the companion re-seed will propagate this canonical's block into the stub — which is why the re-seed is ordered after this.
Implementation Checklist
standards/workflows/pr-review-mention.yml: replace secrets: inherit with an explicit block — GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }} and DON_PETRY_BOT_GH_PAT: ${{ secrets.DON_PETRY_BOT_GH_PAT }}
standards/workflows/pr-review-mention.yml: update the top-of-file # Requires: block to name GH_PAT_DON_PETRY (canonical) with GH_PAT_WORKFLOWS as the deprecated transition alias, and document DON_PETRY_BOT_GH_PAT
Leave the uses: ref, on: triggers, and permissions: untouched
Tests to Write
test/workflows/pr-review-mention/stub-secrets.bats — assert the canonical stub sources GH_PAT_WORKFLOWS from the GH_PAT_DON_PETRY || GH_PAT_WORKFLOWS fallback, retains DON_PETRY_BOT_GH_PAT, and no longer uses bare secrets: inherit (fail-closed contract)
Test Command
npx bats test/workflows/pr-review-mention/ and bash .dev-lead/scripts/dev-lead-lint.sh
Replaced secrets: inherit with an explicit block wiring GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}
Retained DON_PETRY_BOT_GH_PAT: ${{ secrets.DON_PETRY_BOT_GH_PAT }} (the reusable declares it required: true)
Updated the top-of-file # Requires: block to name GH_PAT_DON_PETRY (canonical) with GH_PAT_WORKFLOWS as the deprecated transition alias
Left the uses: ref, on: triggers, and permissions: untouched
Added a focused bats regression test for the wiring
Test Results
$ npx bats test/workflows/pr-review-mention/
1..17
ok 1 ack: a human commenter is @-mentioned in the acknowledgement
ok 2 ack: the acknowledgement always carries the pr-review-agent marker
ok 3 ack: never emits a literal @donpetry-bot when the bot is the actor (comment path)
ok 4 ack: never emits a literal @donpetry-bot when the bot self-assigns as reviewer (pull_request path)
ok 5 ack: a human reviewer-assigner is still @-mentioned (pull_request path)
ok 6 guard: excludes comments authored by donpetry-bot itself
ok 7 guard: excludes any comment carrying an <!-- pr-review-agent marker
ok 8 guard: no longer keys the exclusion on the narrow mention-ack string alone
ok 9 guard: still fires on an @donpetry-bot mention
ok 10 guard: still gates comment events on trusted author_association
ok 11 guard: still fires when donpetry-bot is assigned as reviewer
ok 12 install: the tests workflow exists
ok 13 install: every curl download uses bounded retries
ok 14 stub: GH_PAT_WORKFLOWS input uses the GH_PAT_DON_PETRY || GH_PAT_WORKFLOWS fallback
ok 15 stub: retains DON_PETRY_BOT_GH_PAT (required by the reusable's ack step)
ok 16 stub: uses an explicit secrets mapping, not bare 'inherit'
ok 17 reusable: declares GH_PAT_WORKFLOWS and DON_PETRY_BOT_GH_PAT as required
$ bash .dev-lead/scripts/dev-lead-lint.sh
[lint] shellcheck on 24 file(s)...
[lint] validating .github/CODEOWNERS...
OK: .github/CODEOWNERS
[lint] all checks passed
$ yamllint -c <ci.yml config> standards/workflows/pr-review-mention.yml
YAMLLINT PASS
test/workflows/pr-review-mention/stub-secrets.bats: new regression test pinning the GH_PAT_DON_PETRY fallback, DON_PETRY_BOT_GH_PAT retention, and the explicit-mapping (non-inherit) shape. Auto-gated by pr-review-mention-tests.yml (its paths: already include standards/workflows/pr-review-mention.yml).
Notes
Deviation worth flagging for review: the issue described the canonical as carrying an explicit credential line to edit, but it actually used secrets: inherit. I converted it to an explicit secrets: block — the only way to express the GH_PAT_DON_PETRY || GH_PAT_WORKFLOWS fallback — and kept DON_PETRY_BOT_GH_PAT, which pr-review-mention-reusable.yml declares required: true. Dropping it (a naive read of the one-line instruction) would have broken the ack step and violated the fail-closed AC. This matches the merged .github-private stub (.github/workflows/pr-review-mention.yml lines 41–43) verbatim on the secrets: surface.
Fail-closed: if both GH_PAT_DON_PETRY and GH_PAT_WORKFLOWS are absent, the expression is empty and the reusable's required: true gate + the gh calls fail the job — no silent success.
uses: ref left as @pr-review-mention/stable per the file's own AGENTS header; the seed/repin pipeline (seed-repo-template.sh) repins that line per-consumer and passes comments + secrets: through verbatim, so the re-seed will propagate this block.
Requires block: written per this issue's intent (canonical GH_PAT_DON_PETRY + deprecated alias). The interim .github-private stub still names the old secret in its comment because Org Status — 2026-10-11 #1317 could not touch this source; the companion re-seed regenerates that stub from this file, so this wording becomes authoritative — hence the ordering dependency called out in the issue.
Ordering reminder: the companion re-seed in petry-projects/.github-private must land only after this merges, or it will revert the stub to GH_PAT_WORKFLOWS.
Activity
don-petry commentedon Jul 19, 2026
Dev-Lead Implementation Plan
Issue: #791 — Propagate GH_PAT_DON_PETRY credential rename into standards/workflows/pr-review-mention.yml
Scope
Reconcile the credential wiring in the canonical
standards/workflows/pr-review-mention.ymlso it matches the merged.github-privatestub: source the workflows PAT fromGH_PAT_DON_PETRY(canonical) withGH_PAT_WORKFLOWSas the||transition fallback, retainingDON_PETRY_BOT_GH_PAT. Secret-name reconcile only — no behavioral change.Findings (verified against the merged stub + seed pipeline)
secrets: inherit— it has no explicit credential line. The merged.github-privatestub (.github/workflows/pr-review-mention.yml, lines 41–43) switched to an explicitsecrets:block with two entries.pr-review-mention-reusable.yml) declares tworequired: truesecrets:GH_PAT_WORKFLOWSandDON_PETRY_BOT_GH_PAT. An explicitsecrets:block passes only what it lists, soDON_PETRY_BOT_GH_PATmust be carried too, or the ack step breaks. This is why the fix keeps both.seed-repo-template.sh --emit-workflow, which repins only theuses:/agent_ref:lines and passes comments +secrets:through verbatim. So theuses:ref must stay@pr-review-mention/stable(repin handles per-repo channels) and the companion re-seed will propagate this canonical's block into the stub — which is why the re-seed is ordered after this.Implementation Checklist
standards/workflows/pr-review-mention.yml: replacesecrets: inheritwith an explicit block —GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}andDON_PETRY_BOT_GH_PAT: ${{ secrets.DON_PETRY_BOT_GH_PAT }}standards/workflows/pr-review-mention.yml: update the top-of-file# Requires:block to nameGH_PAT_DON_PETRY(canonical) withGH_PAT_WORKFLOWSas the deprecated transition alias, and documentDON_PETRY_BOT_GH_PATuses:ref,on:triggers, andpermissions:untouchedTests to Write
test/workflows/pr-review-mention/stub-secrets.bats— assert the canonical stub sourcesGH_PAT_WORKFLOWSfrom theGH_PAT_DON_PETRY || GH_PAT_WORKFLOWSfallback, retainsDON_PETRY_BOT_GH_PAT, and no longer uses baresecrets: inherit(fail-closed contract)Test Command
npx bats test/workflows/pr-review-mention/andbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jul 19, 2026
Dev-Lead: Implementation Complete
Plan Execution
secrets: inheritwith an explicit block wiringGH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}DON_PETRY_BOT_GH_PAT: ${{ secrets.DON_PETRY_BOT_GH_PAT }}(the reusable declares itrequired: true)# Requires:block to nameGH_PAT_DON_PETRY(canonical) withGH_PAT_WORKFLOWSas the deprecated transition aliasuses:ref,on:triggers, andpermissions:untouchedTest Results
Files Changed
standards/workflows/pr-review-mention.yml: credential +# Requires:reconcile (secret-name only;uses:/triggers/permissions unchanged).test/workflows/pr-review-mention/stub-secrets.bats: new regression test pinning theGH_PAT_DON_PETRYfallback,DON_PETRY_BOT_GH_PATretention, and the explicit-mapping (non-inherit) shape. Auto-gated bypr-review-mention-tests.yml(itspaths:already includestandards/workflows/pr-review-mention.yml).Notes
secrets: inherit. I converted it to an explicitsecrets:block — the only way to express theGH_PAT_DON_PETRY || GH_PAT_WORKFLOWSfallback — and keptDON_PETRY_BOT_GH_PAT, whichpr-review-mention-reusable.ymldeclaresrequired: true. Dropping it (a naive read of the one-line instruction) would have broken the ack step and violated the fail-closed AC. This matches the merged.github-privatestub (.github/workflows/pr-review-mention.ymllines 41–43) verbatim on thesecrets:surface.GH_PAT_DON_PETRYandGH_PAT_WORKFLOWSare absent, the expression is empty and the reusable'srequired: truegate + theghcalls fail the job — no silent success.uses:ref left as@pr-review-mention/stableper the file's own AGENTS header; the seed/repin pipeline (seed-repo-template.sh) repins that line per-consumer and passes comments +secrets:through verbatim, so the re-seed will propagate this block.GH_PAT_DON_PETRY+ deprecated alias). The interim.github-privatestub still names the old secret in its comment because Org Status — 2026-10-11 #1317 could not touch this source; the companion re-seed regenerates that stub from this file, so this wording becomes authoritative — hence the ordering dependency called out in the issue.petry-projects/.github-privatemust land only after this merges, or it will revert the stub toGH_PAT_WORKFLOWS.feat: implement issue #791 — Propagate GH_PAT_DON_PETRY credential re…