From 1cf05fdf15de39503fb62a8464281ff8da94bf2e Mon Sep 17 00:00:00 2001 From: Mathias Date: Mon, 5 Oct 2026 16:20:41 +0200 Subject: [PATCH] test(search): in-brain Query race queries the inside note too After main's #177 floor (AssertNoLeakFrom needs at least one read that returns the inside note), this test went red on merge: the reader queried only the sentinel, so the regular note could never be a hit and the race had been passing vacuously. Query both terms. Co-Authored-By: Claude Opus 5.5 --- ingestion/internal/search/brainroot_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ingestion/internal/search/brainroot_test.go b/ingestion/internal/search/brainroot_test.go index f9253e5..a94a4a9 100644 --- a/ingestion/internal/search/brainroot_test.go +++ b/ingestion/internal/search/brainroot_test.go @@ -205,7 +205,9 @@ func TestQueryDoesNotReturnAnInBrainSymlinkTargetDuringASampledSwapRace(t *testi brain, facts, _ := searchBrain(t) target := inBrainTarget(t, brain) read := func() string { - rs, _ := Query(brain, QueryOptions{Query: brainfstest.Sentinel, Limit: 10}) + // Both terms, so the regular note is a possible hit: a reader that + // never returns the inside note would pass vacuously (#177 floor). + rs, _ := Query(brain, QueryOptions{Query: brainfstest.Sentinel + " zqinside", Limit: 10}) s := "" for _, r := range rs { s += r.Title + r.Excerpt