You-might-like: liked-entity fallback when the section is thin (#790) #95

Merged
bvandeusen merged 2 commits from dev into main 2026-06-11 23:33:26 -04:00
Owner

Heavy-listener fix: the You-might-like artists row collapsed to a single tile
because the taste roll-up surfaces top-similar artists (mostly ones the user
already plays), which the read-time dedup (vs Most Played + Rediscover + Last
Played) then strips. Adds a read-time fallback that tops up a thin section from
the user's liked artists/albums — a far larger pool than the similarity roll-up,
reusing the existing Rediscover-fallback queries, with the same exclusions so it
never duplicates a tile or suggests an actively-played entity. Read-side, so it
fills immediately (no rebuild); stays empty for a no-likes user. CI-green on dev.

🤖 Generated with Claude Code

Heavy-listener fix: the You-might-like artists row collapsed to a single tile because the taste roll-up surfaces top-similar artists (mostly ones the user already plays), which the read-time dedup (vs Most Played + Rediscover + Last Played) then strips. Adds a read-time fallback that tops up a thin section from the user's liked artists/albums — a far larger pool than the similarity roll-up, reusing the existing Rediscover-fallback queries, with the same exclusions so it never duplicates a tile or suggests an actively-played entity. Read-side, so it fills immediately (no rebuild); stays empty for a no-likes user. CI-green on dev. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 2 commits 2026-06-11 23:33:20 -04:00
feat(recommendation): fall back to liked entities when You-might-like is thin (#790)
test-go / test (push) Failing after 14s
test-go / integration (push) Has been cancelled
36786defd1
The taste roll-up surfaces top-similar albums/artists, which for a heavy
listener are mostly ones they already play — so the read-time dedup (vs Most
Played + Rediscover + Last Played) can strip the section down to a single tile
(reported on the artists row). The code was sound; the section was just starved.

Adds a read-time fallback: when a You-might-like row comes up short after dedup,
top it up from the user's LIKED artists/albums — a far larger pool than the
12-entity similarity roll-up, so the same exclusions still leave plenty. Reuses
the existing Rediscover-fallback queries (no new SQL), applies the same
exclusions (already-shown + Rediscover + Most/Last Played) so it never
duplicates a tile or suggests an actively-played entity, and is best-effort
(a query error leaves the section as-is). Takes effect immediately — no rebuild.

A cold-start user with no likes gets nothing from the fallback, so the
new-user-empty behaviour is preserved (test still passes).

Test: 20 liked artists, none played → Rediscover fills 10, You-might-like
fallback fills the other 10, disjoint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(recommendation): use type conversion for fallback rows (staticcheck S1016)
test-go / test (push) Successful in 28s
test-go / integration (push) Successful in 4m35s
26c368c35e
golangci-lint v2 (CI-only; local is v1) flagged the field-by-field struct
literals — the fallback and you-might-like row types are identical, so convert
directly instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bvandeusen merged commit 7b7bd0c3e8 into main 2026-06-11 23:33:26 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#95