Skip thumbnail repairs the server always refuses (closes #109) #119

Merged
clawbot merged 1 commits from issue-109-thumb-refusals into next2 2026-09-23 07:03:33 +02:00
Collaborator

Fixes #109.

The server accepts a new thumbnail only from the file's owner, and only when it is no larger than the thumbnail size it records for the file. quak ignored both rules, so helper fix-missing-thumbnails downloaded these files, got refused, and exited 1 on every run.

  • list-missing-thumbnails and fix-missing-thumbnails skip a file another account owns without fetching it. The fixer reports it as skipped with a reason. The lister only logs the skip, because its output lists missing thumbnails and has no skipped state.
  • The fixer skips a file whose recorded thumbnail size is 0 or unknown before downloading it. Otherwise it tries encodings from 720 px at quality 50 (the old fixed setting) down to 160 px at quality 20, and uploads the first whose encrypted size fits. If none fits, the file is skipped.
  • The CLI summary heading "Skipped (unsupported format)" is now "Skipped", because the reasons now vary.

Things the diff does not show:

  • The size is compared against the encrypted thumbnail (info.thumbSize is the size of the stored object). This comes from reading the upstream server code and was not checked against a live server.
  • Judgement call: the lister still reports thumbnails that are 0 bytes as missing. The fixer then skips them because their recorded size is 0.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/quak/issues/109. The server accepts a new thumbnail only from the file's owner, and only when it is no larger than the thumbnail size it records for the file. quak ignored both rules, so `helper fix-missing-thumbnails` downloaded these files, got refused, and exited 1 on every run. - `list-missing-thumbnails` and `fix-missing-thumbnails` skip a file another account owns without fetching it. The fixer reports it as `skipped` with a reason. The lister only logs the skip, because its output lists missing thumbnails and has no skipped state. - The fixer skips a file whose recorded thumbnail size is 0 or unknown before downloading it. Otherwise it tries encodings from 720 px at quality 50 (the old fixed setting) down to 160 px at quality 20, and uploads the first whose encrypted size fits. If none fits, the file is skipped. - The CLI summary heading "Skipped (unsupported format)" is now "Skipped", because the reasons now vary. Things the diff does not show: - The size is compared against the encrypted thumbnail (`info.thumbSize` is the size of the stored object). This comes from reading the upstream server code and was not checked against a live server. - Judgement call: the lister still reports thumbnails that are 0 bytes as missing. The fixer then skips them because their recorded size is 0. Model: opus-5-5
clawbot self-assigned this 2026-09-23 06:21:19 +02:00
clawbot added the needs-review label 2026-09-23 06:21:26 +02:00
Author
Collaborator

PASS on c005978 rebased onto next2 c19943a.

Non-blocking: no test covers a download where even the 160 px, quality 20 encoding is too large (src/thumbnails.ts:327-339), so switching that result from skipped to failed would go unnoticed.

Model: opus-5-5

PASS on `c005978` rebased onto `next2` `c19943a`. Non-blocking: no test covers a download where even the 160 px, quality 20 encoding is too large (`src/thumbnails.ts:327-339`), so switching that result from `skipped` to `failed` would go unnoticed. Model: opus-5-5
clawbot added needs-rebase and removed needs-review labels 2026-09-23 06:36:22 +02:00
clawbot added 1 commit 2026-09-23 06:58:04 +02:00
The server accepts a new thumbnail only from the file's owner and only when
it is no larger than the thumbnail size it records. Both thumbnail helpers
now skip files another account owns without fetching them. The fixer skips
a file whose recorded thumbnail size is 0 or unknown before downloading it,
and otherwise tries smaller encodings until the encrypted thumbnail fits,
skipping the file if none does.

Model: opus-5-5
clawbot force-pushed issue-109-thumb-refusals from c005978ee7 to 4e7d629b56 2026-09-23 06:58:04 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-09-23 07:03:32 +02:00
clawbot merged commit cda57eebda into next2 2026-09-23 07:03:33 +02:00
clawbot deleted branch issue-109-thumb-refusals 2026-09-23 07:03:33 +02:00
Sign in to join this conversation.