Repository navigation
The merge queue checks a pull request against the branch it targets, not the default branch (GST-3445) - #4663
Merged
Merged
Conversation
…not the default branch (GST-3445) gstack-ship-queue took its base from origin/HEAD when --base was missing, so ready refused a correct /ship receipt for a pull request into another branch with QUEUE_RECEIPT_BASE_MISMATCH (Founderstar #1024). Without --base it now uses the base of the pull request --pr names, and ready refuses an explicit --base that is not that base. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…ps make no extra GitHub call (GST-3445) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ready reads the pull request's base (GST-3445) Review-Finding: p1/specialist-batched#1 reader=specialist-batched Review-Finding: p1/specialist-batched#2 reader=specialist-batched Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s the default branch (GST-3445) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…se it checked, even when the base lookup failed (GST-3445) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gstack-ship-queue readynow checks a pull request against the branch it targets, so a PR into a branch other than main is no longer refused when its /ship review was done against that branch.Why: Founderstar #1024 targets
garrytan/v0.2-plan-wip, and ready refused its correct /ship review record because it compared that record against main.Nothing to do: until this lands, passing
--base <the PR's base>to ready works around it.What changed
--base,readyreads the base of the PR that--prnames (gh pr view <n> --json baseRefName). Before, it used origin/HEAD first, which is the default branch. If gh can't answer, it falls back to the old lookup.readythen reads the PR's base a second time, in the samegh pr viewcall that checks the PR's state, and refuses with QUEUE_NOT_READY ("#N targets X, not Y") when that base differs from the one it checks against or can't be read. So a failed first lookup, or a base name that starts withorigin/, ends in a refusal instead of a wrong READY.readyrefuses an explicit--basethat isn't the PR's base. Before,--base mainon a PR into another branch would accept a review record made against main.landkeeps using the default branch unless--basenames another, so it still refuses a stacked PR instead of merging it into its parent branch.Tests
New test file
test/ship-queue-ready-pr-base.test.ts. Its fixture has origin/HEAD set to main and a PR intogarrytan/v0.2-plan-wip. These cases fail on main 69ad103:--base, the case fails with Founderstar's exact refusal. A review record for the PR's base is now accepted, and one for main is still refused.--base main, main printed READY. It now refuses with QUEUE_NOT_READY.One more case in the same file checks the second base read in
ready. Both parts printed READY (exit 0) at c531eb9 and now refuse with exit 3:readyfalls back to main for a PR into another branch;origin/foo.test/ship-queue-land-direct.test.tsadds one case:land --pinwith no--baserefuses a stacked PR shipped against its parent branch and merges nothing.The new test file spawns shell fixtures, so it gets a Windows curation entry like test/ship-queue-ready-fresh-base.test.ts.
Documentation
Status: current — docs already match the change; no edits.
Scope: branch
ship-queue-uses-the-pr-baseagainst base69ad1031(headef08d775):gstack-ship-queue readydefaults--baseto the base of the PR that--prnames, refuses a mismatched explicit--base, andlib/ship-queue.tsrefuses a PR whose base is not the queue's base.landstill defaults to the main branch.Documentation health:
docs/troubleshooting.md— Current (the branch already updated theQUEUE_RECEIPT_BASE_MISMATCHsection)docs/ship-policy.md— Current (mentions of the queue's base still hold)bin/gstack-ship-queuehelp and header — Currentchangelog.d/ship-queue-uses-the-pr-base.md— Current (owned by the parent)Debt: no coverage gaps; no diagram drift; no regeneration needed.
Agent notes
--prsince cadbd0a (v1.91.116.0 feat: field list 2 wave B: gstack-ship-queue, approval classes, state-machine review, pregate timing check, update-check main moves #3235, 2026-10-16). The receipt's base check that turned that into a refusal came in f75ce6f (Stop the merge queue from landing a stacked PR's unreviewed parent commits (GST-2153) #4229, 2026-11-09).History: the exception below was recorded for the second full pass at 700e0d7.
Review-loop exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-22 via GStack Minder ruling C on #4663 (agent message to this /ship run): Both fail closed: a failed PR lookup or an origin/-prefixed base name ends in a refusal, never a wrong READY. (second full pass at 700e0d7, deferred v1/outside-voice#1, v1/outside-voice#2)
Refs Founderstar#1024
Refs p1/specialist-batched#1
Refs p1/specialist-batched#2
Approvals
No approvals recorded for branch ship-queue-uses-the-pr-base.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix