ContentCache.backupOriginal(fileID, destination): an original not present anywhere is fetched through the content pool and written by the download writer straight to destination (the backup's originals/<fileID>.<ext>), then recorded there, so the cache counts it as present without holding a copy. runBackup passes the destination; copyAtomic only runs when the original was already cached elsewhere (it already returns early when source and destination match).
quak backup opens its library with precacheThumbnails: false and precacheOriginals: false.
README backup text, the src/backup.ts header wrap, and TODO.md updated.
Worth knowing
A freshly downloaded original's temp file in the backup's originals/ is now the download writer's .quak-<pid>-<random>.tmp, not .quak-backup-…. The backup's leftover-temp cleanup already matches both.
If the same original is already being fetched into the cache when the backup asks for it, the backup joins that fetch and copies the result, as before.
The existing fsync-ordering test now primes the cache first, since only a copy from the cache goes through copyAtomic.
New tests: a backup of 3 files through a counting source makes 3 fetches, leaves the cache's originals/ empty, and has every original in the backup tree; quak backup leaves the cache's originals/ and thumbnails/ empty.
make check green.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/quak/issues/106.
**What changed**
- `ContentCache.backupOriginal(fileID, destination)`: an original not present anywhere is fetched through the content pool and written by the download writer straight to `destination` (the backup's `originals/<fileID>.<ext>`), then recorded there, so the cache counts it as present without holding a copy. `runBackup` passes the destination; `copyAtomic` only runs when the original was already cached elsewhere (it already returns early when source and destination match).
- `quak backup` opens its library with `precacheThumbnails: false` and `precacheOriginals: false`.
- README backup text, the `src/backup.ts` header wrap, and `TODO.md` updated.
**Worth knowing**
- A freshly downloaded original's temp file in the backup's `originals/` is now the download writer's `.quak-<pid>-<random>.tmp`, not `.quak-backup-…`. The backup's leftover-temp cleanup already matches both.
- If the same original is already being fetched into the cache when the backup asks for it, the backup joins that fetch and copies the result, as before.
- The existing fsync-ordering test now primes the cache first, since only a copy from the cache goes through `copyAtomic`.
- New tests: a backup of 3 files through a counting source makes 3 fetches, leaves the cache's `originals/` empty, and has every original in the backup tree; `quak backup` leaves the cache's `originals/` and `thumbnails/` empty.
`make check` green.
Model: opus-5-5
An original fetched for a backup is now written by the download writer
straight into the backup's originals/, and the content cache records it
there instead of keeping its own copy. One the cache already held is
still copied. `quak backup` opens its library with the thumbnail and
originals precache off, as the one-shot commands do.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #106.
What changed
ContentCache.backupOriginal(fileID, destination): an original not present anywhere is fetched through the content pool and written by the download writer straight todestination(the backup'soriginals/<fileID>.<ext>), then recorded there, so the cache counts it as present without holding a copy.runBackuppasses the destination;copyAtomiconly runs when the original was already cached elsewhere (it already returns early when source and destination match).quak backupopens its library withprecacheThumbnails: falseandprecacheOriginals: false.src/backup.tsheader wrap, andTODO.mdupdated.Worth knowing
originals/is now the download writer's.quak-<pid>-<random>.tmp, not.quak-backup-…. The backup's leftover-temp cleanup already matches both.copyAtomic.originals/empty, and has every original in the backup tree;quak backupleaves the cache'soriginals/andthumbnails/empty.make checkgreen.Model: opus-5-5
PASS on
cb981earebased ontonext2f52c77f.Model: opus-5-5