Skip to content

fix(staged): prevent auto review adoption when commit session is pending or active - #552

Merged
matt2e merged 1 commit into
mainfrom
auto-code-review-reveals-old-review
Mar 31, 2026
Merged

fix(staged): prevent auto review adoption when commit session is pending or active#552
matt2e merged 1 commit into
mainfrom
auto-code-review-reveals-old-review

Conversation

@matt2e

@matt2e matt2e commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a hasPendingOrActiveCommitSession() check in BranchCardSessionManager that detects pending/queued commits and running/queued commit sessions
  • Short-circuits tryAdoptAutoReview() when a commit session is in progress, preventing the auto code review from adopting stale review data while commits are still being processed

Test plan

  • Verify that auto review is not adopted while a commit session is pending or queued
  • Verify that auto review is not adopted while a commit session is running
  • Verify that auto review adoption still works normally when no commit session is active

🤖 Generated with Claude Code

…ing or active

When a finished auto review exists and the user starts a commit session then
requests a code review, tryAdoptAutoReview() would surface the stale auto
review instead of queueing a fresh one. Guard adoption behind a check for
pending, queued, or running commit sessions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e
matt2e requested review from baxen and wesbillman as code owners March 31, 2026 00:18
@matt2e
matt2e merged commit 46e5e38 into main Mar 31, 2026
4 checks passed
@matt2e
matt2e deleted the auto-code-review-reveals-old-review branch March 31, 2026 00:28
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.

1 participant