commands: enforce worktree isolation in rockout, review-pr, release-patch#2032
Merged
Conversation
…atch Tighten the workflow commands so the user's main checkout stays on main and all work happens in a dedicated worktree on its own branch. - rockout: replace Step 2 with an explicit isolation contract ($ROCKOUT_WT / $ROCKOUT_MAIN), require a pwd/branch re-check before every commit, and forbid absolute paths into the main checkout. - review-pr: add Step 1.5 to materialize the PR head in a worktree before reading files. Detects when invoked from inside another worktree (rockout Step 9) and reuses it. Cleans up only the worktree it created. - release-patch: Step 2 now creates release/vX.Y.Z in a worktree off origin/main; Step 7 tags from the main checkout and removes the worktree after.
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.
Summary
Tighten three workflow commands so the user's main checkout stays on
mainand all work happens in a dedicated worktree on its own branch.ROCKOUT_WT/ROCKOUT_MAIN), requires apwdand current-branch re-check before every commit, and forbids absolute paths into the main checkout.`release-minor`, `release-major`, notebook commands, and `bench` are not changed in this PR (out of scope for this round).
Test plan