Abandoned closed-unmerged PR reverts a Done target completed by a different merged PR to Review #96
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during independent review of PR89 (BB-99) at
955fb2887a. Confidence: medium (reproduced once by the reviewer with a throwaway test; the reproduction is written out below so it can be turned into a maintained fixture).Behavior: sync_pr_closes treats every closed-unmerged PR that references a target as rejecting the target. If the target is Done it is moved to Review (and reopened on Forgejo), with no check on whether a different, merged PR is what completed it.
Reproduction (crates/breadboard-server/tests/sync.rs helpers pr_issue, import_target_issue, ensure_repo_and_project):
Related: any later update to an abandoned PR that triggers sync_pr_closes (label or title change) would re-revert a target that a human moved back to Done.
Why it is not part of PR89: the revert-to-review rule is the documented, intended conservative behavior of BB-99 (Documentation.md PR row), and the reviewer judged it non-blocking. Fixing it needs provenance (which PR completed the target) or an explicit policy decision, so it should be decided separately rather than widened into PR89.
Proposed direction: record the completing merged PR (or check for any linked closed-by PR with merged=true) and skip the revert when one exists.