soulsync/tests/sync
BoulderBadgeDad 0df1d55ed6 Sync: re-resolve a manual match against live Plex when its stored key went stale
wolf39us: a Find & Add manual match got dropped on auto-sync (60->57) with a 404
fetching the stored Plex ratingKey. Root cause: Plex re-keys tracks on a metadata
refresh, and the SoulSync DB id IS that ratingKey — so until a SoulSync rescan BOTH
the durable match's library_track_id AND the file-path self-heal (which reads the
same DB) land on the dead key, fetchItem 404s, the track falls through to fuzzy
(also the dead key) and is dropped.

Fix: when both DB-side lookups miss on Plex, re-resolve the manual match against
LIVE Plex by the matched track's metadata, disambiguated by the stored file path
so the user's EXACT chosen track wins among multiple versions; return the current
live track and heal the stored id + sync cache. A manual match is now never dropped
or silently re-matched — it 'always overrides' as asked. Scoped to Plex (DB-backed
servers materialize off the DB and don't have this re-key problem).

Seam tests: file-path picks the right version over a live alternate, basename
fallback for server-vs-local paths, no-file-match falls back to top hit (never
drop), no results/empty title -> None, and a broken client never raises.
2026-06-22 08:47:24 -07:00
..
__init__.py Persist Find & Add selections as permanent server-playlist match overrides 2026-05-14 09:39:24 -07:00
test_artist_name_extraction.py Address Cin review: extract helpers, indexed pool fetch, tidy nits 2026-05-24 23:33:55 -07:00
test_match_overrides.py Fix #787: Find & Add now records a durable manual match that survives a rescan 2026-06-04 13:46:24 -07:00
test_reconcile_or_replace.py Fix #792: 'reconcile' playlist sync mode (edit in place, keep image/description) 2026-06-04 15:15:49 -07:00
test_reresolve_live_plex.py Sync: re-resolve a manual match against live Plex when its stored key went stale 2026-06-22 08:47:24 -07:00
test_sync_candidate_pool.py Address Cin review: extract helpers, indexed pool fetch, tidy nits 2026-05-24 23:33:55 -07:00
test_sync_durable_match.py Test the REAL Plex/Jellyfin sync matcher's durable-match fallback (#895) 2026-06-21 18:18:58 -07:00