Characterize data-binding allowlist through public binding API#16003
Open
jamesfredley wants to merge 1 commit into
Open
Characterize data-binding allowlist through public binding API#16003jamesfredley wants to merge 1 commit into
jamesfredley wants to merge 1 commit into
Conversation
Assisted-by: opencode:gpt-5.6-sol
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a characterization test in grails-test-suite-web to pin the observable behavior of the compile-time data-binding allowlist via public data-binding APIs, without inspecting internal AST-generated fields.
Changes:
- Introduces a new Spock spec that verifies which properties bind vs remain unset for a domain instance when binding via
DataBindingUtils.bindObjectToInstance. - Adds a controller-action command object scenario (a
Validateablecommand) to assert allowlist behavior through controller command binding, including nested property binding.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #16003 +/- ##
==================================================
+ Coverage 51.1168% 51.1210% +0.0042%
- Complexity 17597 17600 +3
==================================================
Files 2041 2041
Lines 95493 95493
Branches 16587 16587
==================================================
+ Hits 48813 48817 +4
+ Misses 39394 39390 -4
Partials 7286 7286 🚀 New features to boost your workflow:
|
✅ All tests passed ✅🏷️ Commit: 23f7c46 Learn more about TestLens at testlens.app. |
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.
Summary
DataBindingUtils.bindObjectToInstance) and a controller-action@ValidateablecommandBehavior characterized (current 8.0.x)
nameand nestedaddress.streetbind;id/version/dateCreated/lastUpdatedand a declared non-allowlistedObjectproperty stay null@Validateablecommand: declared special properties bind; the non-allowlisted property stays nullScope note
Test-only; no production changes. Exercises only public data-binding APIs (per the repo's test-through-public-API policy); it does not read the AST-generated allowlist field.
Verification
This is an AI-generated starting point pinning the data-binding code-generation contract.