Part of #162 (one cron-safe command that mirrors the whole account).
What
quak backup <dir> writes Ente's ML data for each file (faces and the CLIP embedding: the payload backup-metadata writes as mlData) into the file's JSON beside its original, YYYY-MM-DD.<fileID>.json.
Today the backup's library fetches ML data into the cache's mldata/ in the background, the backup can finish before that fetch does, and the per-file JSON never carries it.
Definition of done
After its refresh, lib.backup() waits for an ML data fetch to complete (starting one if none is running) before it writes the per-file JSON files. A library whose client cannot fetch ML data skips this.
Each per-file JSON has mlData, the payload lib.mldata.forFile() returns (the same shape as backup-metadata's mlData), when the cache holds one. A file the server has no ML data for has no mlData field.
When the ML fetch fails, every file in scope whose data is not cached gets mlDataError with the reason instead, the result says so, and quak backup exits non-zero. The next run fetches again.
The per-file JSON is still rebuilt on every run, so ML data that arrived since the last run appears.
README "Backup layout": the per-file JSON holds the ML data; the sentence saying the ML fetch only fills the cache's mldata/ goes.
Tests with stand-ins, never the real service: payload written; no field when there is none; mlDataError and a non-zero exit when the fetch fails; a later successful run writes the data.
TODO.md: an entry at the top of Completed Steps.
Notes
runBackup drives a BackupLibrary interface; add what it needs there (waiting for the ML fetch, reading one payload) rather than reaching into Library internals. Keep it small.
Touches src/backup.ts, src/library/index.ts, tests, README.md, TODO.md. Units in flight beside it change src/cli-commands.ts, src/cli-run.ts, src/retry.ts and bin/quak.ts; leave those alone.
Model: opus-5-5
Part of https://git.eeqj.de/sneak/quak/issues/162 (one cron-safe command that mirrors the whole account).
## What
`quak backup <dir>` writes Ente's ML data for each file (faces and the CLIP embedding: the payload `backup-metadata` writes as `mlData`) into the file's JSON beside its original, `YYYY-MM-DD.<fileID>.json`.
Today the backup's library fetches ML data into the cache's `mldata/` in the background, the backup can finish before that fetch does, and the per-file JSON never carries it.
## Definition of done
- After its refresh, `lib.backup()` waits for an ML data fetch to complete (starting one if none is running) before it writes the per-file JSON files. A library whose client cannot fetch ML data skips this.
- Each per-file JSON has `mlData`, the payload `lib.mldata.forFile()` returns (the same shape as `backup-metadata`'s `mlData`), when the cache holds one. A file the server has no ML data for has no `mlData` field.
- When the ML fetch fails, every file in scope whose data is not cached gets `mlDataError` with the reason instead, the result says so, and `quak backup` exits non-zero. The next run fetches again.
- The per-file JSON is still rebuilt on every run, so ML data that arrived since the last run appears.
- README "Backup layout": the per-file JSON holds the ML data; the sentence saying the ML fetch only fills the cache's `mldata/` goes.
- Tests with stand-ins, never the real service: payload written; no field when there is none; `mlDataError` and a non-zero exit when the fetch fails; a later successful run writes the data.
- `TODO.md`: an entry at the top of Completed Steps.
## Notes
`runBackup` drives a `BackupLibrary` interface; add what it needs there (waiting for the ML fetch, reading one payload) rather than reaching into `Library` internals. Keep it small.
Touches `src/backup.ts`, `src/library/index.ts`, tests, `README.md`, `TODO.md`. Units in flight beside it change `src/cli-commands.ts`, `src/cli-run.ts`, `src/retry.ts` and `bin/quak.ts`; leave those alone.
Model: opus-5-5
clawbot
self-assigned this 2026-10-06 01:16:50 +02:00
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.
Part of #162 (one cron-safe command that mirrors the whole account).
What
quak backup <dir>writes Ente's ML data for each file (faces and the CLIP embedding: the payloadbackup-metadatawrites asmlData) into the file's JSON beside its original,YYYY-MM-DD.<fileID>.json.Today the backup's library fetches ML data into the cache's
mldata/in the background, the backup can finish before that fetch does, and the per-file JSON never carries it.Definition of done
lib.backup()waits for an ML data fetch to complete (starting one if none is running) before it writes the per-file JSON files. A library whose client cannot fetch ML data skips this.mlData, the payloadlib.mldata.forFile()returns (the same shape asbackup-metadata'smlData), when the cache holds one. A file the server has no ML data for has nomlDatafield.mlDataErrorwith the reason instead, the result says so, andquak backupexits non-zero. The next run fetches again.mldata/goes.mlDataErrorand a non-zero exit when the fetch fails; a later successful run writes the data.TODO.md: an entry at the top of Completed Steps.Notes
runBackupdrives aBackupLibraryinterface; add what it needs there (waiting for the ML fetch, reading one payload) rather than reaching intoLibraryinternals. Keep it small.Touches
src/backup.ts,src/library/index.ts, tests,README.md,TODO.md. Units in flight beside it changesrc/cli-commands.ts,src/cli-run.ts,src/retry.tsandbin/quak.ts; leave those alone.Model: opus-5-5
clawbot referenced this issue2026-10-06 01:37:53 +02:00