Skip to content

test(mcp): add regression tests for tool-level error breaker fix - #74770

Closed
x7peeps wants to merge 1 commit into
NousResearch:mainfrom
x7peeps:optimize-74606-mcp-breaker
Closed

test(mcp): add regression tests for tool-level error breaker fix#74770
x7peeps wants to merge 1 commit into
NousResearch:mainfrom
x7peeps:optimize-74606-mcp-breaker

Conversation

@x7peeps

@x7peeps x7peeps commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Extends PR #74606 with additional regression tests for the MCP circuit breaker fix:

  • test_mixed_success_and_tool_errors_reset_breaker: Alternating isError/success sequences exercise the reset-every-result path
  • test_tool_errors_do_not_count_toward_breaker_threshold: THRESHOLD tool-level errors followed by THRESHOLD transport exceptions exercise the boundary between error classes
  • test_session_recovers_after_isError_then_transport_failure: Dead-session probe + manual reset verifies post-fix state machine works correctly
  • test_tool_errors_after_transport_recovery_keep_breaker_closed: Many isError results after breaker recovery must not re-open it

Verification: 41 passed across circuit breaker and failure classification tests.

- test_tool_level_errors_do_not_trip_server_breaker (original PR test)
- test_mixed_success_and_tool_errors_reset_breaker: alternating
  isError/success sequences exercise the reset-on-every-result path
- test_tool_errors_do_not_count_toward_breaker_threshold: THRESHOLD
  tool-level errors followed by THRESHOLD transport exceptions exercise
  the boundary between the two error classes
- test_session_recovers_after_isError_then_transport_failure: dead
  session probe + manual reset verifies post-fix state machine works
- test_tool_errors_after_transport_recovery_keep_breaker_closed:
  many isError results after breaker recovery must not re-open it

All 12 circuit breaker tests + 41 total in the MCP test suite pass.
@alt-glitch alt-glitch added type/bug Something isn't working tool/mcp MCP client and OAuth P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 30, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of the #74045 / #74606 / #61555 family: the tools/mcp_tool.py change is byte-identical to #74606, which is already flagged as a duplicate of #74045. These added regressions are a superset of #74606's tests; #74045 remains the more complete repair with auth/session recovery.

@x7peeps x7peeps closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists tool/mcp MCP client and OAuth type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants