Repository navigation
feat: delete dependency folders without checking for hand edits - #6639
Merged
Merged
Conversation
janicduplessis
marked this pull request as ready for review
November 28, 2026 17:10
This was referenced Nov 28, 2026
Closed
janicduplessis
added a commit
that referenced
this pull request
Nov 29, 2026
…6688) * feat: remove hard-link sampling of dependency trees of unknown size A tree of unknown size now follows its step's rule: the dormant step takes a linked worktree's tree after the measured ones, and the 7-day source rule keeps a source checkout's tree. Removes link-sample.ts, its two sidecar records and the tests that only protected it, and replaces LLP 0001 "A tree of hard links stays". Refs #6685 * docs: drop stale hand-edit and #6093 text from LLP 0001 and 0004 #6639 removed the hand-edit check on dependency trees, and #6109 and #6115 closed #6093 with the saved sentinel proof for scan-only marks. Refs #6685
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.
Description
Maintenance and
stim gckeep anode_modulesorPodsfolder at every disk pressure when they detect hand edits in it. The detection reads file times, which cannot tell a slow or tool-written install output from an edit, so it needs a new rule for each tool (#6616, #6617). A reinstall loses an unpatched edit anyway.Solution
The edit check is removed: dependency folders, and finished or discovered worktrees with them, are deleted without looking inside. The other guards stay, and an unfinished
pnpm patchfolder is still copied aside first. The guides say these folders can be deleted at any time and that library fixes must be committed patches. This reverses the decision recorded for #5581; LLP 0002 quotes the new one.So that nothing is deleted by surprise, a new machine setting
maintenance.cleanAutoDiscoveredDependencies(defaultfalse) governs checkouts that only auto discovery found: while off, theirnode_modulesandPodsstay as long as the checkout does. Their build outputs and finished worktree removal do not wait for it. Checkouts where astimcommand ran, and checkoutsmaintenance.discoverRootsreaches (a direct child of a root, or a linked worktree inside one), are unaffected.Behaviour changes to note:
maintenance.autoDiscoveron, auto-found checkouts keep their dependencies until the new setting is turned on, where before they lost them.status --jsonno longer hasdependencyEdits, andstim doctorno longer reports edited folders.$STIM_HOME/dependency-installs/are no longer written or pruned. Existing files stay.Test plan
node_moduleswith the setting off, and adiscoverRootscheckout loses it with the setting off.stimdMetro test that passed 3 of 3 alone. After the review fixes,daemon-cadencetimed out under load in the affected run and passed twice alone.Fixes #6638