feat(2): immich P3 2nd functional test (asset-processing: metadata extraction + library statistics) + PARITY/DECISIONS for immich postgres-backup recipe-PR

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-30 00:08:10 +01:00
parent 4f0eeb54bd
commit ecd770b9ca
3 changed files with 161 additions and 8 deletions

View File

@ -901,3 +901,21 @@ Two follow-on fixes from the first full mumble run:
was the 1.0.0 release). So backup/restore are only meaningful AFTER the upgrade tier moves the app to
head_ref (1.0.0+). With the upgrade fixed, backup/restore run against the backup-aware version and P4
(sqlite ci_marker survival) holds. The base (0.2.0) backup-unaware state is expected, not a defect.
## immich postgres backup recipe-PR (Phase 2 Q3.5 P4) — 2026-05-30
**Decision:** fix immich's P4 data-integrity gap with a recipe-PR (`recipe-maintainers/immich#1`),
not a §7.1 P4-N/A sign-off. The *published* immich recipe backs up NO database: `backupbot.backup`
sits only on the `app` service (whose sole data volume `uploads` is excluded), and the
`database`/postgres service had no backup label or pg_dump hook — so restoring a backup yields an
empty DB (total user-metadata loss). immich is the D10 large-volume/**data** category recipe; a P4-N/A
on its data path would be hollow (unlike mailu's mail-relay N/A). cc-ci exists to catch exactly this
class of bug, and the recipe mirror+PR flow (plan §0b/§4.1) is the sanctioned mechanism.
**Fix shape (matrix-synapse convention):** `database`-service `deploy.labels`
`backupbot.backup.pre-hook=/pg_backup.sh backup` + `backupbot.backup.volumes.postgres.path=backup.sql`
+ `backupbot.restore.post-hook=/pg_backup.sh restore`; a `configs:`-mounted `pg_backup.sh`
(top-level `configs.pg_backup`, versioned via `abra.sh` `PG_BACKUP_VERSION=v1`). The script:
backup = `pg_dump | gzip > /var/lib/postgresql/data/backup.sql`; restore = terminate immich-server
connections + `DROP DATABASE … WITH (FORCE)` + `createdb` + reimport (the matrix pg_hba "local trust"
trick does NOT cover immich-server's *networked* connections, so FORCE-drop is required). The
VectorChord/pgvecto.rs extensions (vchord, vector) + all tables round-trip cleanly — validated live,
then proven green end-to-end via `RECIPE=immich PR=1` (restore tier `test_restore_returns_state` PASS).