Repository navigation
Stop rebase reminders for empty historical branches - #3932
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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
Defect and owner repair
Carry reported repeated rebase instructions for the closed #3871 checkout, even after verifying an empty complete diff. Every unrelated main merge recreated the alarm and consumed another rebase/push.
Before:
BranchBehindMain.derivetreateddifference.behindas sufficient. The actual outstanding-path set, already derived byWorkBranches.differencefrom merge-base to branch head, was ignored.After:
BranchDifference.needs_rebaseanswersbool(behind and files)once at the fact's existing owner.BranchBehindMainconsumes that answer and preserves its existing queued-head exclusion. No branch-name exception, suppression ledger, timer, compatibility path or extra Git read.Structure
Before: standing rule interprets raw behind count -> every stale checkout is work.
After:
WorkBranches.difference -> BranchDifference.needs_rebase -> BranchBehindMain.derive -> existing holder publication.The historical checkout remains intact. Uncommitted edits are not modified or classified as published branch changes; the holder's before-commit synchronization obligation remains. A branch with committed changes is still warned, including deletion-only or documentation changes.
Evidence
Complete source trace:
differencepins main/head, finds their merge base, computesbehindandchanged(base, head). An ancestor of main has no outgoing committed delta. The reminder now requires that actual delta. Existing publication preserves holder birth/alias and archived-holder handling.Added real-Git replay controls exercise a retained empty branch versus a branch with outstanding changes across two subsequent main advances, asserting the checkout HEAD is never changed. Existing controls cover queued branches and selection of the allocated order checkout rather than an old home.
First bounded run: four setup errors in 2.83s from the fixture's removed
CreateProblemGoalAction(commander=...)argument; none reached the assertions. Deleted that obsolete argument, preserving the current assigner/creator API. The second bounded run collected and passed all four cases in 26.10s (exit0). Log:/home/ts/.cache/agent-scratch/pi-commander/branch-reminder/tests-02.log. No full suite, local NRA gate or profiler.Assumed