Composer runs on Prisma ORM 8.0.0-rc.20 and CLI engine 0.9.0: a piped command prints data lines, and apps that use auth must sign their databases #375
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #375"
general
weight: 0.35
wmadden
Moves Composer to Prisma ORM
8.0.0-rc.20,@prisma/cli-engine0.9.0and theprismaCLI8.0.0-rc.26, ahead of the Composer0.34.0release. Two things change for users: a piped command prints only data lines on stdout, and an app that uses the auth module must sign its databases.Under engine 0.9.0 (prisma/prisma-cli#353) a piped command prints its data lines on stdout, and JSON needs
--json. Composer's commands now say what their data lines are, and a pipedprisma deploykeeps Alchemy's progress on stderr.Changes
1. Pins.
@prisma/orm-postgresand@prisma/orm-toolchain8.0.0-rc.19→8.0.0-rc.20in all seven manifests (11 pins).@prisma/cli-engine0.7.0→0.9.0in@internal/cli, the target,@prisma/composer-cli(peer and dev dependency) and the rootpnpm.overrides. The catalog'sprismahost8.0.0-rc.19→8.0.0-rc.26. The three move together: the rc.26 CLI ships engine 0.9.0 and crashes on start with 0.7.0, and ORM rc.20's@prisma/orm-toolchainpeers 0.9.0.2. Data lines. Each line is tab-separated, an absent value is an empty field, and a backslash, tab, newline or carriage return inside a field is written as
\\,\t,\nor\r.dataLinein@internal/cli'sfamily/data-lines.tsbuilds them, following the ORM's helper from prisma/orm#30835.-
deployprints one line per deployed entity: node address, entity kind (compute-service,postgres-databaseorbucket), entity id, URL. A node without entities, and a deploy that wrote no report, print no line.-
dev stopprints one line per stopped node: address, kind.-
dev urlstill prints the URL alone, now escaped.-
emulator listkeeps its six fields and now escapes them. Its directory field stays an absolute path, because the listing covers every app on the machine and runs from any directory.-
devis a session command and returns no presentation, so it has no data lines.-
family/__tests__/command-stdout.test.tsreads every command source,emulator listincluded. It fails if a command declares an empty data-line list instead ofnoDataLines(reason), and it records that no command usesnoDataLinestoday.-
docs/guides/running-locally.mdhas a new Piped output section: the shared rules, the promise that fields are only added at the end, every command's fields, and whyemulator listprints an absolute path.docs/guides/deploying.mdlinks it. ADR-0053 andlocal-dev.mdmatch.3. A piped deploy keeps the child's output off stdout. In human format the engine starts the converge child with
output: "inherit", so a pipedprisma deployhanded its stdout to Alchemy, and Alchemy's progress landed among the data lines. Composer now starts the child withnode --import data:…, a one-line module that sends the child's stdout to stderr when stdout is not a terminal.captureEngineFailuredoes the same in the stack file, for a child that Alchemy moved to Bun. The reproduce command a failed run prints stays the plain Alchemy command. The cause sits in the engine: in human format with a piped stdout,inheritgives the child the data stream. The engine could route the child's stdout to stderr whenever its own stdout is not a terminal.4. The rc.19 to rc.20 upgrade guides. I ran every entry's detection over the repo. These entries applied:
-
engine-pin-moves-to-0-9-0: the engine pins above.-
piped-output-needs-json: Composer's tests and scripts that read JSON from a pipedprismaalready pass--json. Nothing changed.-
stored-contracts-expand-type-aliases: the auth pack's contract andexamples/auth's snapshot of it named theTstzalias intypeRef. The guide's script wrote the alias into each column, renamed the snapshot directory and rewrote0001_init/migration.jsonandexamples/auth/migrations/auth/refs/head.json. The re-emit gives the same hash, so no extra migration is needed.-
column-type-ref-removedmatched only the twocontract.d.tsfiles the script rewrote.-
check-expectationmatches theops.jsonof migrations that are already applied in deployed databases. I left them unchanged; the guide makes this step optional.-
sql-builder-insert-required-columnsmatches only code that is not a SQL builder insert.5. Contracts. Every contract with an
ormconfig section was re-emitted. Only the auth pack's storage hash changes.Breaking for Composer users
0df0ef0989ec3dd95124dde6303fbe0572bbab08bebf00abff6a7955cadd786eto24a0762cac2c89426d118c9a9a81876ebcf32eba11789722d7c907ba710dc60d. The tables do not change. The auth module's README has a new section, Upgrading to Composer 0.34.0, with the steps in order: run the ORM's type-alias script on the app's copy of the auth migrations, re-emit, thenprisma db signevery database. It says where to find each database's URL, and thatprisma migration statusno longer shows the auth pack's earlier migrations as applied.prisma deploy,prisma dev stoporprisma emulator listmust pass--json. Hosts fromprisma8.0.0-rc.24 on already printed no JSON to a pipe.Why
prisma8.0.0-rc.26The pin is 8.0.0-rc.26, the first CLI that bundles
@prisma/orm-toolchain8.0.0-rc.20. The rc.25 CLI bundles rc.19, which failsprisma contract emit,prisma db verifyandprisma db signon every rc.20 contract withCannot use 'in' operator to search for 'kind' in typeAlias, so an app that uses auth could not finish the upgrade on it. Every contract in this repo was re-emitted with the published rc.26 CLI from the catalog, with no workaround, and came out unchanged; the auth pack's storage hash is24a0762…. Composer 0.34.0 must not be released with an older CLI pin.The auth upgrade, run locally
On
examples/auth, with its own emulators directory and a local database only:1. Composer 0.33.0 (
main):prisma dev module.ts --detachmigrated the local database, whose marker then held0df0ef….2. This branch, with
examples/auth's migrations restored to their 0.33.0 copies, as a user's app has them.prisma devrefused:Contract-space contract validation failed for "auth". The message does not say why.3.
prisma skills sync, thennode .agents/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.19-to-8.0.0-rc.20/scripts/expand-type-aliases/expand-type-aliases.ts. It printed0df0ef… -> 24a0762…, and the migrations it wrote are the same as this branch's. Running the script straight fromnode_modulesfails, because Node does not strip types there, so the README runs the synced copy.4.
prisma devagain:MIGRATION_PATH_NOT_FOUNDfor contract space"auth". The failed run stopped the database, andprisma dev url databasethen answeredDEV.NOT_RUNNING. So the local database must be signed while it still runs, before the firstprisma devon 0.34.0, or reset withprisma dev --fresh. The README says this.5. Back on 0.33.0,
prisma dev --detach, then the upgrade again with theprisma8.0.0-rc.26 dev build (8.0.0-rc.26-dev.162), (rc.26 was published afterwards, and this branch now pins it).prisma db verifyrefused withMIGRATION.CONTRACT_SPACE_VIOLATION(hashMismatchonauth).prisma contract emitworked and changed only the version stamp incontract.json.prisma db sign --db "$(prisma dev url database)"printedauth: signed 24a0762… (was 0df0ef…).prisma db verifythen passed, andprisma migration statussaidUp to datewhile no longer marking the auth0001_initas applied.6.
prisma dev module.ts --detachsucceeded, and Alchemy's output went to stderr.With rc.25, steps 4 and 5 fail on
Cannot use 'in' operator to search for 'kind' in typeAlias.Checks run locally
lint,lint:casts,lint:deps,test:scripts,typecheck:scripts,check:orm-pins,check:family-static-graph,check:floor-imports,lint:retired-binary-name,lint:control-bytes,lint:rules:symlinks,check:cli-engine-pin,check:publish-deps,check:npm-effect-resolutionandcheck:skill-packagingpass.@internal/cli: typecheck passes, 306 tests pass.@prisma/composer-cli: 6 tests pass.turbo run typecheck(80 tasks),@internal/prisma-cloud(433 tests),@internal/auth(130 tests),examples/auth(2 tests), andtest/integration'sbun testandlocal-dev-detach.integration.ts.converge-spawn.test.tsruns the converge child with a piped stdout, as the engine'sinheritgives it, and fails without the fix: Alchemy-styleconsole.log,console.info,console.debugandprocess.stdout.writeoutput reached stdout.The data-line helper is a copy of the ORM's. TML-3718 moves it into
@prisma/cli-engine, after which both copies go.Agent: rochester-20