• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 22070059215

16 Feb 2026 04:14PM UTC coverage: 62.269% (+0.1%) from 62.17%
22070059215

push

github

web-flow
Add vector embedding support and hybrid search to ToolStore (#3808)

* Add vector embedding support and hybrid search to ToolStore

Extend the SQLite-backed ToolStore with optional embedding-based semantic
search. When an EmbeddingClient is provided, Search runs FTS5 and cosine
similarity in parallel via errgroup, merges and deduplicates results by
keeping the lower distance score, and caps output at 4 results.

Key additions:
- EmbeddingClient interface in internal/types (Embed, EmbedBatch, Dimension, Close)
- FakeEmbeddingClient using SHA-256 seeded RNG with L2-normalized vectors
- Pure Go cosine similarity/distance in internal/similarity package
- Binary encode/decode helpers for embedding BLOB storage
- normalizeBM25 rescaled to [0, 2) range to align with cosine distance
- Comprehensive unit tests, concurrency tests, and benchmarks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Added note about benchmarking

* Moved fake_embeddings, added more comments to search and changed entrypoint for embeddings

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

185 of 210 new or added lines in 5 files covered. (88.1%)

10 existing lines in 3 files now uncovered.

44789 of 71928 relevant lines covered (62.27%)

78.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.47
/pkg/secrets/keyring/keyctl_linux.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc