Skip to content

Port prisma functional waves 3–4: transactions, composites, and the full issues/ regression bucket (591 accounted) - #1066

Closed
SevInf wants to merge 3 commits into
mainfrom
port-all-tests
Closed

Port prisma functional waves 3–4: transactions, composites, and the full issues/ regression bucket (591 accounted)#1066
SevInf wants to merge 3 commits into
mainfrom
port-all-tests

Conversation

@SevInf

@SevInf SevInf commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Update — this PR now bundles two porting waves (two self-contained commits; review per-commit). Combined: +591 checklist boxes accounted (717 → 1308 of 6,304).

Wave 4 — complete the issues/ regression bucket (88 accounted)

The prisma/prisma functional issues/ 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.

  • 21 passing + 14 faithful test.fails = 35 real ports; 53 non-ported (each an individual ledger line).
  • Passing: relation-join filters (21352), $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/ inline expectTypeOf (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 @id reload (27455), enum[] emitter gap (27511).
  • Non-ported: MySQL/SQLite/SQL Server/D1-only suites; $extends; TypedSQL $queryRawTyped; per-query omit; env-var client constructor; mongo raw + $on logging + cursor/distinct/aggregate/groupBy; array $transaction([...]); relationMode=prisma + implicit M:N; Prisma.empty/$queryRaw; Prisma-codegen GetPayload; $connect/P1001; scalar-array push; 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/functional104 files, 552 passed + 78 expected-fail, 0 unexpected, no type errors.


Third porting wave for the port-all-tests project. +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/prisma functional 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 individual non-ported ledger line with its exact subject and reason, never a bent green.

What landed

Ported & passing (55) + test.fails (12)

  • interactive-transactions — 11 ports through the high-level facade 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.
  • mongo compositesobject/list update · updateMany · upsert-update + selection: 36 pass, 12 test.fails (the set null on required embedded fields — type-rejected, mongo doesn't throw at runtime). composites/recursive is non-ported (self-referential embedded type is non-emittable; upstream itself marks it test.failing).
  • batching-bigint / batching-bytes — the Promise.all result-shape lookups over @unique BigInt/Bytes columns (the array-$transaction([...]) siblings stay non-ported).
  • find-unique-or-throw-batchingPromise.allSettled shapes with RUNTIME.NO_ROWS. chunking-query — within-limit param IN/OR.

Non-ported (436) — subject inexpressible on prisma-next's public API, each confirmed against the ORM/client exports before recording:

  • $extends client extensions (client / model / result / query / defineExtension / itx / pdp / tx) — prisma-next has no client-extension surface.
  • globalOmit constructor option; typed-sql $queryRawTyped codegen (postgres scalars / nullable / lists).
  • tracing (OpenTelemetry spans), logging / $on query+error events, PrismaPromise .catch/.finally idempotency (prisma-next's result is a single-consumption iterator).
  • $queryRaw/$executeRaw raw-SQL executor, array $transaction([...]) batch form, Accelerate URL validation, reconnect lifecycle, runtime-import.
  • mysql-bit-type (no MySQL target).

Process & guarantees

  • Reviewer-gated. Five implementer batches (≤10 suites each), each followed by an Opus reviewer that diffed every fixture schema field-by-field against upstream, mapped every assertion, re-ran the ports, and only then checked boxes / merged ledgers. One batch looped once on CHANGES-REQUIRED (a dropped @updatedAt, and two Promise.all tests wrongly marked non-ported — both fixed and re-verified).
  • No production-code changes (per project non-goals). The one non-test change is adding @prisma-next/sql-errors as a workspace dependency to the integration-tests package, used for error-code assertions in the interactive-transactions port (lockfile updated via pnpm install).
  • Green. Full test/ports/prisma/functional suite: 80 files, 531 passed + 64 expected-fail, 0 unexpected failures, no type errors.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Expanded integration coverage for PostgreSQL and MongoDB query behavior, including batching, chunking, BigInt, bytes, transactions, composite fields, selections, updates, and upserts.
    • Added validation for concurrent operations, rollback scenarios, required and optional composite values, and nested list updates.
  • Documentation

    • Documented additional Prisma behaviors that are not currently supported or portable, including extensions, raw queries, typed SQL, logging, tracing, reconnect, and batch transactions.

@SevInf
SevInf requested a review from a team as a code owner July 27, 2026 15:33
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 129 files, which is 29 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

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 configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: f0c159f5-c22e-4df5-8c1b-76b3e8631f52

📥 Commits

Reviewing files that changed from the base of the PR and between 98d0524 and cabbf6b.

⛔ Files ignored due to path filters (74)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • projects/port-all-tests/checklists/prisma-functional-0-l.md is excluded by !projects/**
  • projects/port-all-tests/checklists/prisma-functional-issues.md is excluded by !projects/**
  • projects/port-all-tests/checklists/prisma-functional-m-z.md is excluded by !projects/**
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-14271/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-14271/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-15044/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-15044/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-17005-args-type-conflict/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-17005-args-type-conflict/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-17030-args-type-conflict/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-17030-args-type-conflict/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-21352-id-does-not-exist/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-21352-id-does-not-exist/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-21454-type-in-json/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-21454-type-in-json/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-22098-column-does-not-exist/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-22098-column-does-not-exist/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-22610-parallel-batch/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-22610-parallel-batch/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-23201-non-ascii-comments/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-23201-non-ascii-comments/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-23902/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-23902/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-25404/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-25404/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-27455-bytes-id/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-27455-bytes-id/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-27511-include-enum-array/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-27511-include-enum-array/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-28151-broken-nested-set/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-28151-broken-nested-set/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-28192-pg-historical-dates/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-28192-pg-historical-dates/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-28591-mapped-enums/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-28591-mapped-enums/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29010-bigint-precision-relation-joins/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29010-bigint-precision-relation-joins/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29176-cursor-parameter-regression/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29176-cursor-parameter-regression/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29254-query-plan-cache-mutation/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29254-query-plan-cache-mutation/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29309-datetime-cursor/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29309-datetime-cursor/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29331-query-plan-cache-bloat/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-29331-query-plan-cache-bloat/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-TML-1664-invalid-enum-value-error/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-TML-1664-invalid-enum-value-error/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-TML-1664-unknown-enum-value-read-error/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-TML-1664-unknown-enum-value-read-error/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-unmapped-driver-error-user-facing/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/issues-unmapped-driver-error-user-facing/_fixture/generated/contract.json is excluded by !**/generated/**
📒 Files selected for processing (129)
  • test/integration/package.json
  • test/integration/test/ports/prisma/failing.md
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/batching-bigint/batching-bigint.test.ts
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/batching-bytes/batching-bytes.test.ts
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/chunking-query/chunking-query.test.ts
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/composites-list-updateMany.test.ts
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/composites-list-upsert-update.test.ts
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-update/composites-object-update.test.ts
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/composites-object-upsert-update.test.ts
  • test/integration/test/ports/prisma/functional/composites-recursive/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-recursive/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-selection/composites-selection.test.ts
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/find-unique-or-throw-batching.test.ts
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/interactive-transactions/interactive-transactions.test.ts
  • test/integration/test/ports/prisma/functional/issues-14271/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-14271/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-14271/issues-14271.test.ts
  • test/integration/test/ports/prisma/functional/issues-15044/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-15044/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-15044/issues-15044.test.ts
  • test/integration/test/ports/prisma/functional/issues-15177/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-15177/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-17005-args-type-conflict/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-17005-args-type-conflict/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-17005-args-type-conflict/issues-17005-args-type-conflict.test.ts
  • test/integration/test/ports/prisma/functional/issues-17030-args-type-conflict/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-17030-args-type-conflict/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-17030-args-type-conflict/issues-17030-args-type-conflict.test.ts
  • test/integration/test/ports/prisma/functional/issues-21352-id-does-not-exist/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-21352-id-does-not-exist/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-21352-id-does-not-exist/issues-21352-id-does-not-exist.test.ts
  • test/integration/test/ports/prisma/functional/issues-21454-type-in-json/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-21454-type-in-json/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-21454-type-in-json/issues-21454-type-in-json.test.ts
  • test/integration/test/ports/prisma/functional/issues-22098-column-does-not-exist/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-22098-column-does-not-exist/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-22098-column-does-not-exist/issues-22098-column-does-not-exist.test.ts
  • test/integration/test/ports/prisma/functional/issues-22610-parallel-batch/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-22610-parallel-batch/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-22610-parallel-batch/issues-22610-parallel-batch.test.ts
  • test/integration/test/ports/prisma/functional/issues-23201-non-ascii-comments/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-23201-non-ascii-comments/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-23201-non-ascii-comments/issues-23201-non-ascii-comments.test.ts
  • test/integration/test/ports/prisma/functional/issues-23902/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-23902/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-23902/issues-23902.test.ts
  • test/integration/test/ports/prisma/functional/issues-25404/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-25404/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-25404/issues-25404.test.ts
  • test/integration/test/ports/prisma/functional/issues-27455-bytes-id/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-27455-bytes-id/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-27455-bytes-id/issues-27455-bytes-id.test.ts
  • test/integration/test/ports/prisma/functional/issues-27511-include-enum-array/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-27511-include-enum-array/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-27511-include-enum-array/issues-27511-include-enum-array.test.ts
  • test/integration/test/ports/prisma/functional/issues-28151-broken-nested-set/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-28151-broken-nested-set/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-28151-broken-nested-set/issues-28151-broken-nested-set.test.ts
  • test/integration/test/ports/prisma/functional/issues-28192-pg-historical-dates/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-28192-pg-historical-dates/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-28192-pg-historical-dates/issues-28192-pg-historical-dates.test.ts
  • test/integration/test/ports/prisma/functional/issues-28591-mapped-enums/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-28591-mapped-enums/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-28591-mapped-enums/issues-28591-mapped-enums.test.ts
  • test/integration/test/ports/prisma/functional/issues-29010-bigint-precision-relation-joins/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-29010-bigint-precision-relation-joins/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-29010-bigint-precision-relation-joins/issues-29010-bigint-precision-relation-joins.test.ts
  • test/integration/test/ports/prisma/functional/issues-29176-cursor-parameter-regression/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-29176-cursor-parameter-regression/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-29176-cursor-parameter-regression/issues-29176-cursor-parameter-regression.test.ts
  • test/integration/test/ports/prisma/functional/issues-29254-query-plan-cache-mutation/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-29254-query-plan-cache-mutation/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-29254-query-plan-cache-mutation/issues-29254-query-plan-cache-mutation.test.ts
  • test/integration/test/ports/prisma/functional/issues-29309-datetime-cursor/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-29309-datetime-cursor/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-29309-datetime-cursor/issues-29309-datetime-cursor.test.ts
  • test/integration/test/ports/prisma/functional/issues-29331-query-plan-cache-bloat/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-29331-query-plan-cache-bloat/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-29331-query-plan-cache-bloat/issues-29331-query-plan-cache-bloat.test.ts
  • test/integration/test/ports/prisma/functional/issues-TML-1664-invalid-enum-value-error/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-TML-1664-invalid-enum-value-error/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-TML-1664-invalid-enum-value-error/issues-TML-1664-invalid-enum-value-error.test.ts
  • test/integration/test/ports/prisma/functional/issues-TML-1664-unknown-enum-value-read-error/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-TML-1664-unknown-enum-value-read-error/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-TML-1664-unknown-enum-value-read-error/issues-TML-1664-unknown-enum-value-read-error.test.ts
  • test/integration/test/ports/prisma/functional/issues-unmapped-driver-error-user-facing/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/issues-unmapped-driver-error-user-facing/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/issues-unmapped-driver-error-user-facing/issues-unmapped-driver-error-user-facing.test.ts
  • test/integration/test/ports/prisma/non-ported/functional/accelerate-bad-url-errors/accelerate-bad-url-errors.md
  • test/integration/test/ports/prisma/non-ported/functional/batch-transaction-isolation-level/batch-transaction-isolation-level.md
  • test/integration/test/ports/prisma/non-ported/functional/batch-transaction/batch-transaction.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-bigint/batching-bigint.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-bytes/batching-bytes.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-compound/batching-compound.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-relation/batching-relation.md
  • test/integration/test/ports/prisma/non-ported/functional/batching/batching.md
  • test/integration/test/ports/prisma/non-ported/functional/chunking-query/chunking-query.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-list-updateMany/composites-list-updateMany.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-list-upsert-update/composites-list-upsert-update.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-object-update/composites-object-update.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-object-updateMany/composites-object-updateMany.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-object-upsert-update/composites-object-upsert-update.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-recursive/composites-recursive.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-selection/composites-selection.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/client.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/defineExtension.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

Adds 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.

Changes

Prisma integration coverage

Layer / File(s) Summary
PostgreSQL functional ports
test/integration/test/ports/prisma/functional/{batching-bigint,batching-bytes,chunking-query,find-unique-or-throw-batching}/...
Adds Prisma contract fixtures, generated configurations, and tests for concurrent scalar queries, bind-parameter limits, and findUniqueOrThrow results.
MongoDB composite operations
test/integration/test/ports/prisma/functional/composites-*/...
Adds composite schemas and tests covering selection, required and optional object/list updates, updateMany, upsert, nested replacements, pushes, null values, and unset behavior.
Interactive transactions
test/integration/test/ports/prisma/functional/interactive-transactions/..., test/integration/package.json
Adds transaction fixtures and tests for commit, rollback, constraint errors, concurrency, and promise chaining, with the SQL errors workspace dependency.
Compatibility and non-ported records
test/integration/test/ports/prisma/{failing.md,non-ported}/...
Documents composite runtime differences and Prisma capabilities that are not represented by prisma-next, including extensions, batching, raw queries, typed SQL, logging, tracing, and reconnect behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: wmadden, aqrln

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main scope: Prisma functional ports focused on transactions, composites, and regression/issue coverage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch port-all-tests

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.

@pkg-pr-new

pkg-pr-new Bot commented Jul 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@1066

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@1066

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@1066

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@1066

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@1066

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@1066

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@1066

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@1066

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@1066

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@1066

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@1066

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@1066

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@1066

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@1066

@prisma-next/extension-supabase

npm i https://pkg.pr.new/@prisma-next/extension-supabase@1066

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@1066

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@1066

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@1066

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@1066

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@1066

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@1066

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@1066

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@1066

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@1066

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@1066

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@1066

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@1066

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@1066

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@1066

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@1066

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@1066

@prisma-next/config-loader

npm i https://pkg.pr.new/@prisma-next/config-loader@1066

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@1066

@prisma-next/language-server

npm i https://pkg.pr.new/@prisma-next/language-server@1066

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@1066

prisma-next

npm i https://pkg.pr.new/prisma-next@1066

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@1066

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@1066

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@1066

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@1066

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@1066

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@1066

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@1066

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@1066

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@1066

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@1066

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@1066

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@1066

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@1066

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@1066

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@1066

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@1066

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@1066

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@1066

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@1066

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@1066

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@1066

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@1066

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@1066

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@1066

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@1066

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@1066

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@1066

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@1066

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@1066

commit: cabbf6b

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 170.18 KB (0%)
postgres / emit 150.83 KB (0%)
mongo / no-emit 100.72 KB (0%)
mongo / emit 90.4 KB (0%)
cf-worker / no-emit 195.84 KB (0%)
cf-worker / emit 174.68 KB (0%)

@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.

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 win

Assert 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 on contents/upvotes to cover the actual list replacement and push behavior.

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between e0e739c and 98d0524.

⛔ Files ignored due to path filters (25)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • projects/port-all-tests/checklists/prisma-functional-0-l.md is excluded by !projects/**
  • projects/port-all-tests/checklists/prisma-functional-m-z.md is excluded by !projects/**
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/generated/contract.json is excluded by !**/generated/**
📒 Files selected for processing (77)
  • test/integration/package.json
  • test/integration/test/ports/prisma/failing.md
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/batching-bigint/batching-bigint.test.ts
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/batching-bytes/batching-bytes.test.ts
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/chunking-query/chunking-query.test.ts
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/composites-list-updateMany.test.ts
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/composites-list-upsert-update.test.ts
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-update/composites-object-update.test.ts
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/composites-object-upsert-update.test.ts
  • test/integration/test/ports/prisma/functional/composites-recursive/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-recursive/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/composites-selection/composites-selection.test.ts
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/find-unique-or-throw-batching.test.ts
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/contract.prisma
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/prisma-next.config.ts
  • test/integration/test/ports/prisma/functional/interactive-transactions/interactive-transactions.test.ts
  • test/integration/test/ports/prisma/non-ported/functional/accelerate-bad-url-errors/accelerate-bad-url-errors.md
  • test/integration/test/ports/prisma/non-ported/functional/batch-transaction-isolation-level/batch-transaction-isolation-level.md
  • test/integration/test/ports/prisma/non-ported/functional/batch-transaction/batch-transaction.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-bigint/batching-bigint.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-bytes/batching-bytes.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-compound/batching-compound.md
  • test/integration/test/ports/prisma/non-ported/functional/batching-relation/batching-relation.md
  • test/integration/test/ports/prisma/non-ported/functional/batching/batching.md
  • test/integration/test/ports/prisma/non-ported/functional/chunking-query/chunking-query.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-list-updateMany/composites-list-updateMany.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-list-upsert-update/composites-list-upsert-update.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-object-update/composites-object-update.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-object-updateMany/composites-object-updateMany.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-object-upsert-update/composites-object-upsert-update.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-recursive/composites-recursive.md
  • test/integration/test/ports/prisma/non-ported/functional/composites-selection/composites-selection.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/client.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/defineExtension.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/extends.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/itx.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/model.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/pdp.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/query.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/result.md
  • test/integration/test/ports/prisma/non-ported/functional/extensions/tx.md
  • test/integration/test/ports/prisma/non-ported/functional/globalOmit/globalOmit.md
  • test/integration/test/ports/prisma/non-ported/functional/globalOmitJSGenerator/globalOmitJSGenerator.md
  • test/integration/test/ports/prisma/non-ported/functional/interactive-transactions/interactive-transactions.md
  • test/integration/test/ports/prisma/non-ported/functional/logging/logging.md
  • test/integration/test/ports/prisma/non-ported/functional/mysql-bit-type/mysql-bit-type.md
  • test/integration/test/ports/prisma/non-ported/functional/prisma-promise/prisma-promise.md
  • test/integration/test/ports/prisma/non-ported/functional/query-error-logging/query-error-logging.md
  • test/integration/test/ports/prisma/non-ported/functional/raw-queries-send-type-hints/raw-queries-send-type-hints.md
  • test/integration/test/ports/prisma/non-ported/functional/raw-queries-typed-results/raw-queries-typed-results.md
  • test/integration/test/ports/prisma/non-ported/functional/reconnect/reconnect.md
  • test/integration/test/ports/prisma/non-ported/functional/runtime-import/runtime-import.md
  • test/integration/test/ports/prisma/non-ported/functional/tracing/tracing.md
  • test/integration/test/ports/prisma/non-ported/functional/typed-sql/postgres-lists/postgres-lists.md
  • test/integration/test/ports/prisma/non-ported/functional/typed-sql/postgres-scalars-nullable/postgres-scalars-nullable.md
  • test/integration/test/ports/prisma/non-ported/functional/typed-sql/postgres-scalars/postgres-scalars.md

Comment on lines +49 to +54
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);

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.

🎯 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 is null.
  • 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 assert content has 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-L75
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L135-L146
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L164-L169
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L185-L190
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L206-L211
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L227-L232
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/composites-object-updateMany.test.ts#L248-L259
  • test/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

Comment on lines +223 to +235
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()),
]);
}

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.

🎯 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.

Suggested change
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.

@SevInf SevInf changed the title Port prisma functional wave 3: interactive transactions, composite updates, non-portable client-surface sweep (503 accounted) Port prisma functional waves 3–4: transactions, composites, and the full issues/ regression bucket (591 accounted) Jul 27, 2026
SevInf and others added 3 commits July 28, 2026 08:33
…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>
@StevenMcClankerton

Copy link
Copy Markdown

This pull request has moved to prisma/prisma#29832.

@SevInf SevInf closed this Jul 28, 2026
@SevInf
SevInf deleted the port-all-tests branch July 28, 2026 16:24
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