Skip to content

The Enabler's complete_handoff recovery path runs handoff_complete_review with no pr_merge_state read ahead of it

Id: TD-PPagop-26083008 · Status: open · Filed: 2026-08-30

Requirement 31d’s merged read guards only the Reviewer’s own call site in agent-cycle.sh. lib/handoff.sh’s handoff_complete_review has a second caller — lib/enabler.sh:699, the complete_handoff recovery path (requirements 31c/32b, agent-ops#440) — which gates and flips a blocked item’s pull request with no merged read anywhere ahead of it: confirm_pr_ready still answers ‘already’ for a merged pull request (isDraft is false), so an item blocked with a pr_url whose pull request merges while it sits blocked can still be handed off against the merged pull request, the same false-handoff shape agent-ops#916 just fixed for the Reviewer path. This is the third sibling of the same missing read, beside #1063 (a Reviewer stage that fails outright never reaches it) and TD-PPagop-26083004/#1062 (the Implementer’s stage-start), and the only one not yet on file. Related: pr_merge_state deliberately reports CLOSED-without-merging as ‘open’; PR #1061’s review asserts the handoff refuses that state downstream, but confirm_pr_ready answers ‘already’ for any non-draft and a failed re-review request is only a warning, so whichever fix is taken here should decide the deliberately-closed state explicitly too. Fix options: (a) move the pr_merge_state read inside handoff_complete_review itself, ahead of its confirm_pr_ready step, so both callers inherit it; (b) add a separate advisory read at the Enabler’s own call site before it elects complete_handoff.

Default: Move the read inside handoff_complete_review ahead of confirm_pr_ready so both callers inherit it — the same one-gate-and-flip-implementation argument requirement 31c already makes is exactly why a per-caller read would be the wrong shape here.

Section titled “Default: Move the read inside handoff_complete_review ahead of confirm_pr_ready so both callers inherit it — the same one-gate-and-flip-implementation argument requirement 31c already makes is exactly why a per-caller read would be the wrong shape here.”

Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/1061.

Migrated to https://github.com/Pullwright/agent-ops/issues/2006.