Skip to content

test(neo4j): add integration tests for semantic vector search#2902

Open
duwenxin99 wants to merge 1 commit intomainfrom
feat/neo4j-semantic-search
Open

test(neo4j): add integration tests for semantic vector search#2902
duwenxin99 wants to merge 1 commit intomainfrom
feat/neo4j-semantic-search

Conversation

@duwenxin99
Copy link
Copy Markdown
Contributor

No description provided.

@duwenxin99 duwenxin99 requested a review from a team as a code owner March 30, 2026 18:27
@duwenxin99 duwenxin99 changed the title feat(neo4j): add integration tests for semantic vector search test(neo4j): add integration tests for semantic vector search Mar 30, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds an API_KEY to the CI secret environment and introduces semantic search integration tests for Neo4j, including Cypher statements for document insertion and similarity searching. A review comment points out a likely copy-paste error in the semantic search test invocation, noting that the function arguments are duplicated and missing the required JSON-RPC formatted responses for the Model Context Protocol (MCP) validation.

Comment on lines +595 to +597
semanticInsertWant := `[{"result":1}]`
semanticSearchWant := `[{"content":"The quick brown fox jumps over the lazy dog"}]`
tests.RunSemanticSearchToolInvokeTest(t, semanticInsertWant, semanticInsertWant, semanticSearchWant)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The arguments to 'RunSemanticSearchToolInvokeTest' appear to be incorrect. The second argument is a duplicate of the first, which is likely a copy-paste error. Based on the testing patterns in this repository, this function probably expects separate 'want' strings for the direct API call and the MCP (Model Context Protocol) call. Per the project's standard for MCP semantic conventions (https://modelcontextprotocol.io/docs/concepts/resources), the MCP 'want' string should be a JSON-RPC formatted response. The test also appears to be missing the MCP 'want' string for the search operation.

	semanticInsertWant := "[{\"result\":1}]"
	semanticInsertMCPWant := "{\"jsonrpc\":\"2.0\",\"id\":\"invoke-semantic-search-insert-tool\",\"result\":{\"content\":[{\"type\":\"text\",\"text\":\"{\\\"result\\\":1}\"}]}}"
	semanticSearchWant := "[{\"content\":\"The quick brown fox jumps over the lazy dog\"}]"
	semanticSearchMCPWant := "{\"jsonrpc\":\"2.0\",\"id\":\"invoke-semantic-search-query-tool\",\"result\":{\"content\":[{\"type\":\"text\",\"text\":\"{\\\"content\\\":\\\"The quick brown fox jumps over the lazy dog\\\"}\"}]}}"
	tests.RunSemanticSearchToolInvokeTest(t, semanticInsertWant, semanticInsertMCPWant, semanticSearchWant, semanticSearchMCPWant)
References
  1. When using configuration values or standards like MCP semantic conventions, comments should cite and link to the specific standard to avoid confusion.

@duwenxin99 duwenxin99 mentioned this pull request Mar 30, 2026
1 task
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.

2 participants