Skip to content

pr-review: intermittent fine-grained-PAT pickup on pull_request events (auth-scope guard fails) #561

Closed

Description

@don-petry

Parent: #495 · Work type: Fix · Priority: low · Found by post-implementation health check.

Symptom

On markets, a pull_request-event pr-review run (27311242435, 2026-06-10T22:46Z) failed at Verify auth scopes with:

Fine-grained PAT detected — fine-grained PATs are not supported by this workflow.

The run picked up DON_PETRY_BOT_GH_PAT (fine-grained) instead of DON_PETRY_BOT_GH_PAT_CLASSIC. The guard correctly failed loud rather than post a review it can't approve. It is intermittent (~1/8 recent markets runs; surrounded by successes) and self-recovers on the next event.

Notes

  • Both PATs are org secrets with visibility: all, so it is not a visibility gap — looks like a transient secret-resolution hiccup specific to some pull_request events; the reusable's GH_TOKEN: classic || fine-grained fallback then resolves to the fine-grained one.
  • Not a conversion regression (the @pr-review/stable pin forwards both PATs via secrets: inherit; the fallback logic is pre-existing).
  • Low priority: self-recovers, no bad reviews posted. Watch for recurrence; if it persists, consider removing the fine-grained fallback so a missing classic PAT fails fast and obviously rather than intermittently.

Activity

  1. don-petry commented on Jun 11, 2026

    @don-petry
    CollaboratorAuthor

    Root cause found & fixed. markets had a repo-level secret override shadowing the org-level classic PAT, so pr-review resolved the fine-grained DON_PETRY_BOT_GH_PAT (which can't addPullRequestReview) and the auth-scope guard failed on pull_request events.

    @don-petry removed the repo-level override. Re-tested (markets pr-review run 27348525831 on #207): 'Verify auth scopes' now passes, run completed/success — markets now uses the org-level classic PAT (visibility=all). Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions