fix(ship): require a main-based checkout, drop the stash/pop#394
Open
shirgoldbird wants to merge 1 commit into
Open
fix(ship): require a main-based checkout, drop the stash/pop#394shirgoldbird wants to merge 1 commit into
shirgoldbird wants to merge 1 commit into
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
ship.py stashed the working tree, branched off main, then popped the stash back. On a divergent branch the pop conflicted, crashed the step, and committed conflict markers into docs.json — while stranding the user's real work in a dangling stash. Now: 1. No stash — the promoted working-tree changes carry onto the new branch directly. 2. A guard that refuses unless HEAD == origin/main, so a PR is always built on the correct base. On a feature or stale branch ship stops with a clear message instead of crashing or silently building off the wrong base. CI runs on main, so the guard is a no-op there. Verified: refuses on a non-main HEAD (exit 1, no branch created, no state change). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
bbfeb41 to
9a5dafc
Compare
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.
ship.pystashed the working tree, branched offmain, then popped the stash back onto the new branch. On a divergent branch (e.g. running the full pipeline locally on a feature branch mid-restructure) thegit stash popconflicted → the step crashed → conflict markers got committed intodocs.json, and the user's uncommitted work was stranded in a dangling stash.Fix (strict, main-based)
HEAD == origin/main. A PR is always built on the correct base. On a feature/stale branch, ship stops with a clear message (run from a fresh main checkout, orrun.py --skip ship post_review) instead of crashing or silently building off the wrong base.CI always runs on
main, so the guard is a no-op there — it only catches accidental local runs on the wrong branch.Verified
🤖 Generated with Claude Code