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

stacklok / toolhive / 21917035694

11 Feb 2026 06:06PM UTC coverage: 61.667% (+0.01%) from 61.653%
21917035694

push

github

web-flow
Add ToolStore interface and refactor DummyOptimizer to use it (#3749)

* Add ToolStore interface and refactor DummyOptimizer to use it

Introduce a ToolStore abstraction that separates tool storage and search
from the Optimizer interface. This lays the foundation for replacing the
in-memory substring matching with a SQLite FTS5 backend in a follow-up PR.

Changes:
- Add ToolStore interface (UpsertTools, Search, Close) in store.go
- Add InMemoryToolStore implementation preserving existing behavior
- Add Close() method to Optimizer interface for lifecycle management
- Refactor DummyOptimizer to delegate search to a shared ToolStore with
  per-instance scope filtering
- Update OptimizerFactory signature to return (Optimizer, error)
- Track session optimizers in Server for cleanup on shutdown
- Update commands.go wiring to create shared InMemoryToolStore
- Add comprehensive tests for InMemoryToolStore

Part of #3731

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

* Address first review comments

* Simiply DummyOptimizer struct

* Added a vMCP yaml with an example

* Address review about context

---------

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

67 of 82 new or added lines in 4 files covered. (81.71%)

8 existing lines in 4 files now uncovered.

43097 of 69887 relevant lines covered (61.67%)

76.45 hits per line

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

79.58
/pkg/transport/proxy/httpsse/http_proxy.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