From 5e39af933f601cd2dc36c25a0b84f168ca10d4e3 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 24 Oct 2026 02:02:53 -0400 Subject: [PATCH] test(autosave): fix a flake: the owner-only folder test uses its own instance id Two tests that start in the same millisecond got the same instance_id(), so this test's shutdown() removed the other test's lock from the process-wide SAVEFILEPATH (after #1868). Co-Authored-By: Claude Opus 5.5 --- crates/engine/tests/autosave.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/tests/autosave.rs b/crates/engine/tests/autosave.rs index abd0ecbd..0f0ec7da 100644 --- a/crates/engine/tests/autosave.rs +++ b/crates/engine/tests/autosave.rs @@ -226,7 +226,9 @@ fn a_new_autosave_folder_is_owner_only() { for (dir, expected) in [(base.join("new").join("autosave"), 0o700), (picked, 0o755)] { let mut s = Session::new(); draw(&mut s); - let mut a = Autosaver::new(autosave::instance_id()); + // Not instance_id(): a test started in the same millisecond would get the same id, and + // shutdown() would then remove its lock from the process-wide SAVEFILEPATH. + let mut a = Autosaver::new("41-c"); a.plan(&s, 0.0, 1, &dir.to_string_lossy()); let jobs = a.plan(&s, 60.0, 1, &dir.to_string_lossy()); let path = writes(&jobs).pop().unwrap();