feat: Add advisory code review system - #37
Merged
Conversation
…nd Integration
…assed:true Parsing failures in the Claude reviewer were incorrectly marked as Passed:true, which masked failures and caused CodeReviewPassed events to be emitted instead of CodeReviewFailed. This could skip fix attempts when they should have been triggered. Now parseOutput returns errors for: - No JSON found in review output - JSON unmarshaling failures The caller in review.go already handles these gracefully by logging the error, emitting CodeReviewFailed, and proceeding to merge. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add guard to cleanupWorktree() to skip when worktreePath is empty - Add Bus.Wait() and EventCollector for thread-safe event collection in tests - Update review_test.go and worker_test.go to use new thread-safe patterns - Add PRD for safe git operations interface refactoring Root cause: Tests with MaxFixIterations>0 but no worktreePath would trigger cleanupWorktree(), which ran git checkout/reset/clean in the current working directory (the actual repo), reverting uncommitted changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves conflicts: - internal/worker/worker.go: kept getTargetRef() from main, replaced logReviewPlaceholder with runCodeReview from HEAD - internal/orchestrator/orchestrator_test.go: kept main's graph tests, added HEAD's reviewer tests (TestResolveReviewer_*) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…-operations - CODE-REVIEW.md: status changed to completed - safe-git-operations.md: added proper frontmatter and document info Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
This PR implements an advisory code review system that runs before merging unit branches into the feature branch. The review system:
Units completed:
Test plan
🤖 Generated with Claude Code