Skip to content

refactor(fast_io): re-fold SEC-1 *at* helpers into single at_syscalls module#4700

Open
oferchen wants to merge 1 commit into
masterfrom
refactor/fast-io-at-syscalls-refold
Open

refactor(fast_io): re-fold SEC-1 *at* helpers into single at_syscalls module#4700
oferchen wants to merge 1 commit into
masterfrom
refactor/fast-io-at-syscalls-refold

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

Consolidates at_syscalls_metadata.rs (SEC-1.i) and at_syscalls_rename.rs (SEC-1.j) into the existing at_syscalls.rs now that all three SEC-1 *at helper PRs (.h #4683, .i #4690, .j #4693) are on master. The original module headers explicitly committed to a re-fold once siblings landed; this completes the hygiene follow-up planned in docs/design/sec-1-at-syscalls-refold-2026-05-21.md.

  • Move metadata helpers (fchmodat / fchownat / utimensat plus their via_sandbox_or_fallback adaptors and tests) under a SEC-1.i divider.
  • Move rename helpers (renameat plus its via_sandbox_or_fallback adaptor and tests) under a SEC-1.j divider. The RENAME_NOREPLACE const stays alongside the helpers that consume it.
  • Drop the two duplicated single_component_leaf private helpers that the sibling files carried for in-flight isolation; the original in at_syscalls.rs is shared by every adaptor.
  • Collapse dir_sandbox/mod.rs re-exports into a single alphabetical pub use at_syscalls::{...} block.
  • Delete at_syscalls_metadata.rs and at_syscalls_rename.rs.

Zero behaviour changes. All public helper names, signatures, cfg gating, and the lib.rs re-export surface are preserved. Net delta: +1081 / -1206 LoC (deduped private helpers + module-doc headers + test-helper duplication).

Test plan

  • CI fmt+clippy passes for fast_io
  • CI nextest (stable, Linux + macOS) passes - all SEC-1.f-j unit tests still cover the merged surface
  • CI Windows passes - dir_sandbox remains #[cfg(unix)] at lib.rs; Windows compile-out is unchanged
  • CI Linux musl passes

… module

Consolidates `at_syscalls_metadata.rs` (SEC-1.i) and `at_syscalls_rename.rs`
(SEC-1.j) into the existing `at_syscalls.rs` now that all three SEC-1 *at*
helper PRs are on master. The original module headers committed to a
re-fold once siblings landed; this completes the hygiene follow-up.

- Move metadata helpers (fchmodat / fchownat / utimensat plus their
  via_sandbox_or_fallback adaptors and tests) under a SEC-1.i divider.
- Move rename helpers (renameat plus its via_sandbox_or_fallback adaptor
  and tests) under a SEC-1.j divider. Keep the `RENAME_NOREPLACE` const
  alongside the helpers that consume it.
- Drop the two duplicated `single_component_leaf` private helpers that
  the sibling files carried for in-flight isolation; the original lives
  in `at_syscalls.rs` and is shared by every adaptor.
- Collapse the dir_sandbox/mod.rs re-exports into a single alphabetical
  `pub use at_syscalls::{...}` block.
- Delete `at_syscalls_metadata.rs` and `at_syscalls_rename.rs`.

Zero behaviour changes. All public helper names, signatures, gating, and
the lib.rs re-export surface are preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant