- backup: schema coverage's three tests and the three AWS signing
examples, one table each.
- scrobble: Qualifies' six boundary tests; the ListenBrainz client's
refusal mapping, twelve tests of the same rule across three calls, one
table over call x status; the two similarity lookups' success and URL
tests, one table.
- playevents: the skip rule's three plays share one fixture. Dropped
TestRecordPlayEnded_SubThreshold_NoEnqueue: the writer only calls
scrobble.MaybeEnqueue, whose own test and Qualifies' table hold that
case; the qualifying-play test still proves the writer calls it.
- recsettings: the three tag-scale tests share one database reset.
- apierror: Error() and From, one test each; auth: RequireAdmin's three.
- providers: GetJSON's not-found and transient answers, one table. Its
two 401 tests expected the same answer with and without
TreatAuthAsTransient, which changes only the error's text; the table
says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/backup names every table a backup holds, in parent-first order,
and every table it leaves out with the reason: what the server computes
from the music files, provider caches it fetches again, sign-ins and
one-time links, and logs of past runs. The library's identity rows travel
because every like, play and playlist entry hangs off a track id, and the
sync change feed travels because the apps' first sync reads it.
Sealed credentials are left out of the file, and so are the markers that
say tag and art enrichment are done, so a restored server asks for the
credentials again and redoes that work rather than believing it has it.
Snapshot reads one REPEATABLE READ, read-only transaction, each table in
primary-key order, keys sorted. Restore refuses an instance with accounts
or tracks and a backup from a newer schema, replaces seeded settings,
inserts by column intersection in batches, skips generated columns, and
carries serial sequences on past the restored ids.
Guards: every schema table is backed up or excluded; every backed-up
table comes after what it references and references nothing excluded;
every omitted column exists; a restore gives back the backup byte for byte.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>