Skip to content

Conformance drops the engine 0.7.0 exceptions: the ORM toolchain and Composer both peer engine 0.9.0 - #368

Merged
wmadden-electric merged 1 commit into
mainfrom
chore/drop-engine-0-7-exceptions
Oct 23, 2026
Merged

wmadden-electric merged 1 commit into
mainfrom
chore/drop-engine-0-7-exceptions

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

packages/cli/scripts/conformance.ts no longer allows a product family to peer @prisma/cli-engine 0.7.0 while the shell ships 0.9.0. Both exceptions met their own "remove when" condition: @prisma/orm-toolchain 8.0.0-rc.20 (pinned since #364) and @prisma/composer-cli 0.34.0 (pinned since #366) both peer 0.9.0. With them gone, a family that falls behind the shell's engine fails conformance again instead of passing as an allowed exception.

pnpm check:conformance passes on this branch: 5 subjects checked, nothing to report. Typecheck passes.

Agent: rochester-20

…Composer both peer engine 0.9.0

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: af1be707-b69c-4a79-b7aa-ff218951368c
📥 Commits

Reviewing files that changed from the base of the PR and between 21d970f and 1cf7659.

📒 Files selected for processing: 1
  • packages/cli/scripts/conformance.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@368
npx https://pkg.pr.new/@prisma/cli-engine@368

commit: 1cf7659

@wmadden-electric
wmadden-electric merged commit de663bc into main Oct 23, 2026
15 of 16 checks passed
@wmadden-electric
wmadden-electric deleted the chore/drop-engine-0-7-exceptions branch October 23, 2026 08:02
SevInf pushed a commit that referenced this pull request Nov 13, 2026
…ts and the shell's paths (#390)

## Intent

When someone runs a Prisma 7 command against the Prisma 8 CLI, they
should learn in that same run what replaced it and what to run next.
Today they get only `No command registered for '<command>'`. This
applies to people and to agents trained on Prisma 7.

This PR is the first of four. It extends the engine's redirect
mechanism, publishes it as `@prisma/[email protected]`, and covers the
Prisma 7 commands and flags the shell owns. orm-toolchain and
composer-cli add the Prisma 7 paths they own once this engine version is
published. A final PR here then pins those releases and adds one test
that covers every Prisma 7 path.

## Changes

**Engine (`@prisma/cli-engine` 0.9.0 → 0.10.0)**
- `RedirectSpec.replacement` may now be one step, an ordered list of
steps, or absent.
- A redirect may also set:
  - its own error `code` (default `CLI.COMMAND_MOVED`)
  - a `summary` (`{bin}` is substituted)
  - `help`, a command whose `--help` the error points at
  - `docsUrl`, rendered as an `open-url` next action
- Next actions are ordered: steps, then help, then docs.
- A redirect that names none of replacement, help, or docsUrl is a
construction error.
- A redirect that uses only the old fields renders exactly as before;
the existing tests pass unchanged.
- The minor version moves because the normalized
`CommandRedirect.replacement` changed from `string` to `readonly
string[]`.

**Shell (`packages/cli/src/v7-redirects.ts`)**
- A command family with no commands, holding the shell's Prisma 7
redirects:
- **Paths, answered with `CLI.V7_COMMAND`:** `bootstrap`, `postgres
link`, `platform status`, `version`, `complete`, `debug`, `mcp`.
- **`init` flags, answered with `CLI.V7_FLAG`:** `--db`,
`--datasource-provider`, `--generator-provider`, `--preview-feature`,
`--output`, `--url`, `--with-model`, `--no-skills`.
- Each error names the Prisma 8 equivalent as `run-command` next
actions, points at its `--help` (or at the CLI docs when there is no
equivalent), and says in `why` what the equivalent does not cover.
Prisma 7 is mentioned only in the summary.
- `CLI.V7_COMMAND` and `CLI.V7_FLAG` are added to
`docs/reference/error-reference.md`.

**Conformance**
- Two temporary exceptions allow `@prisma/orm-toolchain` and
`@prisma/composer-cli` to keep peering engine `0.9.0` until they release
against `0.10.0`. These are the same kind of entries #368 removed.

```
$ prisma bootstrap
✘ [CLI.V7_COMMAND] `prisma bootstrap` is a Prisma 7 command and is not available in Prisma 8
  why: Setting up a new app takes two commands: `project create` creates a Project, ...
→ Step 1: prisma project create <name>
→ Step 2: prisma postgres create <name>
→ Read its help: prisma project create --help
```

## Scope

**Not in this PR:**
- The ORM's Prisma 7 paths (`generate`, `db *`, `migrate *`, `studio`,
…) belong to orm-toolchain. It already redirects the six `migrate *`
paths, and the engine rejects a second family claiming the same path.
- `dev ls/rm/start` and the Prisma 7 flags on `dev` belong to
composer-cli.
- The test that covers every Prisma 7 path comes in a later PR here,
after those releases.

## Verification

- `pnpm typecheck`, `pnpm lint` and `pnpm --filter @prisma/cli test`
pass. The new `packages/cli/tests/v7-redirects.test.ts` has 57 cases.
- `pnpm --filter @prisma/cli-engine test`: one failure,
`spawn-real-child` ("child runs in the engine's own process group"). It
also fails on main on the machine this was developed on.
- `pnpm check:conformance` fails locally with `tarball/pack-failed` for
`prisma`. The cause is Node's `fs.cpSync` failing with EACCES on the
virtiofs mount the checkout sits on, and it reproduces without this
branch's changes. The CI run of `check:conformance` is the result to
check.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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