From e2ab727a2c865cca0c1ccdf5a5f558bab599a513 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Mon, 22 Dec 2025 20:21:27 -0800 Subject: [PATCH] fix(doctor): use context.Background() instead of nil in CheckDuplicateIssues The nil context caused a panic during store.Close() in tests. Passing context.Background() fixes the test timeout issue. --- cmd/bd/doctor/validation.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/bd/doctor/validation.go b/cmd/bd/doctor/validation.go index 512586d8..861d6094 100644 --- a/cmd/bd/doctor/validation.go +++ b/cmd/bd/doctor/validation.go @@ -3,6 +3,7 @@ package doctor import ( "bufio" "bytes" + "context" "fmt" "os" "path/filepath" @@ -191,7 +192,8 @@ func CheckDuplicateIssues(path string) DoctorCheck { } // Open store to use existing duplicate detection - store, err := sqlite.New(nil, dbPath) + ctx := context.Background() + store, err := sqlite.New(ctx, dbPath) if err != nil { return DoctorCheck{ Name: "Duplicate Issues", @@ -201,7 +203,7 @@ func CheckDuplicateIssues(path string) DoctorCheck { } defer func() { _ = store.Close() }() - issues, err := store.SearchIssues(nil, "", types.IssueFilter{}) + issues, err := store.SearchIssues(ctx, "", types.IssueFilter{}) if err != nil { return DoctorCheck{ Name: "Duplicate Issues",