soulsync/tests/metadata
BoulderBadgeDad 142a1aaf38 Cover art: a numeric difference is a different release — Vol.4 stops wearing Vol.4.5's cover
Sokhi (continued from #806): volume-numbered series ('B小町 …キャラクター
ソングCD Vol.2' / 'Vol.2.5' / 'Vol.4' / 'Vol.4.5') got each other's art from
both normal downloads and the retag tool. Two distinct holes, one principle:

1. The art picker's _album_matches validates by significant-token SUBSET —
   built to tolerate '(Deluxe)'/'- Remastered' suffixes. CJK strips out of
   the normalizer entirely, so Vol.4 → {b,tv,cd,vol,4}, a clean subset of
   Vol.4.5's {b,tv,cd,vol,4,5}: the wrong volume validated as "the same
   album with a suffix". Affected every fuzzy art source (iTunes, Deezer,
   AudioDB, Spotify) in downloads, retag, and the missing-art repair.

2. MusicBrainz match_release scores by string similarity — Vol.4 vs Vol.4.5
   is 0.973, so the wrong volume could win the match outright, and its MBID
   then feeds Cover Art Archive with NO downstream validation (CAA is
   MBID-keyed, trusted by design). With Sokhi's MB metadata source this is
   the likely path in his logs (his release-group 404s push re-matching).

The shared rule (core.text.title_match.numeric_tokens_differ): digit-bearing
tokens must be IDENTICAL between the two titles. A number on one side only —
volume, part, sequel, remaster year — is a different release, never a
suffix. '1989' vs '1989 (Deluxe)' still matches (digits shared); 'Album' vs
'Album 2' now rejects (sequels!). Art picker rejects outright (falls through
to next source / the download's own art — the designed cost of a false
reject); MB matcher halves the candidate's confidence, landing it below the
70 gate while the exact-volume result is untouched.

Tests: helper truth table, the exact reported pairs through _album_matches,
and match_release end-to-end (wrong volume alone → no match beats a wrong
MBID; exact volume beats near-identical wrong one despite lower MB score).
828 matching/metadata + 301 musicbrainz/retag/artwork tests pass.
2026-06-07 10:21:23 -07:00
..
test_album_artist_unknown.py Fix: import overwrites album-artist tag to "Unknown Artist" (#735) 2026-05-29 09:30:38 -07:00
test_album_mbid_cache.py Fix album MBID inconsistency: detector + persistent release-MBID cache 2026-05-03 17:16:39 -07:00
test_album_type_normalization.py Pin type='track' / type='artist' collision case for album-type normalizer 2026-05-12 21:15:58 -07:00
test_art_lookup.py Cover art: a numeric difference is a different release — Vol.4 stops wearing Vol.4.5's cover 2026-06-07 10:21:23 -07:00
test_art_min_size.py Cover-art sources: skip low-res art (min-resolution guard) + max-res iTunes 2026-06-01 12:24:51 -07:00
test_art_sources.py Feature: preferred album-art source selection (opt-in, ordered, with fallback) 2026-06-01 11:45:07 -07:00
test_artist_resolution.py Fix Soulseek downloads losing collab artist tags 2026-05-13 22:11:20 -07:00
test_artist_source_detail.py feat: artist-detail deep linking — /artist-detail/:source/:id 2026-05-18 13:07:54 -07:00
test_artist_source_lookup.py Fix artist-detail showing wrong artist when a source id is duplicated 2026-06-05 07:24:51 -07:00
test_artwork_resolution.py #806 lock-in: archive.org outage cooldown for CAA originals 2026-06-06 23:36:14 -07:00
test_build_album_info_typed_path.py Migrate album-info builders to typed Album path 2026-05-03 22:53:12 -07:00
test_cache_capacity_eviction.py Cache cap test: exercise the REAL _run_maintenance_write, not a stub 2026-05-30 23:31:35 -07:00
test_cache_maintenance_retry.py Handle transient SQLite IO during maintenance 2026-05-21 17:50:30 -07:00
test_deezer_cover_url_upgrade.py Embed highest-resolution album art across all art paths 2026-05-28 13:21:53 -07:00
test_deezer_search_query.py Deezer search: free-text fallback when advanced query returns 0 2026-05-10 09:16:13 -07:00
test_deezer_track_cache_validity.py Fix Deezer contributors tagging silently dropping for cache-polluted tracks 2026-05-14 11:10:51 -07:00
test_discography_filters.py Skip already-owned tracks during download discography 2026-05-12 15:10:41 -07:00
test_discography_typed_path.py Migrate discography + quality scanner to typed Album path 2026-05-04 08:12:40 -07:00
test_enrichment_events.py Drop old per-service enrichment routes after registry cutover 2026-05-01 20:43:18 -07:00
test_image_url_normalization.py feat(webui): cache artwork images on disk 2026-05-20 10:43:47 -07:00
test_metadata_album_tracks.py Move metadata helpers into package modules 2026-04-29 11:28:42 +03:00
test_metadata_artist_image.py Move metadata helpers into package modules 2026-04-29 11:28:42 +03:00
test_metadata_cache.py Move profile Spotify cache into registry 2026-04-29 12:36:37 +03:00
test_metadata_cache_batch_lookup.py Move metadata API into package 2026-04-29 08:10:18 +03:00
test_metadata_discography.py Tighten artist discography soundtrack matching 2026-05-17 22:51:38 -07:00
test_metadata_enrichment.py Preserve full release dates in audio tags 2026-05-17 23:02:41 -07:00
test_metadata_gap_filler.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
test_metadata_musicmap.py Move metadata helpers into package modules 2026-04-29 11:28:42 +03:00
test_metadata_registry.py Add MusicBrainz as a metadata source 2026-05-18 18:47:13 -07:00
test_multi_artist_tag_settings.py Fix Soulseek downloads losing collab artist tags 2026-05-13 22:11:20 -07:00
test_musicbrainz_client_query.py MusicBrainz manual search: field-scope the artist in non-strict mode (#754) 2026-05-31 10:05:24 -07:00
test_musicbrainz_search.py Fix: MusicBrainz artist discography capped at 25 releases 2026-05-28 12:00:05 -07:00
test_release_type.py fix(metadata): surface MusicBrainz 'Other' release-groups in discography (#650) 2026-05-19 20:20:28 -07:00
test_relevance.py Branch cleanup: lift manual-match helpers, fix length-pref ordering, profile-scope view toggle 2026-05-27 07:43:21 -07:00
test_runtime_bundle.py fix post-download tagging, and enable tagging for hifi 2026-05-02 07:50:12 -06:00
test_track_number_format.py Stop writing TRCK as "6/0" when album total_tracks is unknown 2026-05-14 15:25:16 -07:00
test_typed_metadata_types.py Add MusicBrainz as a metadata source 2026-05-18 18:47:13 -07:00