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:
co-authored by
Claude Opus 5
parent
059bf02130
commit
286aadefc4
@@ -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-*
|
||||
|
||||
+2
-1
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user