zenstack/tests
ymc9 9cd6c8ec0b refactor(policy): overhaul auth CTE system
- Fix currentModel()/currentOperation() in auth collection predicates by
  removing them from EVALUATOR_BUILTIN_FUNCTIONS (forces SQL path) and
  using context.thisType instead of context.modelOrType in transformCall
- Move auth CTE analysis from constructor-level (all policies) to
  per-operation (only the filter being injected), via on-the-fly AST
  scanning with new AuthCteUsageCollector/collectAuthCteUsageFromQuery
- Replace mutable requiresAuthCte/authCteFieldsNeeded class fields with
  ShallowColumnCollector that stops at SelectQueryNode boundaries
- Merge four identical injectAuthCtes conditions into one compound check
- Treat absent to-many auth relations as empty lists instead of null,
  making every/none predicates vacuously true for unprovided collections;
  removes the ABSENT_SENTINEL/AUTH_ABSENT_COL mechanism entirely

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 19:33:18 -07:00
..
e2e refactor(policy): overhaul auth CTE system 2026-04-16 19:33:18 -07:00
regression perf(orm): use EXISTS instead of COUNT subquery for to-one relation filters (#2579) 2026-04-15 13:07:16 -07:00
runtimes [CI] Bump version 3.6.0 (#2571) 2026-04-11 19:18:20 -07:00