From bcdccd885dc3b73328a26ead192bffec9ce522ce Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Tue, 10 Nov 2026 19:51:33 -0400 Subject: [PATCH] ci: a comment cancels the PR's pr-agent review, because both enter one group `pr-agent` triggers on `pull_request` and on `issue_comment`, and both land in the same concurrency group (`pr-agent-`) with `cancel-in-progress: true`. So every comment on a PR - a review verdict, an `/ask`, a status note - cancels the review of the head it is commenting on, and the job restarts from the beginning on a single serialised runner. Measured 2026-11-10 on PR #2007 (`27a9788`): the review ran 19:21:26 -> cancelled 19:30:31, with `build`, `hrx_build` and CodeQL green and every READY verdict posted; the PR sat with `pr_agent: COMPLETED/CANCELLED` while the runner queue held other work. That is the "red on pr_agent alone" the issue thread (#1993) reports for #1633, #1638, #1675 and #2007. Group by event name as well as number: a `synchronize` still cancels the review of the head it replaced (a newer head makes the older review moot), and a comment no longer cancels a push-triggered review. Verified on the expression: push -> `pr-agent-2007-pull_request`, comment -> `pr-agent-2007-issue_comment`, newer push -> same group as the earlier push. Refs #1993. --- .github/workflows/pr-agent.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index 6ff716d87..013a9f52b 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -38,7 +38,12 @@ jobs: runs-on: [self-hosted, pr-agent] # on the job, not the workflow: a comment that skips the job (a bot's, say) must not cancel a review concurrency: - group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }} + # A comment and a push are different jobs on one serialised model runner: an `/ask` must not cancel the review of + # the PR it is asked about, and a `synchronize` must cancel the review of the head it replaced. Grouping by event + # name keeps push-cancels-push (right: a newer head makes the older review moot) without letting a busy thread + # starve it. Measured 2026-11-10: PR #2007's review ran 19:21:26 -> cancelled 19:30:31, and `issue_comment: + # [created]` puts every comment on the PR into this same group with `cancel-in-progress: true`. + group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name }} cancel-in-progress: true timeout-minutes: 30 # same-repo PRs, and comments by the owner, members or collaborators on a pull request