One album or file quak cannot decrypt no longer stops a refresh or a backup (closes #181) #188

Merged
clawbot merged 8 commits from issue-181-skip-undecryptable into next 2026-10-14 07:08:58 +02:00
8 Commits
Author SHA1 Message Date
sneak 25a01e2345 Discard a cache whose list of what did not decrypt is damaged
check / check (push) Waiting to run
metadata.json's list of the albums and files the refresh could not
decrypt is read entry by entry, so a value that is not a list of records
discards the cache as other damage does, instead of failing every later
backup. "Backup layout" now says that an album, or a file's copy in an
album, that quak can no longer decrypt loses its folder, JSON or link as
a deleted one does, and the originals stay. It no longer mentions the
empty title in failures.json, which no test covers.

Model: opus-5-5
2026-10-14 04:15:47 +00:00
sneak 3f03689ae4 Test: a damaged list in metadata.json, and records that stop decrypting
check / check (push) Waiting to run
A metadata.json whose list of what the refresh could not decrypt is
damaged must load as an empty store. A backup after an album and a
file's copy stop decrypting removes the album's folder and JSON and the
file's link in its album, and keeps the originals.

Model: opus-5-5
2026-10-14 03:57:04 +00:00
sneak f75816a0da README and TODO: say only what the code does for records it cannot decrypt
check / check (push) Waiting to run
A file whose copy in another album decrypted is stored from that copy, and
the album where it does not decrypt neither links nor lists it. Only a run
without --json prints the line for an album. The exit-code and read-command
sentences no longer cover that file, and the failures.json sentence covers
only files in the backup's scope.

Model: opus-5-5
2026-10-14 03:04:59 +00:00
sneak c6bc1a6265 Test: the exit code when an album is the only record left out
check / check (push) Waiting to run
A backup whose only record quak cannot decrypt is an album exits 1 with
nothing in failures.json, and 0 once the album decrypts or is deleted.
The test of a file in two albums now also checks that the album where its
copy does not decrypt neither links the original nor lists the file.

Model: opus-5-5
2026-10-14 03:03:27 +00:00
sneak 1833009c08 README: say which records quak could not decrypt lib.backup() reports
It reports each such album, and each such file in its scope that has no
copy that decrypted, not every record the library left out.

Model: opus-5-5
2026-10-14 02:54:22 +00:00
sneak 564ec13b69 Back up from a copy that decrypted even outside a run's albums; README wording
A file whose copy in an album in scope does not decrypt is now backed up
from a copy that decrypted in any album, not only one in scope; with no
such copy it is still recorded as failed. The README now says the exit
code stays at 1 until the server sends a copy that decrypts or deletes it,
and that only a run without --json prints the FAILED album line.
StoredMetadata.undecryptable is required, like the other fields.

Model: opus-5-5
2026-10-14 02:54:21 +00:00
sneak cfb3d31047 Test: a backup limited to one album stores a file whose copy there does not decrypt
A run of lib.backup() limited to "Trip" must store a file whose copy in
Trip does not decrypt when its copy in an album the run skips does. Today
the run neither stores it nor records it as failed.

Model: opus-5-5
2026-10-14 02:54:21 +00:00
sneak 349e364109 One album or file quak cannot decrypt no longer stops a refresh or a backup (closes #181)
collectionsSince and filesSince put a row that does not decrypt or parse in
an undecryptable list with the reason instead of throwing. The refresh
leaves it out, an album with its files, and the store keeps the list in
metadata.json until the server sends a copy that decrypts or deletes it,
since the next refresh asks only for changes. lib.backup() records each
such file in failures.json as "could not be decrypted: <reason>", unless a
copy in another album decrypted, logs one line per such album and lists
their IDs in undecryptableAlbums; quak backup exits 1 while any remain.
Tests use a stand-in Ente server with real encryption.

Model: opus-5-5
2026-10-14 02:54:21 +00:00