Batch all review comments into a single submit_review call#58
Merged
factory-nizar merged 2 commits intodevfrom Mar 5, 2026
Merged
Batch all review comments into a single submit_review call#58factory-nizar merged 2 commits intodevfrom
factory-nizar merged 2 commits intodevfrom
Conversation
Contributor
|
Droid finished @factory-nizar's task —— View job |
Contributor
There was a problem hiding this comment.
The batching migration from individual create_inline_comment calls to a single submit_review is clean and well-structured. All four candidate findings are speculative hardening suggestions rather than definite bugs — the schema loosening is mitigated by clear tool descriptions and prompt instructions, the legacy position removal is intentional, and the 30-comment cap is pre-existing. No actionable issues found.
jonathan-factory
previously approved these changes
Mar 5, 2026
src/mcp/github-pr-server.ts
Outdated
| }; | ||
| } | ||
|
|
||
| export type ReviewComment = { |
There was a problem hiding this comment.
nit: Maybe no need for export since it's mainly used in github-pr-server.ts
Instead of posting inline comments individually via create_inline_comment (which creates separate review events for each), batch all comments into the submit_review comments array. This produces a single cohesive review. - Updated submit_review tool schema to support line/side/start_line format - Updated review and validator prompts to batch comments - Removed create_inline_comment from review allowed tools Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
7d57f01 to
5fd976d
Compare
jonathan-factory
approved these changes
Mar 5, 2026
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.
Summary
Instead of posting inline comments individually via
create_inline_comment(which creates separate review events for each comment), this batches all comments into thesubmit_reviewcommentsarray. This produces a single cohesive review on the PR.Changes
github-pr-server.ts: Updatedsubmit_reviewtool schema to support modernline/side/start_line/start_sideparameters (matching GitHub's createReview API), instead of only the legacypositionfieldreview-prompt.ts: Instruct model to batch all findings into onesubmit_reviewcallreview-validator-prompt.ts: Same for the two-pass validator flowreview.ts/review-validator.ts: Removedcreate_inline_commentfrom allowed tools in review flowsBefore / After
closes FAC-16847