You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
repo-hygiene: branch audit needs a patch-id (git cherry) fallback and must report the main checkout's dirty, detached, or in-progress-merge state #5230
When the PR map does not contain a branch (no PR, PR outside the fetched window, gh unavailable), the audit falls to REVIEW or LOSSY with "Loss: undetermined". A squash-merged branch with no PR record cannot be proven landed, although git cherry -v <default> <branch> (patch-id comparison) proves individual commits landed when the squash kept the same diff, and a tree-equality check catches whole-branch squashes.
The audit does not report the state of the main checkout. In one session, claude-code-proxy had an in-progress merge and the audit said nothing about it. Deleting branches or resetting the tree while MERGE_HEAD, rebase-merge/, CHERRY_PICK_HEAD or a detached HEAD exists is unsafe, and the user should see it first.
Evidence (repo-hygiene 0.10.55)
skills/clean/scripts/git-branch-audit.sh contains no cherry, patch-id, MERGE_HEAD, rebase-merge or detached handling (a grep of it and its three siblings returns only the mktemp PR-map lines: git-branch-audit.sh:175, git-stash-audit.sh:65).
skills/clean/context/git-branch-cleanup.md:57-58: the fallbacks are git rev-list <branch> --not --remotes --tags counts giving REVIEW with Loss: undetermined or Loss: none. No cherry step.
Tier ladder: PR merged with matching tip, then git cherry shows every commit as - (equivalent on default), then tree-equality with default, then REVIEW/LOSSY.
A MainCheckout: header block with branch or detached state, dirty file count, and any merge, rebase, cherry-pick or bisect in progress. The audit refuses to emit a deletable tier while an operation is in progress in the checkout it runs from, and names the file that shows it.
Proposed direction
Add a pure-git landed-proof step in git-branch-audit.sh before the REVIEW fallback, and a git rev-parse --git-path check for MERGE_HEAD, rebase-merge, rebase-apply, CHERRY_PICK_HEAD, BISECT_LOG.
Activity
feat(repo-hygiene): report the main checkout and refuse deletion mid-…
fix(repo-hygiene): let git-branch-delete.sh delete a landed branch an…
feat(repo-hygiene): tag branch families and detect ancestor-of-merged…
feat(repo-hygiene): close fleet-wide and remote-branch gaps in clean (#…