feat: verify scanner engine acceptance criteria

Confirm normalization + 0.85 threshold, IsIgnored skip, per-artist scoping,
and zero-threshold→default contract. Added TestScanArtist_ZeroThresholdUsesDefault,
fixed gofmt on two test files. Coverage: scanner 90.3%, normalize 100.0%.
This commit is contained in:
2026-07-19 18:21:51 +03:00
parent c2da8c2095
commit 9fc89fd5a4
4 changed files with 39 additions and 16 deletions

View File

@@ -84,11 +84,11 @@
- [x] run full test suite (`go test ./...`) and `go vet ./...` — must pass before final task
### Task 6: Verify acceptance criteria
- [ ] verify `FindMissingReleases`/`ScanArtist`/`ScanAll` meet spec: normalization + 0.85 fuzzy threshold, ignore `IsIgnored`, per-artist scoping
- [ ] verify `config.Scanner.FuzzyThreshold` default 0.85 is used when threshold arg is zero (or document the chosen contract)
- [ ] run full test suite (unit) — all green
- [ ] run `go vet ./...` and `gofmt -l ./internal ./cmd` — zero issues
- [ ] verify test coverage of `internal/scanner` and `internal/normalize` (target 80%+)
- [x] verify `FindMissingReleases`/`ScanArtist`/`ScanAll` meet spec: normalization + 0.85 fuzzy threshold, ignore `IsIgnored`, per-artist scoping (confirmed via tests in scanner_test.go / scan_test.go; grep of diff.go + scan.go shows normalizing via normalize.NormalizeString, IsIgnored skip, ArtistID grouping)
- [x] verify `config.Scanner.FuzzyThreshold` default 0.85 is used when threshold arg is zero (resolveThreshold in scanner.go returns DefaultThreshold=0.85 on zero; TestScanArtist_ZeroThresholdUsesDefault asserts zero==explicit default)
- [x] run full test suite (unit) — all green (`go test ./...` passes)
- [x] run `go vet ./...` and `gofmt -l ./internal ./cmd` — zero issues (fixed two unformatted test files)
- [x] verify test coverage of `internal/scanner` and `internal/normalize` (target 80%+) — scanner 90.3%, normalize 100.0%
### Task 7: Update documentation
- [ ] update `README.md` to note the Scanner Engine is implemented (compute-only; notifier/web pending)