fix: match bracketed guest credits and hyphenated version suffixes #5

Merged
lyrathorpe merged 1 commits from fix/normalise-bracketed-credits-and-dash-suffixes into main 2026-08-24 16:58:06 +01:00
Owner

What the first real report showed

Tier Pairs Plays
mbid 1167 (5.9%) 3414
name 10124 (50.8%) 36282
none 8650 (43.4%) 22421

Matched listening: 63.9% of plays. Unmatched by an artist the library holds:
2169 pairs, 8188 plays.

Running that report's fifteen worst misses back through the normaliser found
two faults accounting for five of them.

Fixes

Bracketed guest credits. The pattern required whitespace immediately before
the word, so it caught Yellowcard feat. Tay Jardine and missed Self vs Self (feat. In Flames) -- and the bracketed form is the commoner of the two. An
opening bracket is now allowed in that position.

Hyphens inside a version suffix. The trailing-version pattern matched the
suffix as a run of non-hyphens, which cannot cross a hyphen in the suffix
itself. Gold Dust - Shy FX Re-Edit and Back To Your Roots - Friction & K-Tee Remix both survived untouched. Matched lazily instead.

Four version words for how drum and bass marks its variants: vip,
bootleg, rework, extended. They apply only inside a bracket or after a
trailing dash.

Why the MBID tier contributes so little

Worth stating plainly, because it inverts the assumption this was designed on:
64.7% of scrobbles carry a recording MBID, and only 5.9% of pairs join on one.

That is not a bug in the join. MusicBrainz holds a separate recording per
release, and Last.fm and Lidarr rarely picked the same one. The report now
counts library tracks carrying a recording id, and the pairs that carried one,
failed to join on it, and matched by name anyway -- which measures the
disagreement directly.

The consequence: the name tier is load-bearing, not a fallback.

Testing

68 tests, green locally and in docker build --target test.

The seven real titles from the unmatched list are pinned as regression tests.
So are seven ordinary titles containing version words -- Editors, Mixed Emotions, Radio Ga Ga, Live and Let Die, Dancing with Myself,
Vipassana, (Don't Fear) The Reaper -- because the risk of adding version
words is eating titles that legitimately contain them.

Still outstanding on your side

1 artists have no albums indexed -- Lady Gaga, album 1568. Matching is
unaffected; the cull stays blocked until it is fixed.

## What the first real report showed | Tier | Pairs | Plays | | ------ | -------------- | ------------- | | `mbid` | 1167 (5.9%) | 3414 | | `name` | 10124 (50.8%) | 36282 | | `none` | 8650 (43.4%) | 22421 | Matched listening: 63.9% of plays. Unmatched by an artist the library holds: 2169 pairs, 8188 plays. Running that report's fifteen worst misses back through the normaliser found two faults accounting for five of them. ## Fixes **Bracketed guest credits.** The pattern required whitespace immediately before the word, so it caught `Yellowcard feat. Tay Jardine` and missed `Self vs Self (feat. In Flames)` -- and the bracketed form is the commoner of the two. An opening bracket is now allowed in that position. **Hyphens inside a version suffix.** The trailing-version pattern matched the suffix as a run of non-hyphens, which cannot cross a hyphen in the suffix itself. `Gold Dust - Shy FX Re-Edit` and `Back To Your Roots - Friction & K-Tee Remix` both survived untouched. Matched lazily instead. **Four version words** for how drum and bass marks its variants: `vip`, `bootleg`, `rework`, `extended`. They apply only inside a bracket or after a trailing dash. ## Why the MBID tier contributes so little Worth stating plainly, because it inverts the assumption this was designed on: 64.7% of scrobbles carry a recording MBID, and only 5.9% of pairs join on one. That is not a bug in the join. MusicBrainz holds a separate recording per release, and Last.fm and Lidarr rarely picked the same one. The report now counts library tracks carrying a recording id, and the pairs that carried one, failed to join on it, and matched by name anyway -- which measures the disagreement directly. The consequence: the name tier is load-bearing, not a fallback. ## Testing 68 tests, green locally and in `docker build --target test`. The seven real titles from the unmatched list are pinned as regression tests. So are seven ordinary titles containing version words -- `Editors`, `Mixed Emotions`, `Radio Ga Ga`, `Live and Let Die`, `Dancing with Myself`, `Vipassana`, `(Don't Fear) The Reaper` -- because the risk of adding version words is eating titles that legitimately contain them. ## Still outstanding on your side `1 artists have no albums indexed` -- Lady Gaga, album 1568. Matching is unaffected; the cull stays blocked until it is fixed.
lyrathorpe added 1 commit 2026-08-24 16:56:40 +01:00
fix: match bracketed guest credits and hyphenated version suffixes
Build and publish container / build (pull_request) Successful in 10m45s
7588fee302
Two normalisation faults, both found by running a real coverage report's
unmatched list back through the normaliser. Between them they account for five
of the fifteen worst misses by play count.

The guest-credit pattern required whitespace immediately before the word, so it
caught "Yellowcard feat. Tay Jardine" but missed "Self vs Self (feat. In
Flames)" -- and the bracketed form is the more common of the two. An opening
bracket is now allowed in that position.

The trailing-version pattern matched the suffix as a run of non-hyphens, which
cannot cross a hyphen inside the suffix itself: "Gold Dust - Shy FX Re-Edit" and
"Back To Your Roots - Friction & K-Tee Remix" both survived untouched. Matched
lazily instead.

Four version words are added for how drum and bass marks its variants: vip,
bootleg, rework, extended. They only apply inside a bracket or after a trailing
dash, so the exposure is small, and ordinary titles carrying those words --
Editors, Mixed Emotions, Radio Ga Ga, Live and Let Die -- are pinned as tests
against exactly that.

The report also gains the figures that explain why the MBID tier contributes so
little. Two thirds of scrobbles carry a recording id, and only a twentieth of
them join on one: MusicBrainz holds a separate recording per release, and the
two sides rarely choose the same one. Counting the pairs that carried an id and
matched on name anyway measures that disagreement directly, and settles that the
weakness is not a bug in the join.
lyrathorpe merged commit a3d0689c0a into main 2026-08-24 16:58:06 +01:00
lyrathorpe deleted branch fix/normalise-bracketed-credits-and-dash-suffixes 2026-08-24 16:58:07 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lyrathorpe/music-curator#5