docs: wanted, dbtest, recommendation and playlists comments say what the code does (#6277)
The same rewrite as d191a282, for four packages whose comments carried the
most history: tuning stories, quotes from the operator, single-install
measurements in library_scale.go, and 'used to' accounts of bugs. The
constraint each story protected stays as a present-tense reason (why tier 3
is reduced not removed, why the randomised arms take an order seed, why the
seed artist is eligible in Songs-like). Comments naming system_cron.go and
config.RecommendationConfig, neither of which holds what they claimed, now
name the scheduler and internal/recsettings.
Checked: non-comment tokens identical to HEAD; gofmt clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,7 @@ func TestPasses_PrimaryListedAndEverySecondaryAllowed(t *testing.T) {
|
||||
{withLive, "Live at Koko", "Album", []string{"Live"}, true},
|
||||
{withLive, "Live & Rare", "Album", []string{"Live", "Compilation"}, false},
|
||||
{withLive, "Like Phantoms, Forever", "EP", nil, false},
|
||||
// MusicBrainz types these plain Singles; their titles say otherwise (#5573).
|
||||
// MusicBrainz types these plain Singles; their titles say otherwise.
|
||||
{standard, "Common People (Recorded For BBC Radio 1)", "Single", nil, false},
|
||||
{standard, "Welcome to the Black Parade (Steve Aoki remix)", "Single", nil, false},
|
||||
{standard, "The Five of Us Are Dying (Rough mix)", "Single", nil, false},
|
||||
@@ -185,7 +185,7 @@ const (
|
||||
theBallad = "11111111-0000-4000-8000-000000000003" // 2023 album, not held
|
||||
newSingle = "11111111-0000-4000-8000-000000000004" // appears after the baseline
|
||||
oldSingle = "11111111-0000-4000-8000-000000000005" // 1997 single, catalogued late
|
||||
bbcSingle = "11111111-0000-4000-8000-000000000006" // live, typed a plain Single (#5573)
|
||||
bbcSingle = "11111111-0000-4000-8000-000000000006" // live, typed a plain Single
|
||||
parkRelease = "22222222-0000-4000-8000-000000000001"
|
||||
)
|
||||
|
||||
@@ -238,7 +238,7 @@ func newFakeMB(t *testing.T) *fakeMB {
|
||||
case r.URL.Path == "/release":
|
||||
_, _ = fmt.Fprint(w, `{"release-count": 0, "releases": []}`)
|
||||
case r.URL.Path == "/release-group" && strings.Contains(r.URL.Query().Get("query"), "releasegroup:"):
|
||||
// The library listing's search by artist and title (#5569).
|
||||
// The library listing's search by artist and title.
|
||||
found := ""
|
||||
if strings.Contains(r.URL.Query().Get("query"), "Ballad") {
|
||||
found = group(theBallad, "The Ballad of Darren", "Album", "", "2023-07-21")
|
||||
@@ -338,7 +338,7 @@ func TestFollow_WantExistingWantsWhatPassesAndIsNotHeld_Integration(t *testing.T
|
||||
f := newFakeMB(t)
|
||||
s := newService(t, pool, f)
|
||||
_ = seedHeld(t, q, "Parklife", parkRelease, parklife, 2)
|
||||
// Wanted before the follow read the version a title names (#5573).
|
||||
// Wanted before the follow refused the version its title names.
|
||||
if _, err := WantWith(ctx, q, WantParams{GroupMBID: bbcSingle, ArtistMBID: blur, ArtistName: "Blur",
|
||||
Title: "Song 2 (Recorded For BBC Radio 1)", PrimaryType: "Single", Reason: ReasonFollow}); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user