Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
fix(mcp,test): trim search_codebase docstring and update concept key assertion (#1062)
Raghav Chamadiya7ce3f1b76836
diff --git a/packages/server/src/repowise/server/mcp_server/tool_search.py b/packages/server/src/repowise/server/mcp_server/tool_search.pyindex b63d3ecf0..5f7533fb4 100644--- a/packages/server/src/repowise/server/mcp_server/tool_search.py+++ b/packages/server/src/repowise/server/mcp_server/tool_search.py@@ -814,12 +814,10 @@ async def search_codebase(mode="auto" (default) routes the query: identifier-shaped queries searchthe indexed symbols (returns symbol_id/file/line bounds — pipe intoget_symbol), path-shaped queries resolve files (pipe into get_context),- and conceptual queries ("rate limiting", "where do we handle webhooks")- run wiki-semantic search. Mixed natural-language + identifier queries run- hybrid (symbol hits first, then concept pages). Concept results carry a- sources list ("fts", "vector", or both — a hit found by both retrievers- is a stronger match); decision records rank below file pages unless the- query is why-shaped.+ and conceptual queries run wiki-semantic search. Mixed queries run hybrid,+ symbol hits first. Concept hits carry a sources list (fts, vector, or+ both); decision records rank below file pages unless the query is+ why-shaped. See docs/agent/MCP_TOOLS.md for detail.Args:query: identifier, path, or natural-language query.diff --git a/tests/integration/test_wiki_idempotence.py b/tests/integration/test_wiki_idempotence.pyindex 824da6351..95b1950b7 100644--- a/tests/integration/test_wiki_idempotence.py+++ b/tests/integration/test_wiki_idempotence.py@@ -298,7 +298,10 @@ class TestStructuralKeys:continuemembers = page.metadata.get("file_paths") or []assert members, f"{page.page_id} recorded no members"- prefix = "module" if page.page_type == "module_page" else "scc"+ # module_page rows are minted by the concept tree, which keys them+ # on the "concept" prefix (STRUCTURAL_KEY_PREFIX); scc pages keep+ # their own prefix.+ prefix = "concept" if page.page_type == "module_page" else "scc"assert page.structural_key == member_structural_key(members, prefix=prefix)checked += 1assert checked, "sample repo produced no member-keyed pages"