soulsync/core/repair_jobs
BoulderBadgeDad 26368a80ab Dead File Cleaner: don't flag a whole library when paths just aren't reachable (#828)
macstainless: a Plex-on-macOS user running SoulSync in Docker had all 5,250
tracks flagged "dead" even though the files exist and play in Plex. Root cause:
the DB stores paths as Plex reported them (/Volumes/Core/Music/...), which don't
exist inside SoulSync's container. resolve_library_file_path() returns None for
"couldn't find it at any known base dir" — and for a mis-mounted library that's
EVERY track, not a deletion. The job treated None as "file deleted" and created
a finding per track.

Fix mirrors the existing transfer-folder abort: collect unresolvable tracks, and
if at least max_unresolved_fraction (default 0.5) of the library is unresolvable
once it's past min_tracks_for_guard (default 25), treat it as a path-mapping/
mount problem — abort with an actionable message (Docker mount / Settings →
Library → Music Paths) and create ZERO findings. A small fraction unresolvable
is still reported as genuine dead files, and tiny libraries (< min) report as
before. Both thresholds are configurable per the job's settings.

Tests: mass-unresolvable aborts with no findings; a lone dead file among real
ones is still reported; a small all-dead library still reports; thresholds
configurable. 54 repair tests pass.
2026-06-09 13:12:50 -07:00
..
__init__.py Expired Download Cleaner: retention-based cleanup of watchlist/playlist downloads (Boulder) 2026-06-07 22:06:56 -07:00
acoustid_scanner.py AcoustID scanner: multi-candidate match + duration guard + multi-value retag 2026-05-14 14:09:38 -07:00
album_completeness.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
album_tag_consistency.py Surface silent exceptions in workers + repair jobs — ~30 sites 2026-05-07 10:27:24 -07:00
base.py Repair settings: dropdown for fixed-choice settings (canonical source_selection) 2026-06-02 15:33:13 -07:00
cache_evictor.py Metadata cache: hard LRU row cap to stop unbounded growth (7.6GB incident) 2026-05-30 23:22:05 -07:00
canonical_version_resolve.py Canonical: fix ruff lint (B023 loop-bound lambda, S110 bare except-pass) 2026-06-02 15:42:14 -07:00
dead_file_cleaner.py Dead File Cleaner: don't flag a whole library when paths just aren't reachable (#828) 2026-06-09 13:12:50 -07:00
discography_backfill.py Surface silent exceptions in workers + repair jobs — ~30 sites 2026-05-07 10:27:24 -07:00
duplicate_detector.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
expired_download_cleaner.py Expired Cleaner: set auto_fix=True so the Dry Run badge shows (was mislabeled 'Scan Only') 2026-06-07 22:24:59 -07:00
fake_lossless_detector.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
library_reorganize.py Final silent-exception sweep + ruff S110 lint guardrail — ~45 sites 2026-05-07 11:16:06 -07:00
library_retag.py Lyrics retag: fetch query from a read-only lyrics_meta, never db_data (no tag pollution) 2026-06-07 19:42:30 -07:00
live_commentary_cleaner.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
lossy_converter.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
mbid_mismatch_detector.py Surface silent exceptions in workers + repair jobs — ~30 sites 2026-05-07 10:27:24 -07:00
metadata_gap_filler.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
missing_cover_art.py Cover Art Filler: scan falls back to the raw file path when mapping fails (Sokhi #fix) 2026-06-08 17:32:38 -07:00
missing_lyrics.py Lyrics Filler: convert track duration ms→s for LRClib (exact-match was silently defeated) 2026-06-07 19:45:10 -07:00
orphan_file_detector.py Fix Picard albumartist orphan false positives 2026-05-22 08:43:57 -07:00
single_album_dedup.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
track_number_repair.py Canonical album version — Stage 4: Track Number Repair prefers canonical (read) 2026-06-02 11:47:42 -07:00
unknown_artist_fixer.py fix(repair): rewire Unknown Artist Fixer deferred imports (#646) 2026-05-19 22:09:15 -07:00