Skip to content

ship: base_merge leaves a clean moved base unmerged on merge-queue repos (GST-1772) - #4134

Closed
garrytan wants to merge 11 commits into
mainfrom
gsta383/gst-1772-base-merge
Closed

garrytan wants to merge 11 commits into
mainfrom
gsta383/gst-1772-base-merge

Conversation

@garrytan

@garrytan garrytan commented Nov 7, 2026

Copy link
Copy Markdown
Owner

/ship Step 3 currently merges origin/ into the branch whenever the base has moved, even when nothing conflicts. A repo that lands through a merge queue (qm, on GitHub's) gets nothing from that merge, since the queue tests the exact merge commit anyway. What the merge does do is change the head, restart CI and the PR's report, and, on a stack, force a merge-up through every child (qm #3186, #2878).

  • New policy key base_merge: auto | on-conflict | always (default auto). Under on-conflict, or under auto when gh api graphql reports a mergeQueue on the base branch, Step 3 checks the moved base with git merge-tree. If it merges cleanly, Step 3 leaves it unmerged: MERGE: skipped (origin/<base> is N commit(s) ahead and merges clean; …). A conflict still merges and stops as before. When auto can't tell (a local origin, or a failed or empty gh answer) or merge-tree fails, Step 3 merges and a BASE_MERGE: line says why.
  • finish recheck. The release commit (a claim-at-open VERSION or CHANGELOG write) can make a skipped base conflict. gstack-ship-release finish rechecks any head that lacks origin/ against a fresh fetch --refmap=, so origin/ doesn't move, and stops with the conflicted files if the base no longer merges.
  • Receipt. An optional base_merge: { base, behind, mergeable } is written whenever the receipt's head lacks origin/.
  • Preflight warning. ORIGIN_HEAD: warns when the local refs/remotes/origin/HEAD names neither the base nor the remote's default branch. Fix: git remote set-head origin --auto.

Plan approved by Garry ("Do it", via GStack Minder) on autoplan run autoplan-20261107090351. Unchanged: how gstack itself lands (stamp-at-merge still never merges at Step 3), and the land and merged-tree checks.

Open in Capy

garrytan and others added 3 commits November 7, 2026 17:15
…ueue repos (GST-1772)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…-merge

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	lib/ship-policy-keys.ts
#	lib/ship-policy.ts
… (GST-1772)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 7, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

garrytan and others added 6 commits November 7, 2026 17:32
…hip goldens (GST-1772)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Step 3 merges a moved base that changed VERSION or a versioned manifest, since Step 12 reads the branch's version against origin/<base>. finish rechecks a skipped base when its own queue check fails, and its conflict STOP fetches the base before merging. Docs name the CI-carry consequence of an unmerged base.

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…-merge

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	lib/ship-policy.ts
…1772)

cleanBaseSkip merges when the version at the merge base and at origin/<base> differ, read through versionAtRef (VERSION or the .gstack/version-path pin), so a pinned version file is honored and dependency-only manifest edits no longer force a merge.

Review-Finding: p2/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ror; version compare ignores error text (GST-1772)

Scoped fix-check under review_loop_exception a-0b26cd5554a3.

Review-Finding: v1/outside-voice#1 reader=outside-voice
Review-Finding: v1/outside-voice#2 reader=outside-voice
Review-Finding: v1/outside-voice#3 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as draft November 7, 2026 19:06
garrytan and others added 2 commits November 7, 2026 19:20
…y head behind origin/<base> (GST-1772)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai

capy-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closing while parked. Its thread is archived, and the work is frozen until 2026-11-21. The branch gsta383/gst-1772-base-merge is kept, and GST-1772 will re-lane from it after the freeze.

@capy-ai capy-ai Bot closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant