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

@@ -8,11 +8,11 @@ import (
func TestSimilarity(t *testing.T) {
tests := []struct {
name string
a string
b string
want float64
epsilon float64
name string
a string
b string
want float64
epsilon float64
}{
{
name: "exact match scores 1.0",
@@ -127,14 +127,14 @@ func TestFindMissingReleases(t *testing.T) {
artistB := "artist-b"
tests := []struct {
name string
local []database.LocalAlbum
name string
local []database.LocalAlbum
external []database.ExternalRelease
want []string // RGIDs expected to be reported as missing
want []string // RGIDs expected to be reported as missing
}{
{
name: "no local albums means all external are missing",
local: nil,
name: "no local albums means all external are missing",
local: nil,
external: []database.ExternalRelease{
{RGID: "rg1", ArtistID: artistA, Title: "The Wall"},
{RGID: "rg2", ArtistID: artistA, Title: "Animals"},