fix: normalize equivalent object unions - #55
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 65dc1fc. Configure here.
| ) -> Result<(), Error> { | ||
| self.resolve_references(lhs, rhs)?; | ||
| Self::collapse_object_any_of(lhs); | ||
| Self::collapse_object_any_of(rhs); |
There was a problem hiding this comment.
Asymmetric anyOf collapse breaks diffs
Medium Severity
collapse_object_any_of runs independently on each side. When only one pure object anyOf collapses and the other keeps a non-collapsible anyOf, diff_any_of is skipped. Property comparison then treats the remaining anyOf as having no top-level properties, so it emits spurious PropertyRemove changes and misses real branch-level differences.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 65dc1fc. Configure here.


Summary
anyOfobject branches when they differ only in one property'stypeCloses #22
Verification
cargo fmt --all -- --checkcargo test --workspace --all-featurescargo clippy --all-features --workspace --tests --examples -- -D clippy::allgit diff --check