Skip to content

test(mcp): prove tracedecay_search behavior - #1663

Closed
ScriptedAlchemy wants to merge 1 commit into
masterfrom
cursor/prove-tracedecay-search-6e07
Closed

ScriptedAlchemy wants to merge 1 commit into
masterfrom
cursor/prove-tracedecay-search-6e07

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Proves tracedecay_search through the production MCP tools/call path, not a handler stub.
  • A query for apply_invoice_discount must return that function ahead of apply_invoice_discount_preview, with kind function and path src/billing.rs.
  • An unknown name returns no symbols while coverage stays complete, and a call without query is 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.rs calls 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 -- --exact
  • Full workspace suite not run; this change is one MCP behavior test.

Checklist

  • CHANGELOG.md updated (under [Unreleased] if no version bump) — not applicable, test only
  • No secrets, credentials, or .env files included
  • Breaking changes documented (if any) — none
Open in Web Open in Cursor 

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>
@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3c45f36

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants