fix: wire up silently-ignored search and trace parameters#155
Open
maplenk wants to merge 2 commits intoDeusData:mainfrom
Open
fix: wire up silently-ignored search and trace parameters#155maplenk wants to merge 2 commits intoDeusData:mainfrom
maplenk wants to merge 2 commits intoDeusData:mainfrom
Conversation
Author
|
These changes are based on other open PRs. Majorly #151 |
Five parameters were accepted by the MCP schema but never passed through
to the query layer — relationship, exclude_entry_points, include_connected
on search_graph, and edge_types on trace_call_path. This wires them up
with correct SQL, proper memory management, and defensive hardening.
search_graph:
- relationship: EXISTS filter on edges table (UNION index seeks)
- exclude_entry_points: filters nodes where in_deg=0 AND out_deg>0,
preserving dead code (degree=0) while removing true entry points
- include_connected: populates connected_names via post-query (capped
to 50 results, respects relationship edge type, excludes self-edges)
- Degree subqueries now use the relationship edge type when set and
exclude self-edges for correct recursive function classification
trace_call_path:
- edge_types extracted from JSON array instead of hardcoded {"CALLS"}
- Explicit empty array [] produces empty traversal (no fallback to CALLS)
while preserving response schema (empty callees/callers arrays emitted)
Hardening: relationship length capped to 64 chars, validated to safe chars
for SQL inlining, calloc for empty-array sentinel.
8 new integration tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1f86186 to
81718ac
Compare
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
Five parameters were accepted by the MCP tool schemas but never passed through to the query layer:
relationship,exclude_entry_points,include_connected— all defined incbm_search_params_tand the tool schema but never extracted or usededge_types— defined in the tool schema but hardcoded to{"CALLS"}This PR wires them up with correct SQL, proper memory management, and defensive hardening.
Changes
search_graph
in_deg=0 AND out_deg>0, preserving dead code (degree=0) while removing true entry pointsconnected_namesvia post-query (capped to 50 results, 10 connected names each, respects relationship edge type, excludes self-edges)trace_call_path
{"CALLS"}[]produces empty traversal (no fallback to CALLS) while preserving response schema (empty callees/callers arrays emitted)Test plan