Skip to content

#74: Review-cycle skill: one Copilot round; read CI from workflow runs - #75

Merged
rdcoe merged 5 commits into
mainfrom
74-review-cycle-ci-rereview
Oct 17, 2026
Merged

rdcoe merged 5 commits into
mainfrom
74-review-cycle-ci-rereview

Conversation

@rdcoe

@rdcoe rdcoe commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements #74 — the review-cycle skill stalled on XP-Quest/xpq-api#129: it waited for a Copilot re-review that never comes, and could not resolve threads because gh pr checks fails with the fine-grained token and PRs into dev have no CI. The skill now does one triage round, reads CI from workflow runs, and accepts a passing local suite on the head when the base has no CI. The README's token permissions swap Checks read (not offered for fine-grained tokens) for Actions read. Thread resolution moves to the user, because the fine-grained token cannot resolve threads.

SR&ED Linkage

  • Related research issue: N/A
  • Contribution type: N/A — routine engineering (internal tooling docs)

Lifecycle

Test Plan

  • bash scripts/tests/run_tests.sh — 244/244 ok (on 8ac5840 and again on 4d35d88)
  • gh run list -R XP-Quest/xpq-api --commit <head of xpq-api#127> --json name,event,status,conclusion with the current fine-grained token — returns branch-cleanup, pr-lifecycle and Running Copilot Code Review (event: dynamic), all success; the check-runs API on the same sha returns "Resource not accessible by personal access token"
  • Skill run end to end on this PR with the fine-grained token: Step 7 read the newest pr-lifecycle run on 4d35d88 (success); thread replies posted
  • Thread resolution — resolveReviewThread returns FORBIDDEN ("Resource not accessible by personal access token") with Pull requests read/write, so 3b3e7bc hands resolution to the user (Steps 8–9)

Notes for Reviewer (self, for now)

Review follow-up (Copilot, 4 findings)

Finding Disposition
Step 7 run query not scoped to the current base FIX in 4d35d88 — only workflows whose triggers apply to the base are read
headRefOid stale after fix pushes FIX in 866bf9c — re-read before querying runs
Superseded runs on the same sha block a corrected PR FIX in 4d35d88 — newest run per workflow only
"No runs in 2 minutes" does not prove no CI FIX in 4d35d88 — decided from triggers; a missing run blocks

🤖 Generated with Claude Code

Copilot reviews a PR once, when it opens, so drop the re-review wait
and rounds. Fine-grained tokens have no Checks permission, so read CI
from workflow runs (Actions read) instead of gh pr checks. Where the
base has no CI (PRs into dev), a passing local suite on the head
stands in, so threads can be resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 01:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

CI gating can accept stale or unrelated results, bypass expected workflows, or remain blocked by superseded failures.

4 open issues
What changed in this PR

Updates the PR review-cycle skill for #74 to avoid re-review waits and support workflow-based CI checks.

Changes:

  • Limits Copilot triage to one round.
  • Uses workflow runs for CI, with a local-test fallback for bases without CI.
  • Updates token permissions and readiness reporting.
File Description
skills/​xpq-pr-review-cycle.md Revises review polling, CI evaluation, thread resolution, and reporting.
README.md Documents Actions read permission and the revised review cycle.

Review effort: Balanced

Comment thread skills/xpq-pr-review-cycle.md Resolved
Comment thread skills/xpq-pr-review-cycle.md Resolved
Comment thread skills/xpq-pr-review-cycle.md Resolved
Comment thread skills/xpq-pr-review-cycle.md Resolved
rdcoe and others added 2 commits October 16, 2026 21:56
Step 1's headRefOid is stale after Step 6 pushes fixes, and the
dropped re-review poll no longer refreshes it. Without a re-read,
Step 7 could pass on the pre-fix commit's runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Listing every run on the head sha mixed in other workflows, runs from
an earlier base and superseded runs, and treated "no runs yet" as "no
CI". Step 7 now decides which workflows apply from their pull_request
triggers (branches, types, paths), takes the newest run of each, and
falls back to the local suite only when none apply. A missing run for
an applicable workflow blocks instead of falling back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rdcoe and others added 2 commits October 16, 2026 22:18
resolveReviewThread is refused for the fine-grained token even with
Pull requests read/write. Step 8 now posts the replies and lists each
thread's link for the user to resolve; Step 9 accepts unresolved
threads that are on that list. README notes the limitation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The authority line let CLAUDE.md §8 win over the skill, and §8 still
said to resolve every thread, which the token cannot do. The skill
now owns the review procedure; §13 and the conventions doc still win
where they overlap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rdcoe
rdcoe merged commit bf3627c into main Oct 17, 2026
1 check passed
@rdcoe
rdcoe deleted the 74-review-cycle-ci-rereview branch October 17, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants