Skip to content

feat(review): use GitHub Copilot CLI as reviewer#8

Merged
ubcent merged 1 commit intomainfrom
feat/integrate-copilot-cli-for-code-reviews
Mar 16, 2026
Merged

feat(review): use GitHub Copilot CLI as reviewer#8
ubcent merged 1 commit intomainfrom
feat/integrate-copilot-cli-for-code-reviews

Conversation

@ubcent
Copy link
Copy Markdown
Contributor

@ubcent ubcent commented Mar 16, 2026

Motivation

  • Replace the diff-only Claude reviewer with GitHub Copilot CLI so the reviewer can see staged changes in-context (imports/types/related files) while keeping Claude as the arbiter.
  • Apply Codex Cloud diffs locally before review so Copilot can operate on the real working tree and then revert changes after review.

Description

  • Add src/lib/copilot.ts implementing checkCopilotAvailable() and runCopilotReview() that run copilot in JSON output mode, parse JSONL defensively into ReviewComment[], normalise severity, dedupe comments, and surface CopilotNotFoundError / CopilotReviewError with codes (not_found | review_failed | parse_failed).
  • Update the cloud review flow to codex.applyDiff(sessionId) before review, run runCopilotReview() against the service working tree, and always revert local changes with git checkout . after the review; the arbiter still receives the same ReviewComment[] contract.
  • Wire Copilot availability check into startup (src/commands/start.ts) so the CLI fails with a clear error if copilot is not present, and update src/lib/review-loop.ts to use runCopilotReview() instead of the Claude reviewer.
  • Add CopilotErrorCode to src/types/index.ts and add unit/integration tests (test/unit/copilot.test.ts, updates to test/unit/review-loop.test.ts and tests/integration/start.test.ts) to cover command execution, parsing, and integration points.

Testing

  • Ran unit and integration tests with npm test and all tests passed (unit and integration suites included Copilot mocks and exercise the new flow).
  • Ran static checks with npm run typecheck and npm run lint and both completed successfully after minor lint fix, and the project built with npm run build without errors.
  • Probed the local copilot binary during the run and observed copilot: command not found in this environment, so the tests mock copilot behavior to validate parsing and error handling.

Codex Task

@ubcent ubcent merged commit 1ca727e into main Mar 16, 2026
8 checks passed
@ubcent ubcent deleted the feat/integrate-copilot-cli-for-code-reviews branch March 16, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant