- Extract count_comp from detail page in _apply_detail_to_extras so the
all-playstyles completion count is populated even when the search API
returns 0 (Mini Ghost: 0 → 69, now passes confidence thresholds)
- Fix _refresh_candidate_confidence to trigger re-fetch when count_comp==0
even if comp_100_count>0 (was silently skipping stale partial entries)
- Filter colon-stripped fallback candidates (e.g. "Vox Populi" from
"Vox Populi: Poland 2023") to full-edition or exact matches only,
preventing cross-franchise false positives
- Demote "All N ProtonDB ratings found in cache" log to DEBUG to remove
per-game noise from the scan output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Four bugs fixed:
- HLTB search returned 0 results for ~87 games with special chars (™, ®, &,
standalone -, (Legacy), RHCP, etc.) — add _sanitize_search_name() and
extend _build_search_variants() with Steam-suffix and edition stripping
- fetch_hltb_detail_missing returned immediately because `app_id not in rush`
was always False (all keys present with -1) — fix to `rush.get(id,-1) <= 0`
- save_hltb_cache overwrote rush/leisure on confidence-only partial saves —
now reads existing cache and preserves data when extras dicts are empty
- _filter_qualifying_games excluded 57 games with stale snapshot hours (-1)
even though HLTB hours cache had valid data — add cache fallback
Result: stats shows Rush 64,670h / Leisure 136,807h / Worst 228,594h for
all 785 qualifying games with full rush+leisure detail.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Guard enforce_allowed_game() and _guard_installed_games() against
current_app_id=None so they never treat all games as unauthorized
- Add early return in _enforce_loop_iteration when no game is assigned
- Wrap State.load() in enforce loop with error handling for corrupt files
- Switch all config/cache file writes to atomic (tmpfile + rename)
- Add robust error handling to State.load() for corrupt JSON
- Update tests for new behavior and add coverage for atomic writes