Skip to content

feat: delete dependency folders without checking for hand edits - #6639

Merged
janicduplessis merged 4 commits into
mainfrom
feat/6638-drop-dependency-edit-check
Nov 28, 2026
Merged

janicduplessis merged 4 commits into
mainfrom
feat/6638-drop-dependency-edit-check

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Maintenance and stim gc keep a node_modules or Pods folder 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 patch folder 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 (default false) governs checkouts that only auto discovery found: while off, their node_modules and Pods stay as long as the checkout does. Their build outputs and finished worktree removal do not wait for it. Checkouts where a stim command ran, and checkouts maintenance.discoverRoots reaches (a direct child of a root, or a linked worktree inside one), are unaffected.

Behaviour changes to note:

  • A hand edit in a dependency folder is now deleted once the workspace is idle.
  • With maintenance.autoDiscover on, auto-found checkouts keep their dependencies until the new setting is turned on, where before they lost them.
  • status --json no longer has dependencyEdits, and stim doctor no longer reports edited folders.
  • Install records under $STIM_HOME/dependency-installs/ are no longer written or pruned. Existing files stay.

Test plan

  • New tests: an auto-found checkout keeps node_modules with the setting off, and a discoverRoots checkout loses it with the setting off.
  • Removed the tests that asserted edited folders are kept. The pnpm patch rescue test passes unchanged.
  • macOS full suite: the last run failed a setting classification test, fixed and rerun with the affected files, and one stimd Metro test that passed 3 of 3 alone. After the review fixes, daemon-cadence timed out under load in the affected run and passed twice alone.

Fixes #6638

@janicduplessis janicduplessis added area: cli packages/stim-cli, including its README and guide area: core packages/core area: website website/ area: docs docs/ and root documents labels Nov 28, 2026
@janicduplessis janicduplessis added the review: ai-approved A fresh AI review found nothing left to fix label Nov 28, 2026
@janicduplessis
janicduplessis marked this pull request as ready for review November 28, 2026 17:10
@janicduplessis
janicduplessis merged commit 7cab418 into main Nov 28, 2026
61 of 62 checks passed
@janicduplessis
janicduplessis deleted the feat/6638-drop-dependency-edit-check branch November 28, 2026 17:28
janicduplessis added a commit that referenced this pull request Nov 29, 2026
#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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli packages/stim-cli, including its README and guide area: core packages/core area: docs docs/ and root documents area: website website/ review: ai-approved A fresh AI review found nothing left to fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance deletes dependency folders without checking for hand edits, and the guide says to use patches

1 participant