test(mcp): prove tracedecay_lcm_expand_query behavior - #1639
Merged
Merged
Conversation
|
Call the MCP tool with two stored sessions and assert the literal match, cross-session miss, and invalid-request payloads. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The MCP payload serializes absent node, source, and store identity as null. The literal expected hit must include those fields. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/prove-lcm-expand-query-937b
branch
from
September 18, 2026 08:14
7d83ac0 to
050387d
Compare
A stored hit is partial because the matched record's coverage is unknown. A cross-session miss is the literal no-match with zero coverage. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
ScriptedAlchemy
marked this pull request as ready for review
September 18, 2026 09:00
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The ready-for-review run was cancelled before any job started. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
A hit omits the unknown-coverage record; a miss omits nothing. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tracedecay_lcm_expand_querythrough MCPtools/callon an in-processMcpServer, the same handler a host calls.status: partialwithomitted: 1because the matched record's coverage is unknown, not a clean success.status: ok, and zero coverage.Motivation
The tool needed a caller-visible proof: one concrete input, the MCP
tools/callpath, and a literal payload. Existing expand-query tests mostly assert presence, containment, or internal runtime helpers.Changes
crates/tracedecay/tests/mcp_suite/mcp_handler_test/expand_query_behavior.rsdrivestracedecay_lcm_expand_queryon two seeded sessions and compares the stable payload to literal JSON. Anchor ids and the authorized store path are removed because they are process-local identity; coverage stays in the comparison.Test plan
scripts/require-exact-test.sh cargo test -p tracedecay --features test-transport --test mcp_suite mcp_handler_test::expand_query_behavior::lcm_expand_query_returns_the_asked_session_or_the_literal_miss -- --exact(1 passed)The manual proof is the MCP server call inside the test above:
tools/callontracedecay_lcm_expand_queryagainst an in-processMcpServer.Checklist
.envfiles includedCHANGELOG.mdupdated (under[Unreleased]if no version bump)