Repository navigation
fix(lanes): a lane on a node keeps a whole node_modules while new inputs are prepared (#305) - #306
Merged
Merged
Conversation
…uts are prepared (#305) When the lockfile changed in the worktree of a lane on a node, `prepare` ran `npm ci` in the copy the worktree's junction points to. `npm ci` empties node_modules first; when it then failed (a locked file, out of memory) the worktree was left with a few packages and nothing in the log. The lane now has two copies (`linked/src`, `linked/next/src`): new inputs are prepared in the one the worktree is not linked to, its mark removed first, and the link moves once it is whole. A failure keeps the copy it had (`linked (stale)`, with why). A failed prepare is logged as `prepare_failed`. ADR-0063 addendum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…) fails all the same Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 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.
Fixes #305.
What happened
The daemon log of the reporting stack shows it: the lane on the node was linked from the store (61 282 files). Then the lockfile changed in its worktree, and the 15-second look (
follow_node_links) rannpm ciin the copy the worktree's junction points to.npm ciemptiesnode_modulesfirst, then failed:EBUSYon a directory something held open, and a postinstallVirtualAlloc failed(the machine was out of memory). The worktree was left with the few packages installed so far. The log saidpreparestarted and nothing after.Fix (ADR-0063 addendum 2026-10-27)
linked/srcandlinked/next/src, each with its ownprepared/<service>marks.prepare) in the copy the worktree is not linked to. Its mark is removed first, so a half-made copy matches no key. The link moves once the copy is whole.linked (stale)with why (dashboard: warn colour); the next look tries again.run_preparelogsprepare_failed(exit code, cwd, log path).unlink_node_laneremoves links to either copy.Tests
a_lane_on_a_node_gets_its_worktree_linked_to_a_copy_from_the_storeextended: failing prepare →linked (stale), old content still reachable; store hit →linked/next, link moved, first copy unchanged; inputs back → link back without a run.cargo test -p devstack-daemon(160), clippy clean, ui typecheck + vitest (72).🤖 Generated with Claude Code