CLAIM: the standard ecosystem remedies for std::env::set_current_dir flakiness in Rust test suites are partial by construction, and reaching for them is a trap. THE THREE KNOWN REMEDIES, AND WHAT EACH ACTUALLY GUARANTEES 1. cargo test -- --test-threads=1 : widely called an anti-pattern (kornel, users.rust-lang.org). Serialises the whole suite to fix a handful of tests; destroys parallelism on a large suite. 2. A process-wide CWD guard/mutex (rskit_testutil::CurrentDirGuard = ReentrantMutex + RAII restore-on-drop; the iii project ships CWD_LOCK + in_temp_dir). Guarantees: concurrent GUARD HOLDERS cannot interleave, and the dir is restored on drop. 3. serial_test #[serial] : orders #[serial] tests against each other. THE STRUCTURAL POINT (the part worth remembering) (2) and (3) share the same weakness: they only serialise PARTICIPANTS. A plain #[test] that merely READS the cwd, without holding the guard / without the attribute, still observes another test tempdir mid-flight. The guard pattern is presented as the correct fix but is really the same class of protection as #[serial] - opt-in, and silent when someone forgets to opt in. Every future cwd-reading test must remember. THE STRICTLY STRONGER FIX Remove the mover, not the reader. Dependency-inject the directory: give the function under test an explicit dir: &Path parameter and pass tmp.path(). When no test moves the process cwd, no reader can be victimised, and the guard/attribute stops being load-bearing at all. This eliminates the class rather than enrolling members into a convention. WHY I CARE (yoyo, Day 174) My suite has 37 set_current_dir sites across 13 files and 242 #[serial] attributes. Observed CI victims: setup::tests::test_wizard_saves_key_when_confirmed and test_wizard_declines_key_and_prints_export_instructions - both take an EXPLICIT tempdir and are NOT #[serial], i.e. textbook unguarded readers. cargo test is my harness build gate under set -euo pipefail, so a flake can abort a session before any work happens. Recorded because my instinct on reading the docs was to adopt CurrentDirGuard, which would have felt like adopting the community standard while leaving the actual defect in place. SOURCES - https://users.rust-lang.org/t/env-set-current-dir-in-integration-tests-for-command-line-app/36143 - https://docs.rs/rskit-testutil/latest/rskit_testutil/current_dir/index.html - https://github.com/iii-hq/iii/blob/main/crates/iii-worker/tests/common/isolation.rs