Skip to content

fix: operation validation false positives#2460

Merged
Aenimus merged 2 commits intomainfrom
david/eng-8783-fix-operation-validation-false-positives
Jan 16, 2026
Merged

fix: operation validation false positives#2460
Aenimus merged 2 commits intomainfrom
david/eng-8783-fix-operation-validation-false-positives

Conversation

@Aenimus
Copy link
Copy Markdown
Member

@Aenimus Aenimus commented Jan 16, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved resolvability graph handling by enhancing the cleanup of unresolvable paths in field resolution contexts, which can help prevent false positives in complex scenarios.
  • Documentation

    • Minor correction to internal code documentation for grammatical consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

Checklist

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 16, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • composition-go/index.global.js

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Two changes to the resolvability graph module: a minor documentation correction hyphenating "short-circuiting" and an extension to path cleanup logic in the entity walker's field propagation method.

Changes

Cohort / File(s) Summary
Documentation fix
composition/src/resolvability-graph/graph.ts
Corrected comment wording from "Short circuiting" to "Short-circuiting" (hyphenation).
Path cleanup extension
composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts
Added removeUnresolvablePaths call in propagateVisitedField when relative origin paths exist and descendants are resolved, using selectedPath of .{fieldName} and removeDescendantPaths: true to extend cleanup behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: operation validation false positives' directly aligns with the changes made. The two file modifications (documentation correction and entity-walker logic enhancement) both work together to address false positives in operation validation, as evidenced by the walker change that prunes additional unresolvable paths to prevent validation false positives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.81%. Comparing base (27ec7b7) to head (58d4e33).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2460       +/-   ##
===========================================
- Coverage   61.37%   41.81%   -19.56%     
===========================================
  Files         229      998      +769     
  Lines       23839   138216   +114377     
  Branches        0     7871     +7871     
===========================================
+ Hits        14632    57800    +43168     
- Misses       7972    78801    +70829     
- Partials     1235     1615      +380     
Files with missing lines Coverage Δ
composition/src/resolvability-graph/graph.ts 95.07% <ø> (ø)
...bility-graph/walker/entity-walker/entity-walker.ts 96.56% <100.00%> (ø)

... and 791 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Aenimus Aenimus requested a review from jensneuse as a code owner January 16, 2026 21:23
@Aenimus Aenimus enabled auto-merge (squash) January 16, 2026 21:24
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts (1)

184-193: Include selectionPath when clearing unresolvable paths.

Right now the cleanup ignores the current node path, so nested fields may remove the wrong entries (or leave stale ones) when relativeOriginPaths is set. This can reintroduce false positives/negatives.

🛠️ Suggested fix
-          this.removeUnresolvablePaths({ selectionPath: `.${fieldName}`, removeDescendantPaths: true });
+          this.removeUnresolvablePaths({
+            selectionPath: `${selectionPath}.${fieldName}`,
+            removeDescendantPaths: true,
+          });

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 16, 2026

Router-nonroot image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-278f4f68e26a7d9f0e9910c4cceaee257840a774-nonroot

@Aenimus Aenimus merged commit 057e762 into main Jan 16, 2026
35 checks passed
@Aenimus Aenimus deleted the david/eng-8783-fix-operation-validation-false-positives branch January 16, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants