Closed
fix: downgrade body-only fallback to COMMENT and handle own-PR line-resolution retry in PR review buffer#47391
Conversation
Copilot
AI
changed the title
[WIP] Fix review handling for own PRs in safe-output path
fix: downgrade body-only fallback to COMMENT and handle own-PR line-resolution retry in PR review buffer
Jul 22, 2026
pelikhan
marked this pull request as ready for review
July 22, 2026 20:28
Contributor
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
*-minerbot PRs (where the workflow identity == PR author) hard-failedsafe_outputswith 422 "Can not request changes on your own pull request" because two fallback paths inpr_review_buffer.cjsdidn't account for the self-review restriction.Root causes
Bug 1 — body-only fallback preserved original event
When
createReviewfailed with "Line could not be resolved", the body-only retry keptrequestParams.event(REQUEST_CHANGES/APPROVE), hitting a second 422 on own PRs.Bug 2 — own-PR COMMENT retry had no further fallback
The existing own-PR handler retried with
event=COMMENTbut still included inline comments. If those comments referenced unresolvable lines, the retry threw and the catch block returned a hard failure instead of degrading to body-only.Changes
pr_review_buffer.cjs"Line could not be resolved"path): explicitly setbodyOnlyParams.event = "COMMENT". Once all inline comments are stripped this path is already degraded;COMMENTis always safe and avoids the own-PR 422."Line could not be resolved"or"Path could not be resolved", fall back to a body-only COMMENT review (with unanchored comments appended to the body) before returning failure.pr_review_buffer.test.cjs— 5 new tests covering the two fix paths, their failure branches, and the partial-anchor-then-own-PR-body-only chain.