feat(fs): add generic filesystem namespaces#2174
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 1157d56 | Commit Preview URL Branch Preview URL |
Jul 17 2026, 03:30 AM |
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.
What changed
Add
NamespaceFs, a generic static filesystem namespace that composes arbitraryFileSystemsubtrees behind visible targets. The builder supports source-root rebasing, per-mount read-only/read-write access, deterministic nested precedence, synthetic ancestors, consistent metadata/listing behavior, safe cross-mount copy, and typed cross-device rename rejection.Includes runnable generic sandbox and rebasing examples, Rustdoc guide/API examples, public filesystem docs, VFS specification updates, and TM-ESC-031 threat-model coverage.
Why
Embedders need one bounded filesystem tree assembled from independent sources for build sandboxes, tests, plugin hosts, serverless functions, CI, and shell sessions without introducing agent-specific paths or lifecycle abstractions.
Before / After
Before:
MountableFscould mount only source roots, exposed a fallback root tree, and emulated cross-mount rename with non-atomic copy-delete.After, verified by smoke runs:
Behavioral/security coverage: 11 namespace tests pass, including rebasing, synthetic mount listing, metadata parity, normalization, TM-ESC-031 traversal/read-only bypass resistance, same- and cross-mount operations, and symlink preservation.
Risk
MountableFsbehavior are unchanged.ErrorKind::CrossesDevices; directory/FIFO cross-mount copy returnsErrorKind::Unsupported.Validation
just pre-prjust testcargo bench -p bashkit --bench parallel_execution --no-default-featuresChecklist