test(mcp): prove tracedecay_search behavior - #1663
ScriptedAlchemy wants to merge 1 commit into
Conversation
Call the production MCP server the way a host does and assert the symbol the query names, the decoy it must not outrank, an unknown name, the markdown rendering, and a missing query. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
|
Closing as superseded. A sibling change proving the same tool landed first as #1664. Evidence from the triage: git log origin/master --diff-filter=A -- mcp_handler_test/search_behavior_test.rs => de3b561, carried by 829850a 'merge: PR #1664 test(mcp): prove tracedecay_search behavior'; same path added in both, 3 conflict hunks Reopen if the landed version misses an assertion this branch carries; name it and it can be ported as a small follow-up. |
Summary
tracedecay_searchthrough the production MCPtools/callpath, not a handler stub.apply_invoice_discountmust return that function ahead ofapply_invoice_discount_preview, with kindfunctionand pathsrc/billing.rs.queryis an invalid-params refusal.Motivation
The tool is the host entry point for symbol search. Existing suite coverage polls it for readiness and checks schema, but does not pin the ranked symbol a host actually observes.
Changes
crates/tracedecay/tests/mcp_suite/mcp_handler_test/search_behavior_test.rscalls the production server with one fixture and literal expectations for the hit, the decoy order, the miss, the default markdown rendering, and the missing-query error.Test plan
scripts/require-exact-test.sh cargo test -p tracedecay --features test-transport --test mcp_suite mcp_handler_test::search_behavior_test::exact_name_search_returns_that_function_and_rejects_a_missing_query -- --exactChecklist
CHANGELOG.mdupdated (under[Unreleased]if no version bump) — not applicable, test only.envfiles included