Repository navigation
Conversation
2ebe056 to
9de85eb
Compare
…already pending GitHub allows one pending review per person on a pull request. When the viewer had started a review outside T3 (on github.com, or with gh), T3 tried to create a second one, and GitHub refused it with 422 "User can only have one pending review per pull request". submitReview still creates the review with one REST call. When GitHub answers 422, it looks for the viewer's pending review. It submits that review with the chosen verdict when it is on the commit T3 reviewed and T3 has no line comments to add, keeping the review's own summary when T3 sends none. Otherwise it refuses and says to submit or discard the pending review on GitHub. When no pending review is found, or the lookup fails, GitHub's 422 is reported as before. Part of pingdotgg#48382
9de85eb to
c6c9cbf
Compare
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Submitting a review from T3 Code fails with 422 "User can only have one pending review per pull request" when you already have a pending review on that pull request, for example one started on github.com or with
gh. Part of #48382.GitHubPullRequestApi.submitReviewstill creates the review with one REST call, so nothing changes when no review is pending. On a 422 it looks up your pending review (ViewerPendingReview) and submits it withsubmitPullRequestReviewand the chosen verdict, but only when T3 Code has no line comments drafted and the pending review is on the commit you reviewed (expectedHeadSha). A blank summary in T3 Code keeps the pending review's own summary. In every other case it refuses with one message that says to submit or discard the review on GitHub, and writes nothing. If no pending review is found, or the lookup itself fails, you get GitHub's original 422.Submitting also publishes the comments already in the pending review on GitHub, as github.com does. T3 Code doesn't show them, so an agent using the MCP
pull_request_reviewtool publishes them without having read them.Left for follow-up under #48382:
PullRequestService(and disabled in the web and mobile forms), even when the pending review has comments of its own.ghlogin, the lookup can run as a different account from the one that got the 422; you then get GitHub's original 422, as before.Tests in
GitHubPullRequestApi.test.tscover the no-pending path (one REST call, no GraphQL), submitting the pending review, keeping its summary, the 422 when nothing is pending or the lookup fails, and each refusal (line draft, no reviewed commit, older commit). "submits the viewer's pending review" fails on main. I also ran the realsubmitReviewagainst a private scratch pull request on github.com: a Comment with a summary submitted a pending review on the head along with its own comment; no reviewed commit, an older commit, and a T3 Code line draft were each refused with the pending review left unchanged; with nothing pending, a draft outside the diff returned GitHub's "Line could not be resolved". Approve wasn't run live because GitHub won't let you approve your own pull request; it differs only in theeventvalue.Council review
Three models reviewed the change in rounds until all returned all clear. Scores out of 10:
Written by Claude Opus 5.5 in Claude Code, running in T3 Code.