Port prisma functional waves 3–4: transactions, composites, and the full issues/ regression bucket (591 accounted) - #1066
Port prisma functional waves 3–4: transactions, composites, and the full issues/ regression bucket (591 accounted)#1066SevInf wants to merge 3 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 129 files, which is 29 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (74)
📒 Files selected for processing (129)
You can disable this status message by setting the 📝 WalkthroughWalkthroughAdds contract-backed Prisma integration coverage for PostgreSQL batching, chunking, BigInt, Bytes, and interactive transactions; MongoDB composite selection and update operations; and documentation for non-ported Prisma APIs and known behavioral differences. ChangesPrisma integration coverage
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
@prisma-next/extension-author-tools
@prisma-next/mongo-runtime
@prisma-next/family-mongo
@prisma-next/sql-runtime
@prisma-next/family-sql
@prisma-next/extension-arktype-json
@prisma-next/middleware-cache
@prisma-next/mongo
@prisma-next/extension-paradedb
@prisma-next/extension-pgvector
@prisma-next/extension-postgis
@prisma-next/postgres
@prisma-next/sql-orm-client
@prisma-next/sqlite
@prisma-next/extension-supabase
@prisma-next/target-mongo
@prisma-next/adapter-mongo
@prisma-next/driver-mongo
@prisma-next/contract
@prisma-next/utils
@prisma-next/config
@prisma-next/errors
@prisma-next/framework-components
@prisma-next/operations
@prisma-next/ts-render
@prisma-next/contract-authoring
@prisma-next/ids
@prisma-next/psl-parser
@prisma-next/psl-printer
@prisma-next/cli
@prisma-next/cli-telemetry
@prisma-next/config-loader
@prisma-next/emitter
@prisma-next/language-server
@prisma-next/migration-tools
prisma-next
@prisma-next/vite-plugin-contract-emit
@prisma-next/mongo-codec
@prisma-next/mongo-contract
@prisma-next/mongo-value
@prisma-next/mongo-contract-psl
@prisma-next/mongo-contract-ts
@prisma-next/mongo-emitter
@prisma-next/mongo-schema-ir
@prisma-next/mongo-query-ast
@prisma-next/mongo-orm
@prisma-next/mongo-query-builder
@prisma-next/mongo-lowering
@prisma-next/mongo-wire
@prisma-next/sql-contract
@prisma-next/sql-errors
@prisma-next/sql-operations
@prisma-next/sql-schema-ir
@prisma-next/sql-contract-psl
@prisma-next/sql-contract-ts
@prisma-next/sql-contract-emitter
@prisma-next/sql-lane-query-builder
@prisma-next/sql-relational-core
@prisma-next/sql-builder
@prisma-next/target-postgres
@prisma-next/target-sqlite
@prisma-next/adapter-postgres
@prisma-next/adapter-sqlite
@prisma-next/driver-postgres
@prisma-next/driver-sqlite
commit: |
size-limit report 📦
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
test/integration/test/ports/prisma/functional/composites-list-updateMany/composites-list-updateMany.test.ts (1)
40-152: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAssert the rewritten composite list state after
updateAndCount()
updateAndCount()only returns the matched document count, so the passing cases can miss a no-op or wrong composite write. Use the existing.where().first()read path after each update/assert oncontents/upvotesto cover the actual list replacement andpushbehavior.🤖 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 `@test/integration/test/ports/prisma/functional/composites-list-updateMany/composites-list-updateMany.test.ts` around lines 40 - 152, Update the passing cases in the composites list updateMany suite to read the document with the existing .where().first() path after updateAndCount(), then assert the expected contents and nested upvotes values for set, set shorthand, set nested list, and push. Retain the count assertions while verifying push appends to the seeded list rather than replacing it.
🤖 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.
Inline comments:
In
`@test/integration/test/ports/prisma/functional/chunking-query/chunking-query.test.ts`:
- Line 59: Update the test title in the `it` block for the MAX-id `"in"` query
to remove “should,” while preserving the rest of the description and test
behavior.
In
`@test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts`:
- Around line 49-54: Extend each listed updateMany test in
test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts
to read the updated document after updateAndCount and use separate assertions
for every expected persisted field: required and optional content replacements,
shorthand replacements, nested upvotes, and null states. At the unset case,
inspect the stored document and assert that content is absent rather than null;
retain the existing count assertions.
In
`@test/integration/test/ports/prisma/functional/interactive-transactions/interactive-transactions.test.ts`:
- Around line 223-235: Replace Promise.allSettled with Promise.all in the
concurrent transaction test so the test rejects when any conflict-free
transaction fails. Keep the existing ten transaction invocations unchanged.
---
Nitpick comments:
In
`@test/integration/test/ports/prisma/functional/composites-list-updateMany/composites-list-updateMany.test.ts`:
- Around line 40-152: Update the passing cases in the composites list updateMany
suite to read the document with the existing .where().first() path after
updateAndCount(), then assert the expected contents and nested upvotes values
for set, set shorthand, set nested list, and push. Retain the count assertions
while verifying push appends to the seeded list rather than replacing it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: a7eafa12-80e8-41eb-88c9-f82096d74a12
⛔ Files ignored due to path filters (25)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlprojects/port-all-tests/checklists/prisma-functional-0-l.mdis excluded by!projects/**projects/port-all-tests/checklists/prisma-functional-m-z.mdis excluded by!projects/**test/integration/test/ports/prisma/functional/batching-bigint/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/batching-bigint/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/batching-bytes/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/batching-bytes/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/chunking-query/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/chunking-query/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-object-update/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-object-update/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-selection/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/composites-selection/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/generated/contract.jsonis excluded by!**/generated/**test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/generated/contract.d.tsis excluded by!**/generated/**test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/generated/contract.jsonis excluded by!**/generated/**
📒 Files selected for processing (77)
test/integration/package.jsontest/integration/test/ports/prisma/failing.mdtest/integration/test/ports/prisma/functional/batching-bigint/_fixture/contract.prismatest/integration/test/ports/prisma/functional/batching-bigint/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/batching-bigint/batching-bigint.test.tstest/integration/test/ports/prisma/functional/batching-bytes/_fixture/contract.prismatest/integration/test/ports/prisma/functional/batching-bytes/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/batching-bytes/batching-bytes.test.tstest/integration/test/ports/prisma/functional/chunking-query/_fixture/contract.prismatest/integration/test/ports/prisma/functional/chunking-query/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/chunking-query/chunking-query.test.tstest/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-list-updateMany/composites-list-updateMany.test.tstest/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-list-upsert-update/composites-list-upsert-update.test.tstest/integration/test/ports/prisma/functional/composites-object-update/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-object-update/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-object-update/composites-object-update.test.tstest/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.tstest/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-object-upsert-update/composites-object-upsert-update.test.tstest/integration/test/ports/prisma/functional/composites-recursive/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-recursive/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-selection/_fixture/contract.prismatest/integration/test/ports/prisma/functional/composites-selection/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/composites-selection/composites-selection.test.tstest/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/contract.prismatest/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/find-unique-or-throw-batching/find-unique-or-throw-batching.test.tstest/integration/test/ports/prisma/functional/interactive-transactions/_fixture/contract.prismatest/integration/test/ports/prisma/functional/interactive-transactions/_fixture/prisma-next.config.tstest/integration/test/ports/prisma/functional/interactive-transactions/interactive-transactions.test.tstest/integration/test/ports/prisma/non-ported/functional/accelerate-bad-url-errors/accelerate-bad-url-errors.mdtest/integration/test/ports/prisma/non-ported/functional/batch-transaction-isolation-level/batch-transaction-isolation-level.mdtest/integration/test/ports/prisma/non-ported/functional/batch-transaction/batch-transaction.mdtest/integration/test/ports/prisma/non-ported/functional/batching-bigint/batching-bigint.mdtest/integration/test/ports/prisma/non-ported/functional/batching-bytes/batching-bytes.mdtest/integration/test/ports/prisma/non-ported/functional/batching-compound/batching-compound.mdtest/integration/test/ports/prisma/non-ported/functional/batching-relation/batching-relation.mdtest/integration/test/ports/prisma/non-ported/functional/batching/batching.mdtest/integration/test/ports/prisma/non-ported/functional/chunking-query/chunking-query.mdtest/integration/test/ports/prisma/non-ported/functional/composites-list-updateMany/composites-list-updateMany.mdtest/integration/test/ports/prisma/non-ported/functional/composites-list-upsert-update/composites-list-upsert-update.mdtest/integration/test/ports/prisma/non-ported/functional/composites-object-update/composites-object-update.mdtest/integration/test/ports/prisma/non-ported/functional/composites-object-updateMany/composites-object-updateMany.mdtest/integration/test/ports/prisma/non-ported/functional/composites-object-upsert-update/composites-object-upsert-update.mdtest/integration/test/ports/prisma/non-ported/functional/composites-recursive/composites-recursive.mdtest/integration/test/ports/prisma/non-ported/functional/composites-selection/composites-selection.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/client.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/defineExtension.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/extends.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/itx.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/model.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/pdp.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/query.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/result.mdtest/integration/test/ports/prisma/non-ported/functional/extensions/tx.mdtest/integration/test/ports/prisma/non-ported/functional/globalOmit/globalOmit.mdtest/integration/test/ports/prisma/non-ported/functional/globalOmitJSGenerator/globalOmitJSGenerator.mdtest/integration/test/ports/prisma/non-ported/functional/interactive-transactions/interactive-transactions.mdtest/integration/test/ports/prisma/non-ported/functional/logging/logging.mdtest/integration/test/ports/prisma/non-ported/functional/mysql-bit-type/mysql-bit-type.mdtest/integration/test/ports/prisma/non-ported/functional/prisma-promise/prisma-promise.mdtest/integration/test/ports/prisma/non-ported/functional/query-error-logging/query-error-logging.mdtest/integration/test/ports/prisma/non-ported/functional/raw-queries-send-type-hints/raw-queries-send-type-hints.mdtest/integration/test/ports/prisma/non-ported/functional/raw-queries-typed-results/raw-queries-typed-results.mdtest/integration/test/ports/prisma/non-ported/functional/reconnect/reconnect.mdtest/integration/test/ports/prisma/non-ported/functional/runtime-import/runtime-import.mdtest/integration/test/ports/prisma/non-ported/functional/tracing/tracing.mdtest/integration/test/ports/prisma/non-ported/functional/typed-sql/postgres-lists/postgres-lists.mdtest/integration/test/ports/prisma/non-ported/functional/typed-sql/postgres-scalars-nullable/postgres-scalars-nullable.mdtest/integration/test/ports/prisma/non-ported/functional/typed-sql/postgres-scalars/postgres-scalars.md
| const count = await db.comments_required.where({ _id: id }).updateAndCount({ | ||
| country: 'Mars', | ||
| content: { text: 'Goodbye World', upvotes: [{ vote: false, userId: '42' }] }, | ||
| }); | ||
|
|
||
| expect(count).toBe(1); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Assert the persisted composite state, not only the update count.
count === 1 only proves a document changed. Read the document back and assert each replacement/null/nested-list value; for unset, verify content is absent rather than null.
test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L49-L54: assert required content was replaced.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L70-L75: assert shorthand replacement state.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L135-L146: assert nested upvotes replacement state.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L164-L169: assert optional content was replaced.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L185-L190: assert optional shorthand replacement state.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L206-L211: assert optional content isnull.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L227-L232: assert optional shorthand null state.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L248-L259: assert optional nested upvotes replacement state.test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L278-L282: inspect the stored document and assertcontenthas been removed.
Based on learnings, prefer separate field assertions for clearer failures.
📍 Affects 1 file
test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L49-L54(this comment)test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L70-L75test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L135-L146test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L164-L169test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L185-L190test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L206-L211test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L227-L232test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L248-L259test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L278-L282
🤖 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
`@test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts`
around lines 49 - 54, Extend each listed updateMany test in
test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts
to read the updated document after updateAndCount and use separate assertions
for every expected persisted field: required and optional content replacements,
shorthand replacements, nested upvotes, and null states. At the unset case,
inspect the stored document and assert that content is absent rather than null;
retain the existing count assertions.
Source: Learnings
| await Promise.allSettled([ | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| transaction((tx) => tx.orm.public.User.all()), | ||
| ]); | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fail when a conflict-free transaction rejects.
Promise.allSettled() resolves even if every transaction fails, so this test currently passes without proving its claim. Use Promise.all() here.
Proposed fix
- await Promise.allSettled([
+ await Promise.all([📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await Promise.allSettled([ | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| ]); | |
| } | |
| await Promise.all([ | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| transaction((tx) => tx.orm.public.User.all()), | |
| ]); | |
| } |
🤖 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
`@test/integration/test/ports/prisma/functional/interactive-transactions/interactive-transactions.test.ts`
around lines 223 - 235, Replace Promise.allSettled with Promise.all in the
concurrent transaction test so the test rejects when any conflict-free
transaction fails. Keep the existing ten transaction invocations unchanged.
…dates, non-portable client-surface sweep (503 accounted) Third porting wave for the `port-all-tests` project. +503 checklist boxes accounted (717 -> 1220); every box gated by an Opus reviewer before it was checked. Real ports (55 passing + 12 test.fails): - interactive-transactions: 11 ports through the postgres().transaction() facade (commit/rollback/throw/then-catch-finally/concurrency) - composites object|list update/updateMany/upsert-update + selection: 36 pass + 12 test.fails (mongo); recursive self-referential type non-emittable - batching-bigint / batching-bytes: Promise.all result-shape lookups over @unique columns - find-unique-or-throw-batching, chunking-query (within-limit param IN/OR) Non-ported (436) - subjects prisma-next does not express, recorded per-test in the non-ported ledgers: - $extends client extensions (client/model/result/query/defineExtension/itx/pdp/tx) - globalOmit constructor option; typed-sql $queryRawTyped codegen (postgres scalars/nullable/lists) - tracing (OpenTelemetry spans), logging/$on query+error events, PrismaPromise .catch/.finally idempotency - $queryRaw/$executeRaw raw executor, array $transaction([...]) batch form, Accelerate URL validation, reconnect, runtime-import - mysql-bit-type (no MySQL target) No production-code changes (per project non-goals). Adds @prisma-next/sql-errors as a workspace dep to the integration-tests package for error-code assertions in the interactive-transactions port. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
… (88 accounted) Fourth porting wave for the `port-all-tests` project. +88 checklist boxes accounted (1220 -> 1308); the prisma/prisma functional `issues/` regression bucket is now 153/153 complete. Every box gated by an Opus reviewer before it was checked. This wave deliberately targeted the highest-value tests remaining in the functional corpus: real bug regressions on the postgres/mongo surfaces prisma-next supports. Result: 21 passing + 14 faithful test.fails = 35 real ports, plus 53 non-ported (each an individual ledger line with its exact subject and reason). Ported & passing (21): relation-join filters not crashing (21352), JSON values containing a $type key round-tripping (21454), non-ASCII @Map columns / PSL comments (22098, 23201), parallel query batches (22610), nested create + connect (14271, 23902, 15044), args-type-conflict type tests with inline expectTypeOf (17005, 17030), P2007/P2039 structured error conditions (TML-1664-invalid, unmapped-driver), String date-format round-trip (25404), query-plan-cache stress (29331), 5 of the 9 historical-date rows (28192). Ported as test.fails (14) — faithful ports that run but hit a genuine prisma-next gap: exclusive-vs-inclusive cursor divergence (29176, 29254, 29309), BigInt precision in relation-join JSON path (29010 x2), RelationMutator.set() unimplemented (28151), pg/date century drop for 2-digit years (28192 x4), pg/enum @map-on-member not translated (28591), pg/enum decode is a text passthrough (TML-1664-unknown), Bytes @id reload round-trip (27455), enum[] emitter gap (27511). Non-ported (53) — subject inexpressible on prisma-next's public API: MySQL/SQLite/SQL Server/D1-only suites; $extends client extensions; TypedSQL $queryRawTyped; per-query omit; env-var client constructor; mongo raw (findRaw/aggregateRaw/runCommandRaw) + $on logging + cursor/distinct/aggregate/groupBy; array $transaction([...]) batch form; relationMode=prisma emulation + implicit M:N pivot; Prisma.empty/$queryRaw; Prisma-codegen GetPayload types; $connect/P1001; scalar-array push operator; relationLoadStrategy:'join'; pg/citext codec; spaced-@map-column DTS emit. No production-code changes (per project non-goals). Two follow-up-worthy emitter gaps surfaced: enum[] CHECK-constraint emission, and unquoted spaced-column keys in the storage-column DTS layer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
…inates the connection on real CI Postgres) The wave-3 "should succeed when \"in\" has MAX ids" port seeded MAX_BIND_VALUES (32766) rows and selected them all back through one un-chunked IN query. prisma-next does not chunk, so on the real CI Postgres backend this terminates the connection (SqlConnectionError: Connection terminated unexpectedly); it only passed under PGlite, which does not enforce the wire limit. The outcome is backend-dependent, so the upstream chunking subject cannot be faithfully reproduced — reclassified to non-ported, consistent with its already-non-ported EXCESS/include siblings. The sibling two-disjunct-IN case (no rows seeded, returns []) stays a passing port. No production-code changes. Moves one checklist box from ported -> non-ported; adds the non-ported ledger line; removes the flaky test. Integration Tests: 1 failed -> 0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
|
This pull request has moved to prisma/prisma#29832. |
Wave 4 — complete the
issues/regression bucket (88 accounted)The
prisma/prismafunctionalissues/regression bucket is now 153/153. This wave targeted the highest-value tests left in the functional corpus — real bug repros on the postgres/mongo surfaces prisma-next supports.test.fails= 35 real ports; 53 non-ported (each an individual ledger line).$type-key JSON round-trip (21454), non-ASCII@map/comments (22098, 23201), parallel batches (22610), nested create+connect(14271, 23902, 15044), args-type-conflict type tests w/ inlineexpectTypeOf(17005, 17030), P2007/P2039 structured error conditions (TML-1664-invalid, unmapped-driver), String date round-trip (25404), cache stress (29331), 5/9 historical-date rows (28192).test.fails(genuine gaps): exclusive-vs-inclusive cursor (29176, 29254, 29309), BigInt precision in relation-join JSON path (29010 ×2),RelationMutator.set()unimplemented (28151), pg/date century drop for 2-digit years (28192 ×4), pg/enum@map-on-member not translated (28591), pg/enum text-passthrough decode (TML-1664-unknown), Bytes@idreload (27455), enum[] emitter gap (27511).$extends; TypedSQL$queryRawTyped; per-queryomit; env-var client constructor; mongo raw +$onlogging + cursor/distinct/aggregate/groupBy; array$transaction([...]);relationMode=prisma+ implicit M:N;Prisma.empty/$queryRaw; Prisma-codegenGetPayload;$connect/P1001; scalar-arraypush;relationLoadStrategy:'join'; pg/citext; spaced-@map-column DTS emit.Two follow-up-worthy emitter gaps surfaced: enum[]
CHECK-constraint emission, and unquoted spaced-column keys in the storage-column DTS layer.Full suite after both waves:
test/ports/prisma/functional— 104 files, 552 passed + 78 expected-fail, 0 unexpected, no type errors.Third porting wave for the
port-all-testsproject. +503 checklist boxes accounted (717 → 1220 of 6,304); every box was gated by an Opus reviewer sub-agent before it was checked, per the project's execution model.The remaining genuinely-portable volume in the
prisma/prismafunctional corpus is small — most of what's left targets client surfaces prisma-next deliberately does not have. So this wave pairs a focused set of real ports with a large, faithful non-portable accounting sweep: every such test lands as an individualnon-portedledger line with its exact subject and reason, never a bent green.What landed
Ported & passing (55) +
test.fails(12)postgres(...).transaction(async tx => { … tx.orm … }): basic commit, rollback-on-throw (value + query), unique-violation rollback, in-callback batching rollback, high-concurrency with/without write conflicts, and the then/catch/finally rollback case.object/listupdate·updateMany·upsert-update+selection: 36 pass, 12test.fails(theset nullon required embedded fields — type-rejected, mongo doesn't throw at runtime).composites/recursiveis non-ported (self-referential embedded type is non-emittable; upstream itself marks ittest.failing).Promise.allresult-shape lookups over@uniqueBigInt/Bytescolumns (the array-$transaction([...])siblings stay non-ported).Promise.allSettledshapes withRUNTIME.NO_ROWS. chunking-query — within-limit paramIN/OR.Non-ported (436) — subject inexpressible on prisma-next's public API, each confirmed against the ORM/client exports before recording:
$extendsclient extensions (client / model / result / query / defineExtension / itx / pdp / tx) — prisma-next has no client-extension surface.$queryRawTypedcodegen (postgres scalars / nullable / lists).$onquery+error events, PrismaPromise.catch/.finallyidempotency (prisma-next's result is a single-consumption iterator).$queryRaw/$executeRawraw-SQL executor, array$transaction([...])batch form, Accelerate URL validation, reconnect lifecycle, runtime-import.Process & guarantees
CHANGES-REQUIRED(a dropped@updatedAt, and twoPromise.alltests wrongly marked non-ported — both fixed and re-verified).@prisma-next/sql-errorsas a workspace dependency to the integration-tests package, used for error-code assertions in the interactive-transactions port (lockfile updated viapnpm install).test/ports/prisma/functionalsuite: 80 files, 531 passed + 64 expected-fail, 0 unexpected failures, no type errors.🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Documentation