fix(valuation): stop minting a duplicate roster artist per funnel signup (chat#1850 P1)#46
Conversation
…nup (chat#1850 P1)
linkArtistToAccount POSTed /api/artists {name} unconditionally on every
run, creating a duplicate, song-less artist account that hid the
artist-scoped homepage hero. The valuation flow was its only caller;
roster attach now happens server-side at claim time (POST /api/catalogs
resolves the canonical artist through the songs graph), so the client
call is deleted rather than made find-first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Preview verification — 2026-07-08,
|
| # | Check | Expected (post-#46) | Actual (live preview) | Status |
|---|---|---|---|---|
| 1 | Duplicate-mint removed | no POST /api/artists after the run |
across all 91 requests, zero POST to …/api/artists |
✅ |
| 2 | Social-attach removed | no PATCH /api/artists/{id} after the run |
zero PATCH to …/api/artists/{id} |
✅ |
| 3 | Valuation still runs (no regression from the deletion) | run kicks off + polls + card renders | POST /research/measurement-jobs → 202; 36× GET /research/albums/{id}/measurements → 200; card shows $2.1M (range $1.4M–$2.9M), 558M streams, 67 tracks, 36 releases |
✅ |
| 4 | Retained post-run side effect | captureRunLead still fires |
POST /api/valuation/lead → 200 (the only post-run write) |
✅ |
| 5 | Auth gate intact | search → Value my catalog → OTP → run | Privy passwordless/authenticate 200, modal closed, run proceeded |
✅ |
The removed behavior would have appeared as POST {apiUrl}/artists (create) + PATCH {apiUrl}/artists/{id} (Spotify social) immediately after the card resolved. Neither is present. The post-run write surface is now exactly POST /api/valuation/lead and nothing else.
Scope / not exercised on this preview
- Claim → canonical attach (the replacement path): not exercised here. Marketing preview builds talk to
test-recoup-api.vercel.app(lib/config.ts— onlyproductionhits the prod API), whereas api#768's claim-time attach is deployed to prod. That half was verified separately on the api#768 preview against the shared prod DB (results matrix): first claim attaches the canonical, no duplicate artist minted, artist-scoped measurements return 67 / $2.06M. - New-signup DB assertion (a fresh funnel account creates zero duplicate artist rows and the chat hero lights up): belongs to the post-deploy prod walkthrough on chat#1859, since prod is where both fix(valuation): stop minting a duplicate roster artist per funnel signup (chat#1850 P1) #46 and api#768 will be live together.
Verdict: the removal behaves exactly as intended on the preview — the funnel no longer mints a duplicate roster artist, and the run + lead capture are unaffected. Good to merge (then the post-deploy prod walkthrough + the backfill pass-2/cleanup on #1859).
🤖 Generated with Claude Code
What
Deletes
lib/valuation/linkArtistToAccount.ts(and its test) and its call inuseCatalogValuation.doRun— the funnel no longer mints an artist account per signup.Call-site decision (delete, not find-first)
linkArtistToAccounthad exactly one caller: the valuation flow (useCatalogValuation.doRun, post-run). Per the settled design the choice was delete vs. keep-but-find-first. Deleted, because:useGetFullReport→claimCatalog→POST /api/catalogs) now attaches the canonical artist server-side — the roster gets the artist that actually owns thesong_artistslinks, at the moment the account takes ownership.Verification
pnpm --ignore-workspace test: 19 files / 62 tests green (was 20/67 — the 5 deleted-file tests removed).NEXT_PUBLIC_PRIVY_APP_ID=… pnpm --ignore-workspace build: green (the marketing gate, per marketing#44).Links
Merge order
main.🤖 Generated with Claude Code