Repository navigation
Suggestions: turn artists away by the DJ's fading rule (MAD-762) - #50
Merged
Merged
Conversation
The DJ's half of MAD-762 landed with MAD-756: an artist is turned away only while its decayed net signal is below -0.25, not whenever it's negative. Suggestions still used their own rule: any skip, never offset by time, turned an artist away until a full listen or queued song brought them back. - suggest.TurnedAway now reads dj.Profile.Avoid, so a skip fades with the DJ's 2-hour half-life and is weighed against plays, queued songs and hearts. Artists are compared by dj.ArtistKey. - The suggest tests now run the service on the test clock (it was on the wall clock, which only worked because skips never faded). - TestSkipFades: two days after a skip, the artist is suggested again. TestSkipMemory: two full listens outweigh a quick skip. - ADR 0010 and 0012 describe the shared rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes MAD-762.
The DJ's half of MAD-762 already landed with MAD-756 (#47). It added
avoidBelow = -0.25andTestProfileSkipsFadewith the issue's three cases. This PR does the other half: search suggestions (suggest.TurnedAway, ADR 0010) still turned an artist away for any skip, with no decay.What changed
suggest.TurnedAway(snap, history, now)now returnsdj.NewProfile(...).Avoid. Suggestions and the DJ now share one rule:dj.ArtistKey(match.Simplify), the way the DJ keys them.Behavior change
Under the old rule, one full listen brought a skipped artist back. Under the DJ's rule, a quick skip (−1.5) outweighs one full listen (+1) until it fades or the room plays them again. This matches what autopilot already does.
Tests
TestSkipFades: two days after a skip, the artist is suggested again.TestSkipMemorynow checks that two full listens outweigh a quick skip.go test -race ./...andgolangci-lint(0 issues) pass. There are no web changes.🤖 Generated with Claude Code