Repository navigation
refactor: extract spotifyRecommender (phase 3.3) - #662
Conversation
Extract collectSpotifyRecommendationCandidates and searchSeedCandidates functions to new spotifyRecommender.ts module. Reduces queueManipulation from 2,112 LOC to 1,852 LOC. Includes 13 tests with 82% line coverage.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 40 seconds. ⌛ 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 (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 |
|
Extract collectLastFmCandidates function to dedicated lastFmSeeder.ts module as part of Phase 1.1 of queueManipulation refactor. Maintains strict behavior preservation with all 131 existing tests passing. ## Changes - **New file**: packages/bot/src/utils/music/autoplay/lastFmSeeder.ts (267 LOC) - collectLastFmCandidates() - main Last.fm seeding function - Internal helper functions for candidate filtering and scoring - Dependencies: searchLastFmQuery, calculateRecommendationScore imported from queueManipulation - **Modified file**: packages/bot/src/utils/music/queueManipulation.ts (-134 LOC) - Removed collectLastFmCandidates function body - Exported searchLastFmQuery and calculateRecommendationScore for lastFmSeeder dependency - Re-imported collectLastFmCandidates for backward compatibility ## Testing - All 131 queueManipulation tests pass - No behavior changes - pure extraction - Circular dependency avoided by keeping searchLastFmQuery and calculateRecommendationScore in queueManipulation ## Phase 1 Status Part of Lucky refactor plan Phase 1: Breaking up queueManipulation.ts god object. Prior phases: #658 candidateScorer, #659 diversitySelector, #662 spotifyRecommender Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…3) (#662) Extract collectSpotifyRecommendationCandidates and searchSeedCandidates functions to new spotifyRecommender.ts module. Reduces queueManipulation from 2,112 LOC to 1,852 LOC. Includes 13 tests with 82% line coverage.



Extract Spotify recommendation functions to dedicated module.
Summary
collectSpotifyRecommendationCandidatesandsearchSeedCandidatesto newspotifyRecommender.tsqueueManipulation.tsfrom 2,112 LOC to 1,852 LOC (removed 260 LOC)Testing
Phase 3.3 Complete
Part of Lucky refactor plan Phase 3: Breaking up
queueManipulation.tsgod object.