Make an unpacked archive exactly the archive (hq issue 220) #84

Merged
mesh-admin merged 1 commits from fix/issue-220-a-bundle-on-disk-is-exactly-the-artifact into main 2026-10-03 22:17:58 +00:00
Contributor

An archive was unpacked over the previous tree, so a file the new archive no longer has stayed on disk. After the move to one-file TypeScript bundles, every bundle directory kept the previous version's node_modules.

The archive is now unpacked into a fresh sibling directory, given its owner, and swapped in by rename. The old tree is removed only once the new one is in place. A refused or failed unpack leaves the old tree untouched, which the old code did not: it had written part of the new archive before refusing. Running processes keep their open files.

Archives are delivered only to their own directories: bundles under the mesh's bundle root, and a module's own install directory. Replacing the directory matches the existing rule that the digest is the whole identity of the tree.

Tests: a second delivery without a file removes it and leaves nothing beside the directory; a refused archive leaves the old tree whole. Both fail on main and pass here. The full suite passes.

An archive was unpacked over the previous tree, so a file the new archive no longer has stayed on disk. After the move to one-file TypeScript bundles, every bundle directory kept the previous version's node_modules. The archive is now unpacked into a fresh sibling directory, given its owner, and swapped in by rename. The old tree is removed only once the new one is in place. A refused or failed unpack leaves the old tree untouched, which the old code did not: it had written part of the new archive before refusing. Running processes keep their open files. Archives are delivered only to their own directories: bundles under the mesh's bundle root, and a module's own install directory. Replacing the directory matches the existing rule that the digest is the whole identity of the tree. Tests: a second delivery without a file removes it and leaves nothing beside the directory; a refused archive leaves the old tree whole. Both fail on main and pass here. The full suite passes.
mesh-admin added 1 commit 2026-10-03 22:17:52 +00:00
Unpacked over the previous tree, a file the new archive no longer has stayed: a bundle rebuilt as
one file per entrypoint kept the old package directory. Unpack into a fresh directory and swap it
in, so a refused archive also leaves the old tree whole.
mesh-admin merged commit a7bf0f6e39 into main 2026-10-03 22:17:58 +00:00
mesh-admin deleted branch fix/issue-220-a-bundle-on-disk-is-exactly-the-artifact 2026-10-03 22:17:59 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-host#84