guard: prove a squash-merged branch removable via the forge's merged-PR record #777

Open
opened 2026-10-15 21:37:10 +00:00 by hexajon · 0 comments
Owner

Follow-up from #666 (option C). #666 proves a branch removable only by COMMIT
ancestry: the forge default provably contains the branch's commits
(CompareCommits total_commits == 0). A squash or cherry-pick merge leaves the
branch's content on the default but not its commits, and there is no
cross-platform forge API that proves "content is contained" - Gitea's Compare
response carries only total_commits and commits. So #666 refuses to auto-delete
a squash/cherry-pick-merged local branch; the user finishes the branch or uses
raw git. Local content proof is not an option (ADR 0029: local state is not
proof).

The refinement: when the FORGE itself recorded the squash - a merged PR whose
head was this branch - that merged-PR record is a sound forge proof that the
content landed. prune could accept such a branch for auto-deletion by looking up
the merged PR, restoring squash-prune auto-deletion for PR merges.

Scope:

  • A forge content proof keyed on a merged PR whose head branch was the one being
    pruned, with its own live-forge tests.
  • The commit-ancestry default stays; this only adds a second accepted proof.
  • A cherry-pick merged with no PR still would not qualify and stays refused -
    that is correct, there is no forge record to prove it.

Relates to #666 (the commit-ancestry proof), #670, ADR 0029.

Follow-up from #666 (option C). #666 proves a branch removable only by COMMIT ancestry: the forge default provably contains the branch's commits (CompareCommits total_commits == 0). A squash or cherry-pick merge leaves the branch's content on the default but not its commits, and there is no cross-platform forge API that proves "content is contained" - Gitea's Compare response carries only total_commits and commits. So #666 refuses to auto-delete a squash/cherry-pick-merged local branch; the user finishes the branch or uses raw git. Local content proof is not an option (ADR 0029: local state is not proof). The refinement: when the FORGE itself recorded the squash - a merged PR whose head was this branch - that merged-PR record is a sound forge proof that the content landed. prune could accept such a branch for auto-deletion by looking up the merged PR, restoring squash-prune auto-deletion for PR merges. Scope: - A forge content proof keyed on a merged PR whose head branch was the one being pruned, with its own live-forge tests. - The commit-ancestry default stays; this only adds a second accepted proof. - A cherry-pick merged with no PR still would not qualify and stays refused - that is correct, there is no forge record to prove it. Relates to #666 (the commit-ancestry proof), #670, ADR 0029.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#777
No description provided.