Conversation
… work as safe Three problems in worktree-audit.sh (cursor#470): - a PR in any non-open state satisfied `$pr != "-"`, so a CLOSED (unmerged) PR made the worktree `safe`; - the computed `remote` column (ahead/no-remote/detached) was never read by the bucket logic, so unpushed commits could be bucketed `safe`; - the header called the script read-only although it runs `git fetch`. Only ancestry of origin/main or a MERGED PR now counts as proof the work exists elsewhere. Worktrees whose HEAD is ahead of / absent from the remote or detached and not on origin/main go to a new `hold-unpushed` bucket, ranked right after hold-wip and hold-open-pr. A CLOSED PR falls through to `review`. The header now states the one write the script performs, and the playbook documents the new bucket in step 1 (steps 4-5 are left untouched to avoid conflicting with cursor#459). Verified on a synthetic repo with a stubbed gh: ahead1+CLOSED and detached off-main -> hold-unpushed; pushed+MERGED, pushed+CLOSED-on-main and detached on origin/main -> safe; pushed+CLOSED with commits not on main -> review. Fixes cursor#470
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.
Fixes #470.
worktree-audit.shcould suggestsafefor worktrees whose commits exist nowhere else:$pr != "-", so a PR closed without merging made the worktreesafe;remotecolumn (aheadN/no-remote/detached) was computed but never read by the bucket logic, so unpushed commits were ignored;git fetch origin main.Change
origin/mainor aMERGEDPR counts as proof the work lives elsewhere. ACLOSEDPR falls through toreview.origin/main, go to a newhold-unpushedbucket, ranked right afterhold-wipandhold-open-pr.Verification
Synthetic repo with a bare
originand a stubbedghreturning PR states:ahead1, PR#42/CLOSEDorigin/mainCLOSED, commits not on mainMERGEDCLOSED, HEAD is an ancestor of mainorigin/mainbash -npasses. No version bump here — leaving that to the maintainer to coordinate with #459.