Skip to content

fix(tests): align mcp-harness expected error with #718 no-echo invariant - #1203

Merged
itomek-amd merged 1 commit into
mainfrom
fix/test-mcp-harness-error-message-1201
May 21, 2026
Merged

itomek-amd merged 1 commit into
mainfrom
fix/test-mcp-harness-error-message-1201

Conversation

@itomek

@itomek itomek commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Build Installers on the merged v0.19.0 release commit fails on both ubuntu-latest and windows-latest legs of the Custom agent MCP harness matrix because tests/installer/test_custom_agent_mcp_harness.py:199 still encodes the pre-#718 error wording. PR #718 deliberately replaced "Tool '<name>' not found" with the generic "Unknown tool name. Use only tools listed in your AVAILABLE TOOLS section." to prevent small models from interpreting the echoed bad name as self-confirmation and looping on it — that's the "no-echo invariant on the candidate-list message" called out in v0.19.0's release notes. The test from #1069 missed the migration.

This is a one-line test update to the second assertion in test_custom_agent_with_mcp_reports_diagnosable_connection_failure. The test's "diagnosable connection failure" intent is preserved by the first assertion in the same function, which still verifies get_mcp_status_report() surfaces the transport-level error ("MCP server process died (exit code: 17)") — that's the actual user-facing diagnostic for a dead MCP server.

This unblocks the v0.19.0 release (#1201) — pre-tag verification requires a green Build Installers run on the merged commit, which currently fails because of this single assertion.

Test plan

  • python -m pytest tests/installer/test_custom_agent_mcp_harness.py -xvs — 3/3 pass locally
  • Lint: change is a string-literal update; no formatter impact
  • Build Installers run on this branch goes green

PR #718 deliberately changed the unknown-tool error to a generic
"Unknown tool name. Use only tools listed in your AVAILABLE TOOLS section."
to prevent small models from interpreting an echoed bad name as
self-confirmation that the name was correct. The custom-agent MCP
harness test landed in #1069 still encoded the old "Tool 'X' not found"
wording, so Build Installers fails on both ubuntu-latest and
windows-latest matrix legs against the merged v0.19.0 release commit.

This is a one-line test update to match the framework's intentional
new behaviour. The test's "diagnosable connection failure" intent is
preserved by the first assertion in the same function, which still
verifies get_mcp_status_report() surfaces the transport-level error
("MCP server process died (exit code: 17)").
@itomek
itomek requested a review from kovtcharov-amd as a code owner May 21, 2026 20:44
@github-actions github-actions Bot added the tests Test changes label May 21, 2026
@itomek-amd
itomek-amd added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 0a074f1 May 21, 2026
24 checks passed
@itomek-amd
itomek-amd deleted the fix/test-mcp-harness-error-message-1201 branch May 21, 2026 20:51
@itomek itomek self-assigned this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants