Add optimizer+circuit breaker acceptance test for vMCP#4052
Merged
aponcedeleonch merged 1 commit intomainfrom Mar 9, 2026
Merged
Add optimizer+circuit breaker acceptance test for vMCP#4052aponcedeleonch merged 1 commit intomainfrom
aponcedeleonch merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4052 +/- ##
==========================================
+ Coverage 68.63% 68.70% +0.07%
==========================================
Files 446 446
Lines 45424 45424
==========================================
+ Hits 31175 31207 +32
+ Misses 11840 11808 -32
Partials 2409 2409 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ad89819 to
a4c3b7d
Compare
Validates that unhealthy backends are excluded from the optimizer's find_tool results when the circuit breaker opens, and re-included after recovery. Tests the filterHealthyBackends() integration path end-to-end through the optimizer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a4c3b7d to
9999006
Compare
jerm-dro
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
find_toolresults when the circuit breaker opens, and re-included after recovery.VirtualMCPServer Optimizer with Circuit Breaker) that exercises thefilterHealthyBackends()integration path end-to-end through the optimizer, using two backends (yardstick forecho, gofetch forfetch), an EmbeddingServer, and a VirtualMCPServer with both optimizer and circuit breaker enabled.Closes #3760
Type of change
Test plan
task lint-fix)Verified the test compiles (
go build ./test/e2e/thv-operator/virtualmcp/...), passesgo vet, linting (task lint-fix), and SPDX license checks (task license-check). Full E2E execution requires a Kind cluster with the operator deployed (CI).Changes
test/e2e/thv-operator/virtualmcp/virtualmcp_optimizer_circuit_breaker_test.goDoes this introduce a user-facing change?
No
Special notes for reviewers
virtualmcp_circuit_breaker_test.go, optimizer helpers (callFindTool/getToolNames) fromvirtualmcp_optimizer_test.go, and shared CB constants.find_toolno longer returns tools prefixed with the unhealthy backend name — validating thefilterHealthyBackends()middleware filters backends before the optimizer indexes them.Generated with Claude Code