-
Notifications
You must be signed in to change notification settings - Fork 1
Stop deterministic test directory allocation from deleting colliding roots #717
Copy link
Copy link
Open
Labels
backlogBacklog (not current milestone)Backlog (not current milestone)bad-codeKnown code smell or defect filed for laterKnown code smell or defect filed for laterlane:bad-codeMethod lane bad-code.Method lane bad-code.legend:testMethod legend test.Method legend test.needs-witnessMethod closeout state needs-witness.Method closeout state needs-witness.priority:mediumMethod priority medium.Method priority medium.toolingTooling/CI/CLITooling/CI/CLItype:bugMethod work type bug.Method work type bug.
Description
Activity
Metadata
Metadata
Assignees
Labels
backlogBacklog (not current milestone)Backlog (not current milestone)bad-codeKnown code smell or defect filed for laterKnown code smell or defect filed for laterlane:bad-codeMethod lane bad-code.Method lane bad-code.legend:testMethod legend test.Method legend test.needs-witnessMethod closeout state needs-witness.Method closeout state needs-witness.priority:mediumMethod priority medium.Method priority medium.toolingTooling/CI/CLITooling/CI/CLItype:bugMethod work type bug.Method work type bug.
Defect
Two deterministic filesystem-test allocators treat an existing candidate directory as disposable:
crates/warp-core/src/causal_wal_tests.rs::deterministic_test_dircrates/warp-core/tests/causal_wal_hardening_tests.rs::temp_wal_rootOn
AlreadyExists, each callsremove_dir_alland recreates the path. The counter that chooses the suffix is process-local while thetargetdirectory is shared. Two overlapping test processes can therefore select the same candidate, and one process can delete the other process's live fixture.The destructive collision behavior is present in the current code. A cross-process executable witness is still required before repair.
Acceptance
AlreadyExistsnever authorizesremove_dir_allwithout exact ownership evidence.