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

stacklok / toolhive / 21977227571

13 Feb 2026 06:33AM UTC coverage: 62.044% (+0.09%) from 61.953%
21977227571

push

github

web-flow
Add SQLite FTS5-backed ToolStore for optimizer search (#3786)

* Add SQLite FTS5-backed ToolStore for optimizer search

Add an SQLite FTS5 ToolStore implementation as an alternative to the
existing InMemoryToolStore, and wire it into the vMCP server when
optimizer config is present.

This adds:
- pkg/vmcp/optimizer/fts5store: SQLiteToolStore implementation using
  modernc.org/sqlite (pure Go, no CGO) with FTS5 virtual tables
- BM25 ranking for search results with LIKE-based fallback
- FTS5 query sanitization for safe handling of special characters
- Thread-safe concurrent access with sync.RWMutex
- Close() method on the ToolStore interface for resource cleanup
- OptimizerStoreCloser on server.Config for store lifecycle management
- OptimizerConfig.FTSDBPath for configurable database location
  (defaults to in-memory, use emptyDir in Kubernetes)
- Wire FTS5 store into vMCP serve command when optimizer is configured
- Comprehensive tests for search, upsert, and concurrency scenarios

Part 2 of the optimizer FTS5 migration (issue #3731).

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

* review comments

---------

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

104 of 126 new or added lines in 5 files covered. (82.54%)

44224 of 71278 relevant lines covered (62.04%)

75.75 hits per line

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

80.41
/pkg/vmcp/optimizer/internal/sqlite_store/sqlite_store.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