Skip to content

fix(nix): make prepared workspace restore overwrite source files#640

Merged
schickling merged 1 commit intomainfrom
schickling/2026-04-30-pnpm-restore-overlay
Apr 30, 2026
Merged

fix(nix): make prepared workspace restore overwrite source files#640
schickling merged 1 commit intomainfrom
schickling/2026-04-30-pnpm-restore-overlay

Conversation

@schickling-assistant
Copy link
Copy Markdown
Collaborator

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_modules before 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. Otherwise tar can fail with Permission denied / File exists while overlaying paths such as repos/effect-utils/package.json, .root-patches, and package-level node_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.nix
  • git diff --check
  • Downstream reproducer: schickling/dotfiles discord-agent build failed after effect-utils fix(nix): upstream pnpm CLI builder hardening #639 with tar overlay errors against repos/effect-utils; this patch targets that restore boundary.

@schickling schickling enabled auto-merge (squash) April 30, 2026 13:32
@github-actions
Copy link
Copy Markdown

Storybook Previews

Package Latest URL Last Deploy (Europe/Berlin)
notion-react https://notion-react-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
effect-react https://effect-react-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
effect-schema-form-aria https://effect-schema-form-aria-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
tui-react https://tui-react-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
tui-stories https://tui-stories-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
megarepo https://megarepo-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
genie https://genie-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
notion-cli https://notion-cli-pr-640--overeng-utils.netlify.app 2026-04-30 15:34 CEST
react-inspector https://react-inspector-pr-640--overeng-utils.netlify.app 2026-04-30 15:35 CEST
Per-Commit Deploy History

Commit 541636d · 2026-04-30 15:35 CEST

Package URL
notion-react https://69f35a4a66e9647d8828b520--overeng-utils.netlify.app
Alias: https://notion-react-pr-640--overeng-utils.netlify.app
effect-react https://69f35a5120cea1765acfd4d4--overeng-utils.netlify.app
Alias: https://effect-react-pr-640--overeng-utils.netlify.app
effect-schema-form-aria https://69f35a51eb75067a2f0730d5--overeng-utils.netlify.app
Alias: https://effect-schema-form-aria-pr-640--overeng-utils.netlify.app
tui-react https://69f35a517eae597807207acb--overeng-utils.netlify.app
Alias: https://tui-react-pr-640--overeng-utils.netlify.app
tui-stories https://69f35a52a24cb875b1fa2b88--overeng-utils.netlify.app
Alias: https://tui-stories-pr-640--overeng-utils.netlify.app
megarepo https://69f35a556e890877b81eefaf--overeng-utils.netlify.app
Alias: https://megarepo-pr-640--overeng-utils.netlify.app
genie https://69f35a7502a1997b25e10e2d--overeng-utils.netlify.app
Alias: https://genie-pr-640--overeng-utils.netlify.app
notion-cli https://69f35a7db1d0145da2e70257--overeng-utils.netlify.app
Alias: https://notion-cli-pr-640--overeng-utils.netlify.app
react-inspector https://69f35a8451ef37735cac168d--overeng-utils.netlify.app
Alias: https://react-inspector-pr-640--overeng-utils.netlify.app

@schickling-assistant schickling-assistant added type:bug Semantic type:bug label origin:agent Filed by an AI agent area:nix Semantic area:nix label labels Apr 30, 2026
@schickling schickling merged commit fed50ae into main Apr 30, 2026
13 of 14 checks passed
@schickling schickling deleted the schickling/2026-04-30-pnpm-restore-overlay branch April 30, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:nix Semantic area:nix label origin:agent Filed by an AI agent type:bug Semantic type:bug label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants