Skip to content

prisma dev and prisma deploy no longer fail in pnpm projects with DEPLOY.ALCHEMY_BIN_MISSING - #332

Merged
wmadden-electric merged 23 commits into
mainfrom
fix/alchemy-bin-resolution
Oct 8, 2026
Merged

wmadden-electric merged 23 commits into
mainfrom
fix/alchemy-bin-resolution

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

In a new app installed with pnpm, the way our getting-started guide sets one up, prisma dev fails before anything starts:

$ pnpm add -D prisma @prisma/composer @prisma/composer-prisma-cloud
$ pnpm prisma dev module.ts
code:    DEPLOY.ALCHEMY_BIN_MISSING
message: Could not find an installed `alchemy` bin above "/home/me/my-app".
fix:     Add "alchemy" as a dependency of your app.

prisma deploy uses the same lookup and fails the same way. After this PR, both commands run in that app with no extra dependency.

The decision

Composer runs the copy of Alchemy that the app's own @prisma/composer depends on. It finds @prisma/composer from the app directory, then finds the alchemy package installed beside it, and starts Alchemy's command-line entry file directly with Node. It no longer looks in the app's node_modules/.bin.

Background: why Composer runs Alchemy at all

Composer provisions an app through Alchemy, an infrastructure library. For each prisma deploy or prisma dev, Composer writes a small TypeScript file, the stack file, into .prisma-composer/. It then starts Alchemy's own command-line tool as a child process and points it at that file. Alchemy is a dependency of @prisma/composer. The app never installs it directly.

Why the old lookup failed under pnpm

Composer used to find Alchemy's executable by walking up from the app directory looking for node_modules/.bin/alchemy. npm and Yarn put every installed package's executable there. pnpm only links the executables of the app's own direct dependencies, so alchemy has no link and the walk finds nothing.

Our own repository never saw this, because its .npmrc sets node-linker=hoisted, which makes pnpm link everything like npm does. The old error's advice, "Add alchemy as a dependency of your app", was the only workaround, and no guide mentioned it.

How the new lookup works

alchemy-bin.ts does three steps:

  1. Resolve @prisma/composer/package.json from the app directory with Node's resolver, and follow symlinks to the real directory.
  2. Look for node_modules/alchemy in that directory and each parent, nearest first. This is how Node itself would find alchemy from inside @prisma/composer. We write the walk out because Alchemy does not export its package.json, so Node's resolver cannot be asked directly.
  3. Read the bin entry of Alchemy's package.json and return the JavaScript file it names.

run-alchemy.ts then starts that file as node <alchemy entry> deploy <stack file> --yes --stage <stage>. Starting the JavaScript file directly means no shell script and no Windows .cmd wrapper is involved.

Because the lookup starts from the app's @prisma/composer, the Alchemy that runs is the same copy the stack file's @prisma/composer imports load. Before, the version of @prisma/composer-cli running the command could decide which copy ran.

When the lookup fails, DEPLOY.ALCHEMY_BIN_MISSING now says which step failed, and its fix says to check that the app depends on @prisma/composer. It also says layouts without a node_modules directory, such as Yarn Plug'n'Play, are not supported.

Three things that had to change with it

The dev stack file imported Alchemy itself. With the executable found, prisma dev still failed: the generated dev stack file contained import { localState } from 'alchemy/State/LocalState', and the app cannot resolve alchemy. @prisma/composer/local-target now exports devState(), which returns that same file-based state store, and the stack file imports it from there. Tests check that neither generated stack file imports from alchemy.

The "run it yourself" command was wrong. When a deploy fails, Composer prints the command so you can rerun it by hand, as ADR-0007 promises. It printed alchemy deploy …, which fails in exactly the project this PR fixes. It now prints the command line it actually started, with arguments quoted for the platform's shell, so a stage name containing $ or a quote is not expanded when pasted. ADR-0007 is amended to say so.

Which runtime runs Alchemy is now chosen by Composer. The old .bin link carried a #!/usr/bin/env node line, so Alchemy always started under Node. Starting the entry file ourselves means we choose the program. Composer uses its own process when it runs under Node. When it runs under Bun, it uses the first node on PATH, and fails with the new DEPLOY.NODE_MISSING if there is none. Alchemy's own startup code can still switch itself to Bun when it sees it was invoked through bunx or bun run. We measured each way of running prisma:

How you run prisma prisma runs under Alchemy runs under
pnpm prisma … or npx prisma … Node Node
bunx prisma … Node Bun
bunx --bun prisma … Bun Bun
bun node_modules/prisma/dist/prisma.js … Bun Node

The deploying guide shows this table and recommends the first form. The deploy-cli design doc records the rule: Composer starts Alchemy with Node and lets Alchemy's startup code decide whether to switch.

Docs

The deploying guide and the shipped agent skill describe the new lookup and the runtime table. While in those files, the effect override example now shows the pnpm 11 form, an overrides: block in pnpm-workspace.yaml, since pnpm 11 ignores overrides in package.json.

How it was verified

  • Manual run in a plain pnpm project. pnpm was set to strict isolation, so no package could be found through hoisting, and Composer came from this branch's packed tarballs. prisma dev module.ts ran the alchemy beside @prisma/composer and reached ready. Under bun node_modules/prisma/dist/prisma.js, the process list showed Alchemy on the system Node. Ctrl-C ended with an ok result.
  • Lookup tests. Strict pnpm and hoisted layouts, @prisma/composer reached through a symlink, no resolvable @prisma/composer, no alchemy beside it, and a bin entry that is a string, an object without an alchemy key, a missing file, malformed JSON or unreadable.
  • Node selection tests. Under Node, under Bun with and without node on PATH, and Windows PATH parsing with quoted entries and PATHEXT.
  • Reproduce command tests. Stage names pr-$USER, it`s!, o'brien and say "hi", quoted for both POSIX shells and cmd.exe.
  • Suites. The cli package (253 tests) and core package tests, root lint and typecheck, the dependency and packaging checks, and the local-dev proofs in test/integration. CI passes on Linux, macOS and Windows.

Alternatives considered

  • Tell users to add alchemy to their app. This is what the old error said. Alchemy is Composer's implementation detail, and a second copy in the app can drift from the version Composer was built against.
  • Look up Alchemy from the location of Composer's own code. An earlier version of this PR did this. It worked, but it found the copy beside @prisma/composer-cli, which can differ from the copy the stack file loads through the app's @prisma/composer.
  • Do the lookup inside Composer's core package. Core forbids node: imports by design, and the lookup needs the file system.
  • Remove Bun's environment variables so Alchemy always stays on Node. Nothing shows Alchemy failing under Bun, and overriding its startup code would be a second mechanism to keep in sync with Alchemy's.

Agent: columbo-17, then saruman-38

🤖 Generated with Claude Code

@prisma-gizmo

prisma-gizmo Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Gizmo reviewed 7b54744 — posted 0 inline comment(s) this pass.

Open findings: 🟡 3 minor

Change walkthrough

Change walkthrough

This PR fixes prisma dev in plain pnpm projects, where the alchemy executable never started because node_modules/.bin only links a project's direct dependencies. Composer now resolves the alchemy package the same way the app's own @prisma/composer does (Node resolver from the app directory, nearest node_modules, run its bin entry with Node), so the executable and the generated stack file's imports come from one install by construction.

The reviewed delta (this pass). The incremental change is a docs amendment to the effect-version-conflict guidance, split per package manager now that the per-manager spellings matter more:

  • docs/guides/deploying.md:326-336 replaces the old two-line npm/Yarn note with three forms: npm's overrides in package.json, pnpm 11+ as a top-level overrides: block in pnpm-workspace.yaml (with the parenthetical that pnpm 11 ignores the pnpm field), and pnpm ≤10 nesting pnpm.overrides in package.json.
  • skills/prisma-composer-core-concepts/SKILL.md:517-520 compresses the same four-case summary into the failure-modes quick reference, staying consistent with the guide.

Updating both surfaces together follows the repo's .agents/rules/user-facing-surface-changes.mdc rule (guides are the website's content; the skill ships in the @prisma/composer tarball).

Rest of the PR (earlier pass, context). Core's devState() on @prisma/composer/local-target removes the generated stack file's direct alchemy import, fixing the same isolation bug one level down; the adapters now print the exact spawn command on deploy failure, replacing the fictional alchemy deploy … text; and the Runtime section of the deploy guide documents the Node/Bun matrix between the prisma bin and Alchemy's launcher.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7103ae0c-6581-4634-9319-cbf496a60cce
  • Autopilot · 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 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@332
npm i https://pkg.pr.new/@prisma/composer-cli@332
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@332

commit: 32c917f

prisma-gizmo[bot]
prisma-gizmo Bot previously requested changes Oct 1, 2026

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟡 1 minor · trace

Comment thread packages/0-framework/3-tooling/cli/src/run-alchemy.ts Outdated
@wmadden-electric
wmadden-electric force-pushed the one-config-file/remove-binary branch from be95770 to 07e3465 Compare October 1, 2026 07:52
@wmadden-electric
wmadden-electric force-pushed the fix/alchemy-bin-resolution branch from eb0e77b to 061b536 Compare October 1, 2026 07:52
@wmadden-electric
wmadden-electric force-pushed the one-config-file/remove-binary branch from 07e3465 to 840bb0a Compare October 5, 2026 10:00
@wmadden-electric
wmadden-electric force-pushed the fix/alchemy-bin-resolution branch from 061b536 to 4dff2f8 Compare October 5, 2026 10:02

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

Still open from previous reviews: 🟡 1 minor

@wmadden-electric
wmadden-electric dismissed prisma-gizmo[bot]’s stale review October 5, 2026 10:10

Both findings addressed in the follow-up commits; the bot's re-review reports no new findings.

prisma-gizmo[bot]
prisma-gizmo Bot previously requested changes Oct 5, 2026

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟠 1 major · trace

Still open from previous reviews: 🟡 1 minor

Findings outside the diff

  • 🟠 Major · tests packages/0-framework/3-tooling/cli/src/tests/run-alchemy.test.ts — pnpmStoreLayout places alchemy in a store node_modules pnpm would never put it in, so the pnpm scenario the tests claim to cover is synthetic
    The pnpmStoreLayout fixture installs the fake alchemy directly in the same store node_modules as the package whose file is passed as fromFile (@prisma/composer/dist/control.mjs), and the first test's name claims this is "an alchemy that is only a dependency of Composer". In a real pnpm project that layout cannot occur: a store node_modules (.pnpm/<pkg>@v/node_modules) contains only that package's direct dependencies, and the package that ships this module does not depend on alchemy — packages/0-framework/3-tooling/cli/package.json lists no alchemy; alchemy is a dependency of @internal/core (packages/0-framework/1-core/core/package.json:22), which lives in its own store dir that findAlchemyPackageDir's upward walk never enters. Since resolveAlchemyEntry() defaults to import.meta.url of this module (compiled into the CLI package's dist), the production walk under default pnpm actually succeeds via pnpm's hidden hoisted store (node_modules/.pnpm/node_modules, from hoist-pattern: ['*']) — a mechanism no test models — and under pnpm's strict isolation (hoist-pattern=false) it fails with DEPLOY.ALCHEMY_BIN_MISSING whose fix text names only Yarn Plug'n'Play as the unsupported layout. So the tests greenlight the PR's headline pnpm fix while validating a layout that never exists, and the config in which it still breaks is untested and undocumented.
    Recommended fix: Make the fixture model the real chain: put the module that calls resolveAlchemyEntry() in its own package's store dir without alchemy beside it, and install the fake alchemy at <root>/node_modules/.pnpm/node_modules/alchemy (pnpm's hidden hoisted store). Add a case with the hidden hoist absent (pnpm hoist-pattern=false) asserting the DEPLOY.ALCHEMY_BIN_MISSING message, and mention that pnpm configuration in the error's fix text alongside Yarn Plug'n'Play.

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

Still open from previous reviews: 🟡 1 minor

Base automatically changed from one-config-file/remove-binary to main October 5, 2026 13:28
wmadden-electric and others added 14 commits October 5, 2026 15:33
…n link

In a plain pnpm project that depends on @prisma/composer, `prisma dev` failed
with DEPLOY.ALCHEMY_BIN_MISSING once the emulators were up: Composer looked
for node_modules/.bin/alchemy, and pnpm links bins only for an app's direct
dependencies. alchemy is Composer's dependency. This workspace hid the bug
because its hoisted linker puts every bin at the root.

resolveAlchemyEntry finds the alchemy package by walking node_modules up from
Composer's own real location (alchemy does not export its package.json, so
require.resolve cannot reach it), reads its bin, and the command line runs that
entry with process.execPath. No shell shim is involved, so Windows needs no
.cmd lookup. DEPLOY.ALCHEMY_BIN_MISSING remains for an alchemy that cannot be
resolved, and its message now names the package lookup.

Tests cover a pnpm store layout with alchemy only beside Composer and no .bin
link, a hoisted alchemy, an absent one, and the alchemy this package is
installed with.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The deploying guide and the skill described the old .bin lookup, including
the Windows shim order. They now say Composer runs the alchemy it is installed
with, so an app needs no direct alchemy dependency.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
With the alchemy executable found, `prisma dev` in a plain pnpm project failed
next inside the converge: the generated dev stack file imported
alchemy/State/LocalState, and the app cannot resolve alchemy, which is
Composer's dependency. @prisma/composer/local-target now re-exports
localState, and the stack file imports it from there with the rest of its
local-target imports, so it reaches the same alchemy copy the converge runs.
The deploy stack file already imports only @prisma/composer entries.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The skill and the deploying guide said one fix covers CONFIG.SECTION_MISSING,
CONFIG.FIELD_RETIRED and CONFIG.FILE_RETIRED. SECTION_MISSING is fixed by
adding the composer section; the two RETIRED codes by moving the old file's
extensions and state into the section and removing configPath or the old
file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Running alchemy's entry with process.execPath moved it onto Bun whenever the
prisma host ran under Bun, as the examples and the e2e action run it. The old
bin's node shebang kept alchemy on Node, on purpose. nodeExecutable now picks
this process's runtime only under Node; under Bun it takes the first node on
PATH, and raises the new DEPLOY.NODE_MISSING (added to ADR-0044's code list)
when there is none. Tests cover both runtimes and the missing case with an
injected runtime. The guide and the skill say alchemy runs under Node.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
… under pnpm

`bun node_modules/.bin/prisma` fails in a default pnpm project, where that
entry is a shell script. `bunx prisma` follows the node shebang and runs
prisma under Node, and `bunx --bun prisma` also starts alchemy under Bun
through its node shim on PATH. `bun node_modules/prisma/dist/prisma.js` runs
the host under Bun with alchemy on Node, verified in a plain pnpm project.
The guide and the skill document that form, keep the package-manager form
for Node, and say why the shorter forms fail.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
- A Composer file that is not on disk (realpath fails) now raises
  DEPLOY.ALCHEMY_BIN_MISSING instead of a raw ENOENT.
- The fix text says to check that alchemy is installed beside
  @prisma/composer, which depends on it, and that layouts without
  node_modules are unsupported, instead of sending users to reinstall.
- The PATH lookup for node follows the injected platform: on Windows it
  splits on ";", unquotes entries and tries PATHEXT.
- nodeExecutable's doc says Composer chooses the Node that starts Alchemy's
  launcher, which may move itself to Bun under bunx or bun run.
- localState on @prisma/composer/local-target is marked @internal, for the
  generated dev stack only.
- Tests: Composer reached through a symlink, a string bin, an object bin
  without an alchemy key, a bin naming a missing file, an unreadable path,
  the Windows PATH rules, a deploy stack file with no alchemy import, and a
  `spaces & symbols` stage round-tripping through the child on every
  platform.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The guide and the skill claimed Alchemy always runs under Node and that the
shorter Bun forms do not work. Alchemy's own launcher moves to Bun under
bunx or bun run, and every form runs. Runtime now recommends the package
manager's form (pnpm prisma, npx prisma), explains that Composer starts
Alchemy with Node and the launcher may switch, and tabulates the four forms
from the QA runs: package manager (Node, Node), bunx (Node, Bun),
bunx --bun (Bun, Bun), and bun on the JS entry from a shell (Bun, Node).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…LCHEMY_BIN_MISSING

binEntryOf read and parsed the manifest unguarded, so EISDIR or a JSON
syntax error escaped as a raw error instead of the structured diagnostic.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…ecks

The Bun-on-PATH case used the host platform and the real file system, so
on Windows PATHEXT produced node.EXE where the test expected node.exe.
Every case now injects its runtime, and Windows gets the default-PATHEXT
and no-node cases too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
This module is bundled into @prisma/composer and @prisma/composer-cli,
and both declare alchemy, so pnpm puts alchemy in each package's own
store directory. The fixture now models that with no hidden hoist and no
root alchemy, for both packages. A package that does not declare alchemy
gets DEPLOY.ALCHEMY_BIN_MISSING, and a test fails if the two published
manifests stop declaring the same alchemy. The fix text names the package
that runs alchemy under prisma and from a script.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…aw localState re-export

@prisma/composer/local-target exported Alchemy's localState directly, so
an Alchemy upgrade changed Composer's public types. devState() is
Composer's own name for the store prisma dev converges against. The dev
stack header now describes the command Composer starts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…print the command that ran

resolveAlchemyBin resolves @prisma/composer from the app directory, as
the generated stack file's imports do, and takes the alchemy installed
beside it. The CLI and the stack code then come from one install,
wherever this module was bundled. Adapters report the command line they
started, and failures print it as the reproduce command instead of an
alchemy command that pnpm apps do not have. NodeRuntime is renamed
HostRuntime, since the host may be Bun.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
… prints

deploy-cli.md states the runtime rule: Composer starts the bin of the
alchemy @prisma/composer depends on with Node, and Alchemy's launcher
picks the final runtime. ADR-0007 gets an addendum for the printed
reproduce command, and ADR-0044 notes that prisma dev raises the shared
DEPLOY codes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric force-pushed the fix/alchemy-bin-resolution branch from 3496822 to 2ac4bea Compare October 5, 2026 13:33

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

Still open from previous reviews: 🟡 1 minor

Double quotes let a shell expand $, backticks and ! in a stage name when
the command is pasted. Single quotes, with embedded single quotes
escaped, keep every argument literal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…r-cli declares it

The guide and the skill still said Composer finds alchemy from its own
location. The composer-cli build config now says why alchemy stays a
dependency: the inlined core code imports it, and the hoisted workspace
would hide its removal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric dismissed prisma-gizmo[bot]’s stale review October 5, 2026 13:42

The lookup now anchors on the app's @prisma/composer (which declares alchemy) and the tests model pnpm's real strict layout; strict-isolation QA reaches ready. The bot's re-review reports no new findings.

prisma-gizmo[bot]
prisma-gizmo Bot previously requested changes Oct 5, 2026

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟡 1 minor · trace

Still open from previous reviews: 🟡 1 minor

Comment thread packages/0-framework/3-tooling/cli/src/run-alchemy.ts Outdated
cmd.exe reads single quotes literally, so the POSIX-quoted command broke
when pasted on Windows. On win32 arguments are double-quoted with
embedded quotes doubled; elsewhere they stay single-quoted. The family
deploy test checked the bin path and arguments as one string, which
failed on Windows because the temp path (RUNNER~1) needs quoting there;
it now checks them apart.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
prisma-gizmo[bot]
prisma-gizmo Bot previously requested changes Oct 5, 2026

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟡 2 minor · trace

Still open from previous reviews: 🟡 2 minor

Comment thread packages/0-framework/3-tooling/cli/src/family/__tests__/deploy.test.ts Outdated
Comment thread packages/0-framework/3-tooling/cli/src/run-alchemy.ts
…hy a path gets quoted

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
prisma-gizmo[bot]
prisma-gizmo Bot previously requested changes Oct 5, 2026

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟡 1 minor · trace

Still open from previous reviews: 🟡 4 minor

wmadden-electric and others added 2 commits October 5, 2026 16:12
…tput on cmd.exe

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

Still open from previous reviews: 🟡 5 minor

@wmadden-electric
wmadden-electric dismissed stale reviews from prisma-gizmo[bot], prisma-gizmo[bot], and prisma-gizmo[bot] October 5, 2026 14:34

Addressed in later commits; the bot's re-review on 11b085c reports no new findings.

pnpm 11 ignores the pnpm field of package.json, so the guide and the
skill now give the pnpm-workspace.yaml overrides block for pnpm 11 and
later, keep the package.json form for pnpm 10 and earlier, and list the
other package managers' forms separately.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

Still open from previous reviews: 🟡 5 minor

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Gizmo review threads are resolved and the head commit has been reviewed. Approving.

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No critical or major Gizmo finding is open and the head commit has been reviewed. Approving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric wmadden-electric changed the title prisma dev finds the alchemy executable in a plain pnpm project Composer runs the alchemy that @prisma/composer installs, so prisma dev and deploy work under pnpm Oct 8, 2026
@wmadden-electric wmadden-electric changed the title Composer runs the alchemy that @prisma/composer installs, so prisma dev and deploy work under pnpm prisma dev and prisma deploy no longer fail in pnpm projects with DEPLOY.ALCHEMY_BIN_MISSING Oct 8, 2026
@wmadden-electric
wmadden-electric merged commit 1736420 into main Oct 8, 2026
25 checks passed
@wmadden-electric
wmadden-electric deleted the fix/alchemy-bin-resolution branch October 8, 2026 06:59
RyanGarber pushed a commit to RyanGarber/prisma-orm-tmep that referenced this pull request Oct 9, 2026
```
$ git diff --stat main...HEAD | tail -1
 25 files changed, 1 insertion(+), 2833 deletions(-)
```

This closes the one-config-file project. It deletes the project's
working folder, `projects/one-config-file/`, and fixes one duplicate
number in the failure-mode catalogue. Linear: TML-3340.

The project moved Prisma Composer's configuration out of its own
`prisma-composer.config.ts` into the `composer` section of
`prisma.config.ts`, and deleted Composer's standalone `prisma-composer`
binary. Prisma 8 now has one CLI and one config file. The rest of this
description is the close-out record the Drive process asks for: what was
checked, where each decision now lives, and where each unfinished item
is tracked.

## What was delivered

| PR | What it did |
| --- | --- |
| prisma/composer#328 | Composer's configuration is the `composer`
section of `prisma.config.ts`. The old file and `configPath` are
refused. |
| prisma/composer#331 | The `prisma-composer` binary is gone. Docs,
examples and the shipped skill say `prisma deploy` and `prisma dev`.
Released as Composer 0.26.0. |
| prisma/prisma-cli#330 | The `prisma` host runs Composer 0.26.0.
Released as `prisma@8.0.0-rc.20`. |
| prisma/web#8387 | The public Composer docs describe the `composer`
section. |
| prisma/composer#332 | Found during testing: `prisma dev` and `prisma
deploy` failed in pnpm projects. Merged, not yet released (TML-3520). |
| prisma/composer#333 | An emulator test race that made CI flaky, plus
`PRISMA_COMPOSER_EMULATORS_DIR`. |

Three more PRs came out of this close-out and are open:

- prisma/composer#347 writes ADR-0050, which records the binary's
retirement. Without it the close-out failed the ADR audit, and four
older ADRs still described `prisma-composer` as the entry point.
- prisma/web#8415 fixes a tutorial page that still told readers to write
`prisma-composer.config.ts`.
- prisma/pdp-control-plane#5608 makes the platform's Compute import flow
write the `composer` section into `prisma.config.ts`, and recognise
repositories that already have it. Until now it wrote
`prisma-composer.config.mjs` and pinned Composer 0.25.0, so imported
repositories broke on upgrading to 0.26.0.

## Definition of Done

| Item | Verdict | Evidence |
| --- | --- | --- |
| orm-demo has one config file, and `prisma deploy` and `prisma dev` run
against it from the host | Met, with deviations | `examples/orm-demo`
has only `prisma.config.ts`. `prisma dev` from the host build reached
ready (slice 3 QA). A real `prisma deploy` of orm-demo succeeds in
Composer's e2e workflow on `main`, using the published host with the
workspace family. No deploy ran from the host build itself, because no
service token was available. |
| The old file and `configPath` get their diagnostics | Met, with a
deviation | `CONFIG.FILE_RETIRED` and `CONFIG.FIELD_RETIRED`, exit 2,
from the host binary. Shown with `prisma dev`, because `deploy` checks
credentials before reading the config. Both commands use the same
validator. |
| A broken `effect` install fails with `CLI.CONFIG_UNREADABLE`, and
`prisma --version` still works | Met, with the same deviation | Slice 3
QA, step 5. |
| Published packages have no `bin` and no stale name | Met |
`@prisma/composer-cli` and `@prisma/composer` 0.28.0 declare no `bin`.
Their unpacked tarballs name the old file only in the messages that
refuse it. |
| A CI check keeps the old name out | Met | `pnpm
lint:retired-binary-name` runs in CI. Its test plants a mention and
expects a failure. |
| TML-3340 Done, web pages updated | Met | TML-3340 is Done with a
closing comment. One page missed by #8387 is fixed in prisma/web#8415. |
| The consolidation plan says `deploy` and `dev` stay bare | Met |
`projects/consolidate-clis/cli-consolidation-plan.md`, and now ADR-0050
in prisma/composer. |
| Retro run, ADR merged, folder deleted | Met once #347 and this PR
merge | The retro's lesson is failure mode F42. ADR-0049 is merged.
ADR-0050 is in #347. |
| Repository references to the folder removed | Met | Nothing outside
the folder links to it. |
| Manual QA for each user-facing slice | Met, with a deviation | Slice 3
has a QA transcript. Slices 1 and 2 recorded their manual QA in the
Verification sections of #328 and #331. |

## Where each decision lives now

Every decision recorded in the deleted spec and design notes has a home
outside the folder:

- **Composer's configuration is the `composer` section, validated by the
section, with the old file and field refused:** ADR-0049, and the
`CONFIG` code list in ADR-0044.
- **The `effect` version pre-flight is deleted; a broken tree fails with
the engine's error:** ADR-0049. #347 adds the four rejected
alternatives, which until now were only in #328's description.
- **The binary is retired, and `destroy` and `log` stay programmatic:**
ADR-0050 in #347.
- **`deploy` and `dev` stay bare commands; `destroy` is not mounted:**
ADR-0050, and the consolidation plan.
- **The examples' `destroy` scripts keep `--production` and `--stage`:**
ADR-0050 records this as a repository-internal script grammar, not a
public command.
- **Examples and CI run the published host with a workspace override:**
`gotchas.md` and `scripts/check-cli-engine-pin*.mjs` in prisma/composer,
which enforce it.
- **Composer runs the `alchemy` installed beside `@prisma/composer`:**
ADR-0007's amendment and `docs/design/10-domains/deploy-cli.md` in
prisma/composer.

## Deferred items and their tickets

| Ticket | Item |
| --- | --- |
| TML-3520 | Release Composer 0.29.0 and pin it in the host, so
`prisma@latest` gets the pnpm fix. |
| TML-3521 | Teardown and logs have no `prisma` command. |
| TML-3522 | Two checkouts of one app still share a local Postgres
server. |
| TML-3523 | A compute emulator test is too tight on time and flakes
under load. |
| TML-3524 | Composer's examples pin an older `prisma` host than
`latest`. |
| TML-3525 | Drop the exact `effect` pin once `effect` 4 is stable or
Alchemy pins its peer. |
| TML-3526 | dependency-cruiser skips the examples' `prisma.config.ts`.
|
| TML-3527 | Edge cases in how Composer starts Alchemy. |
| TML-3528 | prisma/asks and prisma/streams still use the retired config
or command. |

Two smaller review notes are accepted without tickets. The prisma-cli
conformance check needs a new exception on each joint engine release,
which is visible when it happens. Windows edge cases are out of scope,
because Windows is documented as unsupported for local tooling.

## What this PR deletes

Every file under `projects/one-config-file/` is transient under
`drive/project/README.md`: the spec, plan, design notes, retro log,
README, and each slice's spec, plan, grounding notes, reviews and QA
transcript. None is methodology to migrate. The decisions are mapped
above. The full files stay readable in the history of prisma/orm#30536.

## The failure-mode number

The retro added its lesson to `drive/calibration/failure-modes.md` as
F39. prisma/orm#30613 had already used F39 two days earlier. This PR
renumbers ours to F42, the next free number.

Agent: saruman-38

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

---------

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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