Skip to content

fix(mcp): return semantic-only graph results as primary#938

Open
SyntaxSawdust wants to merge 1 commit into
DeusData:mainfrom
SyntaxSawdust:codex/issue-915-semantic-query-ranking
Open

fix(mcp): return semantic-only graph results as primary#938
SyntaxSawdust wants to merge 1 commit into
DeusData:mainfrom
SyntaxSawdust:codex/issue-915-semantic-query-ranking

Conversation

@SyntaxSawdust

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #915.

search_graph now returns vector-ranked semantic hits in the primary results array for semantic-only semantic_query calls, instead of returning broad structural results that can make vector-less nodes appear to win the ranking.

Combined structural + semantic calls still expose semantic_results, and non-array semantic_query values still return the existing validation error. The vector search path now also reports a full semantic candidate count so total and has_more stay meaningful with limit/offset pagination.

Local full-suite caveat: make -f Makefile.cbm test is not green in this environment, but the failing graph-contract/probe slice reproduces on a clean upstream/main worktree, so it is not introduced by this patch. Focused MCP proof and lint-ci are green.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects
    unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
@SyntaxSawdust SyntaxSawdust marked this pull request as ready for review July 7, 2026 17:59
@SyntaxSawdust SyntaxSawdust requested a review from DeusData as a code owner July 7, 2026 17:59
@DeusData DeusData added bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Jul 7, 2026
@DeusData

DeusData commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Thanks for the semantic_query fix for #915. Triage: high-priority query correctness bug.

Review should verify semantic-only calls put vector-ranked hits in the primary results array, combined structural+semantic behavior stays compatible, and total/has_more report the semantic candidate set rather than the broad structural fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

semantic_query returns identical (alphabetical) results for any query — vector-less nodes win the ranking

2 participants