From bae1c411e65a73d50993a20b6898e003ed95e72d Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Thu, 17 Sep 2026 02:15:06 +0700 Subject: [PATCH] ci: wake PR Hygiene only for a comment that can change the answer Every comment by either review bot started a full reconciliation. CodeRabbit receipt is a comment and has to be heard; thepastaclaw is a review, which arrives on its own event, and nothing reads its comments. dashpay/stale_prs_are_bad#30 landed as 17ce8d20f2ba1ac7103d01fcf2aea15ac7f1c01f. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/pr-review-policy.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-review-policy.yml b/.github/workflows/pr-review-policy.yml index 541e4a3184a..1afbc87c062 100644 --- a/.github/workflows/pr-review-policy.yml +++ b/.github/workflows/pr-review-policy.yml @@ -20,11 +20,24 @@ permissions: statuses: write jobs: policy: - # Only comments this controller actually reads can change an outcome: a bot - # receipt or an author's attestation. Its own comments, coverage bots and - # human discussion cannot, and were most of the runs it caused. + # Only comments this controller actually reads can change an outcome, and a + # comment it reads only matters for what it carries. CodeRabbit never + # approves — measured over 75 recent pull requests, every one of its + # receipts arrived as a comment and none as a review — so its completion + # marker and its rate-limit notice have to be heard. It keeps one comment + # per pull request and edits it in place, so once it has reviewed once that + # body carries the marker for ever and its later edits still wake the + # controller: the saving is on pull requests it has not reviewed yet or + # skips entirely. thepastaclaw is the mirror image: its receipt is always a + # review, which arrives on its own event, and nothing reads its comments. + # + # Narrowing this costs latency and never correctness: comments are read from + # the pull request when a run happens, not from the event that started it, + # so a comment that starts no run is still seen by the next one. if: >- github.event_name != 'issue_comment' || - contains(fromJSON('["coderabbitai", "coderabbitai[bot]", "thepastaclaw"]'), github.event.comment.user.login) || - contains(github.event.comment.body, '/self-reviewed') - uses: dashpay/stale_prs_are_bad/.github/workflows/pr-review-reusable.yml@1ef768028f88b7f662fb260d9f8ba33fc0e48a44 + contains(github.event.comment.body, '/self-reviewed') || + (contains(fromJSON('["coderabbitai", "coderabbitai[bot]"]'), github.event.comment.user.login) && + (contains(github.event.comment.body, 'final_review_risk_coverage') || + contains(github.event.comment.body, 'rate limited by coderabbit.ai'))) + uses: dashpay/stale_prs_are_bad/.github/workflows/pr-review-reusable.yml@17ce8d20f2ba1ac7103d01fcf2aea15ac7f1c01f