soulsync/tests/search
Broque Thomas 47b4663091 Search cache: preserve falsy provider returns to match original behavior
Line-by-line review of the search lift caught one drift: cache.get_cache_key
was coercing falsy provider returns ('', None, 0) to 'unknown' / False.
Original web_server.py only fell back to those sentinels on exception, not
on falsy success values.

Real-world impact: low — get_active_media_server() and get_primary_source()
return non-empty strings in practice. But cache keys are tuples with no
schema enforcement, so any drift here can silently fragment the cache.
Restored 1:1 parity with original semantics.

Added test covering the falsy-success path so this can't drift again.

789 tests pass, ruff clean.
2026-04-27 15:19:52 -07:00
..
__init__.py Lift /api/search and /api/enhanced-search/* into core/search/ 2026-04-27 15:07:11 -07:00
test_search_basic.py Lift /api/search and /api/enhanced-search/* into core/search/ 2026-04-27 15:07:11 -07:00
test_search_cache.py Search cache: preserve falsy provider returns to match original behavior 2026-04-27 15:19:52 -07:00
test_search_library_check.py Lift /api/search and /api/enhanced-search/* into core/search/ 2026-04-27 15:07:11 -07:00
test_search_orchestrator.py Lift /api/search and /api/enhanced-search/* into core/search/ 2026-04-27 15:07:11 -07:00
test_search_sources.py Lift /api/search and /api/enhanced-search/* into core/search/ 2026-04-27 15:07:11 -07:00
test_search_stream.py Lift /api/search and /api/enhanced-search/* into core/search/ 2026-04-27 15:07:11 -07:00