Commit 3f229a2
docs(tests): correct the e2e expected-failure helper guidance
tests/AGENTS.md told tests expecting a tool failure to use
safe_call_tool() directly. The harness disagrees: MCPAssertions
.call_tool_failure() is used at 61 call sites across 13 e2e files and
does strictly more -- it catches the ToolError, asserts the call
actually failed rather than silently succeeding, and matches
expected_error against the extracted message.
safe_call_tool() swallows ToolError and returns a parsed dict, so using
it for an expected failure leaves nothing verifying the call failed. Its
real roles are finally-block cleanup and availability probing, which the
entry now says.
CodeRabbit cites the old line as a coding-guidelines violation whenever
call_tool_failure appears, most recently on #2246.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015c4gkE9mcKu4RiuQzR5eff1 parent 45824cd commit 3f229a2
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
0 commit comments