Skip to content

feat(migrations): repoint funnel-duplicate roster artists — pass 2 (chat#1859)#44

Merged
sweetmantech merged 1 commit into
mainfrom
feat/repoint-funnel-dupes-pass2
Jul 8, 2026
Merged

feat(migrations): repoint funnel-duplicate roster artists — pass 2 (chat#1859)#44
sweetmantech merged 1 commit into
mainfrom
feat/repoint-funnel-dupes-pass2

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What

Pass 2 of the funnel-duplicate roster repoint — the first of the two backfill follow-ups owed on chat#1859 now that marketing#46 is deployed and the forward mint has stopped.

Adds 20260708170000_repoint_funnel_duplicate_roster_artists_pass2.sql, which re-runs the exact, verified logic of 20260707190000 (database#43) under a new timestamp. It is idempotent by design, so a re-run only touches what still qualifies: Category A duplicates — an account holding the song-less duplicate but not yet the canonical.

Why a second pass

20260707190000 ran on prod 2026-07-08. Duplicates kept accruing until marketing#46 deployed (some pre-existing leads flip into scope the moment their account claims a catalog — condition 5). Post-merge verification of #43 caught this (evidence). With the mint now stopped, this pass converges.

Scope (measured 2026-07-08 on prod, read-only)

  • Category A rows this repoints: 2 (account has the duplicate, not the canonical).
  • Category B (account already holds the canonical) is skipped here by design — the repoint can't fix those; the sibling PR does.

Same conservative 5-condition signature as #43 (on a roster · zero song_artists · Spotify social · exactly one song-owning same-name twin · every referencing account owns a catalog). Same post-condition RAISE EXCEPTION guard.

Verification

  • Logic is byte-for-byte the repoint half of the already-applied, already-verified 20260707190000 (14 rows repointed live, repro flipped 0/$0 → 67 / 557.5M). Re-running is safe: repointed dupes fail condition 1; the social copy is NOT EXISTS-guarded.
  • The Supabase Preview check validates it parses + runs against a branch.
  • Acceptance is shared with the sibling: the #1859 health-check query returns 0 rows after this + the cleanup-delete run.

Merge order

This PR first, then cleanup-delete (#45). The cleanup migration's timestamp is later so they apply repoint → cleanup; merging in that order keeps the migration history in sequence.

Links

🤖 Generated with Claude Code

…hat#1859)

Re-run the idempotent repoint from 20260707190000 now that marketing#46 has
stopped the forward mint. Repoints remaining Category A duplicates (account
holds the duplicate but not yet the canonical; 2 rows on prod 2026-07-08).
Category B (account already holds the canonical) is skipped here by design and
handled by the sibling cleanup-delete migration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bb3b83dd-83c0-4198-9b3a-17921e856bdf

📥 Commits

Reviewing files that changed from the base of the PR and between 2fe5af4 and c4a1099.

📒 Files selected for processing (1)
  • supabase/migrations/20260708170000_repoint_funnel_duplicate_roster_artists_pass2.sql
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/repoint-funnel-dupes-pass2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Jul 8, 2026

Copy link
Copy Markdown

Updates to Preview Branch (feat/repoint-funnel-dupes-pass2) ↗︎

Deployments Status Updated
Database Wed, 08 Jul 2026 17:25:36 UTC
Services Wed, 08 Jul 2026 17:25:36 UTC
APIs Wed, 08 Jul 2026 17:25:36 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Wed, 08 Jul 2026 17:25:51 UTC
Migrations Wed, 08 Jul 2026 17:25:56 UTC
Seeding Wed, 08 Jul 2026 17:25:56 UTC
Edge Functions Wed, 08 Jul 2026 17:25:56 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@sweetmantech sweetmantech merged commit e6a549f into main Jul 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant