Repository navigation
fix(gh): enforce peer roots for Base worktrees - #2636
Merged
codeforester merged 3 commits intoOct 30, 2026
Merged
codeforester merged 3 commits into
codeforester merged 3 commits into
Conversation
This was referenced Oct 30, 2026
Collaborator
Author
|
Addressed the containment review findings in commit c7c11c7.
Local validation:
Hosted checks are running on the new head. |
codeforester
deleted the
bug/2635-20261030-fix-gh-enforce-peer-roots-for-base-created-worktrees
branch
October 30, 2026 18:05
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
Enforce the peer-directory contract for Base-created implementation and review worktrees. Issue worktree paths are canonicalized and validated, while
basectl gh review fetch --rootnow rejects repository-contained paths, including symlinked paths, before creating directories or mutating Git/GitHub state.This prevents unmerged worktrees from being placed inside a primary checkout, where they can interfere with workspace synchronization and repository cleanliness checks.
Issue
Fixes #2635
Validation
BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash bats cli/bash/commands/basectl/tests/gh-review.bats cli/bash/commands/basectl/tests/gh.bats— 89/89 passed.bash -n cli/bash/commands/basectl/subcommands/gh_branch_worktree.sh cli/bash/commands/basectl/subcommands/gh_review.sh cli/bash/commands/basectl/subcommands/gh.shgit diff --checkThe regression tests verify nested and symlinked nested review roots fail before the GitHub mock or Git ref/worktree mutation is reached.
Demo Impact
None.
Notes
git worktree addremains outside Base's enforcement boundary..ai-context/COMMANDS.md.Checklist
<category>/<issue>-<YYYYMMDD>-<slug>and matches the issue category.None.