gh-stack icon indicating copy to clipboard operation
gh-stack copied to clipboard

A stacked PR's queue entry cannot be dequeued after its parent merges

Open christhomas opened this issue 4 weeks ago • 0 comments

Observed behavior

A native stack targeting main contained merged parent antimatter-studios/rust-fs-bcachefs#526 and open child antimatter-studios/rust-fs-bcachefs#527. The child's direct base remained fix/captured-output-checks, while its stack's ultimate base was main. The child had an UNMERGEABLE entry in main's merge queue.

After the merged parent's surviving branch was safely advanced to current main, pushing the locally rebased child was rejected with GH006: a queued pull request's branch cannot be updated.

The public GraphQL dequeuePullRequest(input: {id: <child PR node ID>}) mutation then returned:

No merge queue found for branch 'fix/captured-output-checks'

Reading the child's mergeQueueEntry still returned the existing entry in main's queue. The mutation appears to resolve the child's direct base instead of the native stack's ultimate base. Converting the child to draft also left that entry present and UNMERGEABLE.

Workaround verified

Closing and reopening the existing child PR, without deleting either branch, cleared the queue entry. An exact force-with-lease push then succeeded. The child was restored to ready for review, its diff was verified against main, and it remained unqueued.

Expected behavior

The supported dequeue mutation removes a native stack child's actual queue entry after an earlier layer has squash-merged. Updating that child's head should not require closing and reopening its PR.

Observed November 3, 2026, with GitHub CLI 2.103.3 and github/gh-stack v0.3.0. This is native-stack/public-API integration feedback; the failing dequeue operation was a direct GraphQL request, not a gh stack client command.

christhomas avatar Nov 03 '26 22:11 christhomas