Skip to content

feat(mcp): add trace metadata to search and fetch responses (YEH-007)#12

Merged
rahulrajaram merged 3 commits into
masterfrom
feat/yeh-007-mcp-trace-metadata
Mar 28, 2026
Merged

feat(mcp): add trace metadata to search and fetch responses (YEH-007)#12
rahulrajaram merged 3 commits into
masterfrom
feat/yeh-007-mcp-trace-metadata

Conversation

@rahulrajaram
Copy link
Copy Markdown
Owner

Summary

  • Add McpTrace struct (trace_id, index_fingerprint, strategy, expansion_path) to every MCP search and fetch response for request-level traceability
  • Trace IDs use nanosecond timestamp + FNV hash for uniqueness; index fingerprints hash indexed_at + version + file count for determinism
  • Store index_fingerprint in artifacts so fetch inherits from search without re-loading the forward index
  • Update README contract docs, CHANGELOG, smoke test, and bump version to 0.8.0

Test plan

  • Unit tests for fingerprint determinism, variation, and trace ID format (test_compute_index_fingerprint_deterministic, test_compute_index_fingerprint_changes_with_index, test_generate_trace_id_format)
  • CLI integration tests assert trace fields in search and fetch responses
  • MCP server integration tests verify trace in stdio structured content
  • Smoke test script asserts trace_id, index_fingerprint, and strategy in both search and fetch output
  • cargo clippy -- -D warnings clean
  • All 137 tests pass

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.
@github-actions
Copy link
Copy Markdown

Commit squash-scope review

Range: origin/master..bd389206677ea4c99e01cf982647bf07a9d6f89e
Commits reviewed: 4

Heuristic candidates

No clear squash candidates found from overlap or message-prefix heuristics.

SQUASH_SCOPE_NEEDS_REWRITE=0

@rahulrajaram rahulrajaram merged commit 736d402 into master Mar 28, 2026
6 checks passed
@rahulrajaram rahulrajaram deleted the feat/yeh-007-mcp-trace-metadata branch March 28, 2026 02:18
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.

1 participant