Skip to content

Grant pull-requests: read So the Live comments Label Read Reaches Private Repositories #2354

Open

Description

@ptr727

Problem

The fix for #1703 reads a pull request's labels live in validate-task.yml's lint job, so a comments label applied after the triggering event still reaches the prose gate. It runs at the caller's contents: read grant. GitHub serves the issue-labels endpoint without a permission only for a public repository, so on a private one the read is refused and the step falls back to the event payload. That is the behavior #1703 describes, and it recurred on a private repository on 2026-10-03.

A reusable workflow cannot raise its caller's grant. The lint job declaring pull-requests: read makes any caller whose stub does not grant it fail at startup, so the grant has to land in the stubs before or with the pin bump that carries it.

Done When

The lint job and every caller stub, the hub's own test-pull-request.yml and the catalog test-pull-request and publish-release snippets included, grant pull-requests: read. Each downstream stub carries it before that repository's pin reaches the change, and a private repository's lint log reads the labels live rather than falling back.

Decided while driving #1703: ship the live read for public repositories first, and roll this out stub by stub with a resync.

Activity

  1. added
    enhancement
    on Oct 4, 2026
  2. ptr727 commented on Oct 15, 2026

    @ptr727
    OwnerAuthor

    Recurred 2026-10-15 on a private downstream repository, three times in one session (HomeAutomation-Config #1069, #1071, #1072). Each first lint run logged "The pull request's labels could not be read live, so the event payload's snapshot decides", and gh run rerun --failed replayed the same snapshot. A later push or a close and reopen cleared it each time.

    Until this lands, drive-pr "The Drive Loop" step 2 makes it worse on a private repository. It says to "add the comments label after creating the PR", the one order the snapshot cannot see. Creating the pull request with gh pr create --label comments puts the label in the opened event's payload, and on that repository it passed first time on every PR created that way.

  3. ptr727 commented on Oct 16, 2026

    @ptr727
    OwnerAuthor

    Another data point from the same private downstream repository on 2026-10-16: ptr727/HomeAutomation-Config#1088 was created with gh pr create --label comments, and its first lint run still logged "The pull request's labels could not be read live, so the event payload's snapshot decides, comments label present: false". gh run rerun --failed replayed the same snapshot, and a close and reopen cleared it. The promotion #1089, created the same way minutes later, passed on its first run. So creating with the label narrows the miss but does not prevent it, and the earlier comment's suggested workaround is not one. Until this lands, a private repository's first lint run has to be read after every pull request create, whatever the label route.

  4. ptr727 commented on Oct 25, 2026

    @ptr727
    OwnerAuthor

    Recurred on ptr727/HomeAutomation-Config#1388 on 2026-10-25, the same way as before. drive-pr "The Drive Loop" step 2 says to "add the comments label after creating the PR". I followed that wording and added the label with gh pr edit. The first lint run then logged "The pull request's labels could not be read live, so the event payload's snapshot decides, comments label present: false". A rerun replays that snapshot, so I closed and reopened the PR, and the fresh run passed. The promotion, ptr727/HomeAutomation-Config#1389, was created with --label comments and passed on its first run.

    Until the grant this issue proposes lands, the step 2 wording keeps causing this on a private repository. Telling the driver to pass --label comments to gh pr create would avoid it.

  5. ptr727 commented on Nov 11, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-10): the hub half merged in #4044 and its branch is deleted, so this claim holds no files. The issue stays open for the lint job grant and the downstream rollout.

    Backlog burndown claim, round 1 (2026-11-10). Branch feature/stub-pr-read-grant, group: #2354 (hub half only: the caller stubs gain the grant, and the lint job grant and downstream rollout stay open here).

    Predicted files:

    • catalog/snippets/workflows/test-pull-request.yml
    • catalog/snippets/workflows/test-pull-request-smoke.yml
    • catalog/snippets/workflows/publish-release.yml
    • .github/workflows/test-pull-request.yml
    • .github/workflows/publish-release.yml
    • docs/reusable-workflows.md
  6. ptr727 commented on Nov 22, 2026

    @ptr727
    OwnerAuthor

    Recurred 2026-11-21 on ptr727/HomeAutomation-Config#1956. I followed drive-pr step 2's wording and added comments with gh pr edit after create. The first lint run logged "labels could not be read live" and failed on comment-added, and a close and reopen cleared it. The promotion #1957, created with --label comments, passed on its first run.

  7. ptr727 commented on Nov 22, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-22): merged into develop as #4334 (part 1, drive-pr and comment-and-doc-style). This claim holds no files. #2354 stays open for the lint job's pull-requests: read grant, which most downstream callers lack (sweep in #4334's body).

    Backlog burndown claim (round 3, 2026-11-22): branch burndown/drive-pr-comments-label. Predicted files: .agents/skills/drive-pr/SKILL.md (and its generated copies), conditionally .github/workflows/validate-task.yml, tests/test_workflow_steps.py, docs/reusable-workflows.md. Extended 2026-11-22: .agents/skills/comment-and-doc-style/SKILL.md and its generated copies.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions