Skip to content

Conversation

@shashank-factory
Copy link

Summary

Refactors the code review flow to output findings to a JSON file instead of posting inline comments directly. The combine step will then post all inline comments at once.

Changes

Review Prompt Changes

  • Updated review-prompt.ts to output findings to code-review-results.json
  • Review now outputs JSON with structure: summary, keyChanges, importantFiles, findings
  • Inline comments are NOT posted directly - they're deferred to the combine step

Workflow Changes

  • Updated droid-review.yml to use parallel workflow pattern:
    • prepare job: Creates tracking comment
    • code-review job: Runs review, outputs JSON, uploads artifact
    • combine job: Downloads artifact, posts inline comments, updates summary

Test Updates

  • Updated review prompt tests to match new JSON output format
  • Updated integration tests to verify new behavior

Why This Change?

This enables parallel execution of code review with future security review. The combine step will:

  1. Download results from both reviews
  2. Deduplicate findings (same file/line)
  3. Post all inline comments at once (avoiding overlapping comments)
  4. Generate a unified summary

Depends On

Part of

This is PR 2 of 3 for the security review feature:

  1. PR feat: add modular sub-actions for parallel review workflow #8: Sub-action infrastructure
  2. This PR: Code review refactor
  3. PR 3: Security review feature

This PR refactors the code review flow to output findings to a JSON file
instead of posting inline comments directly. The combine step will then
post all inline comments at once.

Changes:
- Updated review-prompt.ts to output findings to code-review-results.json
- Updated droid-review.yml to use parallel workflow with prepare/review/combine
- Updated tests to match new prompt format

This enables parallel execution of code review with future security review,
where the combine step will deduplicate and post all comments together.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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