test(neo4j): add integration tests for semantic vector search#2902
test(neo4j): add integration tests for semantic vector search#2902duwenxin99 wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
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.
| semanticInsertWant := `[{"result":1}]` | ||
| semanticSearchWant := `[{"content":"The quick brown fox jumps over the lazy dog"}]` | ||
| tests.RunSemanticSearchToolInvokeTest(t, semanticInsertWant, semanticInsertWant, semanticSearchWant) |
There was a problem hiding this comment.
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
- When using configuration values or standards like MCP semantic conventions, comments should cite and link to the specific standard to avoid confusion.
No description provided.