test(search): name the in-brain swap-race tests after what they sample
CI / Lint / Test / Vet (pull_request) Successful in 56s
CI / Mirror to GitHub (pull_request) Skipped

Review of #172 (rule 9): "LeaksNothing" claims more than a 1.5s
sampled race can prove -- the same overclaim this PR removes from the
"Never" names. Renamed to DoesNotReturn...DuringASampledSwapRace,
and the brainfstest doc now says the target may be inside the brain
(#171) and that observation is over a sampled window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 07:19:27 +02:00
co-authored by Claude Opus 5.5
parent bf3646c0c7
commit a83f0cb381
2 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -184,7 +184,7 @@ func inBrainTarget(t *testing.T, brain string) string {
return brainfstest.WriteSentinelAt(t, filepath.Join(brain, "raw", "s.md"))
}
func TestQueryLeaksNothingFromAnInBrainTargetUnderASymlinkSwapRace(t *testing.T) {
func TestQueryDoesNotReturnAnInBrainSymlinkTargetDuringASampledSwapRace(t *testing.T) {
brain, facts, _ := searchBrain(t)
target := inBrainTarget(t, brain)
read := func() string {
@@ -200,7 +200,7 @@ func TestQueryLeaksNothingFromAnInBrainTargetUnderASymlinkSwapRace(t *testing.T)
assert.NotContains(t, read(), brainfstest.Sentinel, "static in-brain link")
}
func TestHydrateRefusesAnInBrainSymlinkAndLeaksNothingUnderASwapRace(t *testing.T) {
func TestHydrateRefusesAnInBrainSymlinkAndDoesNotReturnItsTargetDuringASampledSwapRace(t *testing.T) {
brain, facts, _ := searchBrain(t)
target := inBrainTarget(t, brain)
require.NoError(t, os.Symlink(filepath.Join("..", "..", "..", "raw", "s.md"), filepath.Join(facts, "inlink.md")))