Repository navigation
v1.92.13.0 fix: /ship's preflight skips git merge when the base is already in HEAD (GST-691) - #3774
Merged
Merged
Conversation
… HEAD (GST-691) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…est names its bin (GST-691) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… 3's conflict stop (GST-691) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tted merge, cherry-pick or revert to Step 3 (GST-691) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
4 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.
What changed
gstack-ship-preflight(Step 3) used to rungit merge origin/<base>every time, even whenorigin/<base>was already an ancestor of HEAD and the merge had nothing to do. It now checksgit merge-base --is-ancestor origin/<base> HEADfirst and printsMERGE: up to datewithout runninggit merge. An unfinished merge, cherry-pick or revert (conflicted, or resolved and staged) still falls through to the old merge path, so Step 3's stop still fires. A moved base still merges.Why
GST-691 (GEVA-85 on gstack-evals): on a Capy shared machine, the platform's shared-tree guard (
/home/user/.capy/guard/shared-tree-*/git) refusesgit mergein the checkout, so /ship's preflight stopped withgit merge origin/main failedeven when there was nothing to merge. Underqueue_mode: stamp-at-merge(gstack itself) the merge is already skipped, so this matters for repos that merge the base in preflight.Proof, failing first.
test/ship-preflight-base-ancestor.test.tsputs a guard stub on PATH that logs and refusesgit merge. On main 4eff47c the up-to-date case fails:[3, "", "STOP: git merge origin/main failed: shared-tree guard: git merge is not allowed in this checkout"]instead of[0, "MERGE: up to date", undefined]. With the fix it passes, the moved-base case still records exactly onemerge origin/main --no-edit, and the unfinished-merge case still stops (it fails without thels-files -u/MERGE_HEADguards).Blast radius
One condition in
merge()inlib/ship-preflight.ts, used only bygstack-ship-preflight. No network, env, permission, workflow or dependency change. Output strings are unchanged (MERGE: up to dateis the string the old no-op merge printed).Approvals
None needed: an audited bug fix under the fix-lane exemption, assigned by GStack Minder (GSTA-36).
Review notes
Blocks: no), left for a follow-up: the unfinished-operation test covers a merge but not a resolved cherry-pick/revert; on a guarded machine an unfinished merge stops with the guard's refusal text rather than git's "You have not concluded your merge"..git/sequencer/git amstates and a staleorigin/<base>behave as they did before this change.ship/SKILL.md.tmpl:188doesn't name theup to dateoutcome (docs audit a691-1, minor omission).Pre-Landing Review
Pre-Landing Review: 7 issues — 2 fixed, 0 deferred, 4 noted
Gate edits: none detected
Documentation
Scope: the three-file diff (
lib/ship-preflight.ts,test/ship-preflight-base-ancestor.test.ts, thechangelog.dfragment) checked againstship/SKILL.md.tmpl, generatedship/SKILL.md, anddocs/ship-policy.md. I audited committed content only, because the worktree had no staged, unstaged or new files. Result: no doc edits. The changelog fragment covers the newMERGE: up to datebehavior, anddocs/ship-policy.mddoesn't describe the preflight merge step. Debt: the ship Step 3 line (ship/SKILL.md.tmpl:188, generatedship/SKILL.md:458) lists onlyMERGE:andskippedunder stamp-at-merge, so it doesn't nameup to date. It is a minor omission, not a wrong statement, and a template edit plus regeneration would close it.