Skip to content

merge dev to main (v3.8.1)#2735

Merged
ymc9 merged 2 commits into
mainfrom
dev
Jun 27, 2026
Merged

merge dev to main (v3.8.1)#2735
ymc9 merged 2 commits into
mainfrom
dev

Conversation

@ymc9

@ymc9 ymc9 commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of implicit many-to-many relations, including self-relations, so join-table detection is more reliable.
    • Reduced repeated lookups by caching schema-related results, which can improve performance in repeated queries.
    • Added regression coverage for many-to-many join-table resolution and caching behavior.
  • Chores

    • Bumped project and package versions to 3.8.1 across the repository.

github-actions Bot and others added 2 commits June 24, 2026 22:09
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Package versions are bumped from 3.8.0 to 3.8.1 across workspace manifests. ORM query utilities now cache model and many-to-many join-table lookups per schema, the policy plugin uses that cached lookup, and a regression test covers the join-table behavior.

Changes

Version bumps

Layer / File(s) Summary
Workspace manifest updates
package.json, packages/auth-adapters/better-auth/package.json, packages/cli/package.json, packages/clients/*/package.json, packages/common-helpers/package.json, packages/config/*/package.json, packages/create-zenstack/package.json, packages/ide/vscode/package.json, packages/language/package.json, packages/orm/package.json, packages/plugins/*/package.json, packages/schema/package.json, packages/sdk/package.json, packages/server/package.json, packages/testtools/package.json, packages/zod/package.json, samples/*/package.json, tests/*/package.json, tests/runtimes/*/package.json
version fields are updated from 3.8.0 to 3.8.1 across the listed manifests.

Many-to-many join-table caching

Layer / File(s) Summary
Query utils cache
packages/orm/src/client/query-utils.ts
getModel, getManyToManyRelation, and getManyToManyJoinTable use a schema-scoped cache, and ManyToManyJoinTableEndpoints is exported.
Policy handler lookup
packages/plugins/policy/src/policy-handler.ts
resolveManyToManyJoinTable() calls QueryUtils.getManyToManyJoinTable, sorts the returned endpoints, and extracts the id-field metadata.
Regression test
tests/regression/test/issue-2715.test.ts
The regression test defines implicit and self-relation many-to-many schemas, checks join-table endpoint resolution, and verifies cached object identity and undefined lookups.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • zenstackhq/zenstack#2730: Also updates query-utils and policy-handler around many-to-many join-table lookup and regression coverage for issue 2715.

Poem

🐇 I hopped through manifests, one by one,
to 3.8.1 before the day was done.
Cached little joins in a schema-scoped nest,
and the policy path found the right rest.
A carrot-bright bounce for the bunny brigade.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the merge and release bump to v3.8.1 reflected in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
package.json (1)

17-17: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

packageManager pin violates coding guideline.

The packageManager field is set to "pnpm@10.33.0" but the coding guidelines require it pinned to pnpm@10.12.1. This mismatch can cause CI and local development to use different pnpm versions than intended.

As per coding guidelines, use pnpm for package management with workspaces, pinned to version pnpm@10.12.1.

🔧 Proposed fix
-    "packageManager": "pnpm@10.33.0",
+    "packageManager": "pnpm@10.12.1",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 17, The packageManager pin is using the wrong pnpm
version, so update the package.json packageManager field from pnpm@10.33.0 to
the required pnpm@10.12.1. Keep the existing package-management setup intact and
only adjust the version pin so local and CI environments resolve the same pnpm
version.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@package.json`:
- Line 17: The packageManager pin is using the wrong pnpm version, so update the
package.json packageManager field from pnpm@10.33.0 to the required
pnpm@10.12.1. Keep the existing package-management setup intact and only adjust
the version pin so local and CI environments resolve the same pnpm version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9ab6c8f3-083c-4cb0-a650-dd012a4041bf

📥 Commits

Reviewing files that changed from the base of the PR and between 2f9fdc1 and 805a6b8.

📒 Files selected for processing (31)
  • package.json
  • packages/auth-adapters/better-auth/package.json
  • packages/cli/package.json
  • packages/clients/client-helpers/package.json
  • packages/clients/fetch-client/package.json
  • packages/clients/tanstack-query/package.json
  • packages/common-helpers/package.json
  • packages/config/eslint-config/package.json
  • packages/config/tsdown-config/package.json
  • packages/config/typescript-config/package.json
  • packages/config/vitest-config/package.json
  • packages/create-zenstack/package.json
  • packages/ide/vscode/package.json
  • packages/language/package.json
  • packages/orm/package.json
  • packages/orm/src/client/query-utils.ts
  • packages/plugins/policy/package.json
  • packages/plugins/policy/src/policy-handler.ts
  • packages/plugins/soft-delete/package.json
  • packages/schema/package.json
  • packages/sdk/package.json
  • packages/server/package.json
  • packages/testtools/package.json
  • packages/zod/package.json
  • samples/orm/package.json
  • samples/taskforge/package.json
  • tests/e2e/package.json
  • tests/regression/package.json
  • tests/regression/test/issue-2715.test.ts
  • tests/runtimes/bun/package.json
  • tests/runtimes/edge-runtime/package.json

@ymc9 ymc9 merged commit b8a1dc2 into main Jun 27, 2026
11 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