Skip to content

fix: untrack the node_modules symlinks + lint so it cannot recur (#491) - #492

Merged
physercoe merged 1 commit into
physercoe:mainfrom
agentfleets:agent/agentfleet/fix-491-node-modules-symlinks
Jul 31, 2026
Merged

fix: untrack the node_modules symlinks + lint so it cannot recur (#491)#492
physercoe merged 1 commit into
physercoe:mainfrom
agentfleets:agent/agentfleet/fix-491-node-modules-symlinks

Conversation

@agentfleets

Copy link
Copy Markdown
Collaborator

Closes #491.

What happened

cf7eb93e accidentally committed two symlinks (mode 120000) pointing at an absolute scratch path:

  • desktop/node_modules/tmp/claude-1000/.../scratchpad/vaultfix-wt/desktop/node_modules
  • desktop/electron/node_modules → same layout under desktop/electron/

A tracked entry at a node_modules path bypasses the ignore rules, and the blast radius was observed on two machines' checkouts: git pull replaced populated node_modules directories with the dangling symlink (dependency installs silently destroyed, npm run build then fails on missing packages), and worktrees holding a real node_modules directory could not check out main at all.

Fix

  • git rm desktop/node_modules desktop/electron/node_modules — the two symlink blobs, no other content at those paths.
  • scripts/lint-no-tracked-node-modules.sh — hard ban (not a ratchet): any tracked path containing a node_modules segment fails, with the offending paths listed. Wired into the lint job in ci.yml, matching the existing lint-*.sh conventions.

Verification

  • Lint fails on current main (exit 1, lists both symlinks) — tested by running the script from the main checkout.
  • Lint passes with this branch (exit 0).
  • Both checkouts had deps reinstalled via npm ci and the desktop + electron builds and installer packaging were re-verified green on cf7eb93e after recovery.

Note for merge: after this lands, anyone who pulled cf7eb93e should rm -f desktop/node_modules desktop/electron/node_modules before/after pulling (the tracked symlinks get deleted by the merge; a dangling symlink left untracked would still shadow npm ci) and re-run npm ci in both packages if they haven't already.

…sercoe#491)

cf7eb93 accidentally committed two symlinks (mode 120000) at
desktop/node_modules and desktop/electron/node_modules pointing at an
absolute scratch path on the committer's machine. A tracked entry at a
node_modules path bypasses the ignore rules: git pull replaced populated
installs with the dangling symlink (deps silently gone, builds broke),
and worktrees with a real node_modules dir could not check out main.

- git rm both symlinks (no other content at those paths)
- scripts/lint-no-tracked-node-modules.sh: hard ban — any tracked path
  with a node_modules segment fails, wired into ci.yml's lint job

Closes physercoe#491
@physercoe
physercoe merged commit cea267f into physercoe:main Jul 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main has two tracked node_modules symlinks pointing at a local scratch path — pull clobbers real installs

2 participants