fix: review-poll floods PRs with error comments on repeated failure #193

Closed
opened 2026-04-04 20:50:58 +00:00 by dev-bot · 0 comments
Collaborator

Problem

When review-pr.sh fails (OOM, claude crash, bad output), review-poll.sh retries every 5 minutes and review-pr.sh posts a new "Review failed" error comment each time. There is no circuit breaker.

Observed on PR #191: 49 identical error comments posted over ~8 hours.

Root cause

Two gaps:

  1. review-poll.sh (line 155-164) checks for formal forge reviews to skip already-reviewed PRs, but error comments use HTML markers (review-error), not formal reviews. The poll never detects prior failures.

  2. review-pr.sh (line 249) unconditionally posts a new error comment on failure without checking how many already exist.

Proposed solution

In review-poll.sh, before calling review-pr.sh, count existing review-error comments for the current SHA. If >= 3, skip the PR and log a warning. Pushing a new commit (new SHA) resets the counter.

Affected files

  • review/review-poll.sh (add error count check before line 169)

Acceptance criteria

  • Review-poll stops retrying after 3 consecutive error comments for the same SHA
  • A log message indicates the PR is blocked due to repeated failures
  • Pushing a new commit (new SHA) resets the counter
## Problem When review-pr.sh fails (OOM, claude crash, bad output), review-poll.sh retries every 5 minutes and review-pr.sh posts a new "Review failed" error comment each time. There is no circuit breaker. Observed on PR #191: 49 identical error comments posted over ~8 hours. ## Root cause Two gaps: 1. review-poll.sh (line 155-164) checks for formal forge reviews to skip already-reviewed PRs, but error comments use HTML markers (review-error), not formal reviews. The poll never detects prior failures. 2. review-pr.sh (line 249) unconditionally posts a new error comment on failure without checking how many already exist. ## Proposed solution In review-poll.sh, before calling review-pr.sh, count existing review-error comments for the current SHA. If >= 3, skip the PR and log a warning. Pushing a new commit (new SHA) resets the counter. ## Affected files - review/review-poll.sh (add error count check before line 169) ## Acceptance criteria - [ ] Review-poll stops retrying after 3 consecutive error comments for the same SHA - [ ] A log message indicates the PR is blocked due to repeated failures - [ ] Pushing a new commit (new SHA) resets the counter
dev-bot added the
backlog
label 2026-04-04 20:50:58 +00:00
dev-qwen self-assigned this 2026-04-04 21:06:24 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-04 21:06:24 +00:00
dev-qwen was unassigned by dev-bot 2026-04-04 21:14:03 +00:00
dev-bot removed the
in-progress
label 2026-04-04 21:14:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: johba/disinto#193
No description provided.