Skip sketch planning for scoped permission reads - #2909
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds scoped permission entity-fetch planning. Eligible queries receive a context marker and use direct ChangesScoped permission entity fetch
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant load_entities_map
participant query_nested
participant PostgreSQL
load_entities_map->>load_entities_map: Check scoped permission entity-fetch flag
load_entities_map->>query_nested: Pass ::d/permission-entity-fetch? context marker
query_nested->>query_nested: Validate query shape and select ea_index
query_nested->>PostgreSQL: Execute SQL with ea_index scans
PostgreSQL-->>load_entities_map: Return entity-fetch results
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The optimization is disabled by default and limited to the opted-in app and narrow query shape, with fallback behavior and read results validated. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Simple UUID entity reads during permission checks currently load and decompress attribute sketches to choose an index that is already determined by the query shape. Add a default-off path for one opted-in app that preserves the EA index hint, SQL and parameters while skipping that planning work.
The guard requires the existing permission-fetch entry point and standalone UUID/EA patterns. Other apps, custom query functions, lookup references and more complex shapes retain the existing planner. Permission checks and reads before and after writes are unchanged; an existing-span boolean records when the shortcut runs.
Validation: