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

stacklok / toolhive / 21817718197

09 Feb 2026 08:29AM UTC coverage: 61.091% (+0.06%) from 61.03%
21817718197

push

github

web-flow
Exclude unhealthy backends from vMCP capability aggregation (#3642)

* Exclude unhealthy backends from vMCP capability aggregation

Implement backend health filtering to prevent exposing tools from
unavailable backends when circuit breakers are open, addressing
issue #3036 acceptance criterion.

When backends become unhealthy (circuit breaker open, authentication
failures, unknown status), their tools are automatically excluded from
the aggregated capabilities returned to clients. When backends recover,
tools are automatically restored on the next session initialization.

Changes:
  - Add filterHealthyBackends() in discovery middleware to exclude
    unhealthy/unknown/unauthenticated backends from aggregation
  - Include healthy and degraded backends (operational but slow)
  - Move circuit breaker and health check validation from commands.go
    to pkg/vmcp/config/validator.go for better separation of concerns
  - Add comprehensive unit tests for backend filtering (8 test cases)
  - Add validation tests for failure handling config (11 test cases)
  - Update E2E circuit breaker test with capability filtering notes

Related-to: #3036

* reduce tests to avoid timeout

* changes from review

---------

Co-authored-by: taskbot <taskbot@users.noreply.github.com>

81 of 84 new or added lines in 4 files covered. (96.43%)

9 existing lines in 4 files now uncovered.

41767 of 68369 relevant lines covered (61.09%)

78.13 hits per line

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

79.05
/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