Repository navigation
fix(evals): type the node-exists rows as ResultRow and type-check evals in CI - #3437
Conversation
This comment has been minimized.
This comment has been minimized.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Graph-node result construction and tests evals/cgr_graph.py, codebase_rag/tests/test_eval_graph_node_exists.py |
The existence case builds matching rows in a local list and returns at most one row. Tests cover a qualified name shared by two node labels and an unknown name. |
CI type-check coverage .github/workflows/ci.yml |
Both the standard and neo4j-extra type-check steps now include evals. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: claude
Merge Risk: 
Minimal · up to e750d
-
No actionable merge-blocking risk remains from the reviewed changes.
Pre-merge checks: 
4
-
Full details: Linked Issues check
-
Explanation
Issue
#3436requires fixing theinvalid-return-typediagnostic inevals/cgr_graph.pyand extending CI type checking toevals/. The PR annotates the local rows aslist[ResultRow]and preserves the existing filter and[:1]limit. Both CItysteps now checkcodebase_rag evals. The added tests cover a present qualified name and an unknown qualified name.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#3436. The CI updates prevent hook and CI type-checking drift. The tests exercise the changedCYPHER_GRAPH_NODE_EXISTSbehavior. No unrelated production behavior or unrelated files are changed.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
[Low impact] The PR appears safe to merge; no blocking issues were found. SummaryThe PR fixes the inferred row type without changing lookup results.
No actionable issues found. Tests and type checks were not run during this review. Reviews (1) · Last reviewed commit: "fix(evals): type the node-exists rows as..." · Reviewed by Greptile |
|



Summary
Closes #3436.
The
CYPHER_GRAPH_NODE_EXISTSbranch of_StatefulIngestor.fetch_allinevals/cgr_graph.pybuilds{cs.KEY_QUALIFIED_NAME: wanted}rows inline. ty infers those rows asdict[str, str]. Becausedictis invariant in its value type, that is not aResultRow, so the localtypre-commit hook failed on every commit. The rows are now annotatedlist[ResultRow]. The returned value is unchanged.CI's two
tysteps checked onlycodebase_rag, so the error never showed up there. Both now checkcodebase_rag evals.Tests
codebase_rag/tests/test_eval_graph_node_exists.pycovers the branch.test_mcp_input_bounds.pyandtest_gloss_tools.pydrive the unknown-target refusals, but both stayed green with araiseinside the branch, so neither reaches it.test_a_name_any_node_carries_is_found_as_one_row: a name carried by two nodes (a Function and a Method) comes back as exactly one row, andnode_existsreports it as present.test_an_unknown_name_is_not_found(negative): a name that no node carries returns no rows, andnode_existsreports it as absent.Both tests pass on the original code and on the annotated code. Each also fails under at least one mutation:
[:1]or returning[]fails the first.Verification
tycommand andty check codebase_rag evals --exclude codebase_rag/tests/each report 1 diagnostic, atevals/cgr_graph.py:1379.milvusextra installed, and withmilvusplusneo4j, which is CI's second step.Summary by CodeRabbit