fix(webhook): retry accepts a review that couldn't run, not only one that failed #117
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/retry-unavailable"
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?
@pr-reviewer-bot retryrefused to retry a review that couldn't run.What happened
Seen on #116 (comment). The review ended with "that model isn't loaded on the inference service right now" and its comment closed with "Comment
@pr-reviewer-bot retryto try again". The bot answered that with "There's nothing to retry — the most recent review attempt on this PR didn't fail."Cause
The retry command asks
ConversationContext.LatestFailedReviewwhether there is anything to retry, and that matched the statusfailedalone. A model that isn't loaded, or a service that isn't reachable, is recorded asunavailable— a status added after the command was written. The runner invites a retry for both outcomes, so the command refused its own invitation for one of them.The
unavailablestatus on #116 is inferred from the comment's wording, which the runner only produces for that status; the production row was not inspected.Fix
LatestFailedReviewacceptsfailedorunavailable. It stays an allowlist, so a status added later is not retryable until someone decides it should be.Testing
TestRetryCommandSucceedsWithUnavailablePriorreproduces the case: it fails against the old check with the bot's "nothing to retry" outcome and passes against the new one.TestLatestFailedReviewCoversEveryStatuswalks the status vocabulary and pins which are retryable.go test -race ./...passes. The Postgres-backed tests skipped locally; nothing here touches the database.This is independent of #116 and branches from
main.🤖 Generated with Claude Code
retryaccepts a review that couldn't run, not only one that failedAutomated review by pr-reviewer v0.52.3 | Safety Check | Nemotron 3 Nano | tracking id
r-bf4f5a-a08bfeThis is an AI-generated review and may contain mistakes.
Status: ❌ Failed
Review failed. Tracking id
r-bf4f5a-a08bfe— see logs for details.Comment
@pr-reviewer-bot retryto try again.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.