fix(nix): make prepared workspace restore overwrite source files#640
Merged
schickling merged 1 commit intomainfrom Apr 30, 2026
Merged
fix(nix): make prepared workspace restore overwrite source files#640schickling merged 1 commit intomainfrom
schickling merged 1 commit intomainfrom
Conversation
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.
Summary
Fix prepared pnpm workspace restore when the target already contains read-only source files from a store-backed workspace copy.
The restore helper already removes existing
node_modulesbefore extracting a prepared dependency tree. Composed downstream builds also need the install-root source directory itself to be writable, and top-level files owned by the prepared tree must be removed before tar extraction. Otherwisetarcan fail withPermission denied/File existswhile overlaying paths such asrepos/effect-utils/package.json,.root-patches, and package-levelnode_modules.Rationale
This keeps the prepared-tree contract in effect-utils instead of pushing downstream repos toward local builder forks. The fix is limited to restore-time materialization; it does not change the FOD archive format or hash boundary.
Validation
nixfmt nix/workspace-tools/lib/mk-pnpm-deps.nixgit diff --checkschickling/dotfilesdiscord-agent build failed after effect-utils fix(nix): upstream pnpm CLI builder hardening #639 with tar overlay errors againstrepos/effect-utils; this patch targets that restore boundary.