fix: prevent Spotify social deletion when updating multiple platforms#150
Conversation
Bug: When AI calls update_artist_socials with both YouTube AND existing Spotify URLs, the Spotify social gets deleted but NOT re-inserted. Root cause: The accountSocials array is fetched once at the start of updateArtistSocials and becomes stale after deleting a social. The check on lines 52-54 used this stale array to determine if the account_social relationship exists, incorrectly skipping the insert. Fix: Always insert the account_social relationship after processing a platform, since we know we deleted the old one (if it existed). Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. Comment |
Braintrust eval reportCatalog Opportunity Analysis Evaluation (HEAD-1769099743)
Catalog Songs Count Evaluation (HEAD-1769099743)
First Week Album Sales Evaluation (HEAD-1769099743)
Memory & Storage Tools Evaluation (HEAD-1769099743)
Monthly Listeners Tracking Evaluation (HEAD-1769099743)
Search Web Tool Evaluation (HEAD-1769099743)
Social Scraping Evaluation (HEAD-1769099742)
Spotify Followers Evaluation (HEAD-1769099742)
Spotify Tools Evaluation (HEAD-1769099742)
TikTok Analytics Questions Evaluation (HEAD-1769099742)
|
Summary
update_artist_socialsaccountSocialsarray caused the insert check to incorrectly skip re-inserting the Spotify relationship after deletionBug Details
When AI calls
update_artist_socialswith both YouTube AND existing Spotify URLs:accountSocialsarrayFix
Always insert the account_social relationship after processing a platform, since we know we deleted the old one (if it existed).
Test plan
🤖 Generated with Claude Code