feat(mcp): add trace metadata to search and fetch responses (YEH-007)#12
Merged
Conversation
Add McpTrace struct with trace_id, index_fingerprint, strategy, and expansion_path to every MCP response. Trace IDs use nanosecond timestamp + FNV for uniqueness; index fingerprints hash indexed_at, version, and file count for determinism. Stored in artifacts so fetch inherits the fingerprint from search.
Commit squash-scope reviewRange: Heuristic candidatesNo clear squash candidates found from overlap or message-prefix heuristics. SQUASH_SCOPE_NEEDS_REWRITE=0 |
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
McpTracestruct (trace_id,index_fingerprint,strategy,expansion_path) to every MCP search and fetch response for request-level traceabilityindexed_at+version+ file count for determinismindex_fingerprintin artifacts so fetch inherits from search without re-loading the forward indexTest plan
test_compute_index_fingerprint_deterministic,test_compute_index_fingerprint_changes_with_index,test_generate_trace_id_format)tracefields in search and fetch responsestracein stdio structured contenttrace_id,index_fingerprint, andstrategyin both search and fetch outputcargo clippy -- -D warningsclean