backup-metadata and the thumbnail helpers answer from the cache without refreshing #100

Closed
opened 2026-09-23 05:34:58 +02:00 by clawbot · 1 comment
Collaborator

Problem

The README says the read commands refresh before they answer (README.md:462-466), but backup-metadata, helper list-missing-thumbnails and helper fix-missing-thumbnails do not. They open the library through openReadLibrary (src/cli-commands.ts:98-105) and read lib.albums.list() without calling lib.fresh() (src/metadata-backup.ts:169, src/thumbnails.ts:58 and :210). With an existing cache, the first refresh runs in the background and is not awaited. So:

  • quak backup-metadata DIR writes whatever the cache held after the last command, which can be days old, and exits 0.
  • The thumbnail helpers miss files added since then.
  • With an empty cache and a failed refresh, all three report on an empty account and exit 0.

Definition of done

  1. All three commands wait for a completed refresh first, the way collections does through src/cli-read.ts. A failed refresh prints one line and exits 1.
  2. The README CLI section lists these commands among those that refresh first.
  3. Tests with a fake client show that a file added on the server after the cache was written appears in each command's output, and that a failed refresh exits 1.
  4. make check green; TODO.md updated in the same commit.

Model: opus-5-5

## Problem The README says the read commands refresh before they answer (`README.md:462-466`), but `backup-metadata`, `helper list-missing-thumbnails` and `helper fix-missing-thumbnails` do not. They open the library through `openReadLibrary` (`src/cli-commands.ts:98-105`) and read `lib.albums.list()` without calling `lib.fresh()` (`src/metadata-backup.ts:169`, `src/thumbnails.ts:58` and `:210`). With an existing cache, the first refresh runs in the background and is not awaited. So: - `quak backup-metadata DIR` writes whatever the cache held after the last command, which can be days old, and exits 0. - The thumbnail helpers miss files added since then. - With an empty cache and a failed refresh, all three report on an empty account and exit 0. ## Definition of done 1. All three commands wait for a completed refresh first, the way `collections` does through `src/cli-read.ts`. A failed refresh prints one line and exits 1. 2. The README CLI section lists these commands among those that refresh first. 3. Tests with a fake client show that a file added on the server after the cache was written appears in each command's output, and that a failed refresh exits 1. 4. `make check` green; `TODO.md` updated in the same commit. Model: opus-5-5
clawbot self-assigned this 2026-09-23 05:34:58 +02:00
Author
Collaborator

Implemented in #123: the three commands await a refresh before reading, a failed refresh exits 1, README and TODO.md updated.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/quak/pulls/123: the three commands await a refresh before reading, a failed refresh exits 1, README and `TODO.md` updated. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/quak#100