feat: detect externally squash-merged slots at harvest preview - #5
Conversation
Closes a documented sharp edge from the plan's deferred list. A clean slot with no ancestry trail into base but whose content a merge would not change (proven via git merge-tree --write-tree tree containment, git >= 2.38) is reported as squash_merged and marked merged, instead of conflicting when the user re-merges work they already squashed in. Conflicts and older gits fall through to the previous behavior. Prune deliberately still keeps such branches: its ancestry test cannot see squashes, and deleting on a weaker signal is not its contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSffk4LorDDDit18ENESsj
|
Warning Review limit reached
Next review available in: 45 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Lab Code Review (draft opinion)
|
|
Verified each draft finding against the code — no changes needed:
Generated by Claude Code |
Closes a documented sharp edge from the plan's deferred follow-up list: a slot the user squash- or cherry-pick-merged themselves used to show as pending and conflict on re-merge, with "skip it by hand" as the only guidance.
Harvest preview now proves content containment with
git merge-tree --write-tree(git >= 2.38): if merging the clean slot's tip into base would change nothing, the slot is reported assquash_mergedand marked merged — never re-merged. Conflicts and older gits exit the containment check nonzero and fall through to the previous behavior, so nothing regresses where the proof is unavailable.Deliberately unchanged: prune still keeps squash-merged branches. Its deletion authority is the ancestry test against the recorded base, which cannot see squashes, and deleting on a weaker signal is not its contract. The README sharp-edge entry now explains exactly that.
scripts/harvest-step.sh—squash_merged_into_basehelper + preview branch (after the ancestry-basedexternal_mergedcheck, clean slots only)bin/renderer.mjs—squash_mergedroutes to archive like the other terminal statesclean); renderer terminal-state loop extended229 tests pass on Linux and macOS; shellcheck clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LSffk4LorDDDit18ENESsj
Generated by Claude Code