Skip to content

Generated skill: a linked prepare output (node_modules) is the lane's copy; reinstalling in the worktree empties it #311

Closed

Description

@7schmiede

Reported from a downstream Node + .NET stack on 0.24.1, a local lane with prepare.link = ["<app>/node_modules"].

What happened

An agent working in the lane's worktree ran npm ci in the app directory to get a Playwright run going. The worktree's node_modules was the junction prepare.link puts there, so npm followed it and deleted the lane's copy (.devstack/lane-<name>/lanes/main/src/<app>/node_modules) down to one entry. It only stopped because the lane's running dev server held a file open (EBUSY). Repair: stop the dev server, npm ci in the lane's copy directory, start it again.

The same agent had, earlier the same day, been told by a project note to run npm ci in the worktree for a lane on a pool node (the way before 0.24.0, when such a lane left no link); the note was out of date, and nothing in the generated skill says otherwise.

Why it matters

A linked output is not the worktree's own directory, and it is not obvious from the worktree (on Windows a junction looks like a folder to most tools). Reinstalling, rm -rf, git clean -x or an IDE's "delete node_modules" there destroy what the lane runs from, and on a lane on a node the copy from the store.

Suggestion

  • Generated devstack skill (and devstack-config where it explains link): "A linked output (prepare.link) in a worktree is the lane's copy. Do not reinstall or delete it there; devstack lane list shows it as linked. If you need your own, stop the lane first (lane stop removes the link) or remove only the link (cmd /c rmdir <dir> / rm <link>), then install."
  • devstack could notice a linked copy that shrank (the content check fix(lanes): a lane on a node keeps a whole node_modules while new inputs are prepared (#305) #306 added when preparing) at the next start and prepare it again instead of using it, and devstack lane list could flag it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions