Skip to content

restrict diff field summaries to the single diff being queried - #10054

Merged
ogenstad merged 1 commit into
stablefrom
ajtm-07272026-diff-summary-fix
Jul 28, 2026
Merged

restrict diff field summaries to the single diff being queried#10054
ogenstad merged 1 commit into
stablefrom
ajtm-07272026-diff-summary-fix

Conversation

@ajtmccarty

@ajtmccarty ajtmccarty commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

update the cypher query for get_node_field_summaries() to only check objects that are part of the diff instead of erroneously including objects with the same UUID from different diffs

Review in cubic

update the cypher query for get_node_field_summaries() to only check
objects that are part of the diff instead of erroneously including
objects with the same UUID from different diffs
@ajtmccarty
ajtmccarty requested a review from a team as a code owner July 27, 2026 21:17
@github-actions github-actions Bot added the group/backend Issue related to the backend (API Server, Git Agent) label Jul 27, 2026
retrieved_map = {summary.kind: summary for summary in retrieved_node_field_summaries}
assert expected_map == retrieved_map

async def test_get_node_field_summaries_excludes_other_diffs(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual new test

WITH DISTINCT n.kind AS kind
CALL (kind) {
OPTIONAL MATCH (n:DiffNode {kind: kind})-[:DIFF_HAS_ATTRIBUTE]->(a:DiffAttribute)
WITH DISTINCT diff_root, n.kind AS kind

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you can see, we were not passing the diff_root into the subquery to anchor it to the correct diff

@codspeed-hq

codspeed-hq Bot commented Jul 27, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing ajtm-07272026-diff-summary-fix (4933a7b) with stable (0ad9131)

Open in CodSpeed

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. This is a focused bug fix that restricts Cypher subqueries to the current diff root, preventing cross-diff field name leakage. The patch is bounded and clearly beneficial; a dedicated test validates the corrected behavior.

Re-trigger cubic

@ogenstad
ogenstad merged commit dfe44ef into stable Jul 28, 2026
63 checks passed
@ogenstad
ogenstad deleted the ajtm-07272026-diff-summary-fix branch July 28, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/backend Issue related to the backend (API Server, Git Agent)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants