Context
During the review of #415 (broaden the static-regex lint guard, closes #410), CodeRabbit suggested migrating the new tests/static_regex_lint.rs from std::path/std::fs to camino path types and cap_std::fs_utf8 APIs.
This was deferred from that PR because doing it for one new test file in isolation would:
- add two dependencies (
camino, cap-std) that are currently absent from the tree (Cargo.lock has zero references), and
- diverge from the rest of the integration suite, which consistently uses
std::fs/std::path and tempfile (for example tests/cli.rs),
so it fell outside the minimal-change scope of the lint fix.
Proposal
If UTF-8 path guarantees and capability-scoped filesystem access are desired, adopt them suite-wide rather than piecemeal:
- Add
camino and cap-std as dev-dependencies.
- Migrate the integration tests under
tests/ from std::path::{Path, PathBuf} to camino::{Utf8Path, Utf8PathBuf}.
- Replace ad hoc
std::fs calls with cap_std::fs_utf8 equivalents, preserving existing Command execution and TempDir handling.
- Establish the convention (e.g. in the developers guide) so new tests follow it.
Acceptance criteria
References
Context
During the review of #415 (broaden the static-regex lint guard, closes #410), CodeRabbit suggested migrating the new
tests/static_regex_lint.rsfromstd::path/std::fstocaminopath types andcap_std::fs_utf8APIs.This was deferred from that PR because doing it for one new test file in isolation would:
camino,cap-std) that are currently absent from the tree (Cargo.lockhas zero references), andstd::fs/std::pathandtempfile(for exampletests/cli.rs),so it fell outside the minimal-change scope of the lint fix.
Proposal
If UTF-8 path guarantees and capability-scoped filesystem access are desired, adopt them suite-wide rather than piecemeal:
caminoandcap-stdas dev-dependencies.tests/fromstd::path::{Path, PathBuf}tocamino::{Utf8Path, Utf8PathBuf}.std::fscalls withcap_std::fs_utf8equivalents, preserving existingCommandexecution andTempDirhandling.Acceptance criteria
camino/cap-stdadded as dev-dependencies with a rationale recorded.Utf8Path/Utf8PathBufandcap_std::fs_utf8consistently, with no behavioural regressions.References