soulsync/tests/matching
Jeff Theroux 3c06bd03c0
fix(tidal): honour version field in matching and back off on rate limits
Three related fixes to Tidal track matching and downloading:

1. version-field handling — Tidal stores remix/live/edit qualifiers in a
   dedicated `track.version` attribute (e.g. name="Emerge",
   version="Junkie XL Remix"), not in the track name. The qualifier
   filter and the matcher only looked at name/album, so the exact
   recording was discarded. Fold `version` into both the qualifier
   haystack and the candidate title passed to MusicMatchingEngine.

2. divergent-version penalty — once versions are visible, OTHER cuts of
   the same base become candidates ("(Shazam Remix)" vs "(southstar
   Remix)"). Neither title is a prefix of the other, so the prefix-based
   version check missed them and the raw ratio stayed high off the
   shared base. Apply a heavy penalty when both titles carry different
   version descriptors so the wrong cut can't outscore the threshold.

3. rate-limit backoff — the trackManifests endpoint is aggressively
   rate-limited; a bare request failed 429 instantly, burned the quality
   tier, re-queued the track and hammered again (a self-amplifying
   storm). Honour Retry-After / exponential backoff with a bounded retry
   count and shutdown-aware sleep.

Adds unit + end-to-end tests for all three.
2026-06-08 13:50:19 -04:00
..
__init__.py Add pure artist-name comparison helper with alias awareness 2026-05-10 16:08:38 -07:00
test_acoustid_candidates.py AcoustID scanner: multi-candidate match + duration guard + multi-value retag 2026-05-14 14:09:38 -07:00
test_acoustid_verification_aliases.py AcoustID: report errors honestly instead of masking them as 'Skipped' 2026-05-31 20:10:31 -07:00
test_album_context_title.py Fix MTV Unplugged & live-album false-quarantine pipeline 2026-05-14 12:14:31 -07:00
test_artist_alias_lookup_586.py MusicBrainz: alias trust-gate evaluates MB-score leader, not combined leader 2026-06-06 16:44:14 +02:00
test_artist_alias_service.py Fix MB-worker alias test fixtures missing self.db 2026-06-05 13:24:21 -07:00
test_artist_aliases.py AcoustID scanner: handle multi-value artist credits 2026-05-10 19:17:59 -07:00
test_divergent_version.py fix(tidal): honour version field in matching and back off on rate limits 2026-06-08 13:50:19 -04:00
test_numeric_release_guard.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_script_compat.py #797: stop AcoustID quarantining correct non-English-artist downloads 2026-06-05 16:02:01 -07:00
test_version_mismatch.py AcoustID + quarantine modal: three bug fixes (closes #607, closes #608) 2026-05-15 08:55:06 -07:00