Skip to content

PR review-cycle skill: drop the Copilot re-review wait; read CI without check runs #74

Closed

Description

@rdcoe

Description

The xpq-pr-review-cycle skill stalls or blocks on three things that don't match how the repos and the Claude token behave (seen on XP-Quest/xpq-api#129):

  1. Copilot does not re-review on push. It reviews once, when the PR is opened. Steps 3 and 6 wait for a re-review on each new head that never arrives.
  2. PRs into dev have no CI. xpq-api's only workflow (pr-lifecycle.yml) runs on PRs into main, so gh pr checks reports "no checks". Step 8 resolves threads only on green CI, so a feature → dev PR can never get its threads resolved.
  3. The fine-grained token cannot read check runs. GitHub does not offer a Checks permission for fine-grained personal access tokens, so gh pr checks fails with "Resource not accessible by personal access token". The README's Credentials list asks for "Checks read", which cannot be granted.

Change:

  • Steps 3 and 6: one Copilot review per PR; after fix pushes, go straight to CI. No re-review wait or rounds.
  • Step 7: read CI from workflow runs on the head sha (Actions API, gh run list --commit), excluding the Copilot review run. When no CI workflow runs for the PR's base, the full local test suite passing on the current head stands in, and the report says so.
  • Step 8: resolve condition uses the Step 7 result.
  • README Credentials: replace Checks read with Actions read.

Area

DevOps/Infra (internal tooling)

Acceptance Criteria

  • The skill no longer waits for a Copilot re-review after fix pushes.
  • Step 7 works with the fine-grained token (no check-runs API).
  • A PR with no CI on its base can reach "ready to merge" on a passing local suite, stated in the report.
  • README Credentials lists only permissions a fine-grained token can be granted.
  • bash scripts/tests/run_tests.sh passes.

SR&ED Screening

  • I have considered whether this involves technological uncertainty and concluded it does not.

Activity

  1. added
    engineering
    on Oct 17, 2026
  2. rdcoe commented on Oct 17, 2026

    @rdcoe
    ContributorAuthor

    Commit 8ac5840 (#74: skill: single Copilot round; read CI from workflow runs):

    • Steps 3 and 6: Copilot reviews once, when the PR opens (confirmed on XP-Quest/xpq-api#129: one review on the first commit, none on two later pushes). Step 3 now accepts a Copilot review on any commit of the PR, and the re-review rounds and thread-id bookkeeping are gone. Requesting a re-review was ruled out: the earlier attempt never produced one.
    • Step 7: gh pr checks and the check-runs API need a Checks permission that fine-grained tokens cannot be granted. Workflow runs (gh run list --commit) need only Actions read and give the same pass/fail for these repos, which use GitHub Actions only. Runs with event: dynamic are skipped because the Copilot review shows up as one.
    • No CI on base: xpq-api runs workflows only on PRs into main, so a feature → dev PR never gets runs. A passing full local suite on the exact head now stands in, reported as such and not called CI. Ruled out: adding CI on dev PRs (a separate repo decision).
    • Steps 8 and 9: the resolve condition and the report refer to the Step 7 result.
    • README Credentials: Checks read → Actions read.
  3. added 2 commits that reference this issue on Oct 17, 2026
  4. rdcoe commented on Oct 17, 2026

    @rdcoe
    ContributorAuthor

    Review fixes from Copilot on #75 (all in Step 7):

    • 866bf9c #74: skill: re-read headRefOid before reading CI runs — Step 1's headRefOid goes stale once Step 6 pushes fixes, and the dropped re-review poll was what used to refresh it. Step 7 now re-reads it first, so CI is judged on the fixed commit.
    • 4d35d88 #74: skill: gate on applicable workflows' newest runs — listing every run on the sha mixed in unrelated workflows, runs from an earlier base, and superseded runs (pr-lifecycle runs again on edited, so a Step 2 body fix can replace an earlier failure on the same sha). It also inferred "no CI" from no runs appearing within 2 minutes, which a delayed run or a merge conflict would fake. Step 7 now works out which workflows apply from their pull_request triggers (branches, types, paths/paths-ignore), checks the newest run of each with gh run list --workflow <file> --limit 1, and uses the local suite only when no workflow applies. A missing run for an applicable workflow blocks and is reported. Ruled out: a fixed wait time (cannot tell "late" from "never").
  5. rdcoe commented on Oct 17, 2026

    @rdcoe
    ContributorAuthor

    3b3e7bc #74: skill: hand thread resolution to the user — running the skill on #75 showed resolveReviewThread returns FORBIDDEN ("Resource not accessible by personal access token") for the fine-grained token with Pull requests read/write. Step 8 now posts the disposition replies and lists each thread's #discussion_r<id> link for the user to resolve; Step 9 treats those listed threads as expected rather than blocking. Ruled out: granting the token whatever the mutation needs, since if that is Contents write the token could merge.

  6. added 3 commits that reference this issue on Oct 17, 2026
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

    engineering

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions