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 <noreply@anthropic.com>
This commit is contained in:
@@ -205,7 +205,9 @@ func TestQueryDoesNotReturnAnInBrainSymlinkTargetDuringASampledSwapRace(t *testi
|
|||||||
brain, facts, _ := searchBrain(t)
|
brain, facts, _ := searchBrain(t)
|
||||||
target := inBrainTarget(t, brain)
|
target := inBrainTarget(t, brain)
|
||||||
read := func() string {
|
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 := ""
|
s := ""
|
||||||
for _, r := range rs {
|
for _, r := range rs {
|
||||||
s += r.Title + r.Excerpt
|
s += r.Title + r.Excerpt
|
||||||
|
|||||||
Reference in New Issue
Block a user