mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-06-11 00:09:28 +00:00
57e0db5b1e
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.
Hybrid Vector Storage
LEANN-inspired selective vector storage with hub detection and graph-based search.
Testing
macOS ARM64 Known Issue
Tests in this package currently fail to link on macOS ARM64 due to a known issue with sqlite-vec-go-bindings/cgo. This is a linking-time issue specific to macOS ARM64 and does not affect:
- Linux CI/CD (tests pass normally)
- Windows builds
- Runtime functionality (only affects test compilation)
The issue is caused by how macOS ARM64 handles CGO linking with multiple SQLite implementations (mattn/go-sqlite3 and sqlite-vec's embedded SQLite).
Workaround for local development:
- Run tests for other packages:
go test ./internal/db/... ./internal/search/... - The CI on Linux will test this package
- Or use a Linux container for local testing
Status: This does not affect production builds or CI/CD pipelines.
Architecture
This package implements three storage strategies:
- StorageAlways - Store all embeddings (backwards compatible)
- StorageHub - Store only frequently-accessed "hub" embeddings
- StorageOnDemand - Recompute all embeddings during search
See the main documentation for more details on the LEANN algorithm and hybrid storage approach.