A voided merge-conflicts item closes the pull request it names, discarding live work
Id: TD-PPagop-26080901 · Status: resolved · Filed: 2026-08-09 · Resolved: 2026-08-13 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/332
scripts/close-void-github-items.sh (requirement 34k) recognises the two
void’d id shapes that name a GitHub object and closes it: a bare number is an
issue, and anything matching WORK_GONE_PR_RE (^pr-<n>-) is pull request
<n>. That mapping is right for two of the three finishing sources and wrong
for the third, because the three do not mean the same thing by “this item’s
work is gone”:
pr-<n>-abandoned-<head-sha>andpr-<n>-review-<review-id>are void when the pull request itself is finished — merged or closed. Closing<n>is either a no-op or the correct tidy-up.pr-<n>-conflict-<head-sha>(requirement 3g) is void when the conflict is gone. The pull request is not: it is a ready, unconflicted PR of ours, and closing it destroys exactly the work the item existed to protect.
The failure is not hypothetical. Pull request #264 — the first raising of the
branch that is now PR #273, carrying a human CHANGES_REQUESTED review round
— was closed unmerged by this script when the unrelated merge-conflict item
pr-264-conflict-… was voided after the conflict resolved. Both the PR and
the review round were lost; the work had to be raised again under a new
number, and the human’s requested changes were never answered on the thread
that asked for them. Requirement 34k’s own one-shot rule (void_json’s
void-object-closed set) makes this permanent by design: the pair is never
revisited, so nothing re-opens it.
Every guard around this fires correctly and none of them helps. Requirement
34d’s corroboration guard has nothing to refuse — the void is true, the
conflict really is gone. The stage gate passes, because a real stage wrote
it. The one-shot rule then locks the outcome in. The defect is solely in the
id-shape-to-action mapping: close-void-github-items.sh reads pr-<n>- as
“this item is pull request <n>”, when for the conflict shape the item is
only about it.
Where: scripts/close-void-github-items.sh (the WORK_GONE_PR_RE branch,
around the gh pr close call) and requirement 34k in
docs/IMPLEMENTATION-PIPELINE-SPEC.md, whose “a pull request
(pr-<n>-abandoned-…, -conflict-…, -review-…) — closed the same way, iff
still open” is the sentence the code implements. Note that
lib/work-gone.sh’s WORK_GONE_PR_RE is shared with requirement 34i’s
clearance rule and with lib/preflight.sh, where treating all three shapes
alike is correct — the fix belongs at the close-the-object site, not in
the shared constant.
Suggested fix: exclude the -conflict- shape from the pull-request close
branch, so a resolved conflict voids the item and leaves the pull request
alone; state that carve-out in requirement 34k and cover it in
test/close-void-github-items.test.sh. A distinct id shape for the
merge-conflicts source, one that does not collide with “this item is a pull
request”, would remove the ambiguity at the source, but it is the larger
change: requirements 3g and 23 mint the id and requirement 34d’s
finishing-source corroboration rule reads it.