Nothing reached any of it:
- MusicBrainz search (artists, albums, songs), artist lookups and the
query escaping they used. The release-group lookups the duplicate
resolver uses stay.
- Release-group covers, and artist-level tags for artists not in the
library.
- Nine named queries with no caller (CountTracksByArtist went with the
previous commit), two of them describing request-progress reporting.
The MusicBrainz client's retry and not-found tests now drive the
release-group lookup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema for user management U1: display_name on users; user_invites;
registration_settings singleton (default 'invite_only'); audit_log.
Plus the internal/audit package centralizing the action-name
vocabulary and JSON metadata marshaling so handlers don't repeat
boilerplate.
Race-safe first-admin uses a query-shape primitive
(CreateUserFirstAdminRace's WHERE NOT EXISTS subquery) rather than
a schema-level constraint. Concurrent empty-state registrations
both see 'no users yet' and both insert as admin — fine, having
two admins from the start is benign; what matters is at-least-one.
users.username uniqueness arbitrates if the two callers picked the
same username.
CreateUser signature gains display_name (nullable); existing
bootstrap call sites pass nil. The audit package declares the full
U1+U2+U3 action vocabulary upfront so subsequent slices are purely
additive on the caller side.
Tests cover audit Write with + without metadata and that every
declared action constant persists correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>