← Back to Pull requests

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

Closed
unknown closed this pull request without merging on Oct 23, 2026 05:30 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 18:34 UTC
Author

Moves Composer to Prisma ORM 8.0.0-rc.20, @prisma/cli-engine 0.9.0 and the prisma CLI 8.0.0-rc.26, ahead of the Composer 0.34.0 release. 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.

$ prisma deploy module.ts | cut -f1,4
catalog.service	https://catalog.example.com
catalog.database

$ prisma dev stop
gateway	service
database	database

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 piped prisma deploy keeps Alchemy's progress on stderr.

Changes

1. Pins. @prisma/orm-postgres and @prisma/orm-toolchain 8.0.0-rc.19 → 8.0.0-rc.20 in all seven manifests (11 pins). @prisma/cli-engine 0.7.0 → 0.9.0 in @internal/cli, the target, @prisma/composer-cli (peer and dev dependency) and the root pnpm.overrides. The catalog's prisma host 8.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-toolchain peers 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, \n or \r. dataLine in @internal/cli's family/data-lines.ts builds them, following the ORM's helper from prisma/orm#30835.
- deploy prints one line per deployed entity: node address, entity kind (compute-service, postgres-database or bucket), entity id, URL. A node without entities, and a deploy that wrote no report, print no line.
- dev stop prints one line per stopped node: address, kind.
- dev url still prints the URL alone, now escaped.
- emulator list keeps 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.
- dev is a session command and returns no presentation, so it has no data lines.
- family/__tests__/command-stdout.test.ts reads every command source, emulator list included. It fails if a command declares an empty data-line list instead of noDataLines(reason), and it records that no command uses noDataLines today.
- docs/guides/running-locally.md has a new Piped output section: the shared rules, the promise that fields are only added at the end, every command's fields, and why emulator list prints an absolute path. docs/guides/deploying.md links it. ADR-0053 and local-dev.md match.
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 piped prisma deploy handed its stdout to Alchemy, and Alchemy's progress landed among the data lines. Composer now starts the child with node --import data:…, a one-line module that sends the child's stdout to stderr when stdout is not a terminal. captureEngineFailure does 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, inherit gives 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 piped prisma already pass --json. Nothing changed.
- stored-contracts-expand-type-aliases: the auth pack's contract and examples/auth's snapshot of it named the Tstz alias in typeRef. The guide's script wrote the alias into each column, renamed the snapshot directory and rewrote 0001_init/migration.json and examples/auth/migrations/auth/refs/head.json. The re-emit gives the same hash, so no extra migration is needed.
- column-type-ref-removed matched only the two contract.d.ts files the script rewrote.
- check-expectation matches the ops.json of migrations that are already applied in deployed databases. I left them unchanged; the guide makes this step optional.
- sql-builder-insert-required-columns matches only code that is not a SQL builder insert.
5. Contracts. Every contract with an orm config section was re-emitted. Only the auth pack's storage hash changes.

Breaking for Composer users

  • Apps that use the auth module must sign their databases. The auth pack's storage hash changes from 0df0ef0989ec3dd95124dde6303fbe0572bbab08bebf00abff6a7955cadd786e to 24a0762cac2c89426d118c9a9a81876ebcf32eba11789722d7c907ba710dc60d. 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, then prisma db sign every database. It says where to find each database's URL, and that prisma migration status no longer shows the auth pack's earlier migrations as applied.

  • A script that read JSON from a piped prisma deploy, prisma dev stop or prisma emulator list must pass --json. Hosts from prisma 8.0.0-rc.24 on already printed no JSON to a pipe.
  • Why prisma 8.0.0-rc.26

    The pin is 8.0.0-rc.26, the first CLI that bundles @prisma/orm-toolchain 8.0.0-rc.20. The rc.25 CLI bundles rc.19, which fails prisma contract emit, prisma db verify and prisma db sign on every rc.20 contract with Cannot 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 is 24a0762…. 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 --detach migrated the local database, whose marker then held 0df0ef….
    2. This branch, with examples/auth's migrations restored to their 0.33.0 copies, as a user's app has them. prisma dev refused: Contract-space contract validation failed for "auth". The message does not say why.
    3. prisma skills sync, then node .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 printed 0df0ef… -> 24a0762…, and the migrations it wrote are the same as this branch's. Running the script straight from node_modules fails, because Node does not strip types there, so the README runs the synced copy.
    4. prisma dev again: MIGRATION_PATH_NOT_FOUND for contract space "auth". The failed run stopped the database, and prisma dev url database then answered DEV.NOT_RUNNING. So the local database must be signed while it still runs, before the first prisma dev on 0.34.0, or reset with prisma dev --fresh. The README says this.
    5. Back on 0.33.0, prisma dev --detach, then the upgrade again with the prisma 8.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 verify refused with MIGRATION.CONTRACT_SPACE_VIOLATION (hashMismatch on auth). prisma contract emit worked and changed only the version stamp in contract.json. prisma db sign --db "$(prisma dev url database)" printed auth: signed 24a0762… (was 0df0ef…). prisma db verify then passed, and prisma migration status said Up to date while no longer marking the auth 0001_init as applied.
    6. prisma dev module.ts --detach succeeded, 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-resolution and check:skill-packaging pass.

  • @internal/cli: typecheck passes, 306 tests pass. @prisma/composer-cli: 6 tests pass.

  • From the first round: turbo run typecheck (80 tasks), @internal/prisma-cloud (433 tests), @internal/auth (130 tests), examples/auth (2 tests), and test/integration's bun test and local-dev-detach.integration.ts.

  • converge-spawn.test.ts runs the converge child with a piped stdout, as the engine's inherit gives it, and fails without the fix: Alchemy-style console.log, console.info, console.debug and process.stdout.write output 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

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: wmadden Review duration: 655m
    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
    0.75
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 75.2% (HIGH) · Higher = larger blast radius
    75.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.7% · Safe to merge
    29.7%