soulsync/tests/metadata
BoulderBadgeDad c593a17ac2 spotify search endpoint: plain query, not field-scoped — fixes pool-fix "no results"
The Wing It pool "Fix Match" search returned "no results" for everything (even obvious
tracks). Root cause: /api/spotify/search_tracks built a Spotify field-filtered query
(track:X artist:Y) and handed it to spotify_client.search_tracks, which falls back to the
user's configured source when official Spotify isn't serving the request. The fallback
(Deezer here) got the raw Spotify `track:…artist:…` syntax it can't parse and aborted the
connection (RemoteDisconnected) — so the user's perfectly working Deezer failed ONLY on
this path, on this query format. The iTunes and Deezer search endpoints already dropped
field syntax for exactly this reason; the Spotify one was the lone holdout.

fix:
- new pure helper relevance.build_combined_search_query(track, artist, legacy) — plain,
  source-agnostic query; documents WHY field syntax is wrong here. the endpoint already
  reranks by expected title/artist, so precision is recovered without the brittle syntax.
- the Spotify endpoint uses it (now consistent with iTunes/Deezer).
- frontend (searchPoolFix): surface the real error (auth / 500 / upstream abort) instead
  of masking everything as "No results found" — which is what made this undiagnosable.

5 helper tests incl. the regression (output must contain no 'track:'/'artist:' syntax).
654 metadata/search tests green, 64 script-integrity green, ruff clean.
2026-06-28 19:48:04 -07:00
..
test_album_artist_unknown.py
test_album_mbid_cache.py
test_album_type_normalization.py
test_art_lookup.py Cover art: a sequel digit glued to a CJK title ('…サウンドトラック2') now blocks the wrong-album match 2026-06-18 08:24:54 -07:00
test_art_min_size.py
test_art_sources.py
test_artist_resolution.py
test_artist_source_detail.py
test_artist_source_lookup.py
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
test_cache_capacity_eviction.py
test_cache_maintenance_retry.py
test_deezer_cover_url_upgrade.py
test_deezer_search_query.py
test_deezer_track_cache_validity.py
test_discography_filters.py discography 'add to wishlist': batch the per-track ownership check (fixes ~15-30s/track) 2026-06-27 19:51:28 -07:00
test_discography_typed_path.py
test_enrichment_events.py
test_image_url_normalization.py
test_metadata_album_tracks.py
test_metadata_artist_image.py
test_metadata_cache.py
test_metadata_cache_batch_lookup.py
test_metadata_discography.py #877: Download Discography filters mirror Artist Detail (fix dead EPs + add Live/Comp/Featured) 2026-06-15 21:30:55 -07:00
test_metadata_enrichment.py
test_metadata_gap_filler.py
test_metadata_musicmap.py
test_metadata_registry.py
test_multi_artist_tag_settings.py Multi-artist tags: Search → Download Now finally knows its metadata source (Netti93) 2026-06-09 17:20:16 -07:00
test_musicbrainz_client_query.py
test_musicbrainz_search.py
test_release_type.py
test_relevance.py spotify search endpoint: plain query, not field-scoped — fixes pool-fix "no results" 2026-06-28 19:48:04 -07:00
test_runtime_bundle.py
test_spotify_oauth_integration.py add tests 2026-06-28 14:56:28 -04:00
test_track_number_format.py
test_typed_metadata_types.py