Problem
Under heavy session activity, snapshot operations can overlap on the same snapshot git dir. This can leave index.lock / temporary pack artifacts and cause avoidable disk churn.
Scope
- Serialize snapshot operations per snapshot repo
- Harden staging/tree-write behavior under lock contention
- Make cleanup lock-aware and threshold-driven
- Add regression tests for high-contention behavior
Notes
This issue tracks phased fixes to reduce lock races and stabilize long-running sessions using snapshot-heavy workflows.