From 16263ba0d6b8c99b6e29f5946f6c4c325ccb51c9 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 15 Nov 2026 05:18:16 -0400 Subject: [PATCH] pr-agent: only command comments (/review /describe /improve /ask) ask for a coder-llm window; newer push replaces a waiting reviewer Follow-up to #2509 (engine#2509 review): with the model ticketed, every trusted comment would open a 30B GPU window and then show a red 'reviewer unavailable'. The reviewer job now runs for pull_request events and for trusted comments that start with a PR-Agent command, and has its own concurrency group with cancel-in-progress. Patch v3 by cl-infra; pushed by the orchestrator (workflow scope). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr-agent.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index b821cf19c..6a61ce3ee 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -40,10 +40,19 @@ jobs: # so "no review" must be visible as a red reviewer, never as green), and pr_agent below does not run. reviewer: runs-on: [self-hosted, pr-agent] + # its own group (not pr_agent's, so the two jobs of one run never cancel each other), keyed the same way: a newer push + # replaces a reviewer still waiting for a window instead of queueing behind it + concurrency: + group: pr-agent-reviewer-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name }} + cancel-in-progress: true + # A comment asks for the model only when it IS a command: the fleet posts many trusted comments that are not, and + # each one would otherwise open a 30B window and then report a red "reviewer unavailable" (engine#2509 review). if: | (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'issue_comment' && github.event.issue.pull_request && - contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) + contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) && + (startsWith(github.event.comment.body, '/review') || startsWith(github.event.comment.body, '/describe') || + startsWith(github.event.comment.body, '/improve') || startsWith(github.event.comment.body, '/ask'))) timeout-minutes: 15 outputs: available: ${{ steps.wait.outputs.available }}