Store versioned daily catalog streams and atomic collection claims
Daily Luminate tracking needs a private calendar-day series with atomic daily claims and retained correction history. These migrations add subscriptions, run receipts, versioned observations and service-only claim/commit/read functions; unchanged values are reused with fresh per-run receipts.
Stream commits lock tracking plus current owner and song membership rows, fencing concurrent removal. Tracking stays exclusively locked because the commit also merges shared run coverage; switching to a shared lock can deadlock on lock upgrades. The original migration is preserved after application; the locking fix is a separate migration.
Validation: disposable PostgreSQL 17 service-role checks passed, including real concurrent owner/song deletion blocking and parent-cascade completion without deadlock, daily claim and write idempotency, explicit zero vs missing, retained corrections, pause/revision/ownership/membership fences, account deletion cascade and denied browser privileges. Production ledger and RLS/access controls verified for all three migrations. The runner accepts PG_BINDIR or discovers a PostgreSQL installation.
API dependency: https://github.com/recoupable/api/pull/984