Repository navigation
Split protocol negotiation into focused modules - #22
Merged
oferchen merged 1 commit intoOct 15, 2025
Merged
Conversation
This was referenced May 22, 2026
oferchen
added a commit
that referenced
this pull request
May 22, 2026
…EC-1.q) Extend DeleteFs with unix-only `*_at` siblings (unlink_file_at, rmdir_at, unlink_symlink_at, unlink_device_at, unlink_special_at, remove_dir_all_at) that take a parent dirfd + single-component leaf and route through fast_io::unlinkat / fast_io::recursive_unlinkat (SEC-1.s). Path-based methods stay as the no-sandbox / Windows fallback so existing callers keep working unchanged. Closes the six GAP sites in crates/engine/src/delete/emitter/fs.rs from PR #4710 audit section 4 (#22-#27) by giving RealDeleteFs a dirfd- anchored dispatch shape. Adds DeleteEmitter::with_sandbox carrier slot that opens a per-plan dirfd via DirSandbox::root_dirfd just before dispatch so a mid-syscall symlink swap on the parent walk cannot redirect the call. Plan-directory open failure transparently falls back to the path-based methods so the drain stays compatible. RecordingDeleteFs and ScriptedDeleteFs implement `*_at` by discarding parent_fd and recording the leaf name so every emitter unit test keeps working without sandbox plumbing. New sandbox.rs test module exercises each `*_at` variant against a live tempdir, the recursive peel's symlink-swap resistance, and the sandbox-off / missing-plan-directory fallback paths. Promotes recursive_unlinkat(parent_dirfd, leaf) from a SEC-1.s internal helper to a pub entry point so engine can use it directly without synthesising absolute-path arguments. Receiver-deletion integration in crates/transfer/ deferred to a follow-up per design doc; the receiver loop does not yet route through DeleteEmitter.
oferchen
added a commit
that referenced
this pull request
May 22, 2026
…EC-1.q) (#4728) Extend DeleteFs with unix-only `*_at` siblings (unlink_file_at, rmdir_at, unlink_symlink_at, unlink_device_at, unlink_special_at, remove_dir_all_at) that take a parent dirfd + single-component leaf and route through fast_io::unlinkat / fast_io::recursive_unlinkat (SEC-1.s). Path-based methods stay as the no-sandbox / Windows fallback so existing callers keep working unchanged. Closes the six GAP sites in crates/engine/src/delete/emitter/fs.rs from PR #4710 audit section 4 (#22-#27) by giving RealDeleteFs a dirfd- anchored dispatch shape. Adds DeleteEmitter::with_sandbox carrier slot that opens a per-plan dirfd via DirSandbox::root_dirfd just before dispatch so a mid-syscall symlink swap on the parent walk cannot redirect the call. Plan-directory open failure transparently falls back to the path-based methods so the drain stays compatible. RecordingDeleteFs and ScriptedDeleteFs implement `*_at` by discarding parent_fd and recording the leaf name so every emitter unit test keeps working without sandbox plumbing. New sandbox.rs test module exercises each `*_at` variant against a live tempdir, the recursive peel's symlink-swap resistance, and the sandbox-off / missing-plan-directory fallback paths. Promotes recursive_unlinkat(parent_dirfd, leaf) from a SEC-1.s internal helper to a pub entry point so engine can use it directly without synthesising absolute-path arguments. Receiver-deletion integration in crates/transfer/ deferred to a follow-up per design doc; the receiver loop does not yet route through DeleteEmitter.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…EC-1.q) (#4728) Extend DeleteFs with unix-only `*_at` siblings (unlink_file_at, rmdir_at, unlink_symlink_at, unlink_device_at, unlink_special_at, remove_dir_all_at) that take a parent dirfd + single-component leaf and route through fast_io::unlinkat / fast_io::recursive_unlinkat (SEC-1.s). Path-based methods stay as the no-sandbox / Windows fallback so existing callers keep working unchanged. Closes the six GAP sites in crates/engine/src/delete/emitter/fs.rs from PR #4710 audit section 4 (#22-#27) by giving RealDeleteFs a dirfd- anchored dispatch shape. Adds DeleteEmitter::with_sandbox carrier slot that opens a per-plan dirfd via DirSandbox::root_dirfd just before dispatch so a mid-syscall symlink swap on the parent walk cannot redirect the call. Plan-directory open failure transparently falls back to the path-based methods so the drain stays compatible. RecordingDeleteFs and ScriptedDeleteFs implement `*_at` by discarding parent_fd and recording the leaf name so every emitter unit test keeps working without sandbox plumbing. New sandbox.rs test module exercises each `*_at` variant against a live tempdir, the recursive peel's symlink-swap resistance, and the sandbox-off / missing-plan-directory fallback paths. Promotes recursive_unlinkat(parent_dirfd, leaf) from a SEC-1.s internal helper to a pub entry point so engine can use it directly without synthesising absolute-path arguments. Receiver-deletion integration in crates/transfer/ deferred to a follow-up per design doc; the receiver loop does not yet route through DeleteEmitter.
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
crates/protocol/src/lib.rsinto dedicatederror,legacy,negotiation, andversionmodules to satisfy the workspace file size guidelinesTesting
cargo test