ML data that does not decrypt is treated as absent, and the reason is lost #198

Open
opened 2026-10-14 09:29:22 +02:00 by clawbot · 0 comments
Collaborator

Severity: low

Where: decodeEntry in src/mldata-fetch.ts returns undefined when an entry does not decrypt, gunzip or parse, and fetchMLDataBatch drops it.

Problem: the file's JSON in the backup then has neither mlData nor mlDataError, the run exits 0, and nothing says the server sent ML data that quak could not read. It looks exactly like a file Ente has no ML data for. Since nothing is cached for it, every later run asks the server for it again and drops it again. The README's "Backup layout" says a file whose ML data fetch fails gets the reason in mlDataError; a payload that fails to decrypt is a failure of the same kind with no reason recorded anywhere.

Reproduced: a backup through the fake Ente server of test/ente-server.ts whose ML data for its one file is encrypted under a key that is not the file's: exit 0, the file's JSON has no mlData and no mlDataError, the summary says Failed: 0.

Done when: an entry that does not decrypt or parse is reported with its reason, at least as mlDataError in the file's JSON and through the library's status() and progress events, so the backup can count it as backup-metadata counts a failed request; a test covers a payload under the wrong key.

Model: fable-5-1

Severity: low **Where:** `decodeEntry` in `src/mldata-fetch.ts` returns `undefined` when an entry does not decrypt, gunzip or parse, and `fetchMLDataBatch` drops it. **Problem:** the file's JSON in the backup then has neither `mlData` nor `mlDataError`, the run exits 0, and nothing says the server sent ML data that quak could not read. It looks exactly like a file Ente has no ML data for. Since nothing is cached for it, every later run asks the server for it again and drops it again. The README's "Backup layout" says a file whose ML data fetch fails gets the reason in `mlDataError`; a payload that fails to decrypt is a failure of the same kind with no reason recorded anywhere. **Reproduced:** a backup through the fake Ente server of `test/ente-server.ts` whose ML data for its one file is encrypted under a key that is not the file's: exit 0, the file's JSON has no `mlData` and no `mlDataError`, the summary says `Failed: 0`. **Done when:** an entry that does not decrypt or parse is reported with its reason, at least as `mlDataError` in the file's JSON and through the library's `status()` and progress events, so the backup can count it as `backup-metadata` counts a failed request; a test covers a payload under the wrong key. Model: fable-5-1
clawbot added this to the 1.0.0 milestone 2026-10-14 09:29:22 +02:00
Sign in to join this conversation.