Context
Bun corpus position 4045, js/third_party/prisma/prisma.test.ts, dynamically generates Prisma 5.1.1 SQLite/PostgreSQL clients, runs migrations, exercises raw queries plus user/post CRUD and relations, stresses concurrent queries, checks memory-growth regressions, and reruns client generation.
Required contract
- Parse and validate the copied Prisma schemas and model a generated client per provider.
- Support SQLite user/post CRUD, nested relation creation, filters/order, updates, relation-safe deletes, concurrent queries, raw query/execute, and disconnect lifecycle.
- Keep the PostgreSQL branch correctly secret-gated while retaining generation coverage.
- Reduce multi-million-query leak loops to deterministic representative iterations without removing warmup/measurement/GC/concurrency structure.
- Avoid writing diagnostic RSS artifacts into the repository.
- Fail generation/model/query/lifecycle operations with stable code, operation/model/action/provider metadata, retained causes, and explicit operation stack frames; never expose datasource credentials or bound values.
Acceptance
- Position 4045 has no unexpected failure or unsupported syntax with the unchanged copied source.
- All SQLite CRUD/relation/concurrency/generation tests pass; PostgreSQL database tests remain intentional todos without a secret.
- Permanent coverage verifies generation state and structured/redacted Prisma errors.
- Focused/cumulative results are recorded in #66.