Repository navigation
Conversation
Signed-off-by: Aleksandrov Nikita <aleksandrov.ni@icloud.com>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
Signed-off-by: Aleksandrov Nikita <aleksandrov.ni@icloud.com>
This branch has not been deployed
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.
What does this PR do?
Fixes #3015.
Accept
semantic_query: []as an unused optional parameter instead of rejecting a BM25 request. The same empty-array meaning applies to structural search and the empty-query fallback, so it cannot accidentally select semantic-only output.Nonempty semantic arrays still conflict with
query, including when semantic output is disabled with a limit. Malformed semantic inputs remain errors; no requested ranking mode is silently discarded.The conflict error now tells callers exactly how to recover:
The tool parameter description also documents empty-array acceptance and key omission for active semantic search.
Claude Code failure mode
The report records seven failed tool calls retaining
querytogether withsemantic_query: []before the user interrupted. The error was already markedisError: true; it explained the ranking modes without spelling out the concrete key-removal repair. This change removes that deterministic empty-placeholder trap and improves recovery for genuine conflicts. It does not claim to prevent every agent retry loop or identify which client/model layer supplied the placeholders.Verification
Reproduce-first: with only the regression tests applied to upstream
cdfdf264, the focused run reports 0 passed, 2 failed:isError: true.remove the semantic_query key.After the fix, the same focused ASan+UBSan run reports 2 passed, 0 failed.
The complete
mcp,mcp_mutation_guard, andclirun throughscripts/test.sh --suites "mcp mcp_mutation_guard cli"reports 878 passed, 1 failed, 5 platform skips under ASan+UBSan.mcp_metadata_byte_budget.5772a50shortens the description; the budget remains unchanged and its test now passes.cli_registry_installs_gitlab_and_devin_lifecycle_contextattests/test_cli.c:11583. It reportsplan=1 clean_plan=1 installed=0 cleaned=1 gitlab=1 devin=1 uninstall=0.cdfdf264'ssrc/mcp/mcp.csubstituted back into the otherwise unchanged production sources. Running only that CLI test yields the same failure and diagnostic (0 passed, 1 failed, 410 deselected). The baseline check does not run the modified MCP tests. No unrelated installer changes or test skips are included.Additional checks pass: production-file
clang-format --dry-run --Werror, formatting of changed test ranges,git diff --check, the no-skips policy, NOLINT whitelist, memory-core ratchet, vendored-scanner lint, and DCO verification.The new acceptance test compares responses with and without the empty array across BM25,
semantic_limit: 0, empty-query fallback, filtered structural, and unfiltered structural calls in both JSON and tree formats. The conflict test also checks actionable wording and rejection of malformed semantic values.Local CI lint is blocked by missing
cppcheckand pre-existing formatting drift in unchanged source (src/cypher/cypher.c:146, also reproduced fromHEAD). No unrelated formatting changes are included.Live Claude Code agent validation (2026-11-17)
Tested through a real Claude Code agent session and the MCP transport, not only the CLI or unit tests:
0.12.1+pr3016.5772a50, on macOS./mcpcommand.search_grapharguments, includingquery: "create_indexes",semantic_query: [],semantic_limit: 0, and the original optional filters. The call succeeded withsearch_mode: "bm25",total: 0, and no validation error. Zero matches is a valid search response, not a claim about index completeness.semantic_query: ["indexes"]alongsidequery, keepingsemantic_limit: 0. The server correctly rejected the conflict and returned the new error naming the keys to remove and sayingdo not retry unchanged arguments.This verifies both requested behaviors in a live agent session; it does not establish that all possible agent retry loops are prevented.
Checklist
Tested through a real Claude Code agent session over MCP
Every commit is signed off (
git commit -s) with the contributor's authorized DCO certificationFull test suite passes locally (MCP/mutation-guard/CLI suites run; one baseline CLI failure documented above)
Full CI lint passes locally (environment/baseline blockers described above)
New behavior has reproduce-first regression coverage
AI assistance was used to write this change; the contributor authorized the DCO sign-off.