Skip to content

Batch all review comments into a single submit_review call#58

Merged
factory-nizar merged 2 commits intodevfrom
feat/batch-review-comments
Mar 5, 2026
Merged

Batch all review comments into a single submit_review call#58
factory-nizar merged 2 commits intodevfrom
feat/batch-review-comments

Conversation

@factory-nizar
Copy link
Contributor

@factory-nizar factory-nizar commented Mar 4, 2026

Summary

Instead of posting inline comments individually via create_inline_comment (which creates separate review events for each comment), this batches all comments into the submit_review comments array. This produces a single cohesive review on the PR.

Changes

  • github-pr-server.ts: Updated submit_review tool schema to support modern line/side/start_line/start_side parameters (matching GitHub's createReview API), instead of only the legacy position field
  • review-prompt.ts: Instruct model to batch all findings into one submit_review call
  • review-validator-prompt.ts: Same for the two-pass validator flow
  • review.ts / review-validator.ts: Removed create_inline_comment from allowed tools in review flows

Before / After

closes FAC-16847

@factory-droid
Copy link
Contributor

factory-droid bot commented Mar 4, 2026

Droid finished @factory-nizar's task —— View job


Copy link
Contributor

@factory-droid factory-droid bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

};
}

export type ReviewComment = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe no need for export since it's mainly used in github-pr-server.ts

factory-nizar and others added 2 commits March 5, 2026 15:40
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>
@factory-nizar factory-nizar force-pushed the feat/batch-review-comments branch from 7d57f01 to 5fd976d Compare March 5, 2026 23:40
@factory-nizar factory-nizar merged commit 1bd50ec into dev Mar 5, 2026
1 check passed
@factory-nizar factory-nizar deleted the feat/batch-review-comments branch March 5, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants