soulsync/tests/discovery
BoulderBadgeDad 5bc27e6268 #843 follow-up: key the no-state cache save by the FIRST artist
The #843 fallback saved the discovery-cache match using the client's
original_artist verbatim — but the client sends a joined "A, B, C" string, while
EVERY in-memory + sync path keys the cache by the first artist (artists[0]). So a
multi-artist fix (the reporter's exact "Cherrymoon Traxx, Hermol, SBM, BELS"
case) would have saved under a key the sync never looks up — the fix would
"succeed" with no error but silently never apply.

Reduce the client artist to the first (split on comma) in the no-state branch so
its cache key matches the in-memory/sync convention exactly. Single-artist tracks
are unaffected.

Test: no-state save now keys by the first artist, and a new test pins that the
no-state and in-memory paths produce an IDENTICAL cache key for the same
multi-artist track. 74 discovery tests pass.
2026-06-10 18:57:43 -07:00
..
__init__.py PR5a: lift _run_sync_task to core/discovery/sync.py 2026-04-28 11:20:47 -07:00
test_discovery_beatport.py PR5f: lift _run_beatport_discovery_worker to core/discovery/beatport.py 2026-04-28 15:36:15 -07:00
test_discovery_deezer.py PR5d: lift _run_deezer_discovery_worker to core/discovery/deezer.py 2026-04-28 12:45:18 -07:00
test_discovery_endpoints.py #843 follow-up: key the no-state cache save by the FIRST artist 2026-06-10 18:57:43 -07:00
test_discovery_listenbrainz.py PR5g: lift _run_listenbrainz_discovery_worker to core/discovery/listenbrainz.py 2026-04-28 16:09:02 -07:00
test_discovery_playlist.py Fix #785: file/CSV playlists fail to match (raw 'Artist - Title' titles) 2026-06-04 21:13:23 -07:00
test_discovery_quality_scanner.py Preserve artwork in quality scanner wishlist handoff 2026-04-30 21:42:16 +03:00
test_discovery_spotify_public.py PR5e: lift _run_spotify_public_discovery_worker to core/discovery/spotify_public.py 2026-04-28 13:13:41 -07:00
test_discovery_sync.py Sync: append mode preserves the playlist image like reconcile (#811) 2026-06-07 23:25:42 -07:00
test_discovery_tidal.py Lift _run_tidal_discovery_worker to core/discovery/tidal.py 2026-04-28 23:02:24 -07:00
test_discovery_youtube.py fix: cast duration_ms to int before :02d format in discovery workers 2026-04-28 12:07:54 -07:00
test_manual_match.py #799: add equivalence proof that should_rediscover == original pre-scan 2026-06-05 11:17:49 -07:00
test_quality_scanner_typed_album.py Migrate discography + quality scanner to typed Album path 2026-05-04 08:12:40 -07:00
test_similar_artists_library_filter.py Add MusicBrainz as a metadata source 2026-05-18 18:47:13 -07:00
test_sync_database_only_matcher.py Fix: Spotify sync crash 'unexpected keyword argument candidate_pool' 2026-05-31 23:00:24 -07:00