soulsync/tests
BoulderBadgeDad 0eff9e3708 #798: Spotify Free metadata mode — backend (opt-in, shared spotify tables)
Adds an opt-in no-creds Spotify metadata path: SpotifyClient serves SpotipyFree
data (real Spotify IDs) when metadata.spotify_free is enabled AND SpotipyFree is
installed AND there's no real Spotify auth. The data lands in the SAME spotify_*
columns, so the enrichment worker, search, and #775 lookups work UNCHANGED —
they just receive free-sourced data. The worker's only change is its availability
gate.

- core/spotify_free_metadata.py: SpotifyFreeMetadataClient + normalize_artist +
  pure gate fns (should_use_free_fallback / should_offer_spotify_metadata /
  spotify_free_installed).
- SpotifyClient: _free_enabled (opt-in, default OFF) / _free_available /
  is_spotify_metadata_available / _free_active + in-client routing for
  search_artists/tracks + get_album/artist/track_details/album_tracks/artist_albums.
- 3 scoped availability gates use is_spotify_metadata_available(): enrichment
  worker loop, search resolve_client, watchlist. The ~40 discovery/user-library
  sites stay auth-only (no sprawl, no user-data risk).

Authed users are untouched (gate closed when auth healthy). UI surfacing comes
next. Pure gates + normalizer tested; orchestrator resolve test added.
2026-06-05 13:32:37 -07:00
..
artists Direct ID lookup in Enhance Quality, like Download Discography 2026-05-06 12:05:41 -07:00
automation Fix standalone mirrored playlist sync and post-sync downloads. 2026-06-04 00:24:00 +02:00
database Preserve Navidrome album cover art 2026-05-25 19:51:38 -07:00
discovery #799: add equivalence proof that should_rediscover == original pre-scan 2026-06-05 11:17:49 -07:00
downloads Fix organize-by-playlist downloads: library entries, wishlist, and stale Spotify cache 2026-06-03 10:26:32 +02:00
enrichment Enrichment manager: 6 UX improvements 2026-06-02 19:50:57 -07:00
imports Remove the old Retag Tool (superseded by Library Re-tag job + Write Tags) 2026-06-04 09:33:03 -07:00
library Fix CI: remove orphaned tests for the deleted retag worker 2026-06-04 12:52:37 -07:00
matching Fix MB-worker alias test fixtures missing self.db 2026-06-05 13:24:21 -07:00
media_server Navidrome: pin music-folder selection by id, not name (survives renames) 2026-06-04 11:47:31 -07:00
metadata Fix artist-detail showing wrong artist when a source id is duplicated 2026-06-05 07:24:51 -07:00
playback Player: log SoulSync web-player plays (recently-played + smart-radio recency) 2026-05-30 15:11:46 -07:00
playlists Expose mirrored playlist source-ref health 2026-05-24 19:32:39 -07:00
radio Player revamp Phase 2: smart radio ranking (play-count + popularity) 2026-05-30 08:47:18 -07:00
search #798: Spotify Free metadata mode — backend (opt-in, shared spotify tables) 2026-06-05 13:32:37 -07:00
static Fix: mirrored playlist action buttons dead when name has an apostrophe 2026-06-01 09:02:25 -07:00
stats Lift /api/stats/* and /api/listening-stats/* into core/stats/ 2026-04-27 14:27:03 -07:00
streaming Player revamp Phase 3a: extract stream state into testable per-session store 2026-05-30 08:59:15 -07:00
sync Fix #792: 'reconcile' playlist sync mode (edit in place, keep image/description) 2026-06-04 15:15:49 -07:00
text Address Cin review: extract helpers, indexed pool fetch, tidy nits 2026-05-24 23:33:55 -07:00
tools test(amazon): update search_albums test for derived-from-tracks behavior 2026-05-19 18:24:27 -07:00
watchlist Complete MusicBrainz watchlist source parity 2026-05-18 19:19:25 -07:00
webui Fix missing album placeholder asset path 2026-05-22 08:34:42 -07:00
wishlist Fix organize-by-playlist downloads: library entries, wishlist, and stale Spotify cache 2026-06-03 10:26:32 +02:00
conftest.py tests: isolate the database so the suite can never touch the real DB 2026-05-31 23:36:57 -07:00
test_acoustid_error_reporting.py AcoustID: report errors honestly instead of masking them as 'Skipped' 2026-05-31 20:10:31 -07:00
test_acoustid_scanner.py AcoustID scanner: multi-candidate match + duration guard + multi-value retag 2026-05-14 14:09:38 -07:00
test_acoustid_skip_logic.py AcoustID: report errors honestly instead of masking them as 'Skipped' 2026-05-31 20:10:31 -07:00
test_acoustid_version_mismatch.py AcoustID: report errors honestly instead of masking them as 'Skipped' 2026-05-31 20:10:31 -07:00
test_album_bundle.py Fix #796: Soulseek album bundle left completed files in slskd download folder 2026-06-04 21:56:07 -07:00
test_album_bundle_dispatch.py Album bundle: fall back to per-track on an I/O error, don't hard-fail the batch 2026-06-01 13:29:05 -07:00
test_album_completeness_job.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
test_album_mbid_consistency.py Update mbid consistency test mock to match new create_finding bool contract 2026-05-04 09:11:01 -07:00
test_amazon_outage.py Fix #759: Amazon enrichment floods when its public proxy is down 2026-06-01 13:10:51 -07:00
test_archive_pipeline.py feat(downloads): add archive_pipeline module for torrent/usenet downloads 2026-05-20 17:05:00 -07:00
test_art_apply.py Cover Art Filler: skip files that already have art (keep apply purely additive) 2026-06-03 22:17:20 -07:00
test_art_preservation.py Fix #764: import no longer destroys embedded cover art 2026-06-02 08:40:05 -07:00
test_artist_full_detail_source_id.py Fix: enhanced artist view 404s for library artists opened via source ID 2026-05-28 12:00:29 -07:00
test_artist_top_tracks_clients.py Add download buttons + bulk action to artist top-tracks sidebar 2026-05-07 15:44:47 -07:00
test_audiodb_worker_stuck_track.py AudioDB worker: stop infinite loop on direct-ID lookup failure (#553) 2026-05-11 14:18:55 -07:00
test_auth_usage_throttle.py test: auth last_used_at write throttle 2026-04-19 15:22:24 -07:00
test_auto_sync_js.py Add node:test contract for auto-sync.js helpers 2026-05-25 00:01:34 -07:00
test_canonical_columns_migration.py Canonical album version — Stage 1: schema + pure scorer (dormant) 2026-06-02 11:30:58 -07:00
test_canonical_db.py Canonical album version — Stage 2 (core): resolver + persistence (dormant) 2026-06-02 11:36:19 -07:00
test_canonical_orchestration.py Canonical findings: include as much (free) data as possible 2026-06-02 14:10:02 -07:00
test_canonical_resolver.py Canonical: richer, judge-able findings (the why behind a pin) 2026-06-02 13:13:37 -07:00
test_canonical_version.py Canonical album version — Stage 1: schema + pure scorer (dormant) 2026-06-02 11:30:58 -07:00
test_canonical_version_job.py Repair settings: dropdown for fixed-choice settings (canonical source_selection) 2026-06-02 15:33:13 -07:00
test_config_save_retry.py Stop config retry tests from writing to the real DB 2026-04-30 14:07:00 -07:00
test_content_filter_regex.py Fix watchlist content filters: live false positives + auto-scan bypass 2026-04-21 19:16:25 -07:00
test_create_finding_dedup_counter.py Repair job card badge — show pending count, not last-scan count 2026-05-07 08:28:17 -07:00
test_dashboard_events.py Realign test file names 2026-04-17 21:25:01 +03:00
test_database_io_resilience.py Handle transient SQLite IO during maintenance 2026-05-21 17:50:30 -07:00
test_db_genres_json_normalization.py DB: normalize legacy comma-separated genres to canonical JSON 2026-05-29 12:11:09 -07:00
test_db_integrity.py DB backups: verify integrity + never evict the last good backup 2026-05-30 21:13:04 -07:00
test_db_isolation_guard.py tests: isolate the database so the suite can never touch the real DB 2026-05-31 23:36:57 -07:00
test_db_migration_ledger.py DB: add schema_migrations ledger + PRAGMA user_version backstop 2026-05-29 12:14:20 -07:00
test_db_watchlist_amazon_id_migration.py DB: stop watchlist_artists rebuilds from dropping amazon_artist_id 2026-05-29 12:04:11 -07:00
test_debug_info_services.py Fix Copy Debug Info music_source + surface missing services 2026-05-12 16:47:55 -07:00
test_dedupe_source_ids.py Auto-repair duplicated source ids on startup (one-time migration) 2026-06-05 10:21:52 -07:00
test_deezer_worker_artist_id_guard.py Fix Deezer enrichment stamping one artist id onto multiple artists 2026-06-05 07:32:51 -07:00
test_discogs_collection_source.py Discogs: strip artist disambiguation suffixes at every name surface (#634) 2026-05-27 09:05:47 -07:00
test_discogs_track_count.py Discogs: count rows with empty type_ as real tracks too 2026-04-25 08:27:44 -07:00
test_discover_section_controller_js.py Discover controller — Cin pre-review polish 2026-05-07 20:35:10 -07:00
test_download_orchestrator_soundcloud.py Cin-5: Drop per-source attrs from orchestrator 2026-05-04 23:14:05 -07:00
test_download_plugin_conformance.py Add torrent usenet PR notes and test updates 2026-05-21 15:28:48 -07:00
test_downloads_pagination.py Lift shared runtime state into core 2026-04-27 19:54:44 +03:00
test_duplicate_detector_mount_paths.py Filter same-physical-file duplicates from duplicate detector 2026-04-30 14:06:10 -07:00
test_duplicate_detector_slskd_dedup.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
test_duplicate_keep.py Fix: duplicate detector kept lossy over lossless (rank format first) 2026-06-01 12:49:34 -07:00
test_embed_known_source_ids.py Library re-tag: seam tests for the job scan, apply handler, and source-id embed 2026-06-04 09:46:35 -07:00
test_enrichment_art_preservation.py Fix #764: import no longer destroys embedded cover art 2026-06-02 08:40:05 -07:00
test_enrichment_artist_id_guard.py Apply artist-id name-guard to audiodb/qobuz/tidal workers too 2026-06-05 07:47:59 -07:00
test_enrichment_services.py Consolidate enrichment bubble routes behind a service registry 2026-05-01 20:14:30 -07:00
test_featured_artist_completion.py Match featured-artist tracks across discography completion 2026-04-30 19:31:11 -07:00
test_hifi_instance_methods.py Fix "no such table: hifi_instances" via defensive lazy-create 2026-05-06 17:49:44 -07:00
test_hls_parsing.py fix: pick OS-specific ffmpeg binary in hls demux fallback test 2026-04-28 21:13:54 -07:00
test_image_cache.py Image cache: reject truncated downloads instead of caching broken covers (#750) 2026-05-30 17:45:01 -07:00
test_import_album_match_endpoint.py Lift auto-import matching to testable helper + pin contracts 2026-05-09 09:13:23 -07:00
test_import_singles_parallel.py Restore soulsync logger state between parallel-imports tests 2026-05-01 08:45:17 -07:00
test_integrity_failure_marks_task_failed.py Fix: tasks showed Completed when file was quarantined 2026-05-03 18:28:32 -07:00
test_lb_series_detect.py Roll LB Weekly / Top series into single rolling mirrors (Phase 1c.2.1) 2026-05-26 15:49:49 -07:00
test_library_disk_usage.py Repair stale media schema during refresh 2026-05-21 17:41:54 -07:00
test_library_reorganize.py Rewrite Library Reorganize job to delegate to per-album planner 2026-05-06 21:18:20 -07:00
test_library_reorganize_orchestrator.py Fix #767: Library Organizer dry run no longer creates folders 2026-06-02 10:32:06 -07:00
test_library_retag_job.py Library Re-tag: pull cover art from the configured cover-art sources 2026-06-04 14:46:09 -07:00
test_library_tag_payload.py Add _build_library_tag_db_data helper 2026-05-25 18:48:45 -07:00
test_library_track_identity.py Make extract_external_ids recognize all source-tagging conventions 2026-05-02 18:26:12 -07:00
test_lidarr_download_client.py Fix three Lidarr bugs that prevented it from being a real download source 2026-05-03 15:49:38 -07:00
test_listenbrainz_manager.py Auto-Sync: fix LB pipelines stuck on "Refreshing:" for 5+ minutes 2026-05-27 18:04:55 -07:00
test_listening_stats_batch_queries.py test: listening stats worker batched query paths 2026-04-19 15:22:25 -07:00
test_lyrics_reembed_from_sidecar.py Fix CI: drop dead RetagDeps tests + pointless f-string 2026-06-04 12:53:05 -07:00
test_manual_library_match.py Fix #787: Find & Add now records a durable manual match that survives a rescan 2026-06-04 13:46:24 -07:00
test_manual_pick_no_auto_retry.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
test_manual_search_endpoint.py Manual picks: stream results, don't auto-retry, fix stuck-at-0% 2026-05-08 15:12:58 -07:00
test_matching_engine_cjk.py Fix: duplicate tracks in albums with Japanese / CJK titles (#722) 2026-05-28 08:53:43 -07:00
test_metadata_cache_table_recreate.py Fix: metadata cache tables silently missing after DB recovery (stale migration marker) 2026-05-31 23:27:14 -07:00
test_missing_cover_art.py Cover Art Filler: honor the configured cover-art sources too 2026-06-04 14:50:40 -07:00
test_navidrome_cover_url.py Fix #766: Navidrome album covers blank in the sync editor (+ other modals) 2026-06-02 11:01:28 -07:00
test_orphan_file_detector.py Fix Picard albumartist orphan false positives 2026-05-22 08:43:57 -07:00
test_personalized_api.py Personalized playlists (3/N): standardized API endpoints 2026-05-15 17:15:25 -07:00
test_personalized_generators_curated.py Personalized playlists (2/N): all 8 generators wired through manager 2026-05-15 17:02:08 -07:00
test_personalized_generators_singletons.py Personalized playlists (2/N): all 8 generators wired through manager 2026-05-15 17:02:08 -07:00
test_personalized_generators_variants.py Personalized playlists (2/N): all 8 generators wired through manager 2026-05-15 17:02:08 -07:00
test_personalized_manager.py Personalized pipeline: auto-refresh stale snapshots after watchlist scan 2026-05-15 20:53:03 -07:00
test_personalized_playlists_id_gate.py Discover: sharpen track selection (diversity, source-aware popularity, library dedup, SQL genre) 2026-05-08 08:49:22 -07:00
test_playlist_edit.py Fix #792: reconcile sync mode was clamped back to 'replace' in the backend 2026-06-04 15:57:40 -07:00
test_playlist_reconcile.py #766 follow-on: source rows borrow their matched server track's cover 2026-06-02 11:08:35 -07:00
test_playlist_sources_adapters.py Auto-Sync: fix LB pipelines stuck on "Refreshing:" for 5+ minutes 2026-05-27 18:04:55 -07:00
test_provenance_id_persistence.py Persist source IDs at download time + backfill onto tracks on sync 2026-05-02 17:44:10 -07:00
test_prowlarr_client.py test: cover Prowlarr + torrent + usenet adapters 2026-05-20 15:43:18 -07:00
test_qobuz_credential_sync.py Address Copilot review nits 2026-05-05 11:22:01 -07:00
test_qobuz_playlists.py Fetch all Qobuz favorite tracks for discovery 2026-05-24 01:17:38 -07:00
test_recommendation_sources.py Recommendations: explain WHICH of your artists drive each suggestion 2026-06-03 18:23:51 -07:00
test_reorganize_canonical_source.py Canonical album version — Stage 3: Reorganizer prefers pinned canonical (read) 2026-06-02 11:45:31 -07:00
test_reorganize_db_methods.py Reorganize queue: race + dedupe fixes from kettui review 2026-04-26 08:40:24 -07:00
test_reorganize_deleted_quarantine.py Reorganize: skip files in the duplicate-cleaner /deleted quarantine (#746) 2026-05-30 00:15:06 -07:00
test_reorganize_orphan_format_handling.py Reorganize: move orphan-format siblings alongside the canonical 2026-05-10 19:58:31 -07:00
test_reorganize_queue.py Reorganize queue: race + dedupe fixes from kettui review 2026-04-26 08:40:24 -07:00
test_reorganize_runner.py Library reorganize: FIFO queue with live status panel 2026-04-25 18:01:32 -07:00
test_reorganize_tag_source.py Reorganize: optional embedded-tag mode (closes #592) 2026-05-15 07:56:18 -07:00
test_reorganize_unknown_artist_hint.py Reorganize: hint at Unknown Artist Fixer for placeholder-metadata rows 2026-05-10 20:16:28 -07:00
test_repair_worker_album_fill.py fix(album-completeness): block cross-artist auto-fill 2026-05-21 16:49:12 -07:00
test_repair_worker_unresolvable_folder_error.py Album Completeness: surface diagnostic when resolver can't find album folder 2026-05-12 14:04:15 -07:00
test_replaygain_summary_parse.py Fix: ReplayGain wrote same +52 dB gain to every track 2026-05-03 19:08:35 -07:00
test_request_cleanup_timer.py test: api/request periodic cleanup timer 2026-04-19 15:22:25 -07:00
test_resolve_mirrored_playlist.py Fix #780: Deezer/non-Spotify organize-by-playlist resolved the wrong row 2026-06-03 20:41:04 -07:00
test_retag_planner.py Library re-tag (1/3): pure planner — match source tracklist + per-field tag diff 2026-06-04 08:50:40 -07:00
test_runtime_state.py Tighten metadata and import safety 2026-04-27 20:28:05 +03:00
test_scan_wait_action.py Fix: deep-scan / DB-update automation falsely errors on large libraries (stall-based timeout) 2026-06-01 16:30:28 -07:00
test_script_split_integrity.py test: register enrichment-manager.js in script-split-integrity scan 2026-06-02 21:06:02 -07:00
test_server_playlist_append_mode.py Server playlist sync: append mode (preserve user-added tracks) 2026-05-10 22:52:11 -07:00
test_similar_artists_status_codes.py Fix: MusicMap 404s miscounted as errors in similar-artists worker 2026-06-03 18:04:31 -07:00
test_similar_artists_worker.py Similar Artists worker: guarantee every stored similar has a source id 2026-06-03 16:26:29 -07:00
test_socketio_cors.py Socket.IO CORS: handle self-review nits 2026-04-26 19:24:43 -07:00
test_soulseek_album_fallback.py Fix #796: Soulseek album bundle left completed files in slskd download folder 2026-06-04 21:56:07 -07:00
test_soulseek_album_poll_stall.py Soulseek album poll: treat 'Aborted'/'Cancelled' transfers as failed 2026-05-29 19:29:55 -07:00
test_soulseek_search_throttle.py Add min delay between slskd searches (Bell Canada anti-abuse fix) 2026-05-12 19:11:12 -07:00
test_soundcloud_client.py Lift shared download dataclasses + boot via singleton factory 2026-05-05 09:08:39 -07:00
test_source_ids_registry.py Source IDs: add canonical registry, adopt at the highest-value sites 2026-05-29 12:19:59 -07:00
test_source_title.py Fix #768: playlist sync editor refusing to match certain tracks 2026-06-02 10:16:21 -07:00
test_spa_deep_linking.py feat: artist-detail deep linking — /artist-detail/:source/:id 2026-05-18 13:07:54 -07:00
test_spotify_free_metadata.py #798: Spotify Free metadata mode — backend (opt-in, shared spotify tables) 2026-06-05 13:32:37 -07:00
test_spotify_public_api.py SpotipyFree integration confirmed working (236 tracks live); deps + meta tweak 2026-06-02 22:50:04 -07:00
test_staging_album_provenance.py refactor(staging): inject batch-field accessor instead of importing runtime_state 2026-05-20 20:43:35 -07:00
test_stats_automations_esc_js.py Fix: mirrored playlist action buttons dead when name has an apostrophe 2026-06-01 09:02:25 -07:00
test_status_engine_fallback.py Manual picks: stream results, don't auto-retry, fix stuck-at-0% 2026-05-08 15:12:58 -07:00
test_sync_discovery_scan_events.py Realign test file names 2026-04-17 21:25:01 +03:00
test_tag_writer_multi_artist.py AcoustID scanner: multi-candidate match + duration guard + multi-value retag 2026-05-14 14:09:38 -07:00
test_tidal_album_tracks.py Your Albums: selectable wishlist modal + Tidal album resolution 2026-05-11 12:36:16 -07:00
test_tidal_auth_instructions.py Show Tidal callback port (not Spotify's) in auth instructions 2026-04-30 20:54:06 -07:00
test_tidal_auth_redirect_uri.py Honor configured Tidal redirect_uri, drop request-host fallback 2026-05-02 19:20:18 -07:00
test_tidal_collection_tracks.py Tidal: surface Favorite Tracks as virtual playlist (issue #502) 2026-05-10 21:36:22 -07:00
test_tidal_favorite_albums_artists.py Tidal: rewire favorite albums + artists to V2 user-collection endpoints 2026-05-11 10:03:27 -07:00
test_tidal_qualifier_filter.py Fix MTV Unplugged & live-album false-quarantine pipeline 2026-05-14 12:14:31 -07:00
test_tidal_search_shortening.py Reject Tidal streams that silently downgrade from the requested quality 2026-04-24 13:12:30 -07:00
test_title_match_guard.py Fix #769: playlist sync matched wrong same-artist track with high confidence 2026-06-02 09:14:26 -07:00
test_tool_progress_events.py Realign test file names 2026-04-17 21:25:01 +03:00
test_torrent_client_adapters.py Fix #790: torrent client URL without http:// scheme fails to connect 2026-06-04 11:57:53 -07:00
test_torrent_usenet_plugins.py Fix: torrent/usenet album bundle hard-fails on 'no results' instead of falling back 2026-06-01 09:55:59 -07:00
test_track_artist_matching.py Add fallback negative-case test for track-artist matching 2026-04-30 17:13:15 -07:00
test_track_number_repair.py Fix CI test failures from incomplete dummy config and encoding 2026-04-19 13:04:55 -07:00
test_track_repair_canonical.py Canonical album version — Stage 4: Track Number Repair prefers canonical (read) 2026-06-02 11:47:42 -07:00
test_track_search_single_query.py test: api_search_tracks single-query track search 2026-04-19 15:22:24 -07:00
test_unknown_artist_fixer.py fix(repair): rewire Unknown Artist Fixer deferred imports (#646) 2026-05-19 22:09:15 -07:00
test_usenet_client_adapters.py Fix: Usenet bundle stuck at 99%/100% — SAB reports post-processing in History as non-terminal (#721) 2026-05-29 00:49:02 -04:00
test_watchlist_album_match.py Stop watchlist re-downloading compilation tracks; catch slskd dedup orphans 2026-05-01 12:57:50 -07:00
test_watchlist_bulk_add.py Complete MusicBrainz watchlist source parity 2026-05-18 19:19:25 -07:00
test_watchlist_scanner_scan.py Move the import flows and related post-processing pipelines into separate modules 2026-04-27 19:54:43 +03:00
test_websocket_client_transport.py Repoint websocket transport test to core.js after split 2026-04-22 11:30:39 -07:00
test_websocket_infrastructure.py Split metadata source and Spotify status 2026-05-02 22:02:00 +03:00
test_wishlist_pagination.py test: wishlist SQL pagination and category filter 2026-04-19 15:22:24 -07:00
test_worker_artist_match_gate.py Tighten artist matching: 0.85 gate + shared uniqueness guard 2026-06-05 10:01:17 -07:00
test_worker_existing_id_marks_matched.py test: enrichment worker re-processing fix and migration backfill 2026-04-19 15:22:24 -07:00
test_worker_utils_album_track_count.py Repair stale media schema during refresh 2026-05-21 17:41:54 -07:00
test_youtube_ffmpeg_no_eager_download.py ffmpeg gate also covers is_available — fixes the actual leak path 2026-05-08 15:46:31 -07:00
test_youtube_search_dash_query.py Escape dash-leading YouTube search queries 2026-05-24 08:54:47 -07:00