Repository navigation
Conversation
Pruning refused any branch with a merge commit between its base and tip, so a branch that merged main in before landing could never be proven merged, even when its tip was exactly the snapshot that landed. The 2026-10-12 audit found 9 such branches, including worktree-hygiene (#171). proof() now also accepts a merged PR with the same repository, branch, tip and default base whose single-parent squash commit is still on the default branch and has the same tree as the tip: every path, mode, blob and gitlink. All existing identity checks run first, and a different tree falls through to the unchanged binary-diff rule. Tests: a branch with a merge commit whose tip tree matches the squash is eligible, removed and archived with proof kind squash-tree. The same shape with a wrong head, wrong base or different landed tree is preserved. All 79 worktree tests pass on Node 24. Against the real repository the read-only audit now marks worktree-hygiene eligible (squash-tree, #171). Co-Authored-By: Cody <[email protected]> Coven-Familiar: cody Coven-Harness: claude-code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 12, 2026
This branch was successfully deployed
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.
Why
proof()refused any branch with a merge commit between its base and tip. A branch that mergedmainin before landing could never be proven merged, even when its tip was exactly the snapshot GitHub committed. The 2026-10-12 audit found 9 such branches, each with a tip tree identical to its squash commit. One isworktree-hygiene(#171), the only released worktree, stuck atnot-proven-merged.What
scripts/lib/worktree-maintenance.mjs: after the existing checks (closed and merged PR; same repository, branch and exact tip; default base; squash commit still on the default branch; single parent), the proof also accepts a squash commit whose tree equals the tip's tree. That covers every path, mode, blob and gitlink. It returns{ kind: 'squash-tree', pull, mergeCommit, tree, defaultHead }, which the recovery manifest records. A different tree falls through to the binary-diff rule, which is unchanged. The final check before ref deletion calls the sameproof().docs/worktree-hygiene.mdanddocs/status.mddescribe the rule.Verification
squash-tree. The same shape is kept when the PR head is wrong, the base is wrong, or the landed tree differs. The acceptance test failed (not-proven-merged) before the change.node --test scripts/test/*.test.mjson Node 24.18.0: 79 of 79 pass.scripts/worktree.sh auditagainst the real repository, run from this branch:worktree-hygienemoves fromnot-proven-mergedto eligible withsquash-treeEnforce recoverable local worktree and branch pruning #171 (42223e2). No other row changed because of the rule. Nothing was pruned.npm run build && npm test. The disk had about 600 MB free, so I didn't install workspace dependencies. No workspace package changed; the required macOS job runs both.Notes
scripts/worktree.sh schedule installis rerun from merged code.default external observers use the pinned executable pathsfails whennodelives under a path with a space (Cave's toolchain underApplication Support). The shebang can't hold the space, so spawn reportsENOENT. Unchangedmainbehaves the same; CI is unaffected.✨ Co-authored by Cody, a Coven familiar for Val