Investigate stale commit reviews on PR #687 #52
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
On gargoyle PR #687, GPT-5 filed 14 consecutive
REQUEST_CHANGESreviews against commits that had already been superseded. The reviews referenced line numbers and code that no longer existed at HEAD.Timeline (2026-05-09)
758910fwith fixes at ~7:04am758910fand found a legitimate new issueEvidence
Questions to investigate
Impact
Suggested fix
Investigation Findings
Investigated the review history on PR #687. Here's what I found:
What Actually Happened
Each review correctly reports the commit it evaluated:
The reviews ARE evaluating different commits, not the same stale commit repeatedly. The "Evaluated against" footer matches the
commit_idGitea stores for each review.Root Cause
The issue isn't stale commit evaluation - it's review-per-commit triggering:
synchronize(every push)The findings look similar across reviews because:
Why It Felt Like Stale Reviews
The rapid succession of REQUEST_CHANGES reviews created noise. When a fix was pushed, a new review would fire and often find a related but distinct issue. This felt like "the same complaint over and over" but each review was legitimately evaluating different code.
Suggested Improvements
Dedupe by finding similarity: Before posting, compare new findings against existing non-superseded reviews. If >80% similarity, skip posting or note "same concern as review #X"
Rate-limit reviews per PR: Add a cooldown (e.g., 5 min) between reviews on the same PR. Use job concurrency or a state file.
Skip intermediate commits: Instead of reviewing every
synchronize, only review:Acknowledge fixes: Include diff between last-reviewed commit and current commit in context, so the model can recognize "this concern from review #X appears addressed"
Not a Bug
The review-bot is working as designed - it reviews the commit it's asked to review. The issue is the workflow configuration triggering too many reviews. This is more of a gargoyle CI configuration issue than a review-bot bug.
Recommend either:
Follow-up Investigation: Stale Commit Reviews Analysis
Summary
After reviewing the evidence from PR #687 and PR #53, I can confirm and expand on the previous investigation findings.
Timeline Verification
Looking at the GPT review history on PR #687:
8ceacfc1e48d88104f0dba1b71828e5e758910f08a7c319dKey observation: Each review IS evaluating a different commit SHA. The
commit_idin Gitea's review metadata matches the "Evaluated against" footer in the review body.Root Cause Analysis
The original issue description hypothesized:
Answer: None of the above. The real issue is:
synchronizeevent (push to PR branch)The findings looked repetitive because the underlying domain concerns (index failure handling, idempotency) required multiple iterations to fully address.
Does PR #53 Address the Root Cause?
Partially. PR #53 adds a
shouldSkipStaleReview()check that:This would help if a review was in-flight when a new push arrived. However:
PR #53 does NOT address:
Recommendations
Near-term (PR #53 is valuable):
For fuller resolution (separate work):
Verdict
PR #53 addresses one edge case (HEAD moves during evaluation) but doesn't solve the core problem demonstrated in PR #687, which is too many reviews triggered by rapid pushes. The fix is still valuable and should merge, but the issue should remain open for follow-up work on review frequency/deduplication.
If this is considered sufficient for now, close the issue with a note about future improvements. If the full problem needs solving, this issue should spawn follow-up tasks for workflow rate-limiting and finding deduplication.
Investigation Complete
Summary
This issue has been thoroughly investigated (see previous comments #12314 and #13592). The key findings:
Root cause is NOT stale commits: Each review correctly evaluates the commit it was triggered for. The "stale" perception came from many reviews firing rapidly on successive pushes.
PR #53 addresses the edge case: When HEAD moves during review processing (between fetch and post), the new
shouldSkipStaleReview()check prevents posting outdated findings.PR #53 current status:
Recommended Action
PR #53 should be merged once CI is green (may need to disable unavailable model reviewers in CI matrix).
For further improvements beyond PR #53:
These are nice-to-haves and can be addressed in follow-up issues if needed.
No Additional Code Needed
This investigation issue doesn't require new implementation work — PR #53 already contains the fix. Closing this issue in favor of tracking via PR #53.