Skip to content

Fix: merged review branches nag forever in 'cairn review list' - #130

Merged
quad341 merged 3 commits into
mainfrom
deploy/crn-of9fp-gate
Aug 20, 2026
Merged

quad341 merged 3 commits into
mainfrom
deploy/crn-of9fp-gate

Conversation

@quad341

@quad341 quad341 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

cairn review merge merges a review branch but does not delete it, and
cairn review list was keying its "pending review" listing purely on
branch existence. A branch that got merged by some other path — or was
left behind by a delete failure after a successful merge — would keep
showing up as "pending review" forever, and the backlog count would never
fall to reflect reality.

This adds a merge-status check to the merge-branch listing path, matching
the check its sibling listing function already had. Once a branch is
merged into the default branch, it's no longer listed as pending,
regardless of whether it was also deleted.

Test plan

  • New regression test reproduces the bug directly (merges a fixture
    branch with git merge --no-ff, bypassing the normal merge path,
    and confirms it drops out of the pending list while a genuinely
    unmerged branch stays listed)
  • go build ./..., go vet ./..., gofmt -l clean
  • Full internal/cairn package test suite passes

cairn-reviewer-scratch added 3 commits August 20, 2026 01:40
…irn review list' keys on branch existence — so merged entries nag forever and the backlog count stops falling (refs crn-12ubp)
…review list' keys on branch existence — so merged entries nag forever and the backlog count stops falling (refs crn-12ubp)
7/7 PASS. Cuts deploy/crn-of9fp-gate from the reviewed commit
53e7211 (fixes ListReviewMergeBranches
to skip already-merged branches, matching ListReviewBranches).
@quad341
quad341 merged commit ad0fa86 into main Aug 20, 2026
2 checks passed
@quad341
quad341 deleted the deploy/crn-of9fp-gate branch August 20, 2026 14:07
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