diff --git a/.gitignore b/.gitignore index ad0f893..3f2fb09 100644 --- a/.gitignore +++ b/.gitignore @@ -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-* diff --git a/snapshots/README.md b/snapshots/README.md index f0dbea4..adc9ccc 100644 --- a/snapshots/README.md +++ b/snapshots/README.md @@ -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: