fix: untrack the node_modules symlinks + lint so it cannot recur (#491) - #492
Merged
physercoe merged 1 commit intoJul 31, 2026
Conversation
…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
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 #491.
What happened
cf7eb93eaccidentally committed two symlinks (mode120000) pointing at an absolute scratch path:desktop/node_modules→/tmp/claude-1000/.../scratchpad/vaultfix-wt/desktop/node_modulesdesktop/electron/node_modules→ same layout underdesktop/electron/A tracked entry at a
node_modulespath bypasses the ignore rules, and the blast radius was observed on two machines' checkouts:git pullreplaced populatednode_modulesdirectories with the dangling symlink (dependency installs silently destroyed,npm run buildthen fails on missing packages), and worktrees holding a realnode_modulesdirectory could not check outmainat 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 anode_modulessegment fails, with the offending paths listed. Wired into the lint job inci.yml, matching the existinglint-*.shconventions.Verification
npm ciand the desktop + electron builds and installer packaging were re-verified green oncf7eb93eafter recovery.Note for merge: after this lands, anyone who pulled
cf7eb93eshouldrm -f desktop/node_modules desktop/electron/node_modulesbefore/after pulling (the tracked symlinks get deleted by the merge; a dangling symlink left untracked would still shadownpm ci) and re-runnpm ciin both packages if they haven't already.