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 |
|
| if properties: | ||
| self.edge_props[edge] = dict(properties) | ||
| sites = self.edge_sites.setdefault(edge, []) | ||
| if dict(properties) not in sites: | ||
| sites.append(dict(properties)) | ||
|
|
||
| def sites_of(self, edge: _RelTuple) -> list[PropertyDict]: | ||
| """Every site of an edge (one empty record for a site-less edge).""" | ||
| return self.edge_sites.get(edge) or [self.edge_props.get(edge, {})] |
There was a problem hiding this comment.
Preserve site-less relationships
When the same source, type, and target are recorded first with site properties and then without them, this code retains only the property-bearing site. sites_of() consequently returns fewer relationship rows than the graph would expose, so tests using this fixture can miss behavior involving imports that have both site-bearing and site-less relationships. This is non-blocking for merge, but store an empty site for propertyless insertions to keep the fixture faithful.
Knowledge Base Used: Models and Schemas
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Artifacts
- A narrow Python harness loads the exact checked-out stateful ingestor class and inserts matching property-bearing and propertyless CALLS relationships, ending with the reproducible assertion.
- The executed baseline adds only the property-bearing CALLS relationship and shows one stored site, establishing the expected starting state.
- The executed paired run adds a propertyless relationship after the property-bearing one and reports confirmed because sites_of omits the empty site.
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
Five unresolved moderate findings affect module-root queries and per-site edge fidelity.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds module-level import-site querying and per-site relationship handling for move refactoring.
Changes:
- Adds
CYPHER_GRAPH_IMPORTS_OF. - Preserves per-site edge properties in the stateful evaluator.
- Updates signature-change tests for stored call sites.
| File | Review summary |
|---|---|
evals/cgr_graph.py |
Adds per-site tracking and query support. Four moderate findings: missing Module/project filtering (1 vote), incorrect merge-key deduplication (3 votes), incomplete inbound-site capture (2 votes), and omitted site-less relationships (1 vote). |
codebase_rag/tests/test_change_signature.py |
Updates heuristic-site handling. |
codebase_rag/cypher_queries.py |
Adds the import-site query. One moderate finding (1 vote): root-module matching must include the exact project name. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Every distinct site of an endpoint pair (issue #1522): the real | ||
| # store keeps one edge per site; `edge_props` keeps the last one | ||
| # for the callers that only need the pair. | ||
| self.edge_sites: dict[_RelTuple, list[PropertyDict]] = {} |
| sites = self.edge_sites.setdefault(edge, []) | ||
| if dict(properties) not in sites: | ||
| sites.append(dict(properties)) |
|
Closing as superseded: this is part of the split of #1549, which was closed without merging, and it targets the stale Generated by Claude Code |

Query imports by module and make the stateful test ingestor preserve per-site edge properties.
Files changed
codebase_rag/cypher_queries.pyevals/cgr_graph.pycodebase_rag/tests/test_change_signature.pyDiff stats
+65 additions, -33 deletions (98 LOC)
Dependencies
This PR depends on:
pr-1Dependency graph
Merge in this order: