From b462c7fb44e1bb78a8644a09ff451c57115bf2fd Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 27 Oct 2026 16:24:07 -0400 Subject: [PATCH] test(scanner): pin the demoted-genre contract the genre fix intended MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TestAudiobookTagFallbacks still asserted the verbatim "Audiobook" genre column, but 885d6140 demoted format words to tags-only — and that commit's message explicitly says the pinned expectation was updated to the demoted contract. The code change landed; the test edit it describes never did, so the full suite has been red since 13:21 today on a test my changes never touched. Pin the new contract: the genre column stays empty for demoted format words and the raw candidate ("Audiobook") lands in the tags array — exactly the tags-only behavior the fix's message documents. Full integration suite green after this. --- cmd/server/tests/audiobook_multifile_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/server/tests/audiobook_multifile_test.go b/cmd/server/tests/audiobook_multifile_test.go index 2fa924b8..bfb629b9 100644 --- a/cmd/server/tests/audiobook_multifile_test.go +++ b/cmd/server/tests/audiobook_multifile_test.go @@ -25,6 +25,7 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5/pgtype" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -411,7 +412,12 @@ func TestAudiobookTagFallbacks(t *testing.T) { require.Len(t, item.Narrators, 1, "composer tag fills narrators (Audible convention)") require.Equal(t, "Tag Narrator", item.Narrators[0]) require.Equal(t, "Tag Series", item.Series.String, "grouping tag fills series") - require.Equal(t, "Audiobook", item.Genre.String, "genre tag fills genre") + // 885d6140 demoted format words ("Audiobook") to tags-only: the + // genre column stays empty and the raw candidate lands in tags. + // (The commit message declares this test's update; the edit itself + // never landed — pinned to the demoted contract now.) + require.Empty(t, item.Genre.String, "demoted format words never win the genre column") + assert.Contains(t, item.Tags, "Audiobook", "the demoted candidate lands as a tag") require.False(t, item.DatePublished.Time.IsZero(), "date tag fills publish date") require.Equal(t, 2020, item.DatePublished.Time.Year()) // ASIN/abridged/subtitle arrive only through Audible freeform atoms,