Repository navigation
feat(bot): enforce artist and source diversity caps in autoplay selection - #273
Conversation
…tion - Replace hardcoded artist cap of 1 with configurable Map-based counting (MAX_TRACKS_PER_ARTIST=2) in selectDiverseCandidates so up to 2 tracks per artist can appear while still ensuring variety - Add source diversity cap (MAX_TRACKS_PER_SOURCE=3) to prevent a single platform from dominating the autoplay queue - Replace same-source bonus (+0.1) in calculateRecommendationScore with a same-source penalty (-0.15) to prefer cross-platform variety - Extend RecommendationConfig with maxTracksPerArtist and maxTracksPerSource fields (defaults 2 and 3) for future tunability - Add 2 new tests covering artist-cap and source-cap behaviour (358 pass) Closes #265
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
✅ Deploy Preview for regal-bunny-0c8efe ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
#273) - Replace hardcoded artist cap of 1 with configurable Map-based counting (MAX_TRACKS_PER_ARTIST=2) in selectDiverseCandidates so up to 2 tracks per artist can appear while still ensuring variety - Add source diversity cap (MAX_TRACKS_PER_SOURCE=3) to prevent a single platform from dominating the autoplay queue - Replace same-source bonus (+0.1) in calculateRecommendationScore with a same-source penalty (-0.15) to prefer cross-platform variety - Extend RecommendationConfig with maxTracksPerArtist and maxTracksPerSource fields (defaults 2 and 3) for future tunability - Add 2 new tests covering artist-cap and source-cap behaviour (358 pass) Closes #265





Summary
Closes #265
selectDiverseCandidatesnow uses aMap<string, number>counter instead of aSet— up toMAX_TRACKS_PER_ARTIST(2) tracks per artist are allowed, preventing a single artist from being excluded after one match while still ensuring variety.sourceCounttracking withMAX_TRACKS_PER_SOURCE(3) cap so no single platform (YouTube, Spotify, SoundCloud) dominates the autoplay queue.calculateRecommendationScore, so cross-platform candidates are now preferred.RecommendationConfiggainsmaxTracksPerArtistandmaxTracksPerSourcefields (defaults 2 and 3) for future tunability viaMusicRecommendationService.Tests
queueManipulation.spec.tscovering artist-cap and source-cap behaviour