[Fix] Top-level GitHub PR comments fail to update when threadId is blank - #17
Merged
mrubens merged 1 commit intoJul 9, 2026
Merged
Conversation
Author
|
No code issues found. See task |
mrubens
marked this pull request as ready for review
July 9, 2026 03:27
mrubens
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
July 9, 2026 03:27
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.
What changed
update_pull_request_commentnow treats blank or whitespace-onlythreadIdandcommentIdvalues as omitted instead of rejecting them or treating them as present IDs.GitHub top-level conversation comments keep routing to
issues.updateCommentwhenthreadIdis absent/blank. Real review-thread updates still usepulls.updateReviewCommentwhen a non-emptythreadIdis provided. The MCP worker also trims blank optional IDs before calling the API, and the write entry point normalizes the same values defensively.Why this change was made
During PR review work, client tooling often sends empty strings for unused optional fields. The write schema required min-length strings, so
threadId: ""failed validation (too_small). Agents that then invented dummy non-empty thread IDs were misrouted to GitHub’s review-comment update endpoint, which returned Not Found for top-level issue-comment IDs.Impact
Agents and other clients can patch top-level GitHub PR issue comments again without a
gh apifallback when they pass blankthreadId(or omit it entirely). Review-thread updates and Azure DevOps’s requirement for a realthreadIdare unchanged.