Skip to content

fix(bot): strip fan-upload prefixes, reduce same-artist flooding in autoplay - #580

Merged
LucasSantana-Dev merged 5 commits into
mainfrom
fix/fanupload-noise-patterns
Apr 13, 2026
Merged

LucasSantana-Dev merged 5 commits into
mainfrom
fix/fanupload-noise-patterns

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Apr 13, 2026 •

Copy link
Copy Markdown
Owner

Problem (from production logs)

BIGBANG "Bang Bang Bang" appeared 20+ times in queue because:

  1. YouTube has dozens of fan-uploads with unique title prefixes ([K-POP IN PUBLIC | ONE TAKE], [Fancam], [MPD직캠], [4K 60FPS]) — each normalized to a completely different key, passing all dedup checks
  2. Rapid skipping triggered multiple replenishes, each adding 2 more BIGBANG tracks
  3. recentArtists was built from only 3 history seeds, so BIGBANG's fatigue penalty expired quickly

Fixes

searchQueryCleaner.ts — fan-upload NOISE_PATTERNS

  • Strip [K-POP IN PUBLIC | ONE TAKE], [KPOP IN PUBLIC], [Fancam ...], [MPD*], [Color Coded*], [4K*FPS], [Dance Cover by X], [Stage Mix], [Multi]
  • Strip Korean/CJK-only parentheticals (뱅뱅뱅) when title already has Roman equivalent
  • Strip bare M/V and MV markers
  • Result: all BIGBANG Bang Bang Bang uploads now normalize to bigbangbangbang::bigbang

queueManipulation.ts — scoring

  • Same-artist-as-current penalty: -0.35 → -0.75 (near-block)
  • recentArtists fatigue penalty: -0.25 → -0.45
  • recentArtists now built from full session history (all tracks, not just the 3 seed tracks) — an artist played 10 songs ago still gets the fatigue penalty

Summary by CodeRabbit

  • Bug Fixes
    • Music recommendations now consider your full listening history for session-novelty, improving rotation of artists.
    • Recommendation scoring logic simplified to apply session-novelty consistently (some explicit same-artist/recent-artist penalties were removed).
  • Improvements
    • Search cleaning enhanced to strip more metadata, decorative non‑ASCII text, and fan/cover tags for cleaner track searches.

- strip [K-POP IN PUBLIC], [Fancam], [MPD*], [4K*fps], Korean
  parentheticals from titles so same-song variants normalize alike
- same-artist-as-current penalty: -0.35 → -0.75
- recentArtists penalty: -0.25 → -0.45
- recentArtists uses full session history (not just 3 seeds)
@vercel

vercel Bot commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Apr 13, 2026 1:07am

@github-actions github-actions Bot added the bot label Apr 13, 2026
@coderabbitai

coderabbitai Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 36 seconds before requesting another review.

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 13 minutes and 36 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1a925f6-ebe1-443e-8235-c47af8212a1b

📥 Commits

Reviewing files that changed from the base of the PR and between 402a34a and 6a486eb.

📒 Files selected for processing (1)
  • packages/bot/src/utils/music/queueManipulation.spec.ts
📝 Walkthrough

Walkthrough

Reworked recommendation scoring and queue replenishment: recentArtists now derived from full history, explicit candidate-vs-current-artist penalty and “fresh artist rotation” branch were removed; search query cleaning gained additional bracket/parenthetical noise regexes; multiple package.json versions bumped from 2.6.97 → 2.6.98.

Changes

Cohort / File(s) Summary
Queue recommendation & replenishment
packages/bot/src/utils/music/queueManipulation.ts
Switched recentArtists construction to use allHistoryTracks (not the sliced historyTracks); removed explicit candidateArtist === currentArtist penalty and the "fresh artist rotation" branch (session-novelty now solely based on !recentArtists.has(candidateArtist)); minor formatting/log message adjustments and import formatting changes.
Search query cleaning
packages/bot/src/utils/music/searchQueryCleaner.ts
Added multiple NOISE_PATTERNS to strip additional bracket/parenthetical CJK decorators and bracket-wrapped context tags (e.g., fan-upload/concert/fancam, kpop/k-pop, performance tags, resolution/FPS markers, stage mix, multi, m.v.). These are removed via existing replaceAll flow.
Package versions
package.json, packages/backend/package.json, packages/bot/package.json, packages/frontend/package.json, packages/shared/package.json
Bumped root and workspace package versions from 2.6.97 → 2.6.98 (no behavioral or config changes).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(bot): strip fan-upload prefixes, reduce same-artist flooding in autoplay' accurately describes the two main changes: adding NOISE_PATTERNS to strip fan-upload markers and adjusting scoring penalties to reduce same-artist repetition.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fanupload-noise-patterns

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/bot/src/utils/music/queueManipulation.ts`:
- Line 362: Normalize artist identities before comparisons: create or use a
helper (e.g., normalizeArtistName) that lowercases, strips common noise tokens
like "vevo", "- topic", "topic", punctuation and extra whitespace, and collapses
non-alphanumeric differences; apply this normalization when building
recentArtists in buildRecentArtists(currentTrack, allHistoryTracks) and when
comparing track.author (the places that currently use author.toLowerCase(),
including the same-artist and recent-artist penalty logic around the existing
comparison block) so variants like "BIGBANG - Topic", "BIGBANGVEVO", and
"BIGBANG" are treated as the same artist for penalty calculations.

In `@packages/bot/src/utils/music/searchQueryCleaner.ts`:
- Around line 15-17: The current regexes in cleanSearchQuery() remove any
non-ASCII bracketed segments (/\([^\x00-\x7F]+\)/g and /\[[^\x00-\x7F]+\]/g)
which strips useful localized aliases; change the logic to only remove bracketed
segments when they are CJK-specific or clearly duplicate a romanized title:
replace those broad patterns with Unicode-aware checks (use Unicode property
escapes for CJK: Hangul/Hiragana/Katakana/Han) such as matching only bracket
contents that are CJK characters (e.g. use
\p{Script=Hangul}|\p{Script=Hiragana}|\p{Script=Katakana}|\p{Script=Han} with
the u flag), and/or conditionally remove the bracketed segment only if the rest
of the title contains a Roman/ASCII title (check for /[A-Za-z0-9]/ outside the
brackets) before performing the replacement in cleanSearchQuery().
- Line 94: The regex literal /\[(?:4k|hd|uhd)[\s\d+fps[^\]]*\]/gi in
searchQueryCleaner.ts is malformed (it accidentally opens a character class
mid-pattern), so tags like "[4K 60FPS FANCAM]" aren't matched; replace that
pattern with a corrected one such as /\[(?:4k|hd|uhd)[^\]]*\]/gi in the same
place (the regex used to strip 4K/HD/UHD bracketed tags inside the
searchQueryCleaner logic) so any content following the prefix up to the closing
bracket is removed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2bd87fe5-4ac0-4fd9-9846-2890b77f8e95

📥 Commits

Reviewing files that changed from the base of the PR and between 68c3b4a and 96eba72.

📒 Files selected for processing (2)
  • packages/bot/src/utils/music/queueManipulation.ts
  • packages/bot/src/utils/music/searchQueryCleaner.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: SonarCloud Scan
  • GitHub Check: Quality Gates

},
})
const recentArtists = buildRecentArtists(currentTrack, historyTracks)
const recentArtists = buildRecentArtists(currentTrack, allHistoryTracks)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Normalize artist identities before applying these stronger penalties.

Line 362 makes recentArtists larger, but Lines 1355-1365 still compare raw author.toLowerCase() strings. Variants like BIGBANG - Topic, BIGBANGVEVO, and BIGBANG will still bypass both the same-artist and recent-artist penalties, which means the flooding this PR is targeting can still reappear across sources.

Proposed fix
+function normalizeArtistKey(author?: string): string {
+    return normalizeText(author ? cleanAuthor(author) : '')
+}
+
 function buildRecentArtists(
     currentTrack: Track,
     historyTracks: Track[],
 ): Set<string> {
     return new Set<string>(
         [currentTrack.author, ...historyTracks.map((track) => track.author)]
             .filter(Boolean)
-            .map((artist) => artist.toLowerCase()),
+            .map((artist) => normalizeArtistKey(artist)),
     )
 }
-    const currentArtist = currentTrack.author.toLowerCase()
-    const candidateArtist = candidate.author.toLowerCase()
-    const candidateArtistKey = normalizeText(cleanAuthor(candidate.author))
+    const currentArtistKey = normalizeArtistKey(currentTrack.author)
+    const candidateArtistKey = normalizeArtistKey(candidate.author)
@@
-    if (candidateArtist === currentArtist) {
+    if (candidateArtistKey === currentArtistKey) {
         score -= 0.75
         reasons.push('same artist as current')
-    } else if (!recentArtists.has(candidateArtist)) {
+    } else if (!recentArtists.has(candidateArtistKey)) {
         score += 0.15
         reasons.push('session novelty')
     } else {
         reasons.push('fresh artist rotation')
     }
-    if (recentArtists.has(candidateArtist)) {
+    if (recentArtists.has(candidateArtistKey)) {
         score -= 0.45
     }

Also applies to: 1355-1365

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bot/src/utils/music/queueManipulation.ts` at line 362, Normalize
artist identities before comparisons: create or use a helper (e.g.,
normalizeArtistName) that lowercases, strips common noise tokens like "vevo", "-
topic", "topic", punctuation and extra whitespace, and collapses
non-alphanumeric differences; apply this normalization when building
recentArtists in buildRecentArtists(currentTrack, allHistoryTracks) and when
comparing track.author (the places that currently use author.toLowerCase(),
including the same-artist and recent-artist penalty logic around the existing
comparison block) so variants like "BIGBANG - Topic", "BIGBANGVEVO", and
"BIGBANG" are treated as the same artist for penalty calculations.

Comment on lines +15 to +17
// Korean/CJK parenthetical duplicates: "(뱅뱅뱅)" when title already has English equivalent
/\([^\x00-\x7F]+\)/g,
/\[[^\x00-\x7F]+\]/g,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid stripping every non-ASCII bracketed segment here.

Lines 16-17 are much broader than the stated “duplicate Korean/CJK alias” case: they remove any all-non-ASCII parenthetical/bracketed text. That means cleanSearchQuery() now drops useful localized aliases from titles like Song (Русский) or Track [العربية], which can make downstream search less precise. Please gate this on an existing Romanized title outside the brackets, or narrow the match to the specific duplicate forms you actually want to collapse.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bot/src/utils/music/searchQueryCleaner.ts` around lines 15 - 17, The
current regexes in cleanSearchQuery() remove any non-ASCII bracketed segments
(/\([^\x00-\x7F]+\)/g and /\[[^\x00-\x7F]+\]/g) which strips useful localized
aliases; change the logic to only remove bracketed segments when they are
CJK-specific or clearly duplicate a romanized title: replace those broad
patterns with Unicode-aware checks (use Unicode property escapes for CJK:
Hangul/Hiragana/Katakana/Han) such as matching only bracket contents that are
CJK characters (e.g. use
\p{Script=Hangul}|\p{Script=Hiragana}|\p{Script=Katakana}|\p{Script=Han} with
the u flag), and/or conditionally remove the bracketed segment only if the rest
of the title contains a Roman/ASCII title (check for /[A-Za-z0-9]/ outside the
brackets) before performing the replacement in cleanSearchQuery().

/\[mpd[^\]]*\]/gi,
/\[color\s+coded[^\]]*\]/gi,
/\[color-coded[^\]]*\]/gi,
/\[(?:4k|hd|uhd)[\s\d+fps[^\]]*\]/gi,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix the 4K/HD/UHD bracket regex.

Line 94 accidentally turns the post-prefix part into a character class, so tags such as [4K 60FPS FANCAM] or [UHD PERFORMANCE] are not stripped unless every character after 4K/HD/UHD is one of whitespace, digits, or f/p/s. That leaves many fan-upload variants with distinct normalized keys.

Proposed fix
-    /\[(?:4k|hd|uhd)[\s\d+fps[^\]]*\]/gi,
+    /\[(?:4k|hd|uhd)[^\]]*\]/gi,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/\[(?:4k|hd|uhd)[\s\d+fps[^\]]*\]/gi,
/\[(?:4k|hd|uhd)[^\]]*\]/gi,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bot/src/utils/music/searchQueryCleaner.ts` at line 94, The regex
literal /\[(?:4k|hd|uhd)[\s\d+fps[^\]]*\]/gi in searchQueryCleaner.ts is
malformed (it accidentally opens a character class mid-pattern), so tags like
"[4K 60FPS FANCAM]" aren't matched; replace that pattern with a corrected one
such as /\[(?:4k|hd|uhd)[^\]]*\]/gi in the same place (the regex used to strip
4K/HD/UHD bracketed tags inside the searchQueryCleaner logic) so any content
following the prefix up to the closing bracket is removed.

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) April 13, 2026 00:45
Artist penalties blocked same-artist songs entirely.
The normalizeTrackKey + fan-upload NOISE_PATTERNS already prevent
exact song repeats. Only retain +0.15 novelty boost for diversity.
@github-actions

github-actions Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 325 kB

ℹ️ View Unchanged
Filename Size
packages/frontend/dist/assets/ActionPanel-C1_aFFa9.js 398 B
packages/frontend/dist/assets/api-C9C_BoPi.js 2.91 kB
packages/frontend/dist/assets/authStore-B-XgI7Qf.js 560 B
packages/frontend/dist/assets/AutoMessages-COIPz34j.js 2.69 kB
packages/frontend/dist/assets/AutoMod-BjdrXXl1.js 4.09 kB
packages/frontend/dist/assets/avatar-BQnx8ml3.js 1.79 kB
packages/frontend/dist/assets/badge-1w20SMT3.js 499 B
packages/frontend/dist/assets/Button-CK6bsnJt.js 761 B
packages/frontend/dist/assets/Card-DnMZziVL.js 453 B
packages/frontend/dist/assets/chunk-QFMPRPBF-B0_TipZB.js 14.8 kB
packages/frontend/dist/assets/CommandsConfig-DJriytRY.js 1.49 kB
packages/frontend/dist/assets/Config-UsnxKSX8.js 1.73 kB
packages/frontend/dist/assets/CustomCommands-DhT_cm6n.js 2.16 kB
packages/frontend/dist/assets/DashboardOverview-CZZny723.js 3.42 kB
packages/frontend/dist/assets/dialog-Bebu5T9M.js 947 B
packages/frontend/dist/assets/dist-BYvsGl5s.js 414 B
packages/frontend/dist/assets/EmbedBuilder-DmZZ45A8.js 3.36 kB
packages/frontend/dist/assets/EmptyState-lhGRi9gh.js 428 B
packages/frontend/dist/assets/Features-F7FIPxrz.js 2.85 kB
packages/frontend/dist/assets/GuildAutomation-BxuBuwK4.js 2.94 kB
packages/frontend/dist/assets/guildStore-CddfDJuw.js 791 B
packages/frontend/dist/assets/index-C2e-WFQf.js 11.8 kB
packages/frontend/dist/assets/index-DoLe_VYd.css 14.4 kB
packages/frontend/dist/assets/input-CmtLKKUO.js 461 B
packages/frontend/dist/assets/label-BHlkUPCY.js 483 B
packages/frontend/dist/assets/LastFm-Bid2qyVt.js 1.74 kB
packages/frontend/dist/assets/Levels-CCYbG06S.js 2.65 kB
packages/frontend/dist/assets/Login-COmPipU-.js 2.54 kB
packages/frontend/dist/assets/Lyrics-6SdUY8KZ.js 1.34 kB
packages/frontend/dist/assets/Moderation-B71W0LI7.js 3.87 kB
packages/frontend/dist/assets/Music-CSyTXQxi.js 6.16 kB
packages/frontend/dist/assets/MusicConfig-DuDvDoPw.js 1.62 kB
packages/frontend/dist/assets/PrivacyPolicy-BTjDqB3o.js 1.38 kB
packages/frontend/dist/assets/rbac-BN1DzQHh.js 152 B
packages/frontend/dist/assets/ReactionRoles-C6RicQAG.js 1.9 kB
packages/frontend/dist/assets/rolldown-runtime-COnpUsM8.js 467 B
packages/frontend/dist/assets/scroll-area-DE87jUCx.js 517 B
packages/frontend/dist/assets/SectionHeader-Ct2qWDhq.js 382 B
packages/frontend/dist/assets/select-sC_ROyTR.js 1.22 kB
packages/frontend/dist/assets/ServerLogs-D-7CLfoM.js 2.9 kB
packages/frontend/dist/assets/ServerSettings-Bn-PAwK-.js 4.22 kB
packages/frontend/dist/assets/ServersPage-BMxvmSM4.js 2.95 kB
packages/frontend/dist/assets/Skeleton-DMHFbvVW.js 234 B
packages/frontend/dist/assets/Spotify-BvG85-oI.js 1.75 kB
packages/frontend/dist/assets/Starboard-CJkVfcaD.js 2.1 kB
packages/frontend/dist/assets/StatTile-BkmmFyEu.js 604 B
packages/frontend/dist/assets/switch-RfNgpq5v.js 539 B
packages/frontend/dist/assets/TermsOfService-D7Oh05tV.js 1.37 kB
packages/frontend/dist/assets/TrackHistory-CRDtIZqN.js 1.91 kB
packages/frontend/dist/assets/TwitchNotifications-BQqtKmfp.js 2.29 kB
packages/frontend/dist/assets/useGuildSelection-CkUsxL5H.js 489 B
packages/frontend/dist/assets/usePageMetadata-B513X5D1.js 328 B
packages/frontend/dist/assets/utils-D5piDr1U.js 148 B
packages/frontend/dist/assets/vendor-forms-B7m4p2yU.js 25.4 kB
packages/frontend/dist/assets/vendor-radix-CqxcePto.js 33.5 kB
packages/frontend/dist/assets/vendor-react-DRFstzzV.js 55.6 kB
packages/frontend/dist/assets/vendor-state-C5KtdxzA.js 22.2 kB
packages/frontend/dist/assets/vendor-ui-BIJpYk2I.js 64.2 kB

compressed-size-action

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/bot/src/utils/music/queueManipulation.ts (1)

1311-1404: ⚠️ Potential issue | 🟠 Major

Restore the current/recent-artist penalties.

Line 1354 now only withholds the novelty bonus for recent artists. The explicit same-artist-as-current penalty and the general recent-artist fatigue penalty are gone, so similar/popular mode can still keep picking the current artist whenever preferred/liked/history boosts are present. That undercuts the flood-control goal of this change.

Suggested fix
     const currentArtist = currentTrack.author.toLowerCase()
     const candidateArtist = candidate.author.toLowerCase()
@@
-    if (!recentArtists.has(candidateArtist)) {
+    if (candidateArtist === currentArtist) {
+        score -= 0.75
+        reasons.push('same artist as current')
+    } else if (!recentArtists.has(candidateArtist)) {
         score += 0.15
         reasons.push('session novelty')
+    } else {
+        score -= 0.45
     }
@@
-        if (recentArtists.has(candidateArtist)) {
+        if (recentArtists.has(candidateArtist)) {
             score -= 0.2
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bot/src/utils/music/queueManipulation.ts` around lines 1311 - 1404,
Reintroduce the missing artist-penalties by modifying the scoring in the same
scope that computes novelty: after the novelty bonus using recentArtists and the
variables currentArtist/candidateArtist, subtract a penalty when candidateArtist
=== currentArtist (e.g., score -= 0.25 and reasons.push('same artist penalty'))
and also apply a smaller general recent-artist fatigue penalty when
recentArtists.has(candidateArtist) (e.g., score -= 0.1 and reasons.push('recent
artist fatigue')); keep these adjustments separate from the autoplayMode ===
'discover' branch so preferred/liked/history boosts cannot repeatedly bypass
flood-control, and update the reasons array and score consistently where
currentArtist, candidateArtist, recentArtists, score and reasons are used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/bot/src/utils/music/queueManipulation.ts`:
- Around line 1311-1404: Reintroduce the missing artist-penalties by modifying
the scoring in the same scope that computes novelty: after the novelty bonus
using recentArtists and the variables currentArtist/candidateArtist, subtract a
penalty when candidateArtist === currentArtist (e.g., score -= 0.25 and
reasons.push('same artist penalty')) and also apply a smaller general
recent-artist fatigue penalty when recentArtists.has(candidateArtist) (e.g.,
score -= 0.1 and reasons.push('recent artist fatigue')); keep these adjustments
separate from the autoplayMode === 'discover' branch so preferred/liked/history
boosts cannot repeatedly bypass flood-control, and update the reasons array and
score consistently where currentArtist, candidateArtist, recentArtists, score
and reasons are used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e0b1c642-44a7-4315-a2f9-1ae64db4c4b8

📥 Commits

Reviewing files that changed from the base of the PR and between 96eba72 and 402a34a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • package.json
  • packages/backend/package.json
  • packages/bot/package.json
  • packages/bot/src/utils/music/queueManipulation.ts
  • packages/frontend/package.json
  • packages/shared/package.json
✅ Files skipped from review due to trivial changes (5)
  • packages/backend/package.json
  • packages/shared/package.json
  • package.json
  • packages/bot/package.json
  • packages/frontend/package.json
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: SonarCloud Scan
  • GitHub Check: compressed-size
  • GitHub Check: Quality Gates

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 0277b3a into main Apr 13, 2026
13 checks passed
LucasSantana-Dev added a commit that referenced this pull request May 13, 2026
…utoplay (#580)

* fix(bot): strip fan-upload prefixes, reduce same-artist flooding

- strip [K-POP IN PUBLIC], [Fancam], [MPD*], [4K*fps], Korean
  parentheticals from titles so same-song variants normalize alike
- same-artist-as-current penalty: -0.35 → -0.75
- recentArtists penalty: -0.25 → -0.45
- recentArtists uses full session history (not just 3 seeds)

* chore: bump version to 2.6.98

* fix(bot): remove artist blocking, keep only song dedup

Artist penalties blocked same-artist songs entirely.
The normalizeTrackKey + fan-upload NOISE_PATTERNS already prevent
exact song repeats. Only retain +0.15 novelty boost for diversity.

* test(bot): cover scoring branches for implicit feedback and duration

* test(bot): fix familiar-artist test to use queue history not redis mock
@LucasSantana-Dev
LucasSantana-Dev deleted the fix/fanupload-noise-patterns branch May 23, 2026 02:21

This branch was successfully deployed

1 active deployment
Preview — 6a486eb9 Deployed Apr 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bot dependencies Pull requests that update a dependency file frontend shared size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant