From ad56eb279faa43c381ccde8189ae4f6e6e084ab1 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 27 Apr 2026 22:41:24 -0400 Subject: [PATCH] style(recommendation): drop trailing comments that gofmt-1.23 wants aligned CI's golangci-lint (`gofmt -s`) on Go 1.23 flagged inline comments after the SessionVector literals in TestContextualMatchScore_TakesMax because the variable-length values produced misaligned trailing columns. Local gofmt on Go 1.26 was lenient. Replace with a leading comment that covers all three rows; same intent, no alignment dance. --- internal/recommendation/similarity_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/recommendation/similarity_test.go b/internal/recommendation/similarity_test.go index 32b3f4e6..ee4708b2 100644 --- a/internal/recommendation/similarity_test.go +++ b/internal/recommendation/similarity_test.go @@ -131,10 +131,11 @@ func TestContextualMatchScore_AllLikesSeed_Returns0(t *testing.T) { func TestContextualMatchScore_TakesMax(t *testing.T) { // Three likes: full match, partial match, mismatch. Expect full match (1.0). current := SessionVector{Artists: []string{"a1"}, Tags: map[string]int{"rock": 1}} + // Three likes covering 1.0 (full match), 0.7 (tags-only match), 0.0 (mismatch). likes := []SessionVector{ - {Artists: []string{"a1"}, Tags: map[string]int{"rock": 1}}, // 1.0 - {Artists: []string{"a2"}, Tags: map[string]int{"rock": 1}}, // 0.7 - {Artists: []string{"a99"}, Tags: map[string]int{"jazz": 1}}, // 0.0 + {Artists: []string{"a1"}, Tags: map[string]int{"rock": 1}}, + {Artists: []string{"a2"}, Tags: map[string]int{"rock": 1}}, + {Artists: []string{"a99"}, Tags: map[string]int{"jazz": 1}}, } got := ContextualMatchScore(current, likes, DefaultSimilarityWeights) if !approxEq(got, 1.0) {