Repository navigation
Suggestions on the DJ engine (MAD-759) - #51
Merged
Merged
Conversation
Search's "keep the vibe going" lists now ask the same DJ as autopilot when the server has a music graph: the taste profile, the walk through similar artists, scoring and cross-service matching. - "Your vibe" narrows the taste to the asker's own (dj.Request.Member); "group vibe" uses the room's, members' tastes mixed as for autopilot. source=queue reads the taste from the songs playing and waiting (dj.Request.Queued), with what played through standing in when nothing is queued. What the room heard and turned away stays the room's. - Picks are found only on the asker's links that search, so every suggestion can still be queued by them. Each is credited to the member's song it leads from. - Choose takes a longer list: n picks draw 2n candidates from a shortlist at least that long, and look for up to 6 at once on the services, in the draw's order (autopilot's two picks try the same candidates as before). - Without a graph, or when it knows nothing near the vibe, the services' own recommendations stand in, as before. - Removed duplicated Finder paths: Finder.Like replaces the recommend-or-search branch in suggestions and quick picks, and suggest.TrackOf/ArtistKey defer to dj's. - ADR 0010 and 0012 describe it. 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.
Moves search suggestions (ADR 0010, "your vibe" / "group vibe") onto the DJ (ADR 0012), so they get the same profile, candidates and scoring as autopilot. Phase 7, stage 3.
What changed
suggest.Service.Graph: when it's set (inmain.go, whenever the graph has sources), suggestions askdj.Engine.Choosefirst.dj.Request.Member). Group uses the room's, with members' tastes mixed as they are for autopilot.source=queuereads the taste from the songs playing and waiting (dj.Request.Queued). When nothing is queued, the songs that played through stand in.becauseis the member's song by the artist the pick leads from. A pick that only autopilot's songs led to has no seed, so it's left out.dj.Choosefor longer lists: n picks draw 2n candidates from a shortlist of at least 2n songs, with at most 2 per artist. Up to 6 candidates are looked up on services at once, in draw order. Autopilot asks for 2 picks, so it tries exactly the same candidates as before. Opening sessions is serialized, because the Finder isn't safe for concurrent use.Finder.Likereplaces the recommend-or-search branch that suggestions andGetQueueItemSimilareach had.suggest.TrackOfis gone; callers usedj.TrackOf.suggest.ArtistKeynow compares names withdj.ArtistKey.like/choosePick, with its discovery rules) is unchanged.Tests
internal/suggest/dj_test.gocovers, with an in-memory graph:TestProfileNarrowcovers the member and queued tastes keeping the room's skips and heard songs.go test -race ./...passes andgolangci-lint run ./...reports 0 issues.🤖 Generated with Claude Code