chore: ignore half-written snapshots

Every snapshot is written to a sibling `.tmp-*` and renamed into place, so a
run killed mid-write leaves one behind. `refresh.yml` commits the whole
snapshots/ directory, which would pin that truncated page in git forever — and
the point of the atomic write was that a crash leaves nothing a reader can
mistake for a page.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-08-17 21:55:03 +02:00
co-authored by Claude Opus 5
parent 059bf02130
commit 286aadefc4
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ localStorage keys).
Every file is written to a sibling `.tmp-*` and renamed into place, body before metadata, so an
interrupted run leaves a stray temp file rather than a truncated snapshot or metadata describing
bytes that were never stored.
bytes that were never stored. Those temp files are gitignored: `refresh.yml` commits the whole
directory, so otherwise a run killed mid-write would pin a half-page in git forever.
Three reasons this is committed rather than cached: