6f325d30b9
Two row-leak bugs found in whole-branch review: - discovery.run_discovery now prunes DiscoverySeedContribution rows whose seedMbid is no longer a WatchedArtist (unfollow/removal has no FK cascade) and recomputes the touched candidates' scores this sweep, instead of letting a dead seed's contribution inflate the aggregate forever. - maybe_run_scan's exception handler around scan_chunk now calls clear_worklist and clears scan.id, matching the drain path. Previously an exception mid-chunk left the already-done rows plus the remaining worklist for that scan_id orphaned forever, since the next scan mints a fresh uuid. Also clear scan.id in the build_worklist failure handler for consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>