fix: pin kind 11998 in the indexable-content golden and make it CRLF-proof

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 <not searchable> 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.
This commit is contained in:
Dr. Tobias Baur
2026-09-10 16:40:06 +02:00
parent f8040e5962
commit e19fce0ed2
3 changed files with 9 additions and 1 deletions
+4
View File
@@ -2,3 +2,7 @@
# binary so git never applies CRLF/text normalization or textual diff/merge, which # binary so git never applies CRLF/text normalization or textual diff/merge, which
# would corrupt the compressed stream (important on Windows checkouts). # would corrupt the compressed stream (important on Windows checkouts).
*.gz binary *.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
@@ -107,7 +107,9 @@ class IndexableContentGoldenTest {
"a kind's indexed text changed. If deliberate: rerun with -Dgolden=write, update " + "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 " + "references/searchable-kinds.md in the same commit, and schedule a reindex " +
"(IEventStore.reindexFullTextSearch) — existing databases keep their old text.", "(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(), actual.trim(),
) )
} }
@@ -211,6 +213,7 @@ class IndexableContentGoldenTest {
10100, 10100,
10154, 10154,
11871, 11871,
11998,
12473, 12473,
15128, 15128,
15129, 15129,
@@ -52,6 +52,7 @@
10100 10100
10154 The Title\nThe Description 10154 The Title\nThe Description
11871 The content body. 11871 The content body.
11998 <not searchable>
12473 The Alt 12473 The Alt
15128 The Title\nThe Description 15128 The Title\nThe Description
15129 The Title\nThe Description 15129 The Title\nThe Description