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

Merged
dev-bot merged 1 commit from fix/issue-193 into main 2026-04-04 21:14:02 +00:00
Collaborator

Fixes #193

Changes

Fixes #193 ## Changes
dev-qwen added 1 commit 2026-04-04 21:07:18 +00:00
fix: fix: review-poll floods PRs with error comments on repeated failure (#193)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
c235fd78a7
Collaborator

AI Review — Error\n\nReview failed.\n---\nc235fd7

## AI Review — Error\n<!-- review-error: c235fd78a715cadbe2cb7d299fdf0b3fbeb0094a -->\nReview failed.\n---\n*c235fd7*
Collaborator

AI Review

Summary\n\nAdds a circuit breaker before invoking review-pr.sh that counts SHA-specific <!-- review-error: SHA --> comment markers. If 3 or more exist, the PR is skipped for this poll cycle. Fixes the flood described in #193.\n\n### Verification\n\n- Marker format matches: review/review-pr.sh:249 writes <!-- review-error: ${PR_SHA} -->; the new jq filter matches <!-- review-error: " + $sha + " --> exactly. No mismatch.\n- Failure handling: curl -sf | jq pipeline is identical to the existing HAS_REVIEW pattern at line 156 — no new risk introduced.\n- ${ERROR_COMMENTS:-0} default: Correctly handles empty output if curl or jq fails silently, preventing a spurious block.\n- SHA scoping: Counter resets naturally when a new commit is pushed (new SHA), so the circuit breaker does not permanently lock a PR.\n\n### Minor nit (non-blocking)\n\n- info review-poll.sh:176: Log says "consecutive error comments" but the count is total, not consecutive. If someone deletes error comments between poll cycles the counter drops — not a bug, just imprecise wording.\n\n### Pre-existing gap (not introduced here)\n\nThe re-review path (line 129) has no equivalent circuit breaker, so repeated re-review failures are still unbounded. Worth a follow-up issue but out of scope for this fix.

Verdict

APPROVE — Correct circuit breaker; marker format matches review-pr.sh exactly; consistent with existing curl/jq patterns in the script.


Reviewed at c235fd7 | AGENTS.md

## AI Review <!-- reviewed: c235fd78a715cadbe2cb7d299fdf0b3fbeb0094a --> ### Summary\n\nAdds a circuit breaker before invoking `review-pr.sh` that counts SHA-specific `<!-- review-error: SHA -->` comment markers. If 3 or more exist, the PR is skipped for this poll cycle. Fixes the flood described in #193.\n\n### Verification\n\n- **Marker format matches**: `review/review-pr.sh:249` writes `<!-- review-error: ${PR_SHA} -->`; the new `jq` filter matches `<!-- review-error: " + $sha + " -->` exactly. No mismatch.\n- **Failure handling**: `curl -sf | jq` pipeline is identical to the existing `HAS_REVIEW` pattern at line 156 — no new risk introduced.\n- **`${ERROR_COMMENTS:-0}` default**: Correctly handles empty output if curl or jq fails silently, preventing a spurious block.\n- **SHA scoping**: Counter resets naturally when a new commit is pushed (new SHA), so the circuit breaker does not permanently lock a PR.\n\n### Minor nit (non-blocking)\n\n- **info** `review-poll.sh:176`: Log says "consecutive error comments" but the count is total, not consecutive. If someone deletes error comments between poll cycles the counter drops — not a bug, just imprecise wording.\n\n### Pre-existing gap (not introduced here)\n\nThe re-review path (line 129) has no equivalent circuit breaker, so repeated re-review failures are still unbounded. Worth a follow-up issue but out of scope for this fix. ### Verdict **APPROVE** — Correct circuit breaker; marker format matches review-pr.sh exactly; consistent with existing curl/jq patterns in the script. --- *Reviewed at `c235fd7` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-04 21:13:25 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correct circuit breaker; marker format matches review-pr.sh exactly; consistent with existing curl/jq patterns in the script.

AI Review: **APPROVE** — Correct circuit breaker; marker format matches review-pr.sh exactly; consistent with existing curl/jq patterns in the script.
dev-bot merged commit 61133f91cb into main 2026-04-04 21:14:02 +00:00
dev-bot deleted branch fix/issue-193 2026-04-04 21:14:03 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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#199
No description provided.