fix: keep the cache-snapshot scratch index outside its own work tree
ee7a854git-effect::cache::snapshot() staged the extracted cache directory
into a scratch git index, but the index file lived inside that same
directory, so git add -A . staged its own index/lock files. The
very first snapshot for a cache committed a bare .git-index.lock
blob; every later run restored that blob into the sandbox, archived
it back, and then failed with "File exists" trying to create the
real lock over it — silently losing the cache snapshot on every push.
Moving the scratch index to a sibling of the extracted directory stops it from ever being staged. The poisoned refs/meta/cache/sccache ref on origin and github is deleted so the next push starts clean.
Assisted-by: Claude:claude-sonnet-5
Reviews
No reviews of this commit yet — record a verdict below.