From e19fce0ed24ca5b8126884652b8f8bf83035b8c4 Mon Sep 17 00:00:00 2001 From: "Dr. Tobias Baur" <1097224+believethehype@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:40:06 +0200 Subject: [PATCH] fix: pin kind 11998 in the indexable-content golden and make it CRLF-proof MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The golden test's KINDS list was missing the new heartbeat kind, and the comparison read the golden raw — on Windows CI (autocrlf checkout) every internal CRLF counted as a diff, failing the suite with a full-table ComparisonFailure. Adds 11998 as a pinned row (a heartbeat is a machine signal: no indexable content, per the NIP-50 eligibility policy), normalizes CRLF in the comparison, and forces LF for *.golden in .gitattributes so checkouts can never break it. No reindex needed: nothing is indexed for this kind. --- .gitattributes | 4 ++++ .../quartz/nip50Search/IndexableContentGoldenTest.kt | 5 ++++- quartz/src/jvmTest/resources/indexable-content.golden | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 1fbeadf800..59568dc78d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,7 @@ # binary so git never applies CRLF/text normalization or textual diff/merge, which # would corrupt the compressed stream (important on Windows checkouts). *.gz binary + +# Golden test resources are compared byte-for-byte against generated strings: +# force LF everywhere so a Windows CRLF checkout cannot break the comparison. +*.golden text eol=lf diff --git a/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt b/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt index 0fc7a7697f..e68af7c54b 100644 --- a/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt +++ b/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt @@ -107,7 +107,9 @@ class IndexableContentGoldenTest { "a kind's indexed text changed. If deliberate: rerun with -Dgolden=write, update " + "references/searchable-kinds.md in the same commit, and schedule a reindex " + "(IEventStore.reindexFullTextSearch) — existing databases keep their old text.", - golden.readText().trim(), + // Normalize CRLF: Windows checkouts (autocrlf) would otherwise fail this comparison + // on invisible line endings alone. + golden.readText().replace("\r\n", "\n").trim(), actual.trim(), ) } @@ -211,6 +213,7 @@ class IndexableContentGoldenTest { 10100, 10154, 11871, + 11998, 12473, 15128, 15129, diff --git a/quartz/src/jvmTest/resources/indexable-content.golden b/quartz/src/jvmTest/resources/indexable-content.golden index 161a2acdf6..bc38d78371 100644 --- a/quartz/src/jvmTest/resources/indexable-content.golden +++ b/quartz/src/jvmTest/resources/indexable-content.golden @@ -52,6 +52,7 @@ 10100 10154 The Title\nThe Description 11871 The content body. +11998 12473 The Alt 15128 The Title\nThe Description 15129 The Title\nThe Description