Skip to content

test(mcp): prove tracedecay_search behavior - #1664

Merged
ScriptedAlchemy merged 4 commits into
masterfrom
cursor/prove-tracedecay-search-c75e
Sep 19, 2026
Merged

ScriptedAlchemy merged 4 commits into
masterfrom
cursor/prove-tracedecay-search-c75e

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Prove tracedecay_search through the production MCP server (tools/call), not a stubbed search executor.
  • Assert the literal symbol an agent opens (ledger_post_entry in src/ledger.rs), the freshness and coverage verdict, the lexical route disclosure, the markdown bullet, the empty page for a query that names nothing, the anchor that still ranks that symbol, and the typed refusal when query is missing.

Motivation

Existing search coverage either injects a fake executor or only checks that some name appears. Neither would fail if the tool stopped returning the symbol the caller asked for. This test calls the tool the way a host does and pins the payload that host observes.

Changes

  • crates/tracedecay/tests/mcp_suite/mcp_handler_test/search_behavior_test.rs — one behavior test for tracedecay_search only.

An exact identifier query is classified exact_message, not approximate. The markdown bullet repeats the three lexical routes once per matching chunk, which is the text the host receives.

Test plan

  • scripts/require-exact-test.sh cargo test -p tracedecay --features test-transport --locked --offline --test mcp_suite mcp_handler_test::search_behavior_test::search_returns_the_named_symbol_and_rejects_a_missing_query -- --exact --test-threads=1
    Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 350 filtered out
  • cargo nextest run --workspace --no-fail-fast is not the proof for this one-tool test
  • cargo clippy — left to CI
  • Tested by calling the production MCP server (tools/call) against a fixture that contains ledger_post_entry

Drafts run no CI job on this repo, so this PR is marked ready for review to collect checks. Do not merge from this update.

Checklist

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

@changeset-bot

changeset-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1959047

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

@cursor
cursor Bot force-pushed the cursor/prove-tracedecay-search-c75e branch from d2854e2 to a78a277 Compare September 18, 2026 08:37
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review September 18, 2026 09:27
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@ScriptedAlchemy ScriptedAlchemy added the ci-full label Sep 18, 2026 — with Cursor
cursoragent and others added 4 commits September 18, 2026 11:52
Call the production MCP server the way an agent does and assert the
symbol, routes, freshness, and missing-query refusal it returns.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The production tools/call classifies an exact symbol name as
exact_message, and the markdown bullet lists that class plus one
route disclosure per matching chunk.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The ready-for-review CI run was canceled while queued. No product or
test change.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Repository gates run cargo fmt on the whole workspace. These shared-lock
matches already fail that check on master.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/prove-tracedecay-search-c75e branch from 41a28db to 1959047 Compare September 18, 2026 11:53
@ScriptedAlchemy ScriptedAlchemy added the ci-full label Sep 18, 2026 — with Cursor
@ScriptedAlchemy
ScriptedAlchemy merged commit 829850a into master Sep 19, 2026
19 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants