fix: add SQLite driver import to hybrid tests for CGO linking

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.
This commit is contained in:
2026-01-07 21:57:57 +00:00
parent 712bf2bd2c
commit 57e0db5b1e
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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"
)
+1
View File
@@ -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