From eb95a527b082a2807634c963af92c929e278eed0 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Sun, 20 Sep 2026 07:17:49 +0000 Subject: [PATCH] test(sessions): keep git auto-maintenance out of the fixture Git 2.47+ detaches maintenance after a commit and holds .git/objects/maintenance.lock while it runs. The read-only capture test fingerprints the git dir before and after two captures, so a lock that appears in the first snapshot and is gone by the second reads as the capture having touched the object store. The fixture now disables auto maintenance and gc for every git call, as the runtime-core fixture does. Co-Authored-By: Claude Fable 5.1 --- .../tracedecay-sessions/src/repository_provenance_test.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/tracedecay-sessions/src/repository_provenance_test.rs b/crates/tracedecay-sessions/src/repository_provenance_test.rs index d888e4eb4d..d03c1359f6 100644 --- a/crates/tracedecay-sessions/src/repository_provenance_test.rs +++ b/crates/tracedecay-sessions/src/repository_provenance_test.rs @@ -31,6 +31,12 @@ impl GitFixture { tracedecay_runtime_core::git::try_git_program() .expect("absolute git executable should resolve"), ) + // Git 2.47+ detaches `maintenance run --auto` after a commit and holds + // `.git/objects/maintenance.lock` while it runs, which lands in one + // git-dir fingerprint and vanishes before the next. The read-only + // capture test compares those fingerprints, so the fixture must not + // write either. + .args(["-c", "maintenance.auto=false", "-c", "gc.auto=0"]) .args(args) .current_dir(self.path()) .output()