Address review feedback on databinding whitelist characterization spec - #16054
Merged
borinquenkid merged 1 commit intoJul 26, 2026
Conversation
- Rename the Object-typed field to untypedProperty and reword test names: the property is excluded because it is raw Object-typed (DefaultASTDatabindingHelper#shouldFieldBeInWhiteList), not because it is generically "unlisted". - Drop the misleading hasOne association, which adds nothing to the contract under test since the typed address field alone puts it in the generated whitelist, and the mapping is incomplete (no belongsTo back-reference on WhitelistAddress). - Trim the domain test to its non-duplicated assertions and cross-reference DefaultASTDatabindingHelperDomainClassSpecialPropertiesSpec, which already pins id/version/dateCreated/lastUpdated exclusion for domain classes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DefaultDatabindingWhitelistBehaviorSpec test to better characterize the databinding allowlist contract by clarifying why certain properties are excluded (raw Object/def typing) and by removing unrelated/duplicative assertions from the domain portion of the test.
Changes:
- Renamed the previously “ignored”
Objectproperty tountypedPropertyand updated test descriptions to reflect the actual exclusion rule. - Simplified the domain binding scenario by dropping special-property assertions and an unnecessary/misleading
hasOneassociation mapping. - Added an inline cross-reference to the existing spec that already pins domain special-property exclusions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Folding this directly into #16003 instead — no need for a separate stacked PR. |
borinquenkid
merged commit Jul 26, 2026
1c34ff0
into
test/databinding-codegen-contract
48 checks passed
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## test/databinding-codegen-contract #16054 +/- ##
===========================================================================
- Coverage 51.1210% 51.1147% -0.0063%
Complexity 17600 17600
===========================================================================
Files 2041 2041
Lines 95493 95493
Branches 16587 16587
===========================================================================
- Hits 48817 48811 -6
- Misses 39390 39399 +9
+ Partials 7286 7283 -3 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #16003.
Addresses review comments from @jdaugherty:
untypedPropertyand rewords test names — the property is excluded because it is raw Object-typed (DefaultASTDatabindingHelper#shouldFieldBeInWhiteList), not because it is generically "unlisted".hasOneassociation, which added nothing to the tested contract and declares an incomplete mapping (nobelongsToback-reference onWhitelistAddress).DefaultASTDatabindingHelperDomainClassSpecialPropertiesSpec, which already pins id/version/dateCreated/lastUpdated exclusion for domain classes.Verification
:grails-test-suite-web:test --tests DefaultDatabindingWhitelistBehaviorSpec./gradlew codeStyle