Repository navigation
Conversation
The sibling scan only read <workspace_root>/<repo>/<workspace>/, the layout Conductor creates, so worktrees anywhere else were invisible. Ask git worktree list as well, keep the workspace root for separate clones, and count a checkout found both ways once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merging to
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 |
A blocking git call with no timeout can hang a whole CI shard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks @vilano93. Confirmed on main: |
|
Following up: we're taking this. The config comment says any folder of parallel worktrees works, and with worktrees under |
|
Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-802) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed. |
|
Thank you, @vilano93. This was rebuilt on current main and landed in #4681 (merged as b3323f4), with credit in the changelog. /ship's version picker now adds |
When /ship picks a version, it now notices every parallel git worktree of the repo, so two branches in progress stop taking the same number.
Why (in your own words)
Today
gstack-next-versiononly looks in<workspace_root>/<repo>/<workspace>/, the layout Conductor creates. I work in worktrees that Claude Code puts under.claude/worktrees, and pointingworkspace_rootthere does nothing, because the scan then looks for.claude/worktrees/<repo>/. The config comment says any directory holding parallel worktrees will do, but it silently finds none. This change asksgit worktree list, which knows every linked worktree wherever it lives, and still reads the workspace root because that is how separate clones are found.Live evidence
A temp repo with
mainat 0.1.66.0 and one worktree outside the Conductor layout holding 0.1.67.0, run from the main checkout with--base main --bump micro --current-version 0.1.66.0:The same comparison on my real project, which has 17 worktrees (the main checkout plus 16 linked ones), run from the main checkout:
The two tests for the new behaviour were red before the fix:
The other three tests guard behaviour that must not change, so they pass before the fix too. I broke the code on purpose in four ways to confirm the tests can fail:
nullno longer disables the scanAfter the fix:
Scope
bin/gstack-next-version: the sibling scan takes the union ofgit worktree listand the workspace root layout, compares real paths, and excludes the current checkout by its top level.bin/gstack-config: theworkspace_rootcomment now says what the setting does, and drops the claim that any directory of worktrees works.test/gstack-next-version.test.ts: five tests against real temp repos and worktrees.changelog.d/fix-next-version-sees-git-worktrees.md: the changelog fragment.TOO_BROADabove). CI runs it on this PR./landing-reporttemplate still labels this list "Sibling Conductor worktrees". It is cosmetic, and changing it means regenerating skill files.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface) or PR author is@garrytan(owner exemption)🤖 Generated with Claude Code