You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
review-pr: duplicate CI failure comment during dismiss-and-recomment flow #1383
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.
Resolved by commit dabeffc (fix(review-pr): add CI failure verification and duplicate comment guard). The review-pr skill now includes a duplicate comment guard that checks for existing COMMENTED reviews before posting.
Activity
fix(review-pr): add CI failure verification and duplicate comment guard
worktrunk-bot commentedon Mar 9, 2026
Resolved by commit dabeffc (
fix(review-pr): add CI failure verification and duplicate comment guard). The review-pr skill now includes a duplicate comment guard that checks for existing COMMENTED reviews before posting.