Repository navigation
feat(prepare): link a lane's prepared directories into its worktree (ADR-0044) - #160
Merged
Merged
Conversation
…ADR-0044) A lane runs from a copy of its worktree, and `prepare` installs there, so the worktree has no `node_modules`; git runs its hooks in the worktree, and a pre-commit hook with `npx eslint` failed in every lane until `npm ci` ran there by hand (#159). - `prepare.link = ["web/node_modules"]`: after `prepare`, a lane on this machine links each directory from its worktree to its copy (a junction on Windows, a symbolic link elsewhere). Only where the worktree has nothing of that name; a link git does not ignore is removed again and logged with why (`node_modules/` does not ignore a symbolic link). - The links go when the lane stops, is removed or moved, or the daemon stops: `git worktree remove` follows a junction on Windows (measured), and must not find one. Only links into the copy are removed. - A linked directory gone from the copy runs `prepare` again. - ADR-0044 (Proposed), stack-file reference, config skill, changelog. Closes #159 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ree goes while it runs A newer Git for Windows (CI) left the worktree of a running lane behind with its junction in it; ADR-0044 and the docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lane is forgotten after its services stop and its containers are removed; the test read the list in between (seen on Ubuntu CI, on main too). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
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.
Closes #159.
A lane runs from a copy of its worktree, so the worktree has no
node_modules; a pre-commit hook withnpx eslintfailed in every lane worktree.What
prepare.link = ["web/node_modules"]. Afterprepare, a lane on this machine links each listed directory from its worktree to its copy. On Windows that is a junction, which needs no privilege; elsewhere a symbolic link.prepare_not_linkedwith the reason. On Linux and macOS,node_modules/does not ignore a symbolic link, so the rule there isnode_modules.prepareagain.ADR
ADR-0044 is Proposed. Set it to Accepted on merge if you agree. It records the alternative from the issue (
devstack lane path), and the one consequence I don't like:git worktree removewhile the lane runs follows the junction and empties the copy's directory. I measured this with Git for Windows 2.43. The docs therefore say to stop the lane first, and the next start prepares the directory again.Not done
linkedmarker instatusor the dashboard yet; the diagnostic log hasprepare_linked,prepare_not_linkedandprepare_unlinked.Tests
cargo clippy --workspace --all-targetsandcargo fmt --checkare clean.linka_worktree_runs_as_a_lane(DEVSTACK_INTEGRATION=1, Windows) now checks thatlane startcreates the link andlane stopremoves it while the copy keeps the directory. It passed three times in a row. A fourth run failed while another build was running alongside it; the panic message was not captured.🤖 Generated with Claude Code