Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Dec 18, 2025

No description provided.

ymc9 and others added 4 commits December 17, 2025 13:56
)

* fix(orm): operator "!" should only be applicable to boolean fields

fixes #510

* address PR comments
* chore: minor typing and export updates to ORM and SDK

* update
Copilot AI review requested due to automatic review settings December 18, 2025 13:13
@coderabbitai
Copy link

coderabbitai bot commented Dec 18, 2025

Warning

Rate limit exceeded

@ymc9 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 27 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3f3ffbe and b53ff2b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (35)
  • .gitignore (1 hunks)
  • package.json (1 hunks)
  • packages/auth-adapters/better-auth/package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/cli/src/actions/init.ts (1 hunks)
  • packages/clients/tanstack-query/package.json (1 hunks)
  • packages/common-helpers/package.json (1 hunks)
  • packages/config/eslint-config/package.json (1 hunks)
  • packages/config/typescript-config/package.json (1 hunks)
  • packages/config/vitest-config/package.json (1 hunks)
  • packages/create-zenstack/package.json (1 hunks)
  • packages/language/package.json (1 hunks)
  • packages/language/src/validators/expression-validator.ts (3 hunks)
  • packages/orm/package.json (1 hunks)
  • packages/orm/src/client/executor/zenstack-query-executor.ts (4 hunks)
  • packages/orm/src/client/options.ts (1 hunks)
  • packages/orm/src/client/plugin.ts (1 hunks)
  • packages/plugins/policy/package.json (1 hunks)
  • packages/schema/package.json (1 hunks)
  • packages/sdk/package.json (2 hunks)
  • packages/sdk/src/ast.ts (1 hunks)
  • packages/sdk/tsup.config.ts (1 hunks)
  • packages/server/package.json (1 hunks)
  • packages/testtools/package.json (1 hunks)
  • packages/zod/package.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • samples/next.js/package.json (2 hunks)
  • samples/orm/package.json (1 hunks)
  • tests/e2e/package.json (1 hunks)
  • tests/regression/package.json (1 hunks)
  • tests/regression/test/issue-503/regression.test.ts (1 hunks)
  • tests/regression/test/issue-505.test.ts (1 hunks)
  • tests/regression/test/issue-510.test.ts (1 hunks)
  • tests/runtimes/bun/package.json (1 hunks)
  • tests/runtimes/edge-runtime/package.json (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link

claude bot commented Dec 18, 2025

Claude finished @ymc9's task —— View job


Pull Request Review - v3.0.0-beta.33

Tasks:

  • Analyze changed files and understand scope
  • Review functional code changes (non-version bumps)
  • Examine new regression test implementation
  • Check for security, performance, and quality concerns
  • Provide comprehensive feedback

Review Summary

This PR merges dev → main for the beta.33 release. The changes look good overall with mostly version bumps and a few key functional improvements.

Key Changes Analysis

Expression Validator Enhancement (packages/language/src/validators/expression-validator.ts:252-256)

ORM Query Executor Export Updates (packages/orm/src/client/executor/zenstack-query-executor.ts)

  • Enhancement: Added proper exports for AfterEntityMutationCallback and OnKyselyQueryCallback types
  • Architecture: Improves plugin architecture by making hook types available to plugin authors
  • Quality: Good - follows TypeScript best practices for public API exports

SDK AST Re-export (packages/sdk/src/ast.ts)

  • Addition: Simple re-export from @zenstackhq/language/ast
  • Purpose: Consolidates AST access for external consumers
  • Quality: Clean and follows established patterns

Regression Test Coverage (tests/regression/test/issue-510.test.ts)

  • Coverage: Comprehensive test for Boolean operator validation
  • Test Quality: Good - tests the exact error condition and message
  • Schema: Well-structured test schema covering inheritance, enums, relations

Security Analysis

  • No security concerns - Changes are primarily type safety improvements and exports
  • The Boolean operator validation actually improves security by preventing invalid expressions

Performance Analysis

  • No performance impact - Changes are compile-time validations and type exports
  • The expression validator changes run during schema compilation, not at query time

Code Quality Assessment

Strengths:

  • Clean, focused changes that address specific issues
  • Good test coverage for new functionality
  • Follows established patterns and TypeScript best practices
  • Proper error messaging for validation failures

Minor Observations:

  • All package version bumps are consistent (3.0.0-beta.33)
  • Changes maintain backward compatibility
  • Code follows the existing codebase conventions well

Test Coverage

  • Excellent: New regression test specifically covers the Boolean operator validation
  • Comprehensive: Test schema includes multiple model types, inheritance, and complex relations
  • Appropriate: Tests both positive and negative cases

Recommendations

  1. Merge as-is - All changes are well-implemented and tested
  2. Consider: Adding JSDoc comments to the new exported types for better developer experience
  3. Future: The Boolean operator validation pattern could be extended to other operators if needed

Overall Assessment: ✅ APPROVED

This is a solid release preparation PR with good bug fixes, clean enhancements, and proper test coverage. The changes improve type safety and expand the public API appropriately.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges the dev branch to main, bumping the version from 3.0.0-beta.32 to 3.0.0-beta.33. The changes include version updates across all packages, a Next.js dependency update, new SDK exports for AST utilities, improved error handling in the ORM layer, a fix for UnaryExpr validation in the language package, and minor test corrections.

Key Changes:

  • Version bump to 3.0.0-beta.33 across all packages
  • Next.js updated from 16.0.7 to 16.0.10 in the workspace catalog
  • Added new AST export entry point in SDK package for easier access to language AST types
  • Improved ORM error handling with centralized query execution error wrapping
  • Fixed UnaryExpr validation to ensure boolean type checking with corresponding regression test

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json (root + 18 packages) Version bumped to 3.0.0-beta.33
pnpm-workspace.yaml Next.js catalog version updated to 16.0.10
samples/next.js/package.json Changed next dependency to use catalog version
pnpm-lock.yaml Updated lockfile with Next.js 16.0.10 package resolutions
packages/sdk/tsup.config.ts Added ast entry point to build configuration
packages/sdk/src/ast.ts New file re-exporting from @zenstackhq/language/ast
packages/sdk/package.json Added ./ast export path configuration
packages/orm/src/client/plugin.ts Added @Private annotation to functions field
packages/orm/src/client/options.ts Added @Private annotation to functions field
packages/orm/src/client/executor/zenstack-query-executor.ts Refactored to use centralized internalExecuteQuery for error handling
packages/language/src/validators/expression-validator.ts Added UnaryExpr validation for boolean type enforcement
tests/regression/test/issue-510.test.ts New regression test for UnaryExpr boolean type validation
tests/regression/test/issue-505.test.ts Fixed description text from "issues 505" to "issue 505"
tests/regression/test/issue-503/regression.test.ts Fixed description text from "issues #503" to "issue #503"
.gitignore Added *.vsix pattern to ignore VS Code extension packages
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* fix(cli): use correct yarn command to install packages

* Update packages/cli/src/actions/init.ts

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
@claude
Copy link

claude bot commented Dec 18, 2025

Claude finished @ymc9's task —— View job


Pull Request Review - v3.0.0-beta.33

Tasks:

  • Analyze changed files and understand scope
  • Review functional code changes (non-version bumps)
  • Examine new regression test implementation
  • Check for security, performance, and quality concerns
  • Provide comprehensive feedback

Review Summary

This PR merges dev → main for the beta.33 release. The changes look good overall with mostly version bumps and a few key functional improvements.

Key Changes Analysis

Expression Validator Enhancement (packages/language/src/validators/expression-validator.ts:252-256)

ORM Query Executor Export Updates (packages/orm/src/client/executor/zenstack-query-executor.ts)

  • Enhancement: Added proper exports for AfterEntityMutationCallback and OnKyselyQueryCallback types
  • Architecture: Improves plugin architecture by making hook types available to plugin authors
  • Quality: Good - follows TypeScript best practices for public API exports

SDK AST Re-export (packages/sdk/src/ast.ts)

  • Addition: Simple re-export from @zenstackhq/language/ast
  • Purpose: Consolidates AST access for external consumers
  • Quality: Clean and follows established patterns

Regression Test Coverage (tests/regression/test/issue-510.test.ts)

  • Coverage: Comprehensive test for Boolean operator validation
  • Test Quality: Good - tests the exact error condition and message
  • Schema: Well-structured test schema covering inheritance, enums, relations

Security Analysis

  • No security concerns - Changes are primarily type safety improvements and exports
  • The Boolean operator validation actually improves security by preventing invalid expressions

Performance Analysis

  • No performance impact - Changes are compile-time validations and type exports
  • The expression validator changes run during schema compilation, not at query time

Code Quality Assessment

Strengths:

  • Clean, focused changes that address specific issues
  • Good test coverage for new functionality
  • Follows established patterns and TypeScript best practices
  • Proper error messaging for validation failures

Minor Observations:

  • All package version bumps are consistent (3.0.0-beta.33)
  • Changes maintain backward compatibility
  • Code follows the existing codebase conventions well

Test Coverage

  • Excellent: New regression test specifically covers the Boolean operator validation
  • Comprehensive: Test schema includes multiple model types, inheritance, and complex relations
  • Appropriate: Tests both positive and negative cases

Recommendations

  1. Merge as-is - All changes are well-implemented and tested
  2. Consider: Adding JSDoc comments to the new exported types for better developer experience
  3. Future: The Boolean operator validation pattern could be extended to other operators if needed

Overall Assessment: ✅ APPROVED

This is a solid release preparation PR with good bug fixes, clean enhancements, and proper test coverage. The changes improve type safety and expand the public API appropriately.


@ymc9 ymc9 added this pull request to the merge queue Dec 18, 2025
Merged via the queue into main with commit da6cf60 Dec 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants