fix: incorrect policy injection for post-update rules with deep member access#1665
fix: incorrect policy injection for post-update rules with deep member access#1665
Conversation
WalkthroughWalkthroughThe changes involve refactoring the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/schema/src/plugins/enhancer/policy/expression-writer.ts (2 hunks)
- tests/integration/tests/enhancements/with-policy/post-update.test.ts (1 hunks)
- tests/regression/tests/issue-1648.test.ts (1 hunks)
Additional comments not posted (4)
tests/regression/tests/issue-1648.test.ts (1)
1-42: LGTM!The test case is well-structured and covers the intended policy enforcement scenario for issue 1648.
The code changes are approved.
tests/integration/tests/enhancements/with-policy/post-update.test.ts (1)
556-597: LGTM!The test case is well-structured and covers the intended policy enforcement scenario for deep member access.
The code changes are approved.
packages/schema/src/plugins/enhancer/policy/expression-writer.ts (2)
381-383: LGTM!The update to use
stripFutureCallimproves the readability and maintainability of the code.The code changes are approved.
467-498: LGTM!The method
stripFutureCallis well-implemented and enhances code readability and maintainability.The code changes are approved.
Fixes #1648