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
+6
View File
@@ -126,3 +126,9 @@ public/
# but this file changes on every cycle, and committing it would mean a commit
# per run saying nothing changed.
snapshots/*.state.json
# Half-written snapshots. Every snapshot is written to a sibling temp file and
# renamed into place, so a run killed mid-write leaves one of these behind — and
# the refresh workflow commits the whole snapshots/ directory, which would
# otherwise pin a truncated page in git forever.
snapshots/*.tmp-*