Problem
In run 22831994262 on PR #1381, the review bot posted the same CI failure comment twice within 7 seconds (23:11:10 and 23:11:17 UTC). Both reviews are COMMENTED on commit a464e0d4 with identical bodies starting "CI failed — 11 shell wrapper / PTY snapshot tests need updating..."
Evidence from the GitHub API:
Review 3912161478: COMMENTED at 2026-03-08T23:11:10Z
Review 3912161573: COMMENTED at 2026-03-08T23:11:17Z
Root Cause
This is a different code path than the one fixed in #1321 (which added a retry guard for initial review submission). This duplicate occurs during the dismiss-and-recomment flow when the bot:
- Approves the PR
- CI fails
- Bot tries to dismiss its own approval via
gh api .../dismissals (POST — fails)
- Bot posts CI failure comment via
gh pr review --comment
- Bot retries dismissal via
gh api .../dismissals -X PUT (succeeds)
- Bot posts CI failure comment again via
gh pr review --comment
The existing retry guard (added in #1322) checks for an existing review before the initial review submission. But this flow bypasses that guard because it's posting a CI failure follow-up comment, not the initial review verdict.
Suggested Fix
The review-pr skill's CI monitoring section should include a duplicate check before posting CI failure comments, similar to the existing guard for initial reviews:
# Before posting CI failure comment, check if one was already posted for this SHA
EXISTING_COMMENT=$(gh api "repos/$REPO/pulls/<number>/reviews" \
--jq "[.[] | select(.user.login == \"$BOT_LOGIN\" and .commit_id == \"$HEAD_SHA\" and .state == \"COMMENTED\")] | last | .submitted_at // empty")
If a COMMENTED review already exists for the current SHA, skip posting another one.
Problem
In run 22831994262 on PR #1381, the review bot posted the same CI failure comment twice within 7 seconds (23:11:10 and 23:11:17 UTC). Both reviews are COMMENTED on commit
a464e0d4with identical bodies starting "CI failed — 11 shell wrapper / PTY snapshot tests need updating..."Evidence from the GitHub API:
Root Cause
This is a different code path than the one fixed in #1321 (which added a retry guard for initial review submission). This duplicate occurs during the dismiss-and-recomment flow when the bot:
gh api .../dismissals(POST — fails)gh pr review --commentgh api .../dismissals -X PUT(succeeds)gh pr review --commentThe existing retry guard (added in #1322) checks for an existing review before the initial review submission. But this flow bypasses that guard because it's posting a CI failure follow-up comment, not the initial review verdict.
Suggested Fix
The review-pr skill's CI monitoring section should include a duplicate check before posting CI failure comments, similar to the existing guard for initial reviews:
If a COMMENTED review already exists for the current SHA, skip posting another one.