Repository navigation
Fix: merged review branches nag forever in 'cairn review list' - #130
Merged
Merged
Conversation
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).
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
cairn review mergemerges a review branch but does not delete it, andcairn review listwas keying its "pending review" listing purely onbranch 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
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 -lcleaninternal/cairnpackage test suite passes