Skip to content

Stop rebase reminders for empty historical branches - #3932

Merged
trissim merged 1 commit into
mainfrom
fix/branch-reminder-outstanding-work
Nov 3, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/branch-reminder-outstanding-work

Conversation

@trissim

@trissim trissim commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • One reminder eligibility decision moved to its existing branch-difference owner.
  • 3 files: about +34/-4; no checkout, branch, original evidence or goal data removed.
  • An empty historical branch behind main now yields zero rebase reminders; outstanding committed changes remain eligible.

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.derive treated difference.behind as sufficient. The actual outstanding-path set, already derived by WorkBranches.difference from merge-base to branch head, was ignored.

After: BranchDifference.needs_rebase answers bool(behind and files) once at the fact's existing owner. BranchBehindMain consumes 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: difference pins main/head, finds their merge base, computes behind and changed(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

  • The automatic rebase reminder concerns outgoing committed changes; dirty pre-commit work remains the holder's responsibility and is not touched.
  • An empty committed delta needs no rebase reminder solely because its checkout is retained as evidence.
  • Installation is still needed before the live reminder changes.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 02:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@trissim
trissim merged commit 8e16549 into main Nov 3, 2026
2 of 4 checks passed
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.

2 participants