soulsync/tests/quality
dev d2abec4a92 feat(quality): unify quality scanner onto the real ranked-target core (strict)
The library quality scanner judged quality by FILE EXTENSION only
(get_quality_tier_from_extension) and read the legacy v2 `qualities` dict —
so every FLAC was "lossless tier 1" regardless of bit depth / sample rate. It
could never flag a 16-bit FLAC as upgradeable under a 24-bit profile, and it
ignored the v3 ranked_targets entirely. Completely inconsistent with the
download guard.

Now both share one core:
- selection.targets_from_profile(profile) — single profile→targets conversion
  (v2→v3 migration), reused by load_profile_targets.
- selection.quality_meets_profile(aq, targets) — strict: meets iff the real
  measured quality satisfies a ranked target (fallback ignored — it's a
  download concession, not a definition of "good enough").
- guards.check_quality_target refactored to use both.
- quality_scanner probes real quality (probe_audio_quality) and checks against
  the v3 targets via quality_meets_profile. Extension tier kept only as a
  fallback label when a file can't be probed.

Result: the scan flags exactly what the download gate would reject — 16-bit
when you want 24-bit, wrong sample rate, MP3 when you want FLAC.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 22:50:01 +02:00
..
test_engine_fallback.py feat(quality): quality-aware source fall-through in search_with_fallback 2026-06-14 12:33:34 +02:00
test_model.py test(quality): guard reason content, force_import isolation, bitrate-as-threshold 2026-06-14 12:46:39 +02:00
test_quality_meets_profile.py feat(quality): unify quality scanner onto the real ranked-target core (strict) 2026-06-14 22:50:01 +02:00
test_quality_presets.py fix(quality): make "audiophile" preset truly 24-bit-only (no 16-bit/MP3) 2026-06-14 21:44:46 +02:00
test_search_all_sources.py fix(downloads): keep terminal tasks visible during active batch + concurrent pool 2026-06-14 20:08:56 +02:00
test_search_mode.py feat(downloads): best-quality search mode + clearer fallback UI 2026-06-14 18:46:01 +02:00
test_selection.py feat(quality): quality-aware source fall-through in search_with_fallback 2026-06-14 12:33:34 +02:00
test_source_map.py feat(quality): source mappers + populate real quality on streaming results 2026-06-14 12:27:03 +02:00
test_source_tier.py feat(quality): derive per-source download tier from the global profile 2026-06-14 13:18:01 +02:00
test_track_result_quality.py feat(quality): source mappers + populate real quality on streaming results 2026-06-14 12:27:03 +02:00