feat: optimize aliased BatchCheck requests - #311
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #311 +/- ##
===========================================
+ Coverage 69.93% 85.93% +15.99%
===========================================
Files 142 143 +1
Lines 10774 10925 +151
===========================================
+ Hits 7535 9388 +1853
+ Misses 3239 1537 -1702 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Adds an opt-in
optimize_relation_aliasesoption to async and syncBatchCheck.When enabled, the SDK:
The default
BatchCheckbehavior is unchanged.Why
Applications often use intent-specific permissions that are pure aliases of a shared relation. Sending each alias as a separate item preserves a useful application-level contract, but can repeat the same authorization evaluation within one batch. This opt-in path keeps the original relations and correlation IDs visible to callers while reducing redundant checks.
Safety
Testing