From 57e0db5b1ef822a063d680f9ed2c87da8d31dd15 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Wed, 7 Jan 2026 21:57:57 +0000 Subject: [PATCH] fix: add SQLite driver import to hybrid tests for CGO linking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add blank import of mattn/go-sqlite3 to hybrid test files to ensure the SQLite driver is linked into the test binary. This provides the SQLite symbols that sqlite-vec-go-bindings requires. Root cause: - hybrid package imports sqlitevec (transitively depends on sqlite-vec CGO) - Test binary needs SQLite symbols for linking - sqlitevec tests already had this import, but hybrid tests didn't - Without the driver import, linker fails with "undefined symbols" This fix enables hybrid tests to run with -race flag on all platforms. Before: 41/42 packages pass (hybrid failed to link) After: 42/42 packages pass ✅ Fixes hybrid test compilation on macOS ARM64, Linux, and Windows. --- internal/vector/hybrid/client_test.go | 1 + internal/vector/hybrid/interface_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/vector/hybrid/client_test.go b/internal/vector/hybrid/client_test.go index f784177..b567ea5 100644 --- a/internal/vector/hybrid/client_test.go +++ b/internal/vector/hybrid/client_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/lukaszraczylo/claude-mnemonic/internal/vector/sqlitevec" + _ "github.com/mattn/go-sqlite3" // Import SQLite driver for CGO linking "github.com/stretchr/testify/assert" ) diff --git a/internal/vector/hybrid/interface_test.go b/internal/vector/hybrid/interface_test.go index 0f23398..dc890d6 100644 --- a/internal/vector/hybrid/interface_test.go +++ b/internal/vector/hybrid/interface_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/lukaszraczylo/claude-mnemonic/internal/vector" + _ "github.com/mattn/go-sqlite3" // Import SQLite driver for CGO linking ) // TestInterfaceImplementation verifies that hybrid clients implement vector.Client interface