fix(prune): give squash-merged remote twins their own result class and heading, drop the dead skipRemotes guard (#449) #476
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!476
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-449-prune-is-still-inconsistent-and-broken"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #449. The real breakage (six spurious "API error 500" lines on already-gone remote refs) was fixed in PR #462:
deleteRemoteBranchclassifies the forge's does-not-exist 500 as already-gone (internal/service/prune/run.go, pinned by the run_test.go already-gone cases). This finishes the two items decided on 2026-09-08.Display: squash-merged remote twins are their own class.
PruneResultgainsDeletedSquashMergedRemoteandDeletedSquashMergedRemoteBranches(deleted_squash_merged_remote,deleted_squash_merged_remote_branchesin JSON, additive).Runno longer appends squash twins toDeletedRemoteBranchesor adds them toDeletedRemote. The text formatter renders a new heading, "Deleted squash-merged remote branch(es) (content already in )", so each deleted name appears under exactly one heading. The "Deleted N remote branch(es)" trailer now sums ancestry twins, orphans, and squash twins, so the total is unchanged. This reverses the 2026-07-10 fold; ADR 0008 carries a dated amendment and a Status touch.The
skipRemotesguard is removed fromdeleteSquashMergedandRun. The ancestry candidates and the squash-merged set are disjoint by construction (findSquashMergedexcludes ancestry-merged branches), so the guard had no live path.TestPruneSquashAndAncestrySetsDisjointpins that fact in place of the removed guard test.Tests:
TestDeletedNamesAllAppearInOutputnow asserts the new heading, that a squash twin is absent from the ancestry remote block, and the summed trailer. Prune service, formatter, and cmdutil packages pass;./scripts/gate.shfull run passes (all 18 checks). Reference docs regenerated with no diff.Closes #449