Repository navigation
Conversation
|
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 |
|
| values: dict[int, tuple[str, bool]] = {} | ||
| for index, node in enumerate(positional): |
There was a problem hiding this comment.
For a C# call such as F(b: 2, a: 1), the argument splitter discards b and a and this code enumerates the remaining values as positional arguments. A rewrite can therefore emit F(2, 1), changing the original bindings from a=1, b=2 to a=2, b=1. Preserve C# argument labels through mapping, or refuse rewrites that cannot retain their bindings.
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A critical missing-module import and multiple argument-mapping defects must be addressed.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (4)
What changed in this PR
Adds call-site lookup and argument-remapping helpers for change_signature, covering positional, keyword, splat, and surplus arguments.
Changes:
- Locates calls using recorded source spans.
- Maps arguments and reports unmappable cases.
| File | Summary |
|---|---|
codebase_rag/editing/signature_calls.py |
Adds call lookup and argument-mapping logic; unresolved import and several mapping issues remain. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| from .. import graph_query | ||
| from ..parsers.call_processor import _find_call_arguments_node, _split_call_arguments | ||
| from ..types_defs import ResultRow | ||
| from .signature_params import _text |
| A keyword naming a keyword-only parameter is not part of the positional | ||
| mapping and is carried through exactly as written. | ||
| """ | ||
| positional, keyword = _split_call_arguments(args_node) |
| if name not in old_names: | ||
| return cs.SIGNATURE_UNKNOWN_KEYWORD.format(name=name) | ||
| values[old_names.index(name)] = (_text(node), True) | ||
| keywords_ok = language == cs.SupportedLanguage.PYTHON |
| if spec.from_index is not None: | ||
| found = values.pop(spec.from_index, None) |


Call-site lookup and argument mapping helpers for positional, keyword, splat, and surplus cases.
Files changed
codebase_rag/editing/signature_calls.pyDiff stats
+136 additions, -0 deletions (136 LOC)
Dependencies
This PR depends on:
pr-1Dependency graph
Merge in this order: