feat: complete task 4 - fix scanner diff.go TypeFilter.suppressed to use centralized filter

This commit is contained in:
2026-07-25 23:12:09 +03:00
parent 41e5e079d4
commit 355a12c6a6
3 changed files with 162 additions and 21 deletions

View File

@@ -56,11 +56,11 @@ Problem: Three separate filter implementations (`musicbrainz.FilterReleaseGroups
- [x] Run tests - must pass before task 4
### Task 4: Fix scanner diff.go TypeFilter.suppressed to use centralized filter
- [ ] Update `TypeFilter.suppressed` in `diff.go` to use the same logic as `ApplyTypeToggles` (i.e., treat `EP` in SecondaryTypes as a Single when `IgnoreSingles=true`)
- [ ] Since scanner is separate package, either: (a) export `ApplyTypeToggles` from musicbrainz and import, or (b) duplicate the minimal logic with a comment referencing the canonical source. Choose (a) for DRY.
- [ ] Update `scanner/diff.go` to import `musicbrainz` and use the shared filter
- [ ] Write tests in `diff_test.go` verifying scanner filter matches musicbrainz filter for all release type combinations
- [ ] Run tests - must pass before task 5
- [x] Update `TypeFilter.suppressed` in `diff.go` to use the same logic as `ApplyTypeToggles` (i.e., treat `EP` in SecondaryTypes as a Single when `IgnoreSingles=true`)
- [x] Since scanner is separate package, either: (a) export `ApplyTypeToggles` from musicbrainz and import, or (b) duplicate the minimal logic with a comment referencing the canonical source. Choose (a) for DRY.
- [x] Update `scanner/diff.go` to import `musicbrainz` and use the shared filter
- [x] Write tests in `diff_test.go` verifying scanner filter matches musicbrainz filter for all release type combinations
- [x] Run tests - must pass before task 5
### Task 5: Fix ArtistCacheFresh lexicographic time comparison
- [ ] Change `external_releases.cached_at` from TEXT to INTEGER (unix epoch seconds) via migration `006_cached_at_to_integer`