backup-metadata, helper list-missing-thumbnails and helper fix-missing-thumbnails now await lib.fresh() right after opening the library, the same way collections, files, get and get-thumb already refresh first. With an existing cache the library's first refresh runs in the background, so before this change these commands answered from whatever the cache held. Now a file added since the cache was written is included, and a failed refresh throws, which run in src/cli-run.ts prints as one quak: MESSAGE line with exit 1.
The refresh is called in the command functions, not inside runMetadataBackup or the thumbnail functions, so fix-missing-thumbnails without --file refreshes once, not twice.
Tests: each command is run after collections has written the cache, against a fake server that has since added a file to a collection (with the collection's update time advanced, as the real server does, since the library only re-lists a collection whose update time moved). A second case makes the refresh fail and checks all three reject without writing output. All four fail with the source change reverted.
README CLI section lists the three commands among those that refresh first and says a failed refresh exits 1. TODO.md updated.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/quak/issues/100.
`backup-metadata`, `helper list-missing-thumbnails` and `helper fix-missing-thumbnails` now await `lib.fresh()` right after opening the library, the same way `collections`, `files`, `get` and `get-thumb` already refresh first. With an existing cache the library's first refresh runs in the background, so before this change these commands answered from whatever the cache held. Now a file added since the cache was written is included, and a failed refresh throws, which `run` in `src/cli-run.ts` prints as one `quak: MESSAGE` line with exit 1.
The refresh is called in the command functions, not inside `runMetadataBackup` or the thumbnail functions, so `fix-missing-thumbnails` without `--file` refreshes once, not twice.
Tests: each command is run after `collections` has written the cache, against a fake server that has since added a file to a collection (with the collection's update time advanced, as the real server does, since the library only re-lists a collection whose update time moved). A second case makes the refresh fail and checks all three reject without writing output. All four fail with the source change reverted.
README CLI section lists the three commands among those that refresh first and says a failed refresh exits 1. `TODO.md` updated.
Model: opus-5-5
clawbot
self-assigned this 2026-09-23 07:52:47 +02:00
backup-metadata, helper list-missing-thumbnails and helper
fix-missing-thumbnails now await lib.fresh() before reading the library,
as collections, files, get and get-thumb already do. A file added since
the cache was written is included, and a failed refresh is thrown, so
the CLI prints one line and exits 1 instead of answering from a stale
or empty cache. The README lists them among the commands that refresh
first.
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.
Closes #100.
backup-metadata,helper list-missing-thumbnailsandhelper fix-missing-thumbnailsnow awaitlib.fresh()right after opening the library, the same waycollections,files,getandget-thumbalready refresh first. With an existing cache the library's first refresh runs in the background, so before this change these commands answered from whatever the cache held. Now a file added since the cache was written is included, and a failed refresh throws, whichruninsrc/cli-run.tsprints as onequak: MESSAGEline with exit 1.The refresh is called in the command functions, not inside
runMetadataBackupor the thumbnail functions, sofix-missing-thumbnailswithout--filerefreshes once, not twice.Tests: each command is run after
collectionshas written the cache, against a fake server that has since added a file to a collection (with the collection's update time advanced, as the real server does, since the library only re-lists a collection whose update time moved). A second case makes the refresh fail and checks all three reject without writing output. All four fail with the source change reverted.README CLI section lists the three commands among those that refresh first and says a failed refresh exits 1.
TODO.mdupdated.Model: opus-5-5
PASS on
4c325edc9be21dc10f1c76801f3e4365aad5e77crebased ontonext236642f4448954dff2815f1ec4d096229c8fa2834.Model: opus-5-5
4c325edc9bto2e885d54e5