feat: Add per-run tmpdir wipe and read-only fixture snapshots - #8
Open
ThomasHartDev wants to merge 2 commits into
Open
feat: Add per-run tmpdir wipe and read-only fixture snapshots#8ThomasHartDev wants to merge 2 commits into
ThomasHartDev wants to merge 2 commits into
Conversation
Give each opted-in sandbox run a private workdir via mkdtemp, mount optional host fixtures as read-only copies, and always dispose the tree when the run settles so side effects cannot leak across runs.
fs.cp preserved host-pointing symlinks, so guest writes could mutate host files. Reject symlink hosts/trees, post-copy scan, regression tests, and accurate README (snapshots, not live mounts).
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.
Each opted-in run gets a private mkdtemp workdir injected as
workdir, optional host fixtures snapshotted (content-copied) into the workspace as read-only files, and a guaranteed wipe when the result settles (ok, error, timeout, or throw).ephemeralFsworks on bothrunandrunInWorker;createEphemeralWorkspace/withEphemeralWorkspacecover standalone use.Symlink safety: host paths that are symbolic links, and directory trees that contain any symlink, are rejected with
FixturePathError. Defaultfs.cpwould preserve links and let a guest withfsallowed mutate host files through a recreated link under workdir. Mounts are content snapshots, not live mounts; host paths are never re-opened via links under the workspace.Fixture keys that try to escape the root (including keys that normalize to
.) are rejected before join. Linux hosts best-effort set the immutable bit; without it, mode-bit RO is advisory for same-uid guests (documented in README).Closes #7