Hotfix v2026.05.15.1 — allow discovery-mix variants in playlists CHECK constraints #49

Merged
bvandeusen merged 262 commits from dev into main 2026-05-16 00:32:26 -04:00
bvandeusen commented 2026-05-16 00:32:18 -04:00 (Migrated from git.fabledsword.com)

Hotfix for v2026.05.15.0 — system playlists fully broken in prod.

R3 added the five discovery-mix system_variant values (deep_cuts, rediscover, new_for_you, on_this_day, first_listens) to producers/registry/queries/clients but not to the playlists_kind_variant_consistent / playlists_seed_consistent CHECK constraints (whitelist last set in migration 0021). insertSystemPlaylist for any new mix → SQLSTATE 23514, and because BuildSystemPlaylists is one all-or-nothing transaction the first new-mix insert aborts the entire build — so For-You/Discover refresh 500s and the daily lazy build fails too.

Migration 0028_discovery_mix_variants drops + re-adds both constraints with all five new seedless variants (mirrors the 0021 drop-and-readd pattern; Postgres has no ALTER CONSTRAINT for CHECK). CHECK-only — sqlc/dbq unaffected (regen produced no drift). Mobile client → 2026.5.15+7.

Single commit. CI green on dev. Tracked: Fable #433.

Post-deploy verification:

  • For-You / Discover refresh returns 200; the five new mixes build and appear.
  • Re-check /api/albums/{id}/cover latency on a successful build — the 24–26 s seen in the failing-build logs was likely aborted-txn contention; if it persists now it's a separate issue (noted in #433).

🤖 Generated with Claude Code

**Hotfix for v2026.05.15.0 — system playlists fully broken in prod.** R3 added the five discovery-mix `system_variant` values (deep_cuts, rediscover, new_for_you, on_this_day, first_listens) to producers/registry/queries/clients but **not** to the `playlists_kind_variant_consistent` / `playlists_seed_consistent` CHECK constraints (whitelist last set in migration 0021). `insertSystemPlaylist` for any new mix → SQLSTATE 23514, and because `BuildSystemPlaylists` is one all-or-nothing transaction the first new-mix insert aborts the **entire** build — so For-You/Discover refresh 500s and the daily lazy build fails too. Migration `0028_discovery_mix_variants` drops + re-adds both constraints with all five new seedless variants (mirrors the 0021 drop-and-readd pattern; Postgres has no ALTER CONSTRAINT for CHECK). CHECK-only — sqlc/dbq unaffected (regen produced no drift). Mobile client → 2026.5.15+7. Single commit. CI green on `dev`. Tracked: Fable #433. Post-deploy verification: - [ ] For-You / Discover refresh returns 200; the five new mixes build and appear. - [ ] Re-check `/api/albums/{id}/cover` latency on a *successful* build — the 24–26 s seen in the failing-build logs was likely aborted-txn contention; if it persists now it's a separate issue (noted in #433). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#49