Repository navigation
fix: classify move, and stop kwonly params suppressing TOO_MANY - #2109
Conversation
Two failures on #2074, unrelated to each other. `test_every_graph_reader_is_guarded` named `move`. The enum member lands on this layer ahead of its MCP handler, so nothing dispatches it and it reads nothing yet. Classified as a non-reader beside RENAME and CHANGE_SIGNATURE, which e5e9f1c settled: these are graph-driven EDITS that run their own re-ingest behind the incomplete-run marker, so refusing up front on a partial graph would block the operation that repairs it. When the handler lands it routes through `_graph_query` and must move to `_READS_THE_GRAPH`, or the dispatcher skips its refusal. `test_extra_positional_to_a_keyword_only_callee_is_too_many`: the too-many-positionals suppressor counted `kwonlyargs`. Keyword-only parameters absorb no surplus positional -- CPython raises TypeError -- so a real verdict was dropped. Same fix as #2107, which carries the full reasoning; the oracle here restated the buggy expression too, so it is replaced with one that decides by calling the function.
|
@greptileai review |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: vitali87/code-graph-rag/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No blocking issues remain; only minor documentation and dead-code cleanup nits were identified.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Fixes MOVE tool classification and prevents keyword-only parameters from suppressing TOO_MANY arity findings.
Changes:
- Classifies
MOVEas a non-graph reader. - Restricts variadic detection to
*args. - Adds runtime-backed regression tests.
| File | Changes |
|---|---|
codebase_rag/tests/test_variadic_header_detection.py |
Adds runtime oracle and keyword-only regression tests. |
codebase_rag/structural_delta.py |
Corrects variadic header detection. |
codebase_rag/mcp/tools.py |
Classifies MOVE as a non-reader. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Co-authored-by: vitali87 <22404335+vitali87@users.noreply.github.com>
Co-authored-by: vitali87 <22404335+vitali87@users.noreply.github.com>
36a2b10
into
pr-split/split-pr1549-source/pr-6

Two unrelated failures on #2074.
1.
moveread as an unguarded reader_NOT_GRAPH_READERSis deliberately fail-closed: a tool counts as a readeruntil classified. The
MOVEenum member lands on this layer ahead of its MCPhandler, so nothing dispatches it and it reads nothing yet.
Classified as a non-reader beside
RENAMEandCHANGE_SIGNATURE, pere5e9f1c1: these are graph-driven edits that run their own re-ingestbehind the incomplete-run marker and hold the result to the postcondition
contract, so refusing up front on a partial graph would block the operation
that repairs it.
The comment records what must happen next: when the handler lands it routes
through
_graph_queryand must move to_READS_THE_GRAPH, or thedispatcher's
if tool in _READS_THE_GRAPHsilently skips its refusal.2. Keyword-only params suppressed a real TOO_MANY verdict
test_extra_positional_to_a_keyword_only_callee_is_too_manyis red here forthe same reason as on the 1550 stack. The suppressor counted
kwonlyargs,but keyword-only parameters absorb no surplus positional:
#2107 carries the full reasoning. The oracle on this branch restated the
buggy expression as well, so it is replaced with one that decides by
calling the function with one surplus positional.
Verification
283 passed, 2 skippedacrosstest_mcp_project_scoping.py,test_structural_delta.pyandtest_variadic_header_detection.py.