docs(composer): update the Composer pages to Composer 0.41.2: required targetRef, upgrade steps, region fix #9030
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 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
Real PR Conversation Timeline
1 comments
"Review active on #9030"
general
weight: 0.35
wmadden-electric
Composer 0.41.2 is now
lateston npm, but the Composer pages on docs.prisma.io still describe Composer 0.40.0. An app that follows them today fails its type check, because Composer 0.41 requires everypostgres({ ... })database to name atargetRef: the migration ref the database is migrated to on each deploy. This pull request brings the Composer pages, and the pages elsewhere that describe the same things, up to Composer 0.41.2, Prisma ORM 8.0.0-rc.28 andprisma8.0.0-rc.39.At a glance
'@contract'means the contract the current commit emits; any other value names a committed ref file inmigrations/app/refs/. Every deploy and everyprisma devrebuild runsprisma db migrate --to <targetRef>on the database.What changed in Composer since 0.40.0
These pages are a rewritten copy of the guides in the prisma/composer repository, so each change there has to be carried over by hand. These changes affect the pages:
targetRefis required, and every deploy runs the ORM's migrate to it. Before, Composer judged for itself whether a database was up to date and refused any ref that declared policies. Now the ORM checks the policies, and a deploy stops with the ORM's own error when they differ from the database's.pg,@types/pgandtemporal-polyfill. The contract entry inprisma.config.tsgains arequiredCapabilitiesfield.postinstallhook belongs in a monorepo's rootpackage.json, not a workspace package's.What this pull request changes
composer/databases.mdx,composer/api-reference.mdx: thepostgres()section, the database example and "How migrations are applied". The example installs the ORM's packages at 8.0.0-rc.28, sets aproductionref before its first deploy, and passestargetRef.composer/deploying.mdx: a Region subsection, and new sections on a ref for each new environment, on a deploy that refuses a ref's policies, and on three upgrades: to a requiredtargetRef, to the new contract hashes, and from Composer 0.41.0 or 0.41.1. Review the upgrade steps closely. Readers run them against production databases, and a step done out of order can make a later deploy apply every migration again. They match Composer's own guide step for step.compute/deploy-on-push.mdx: the database migrates to itstargetRef. Deploy on push names each preview after its Git branch, which has no ref of its own, sodeploying.mdxmigratesproductionandstagingto their refs and every other environment to'@contract'. A preview then tests its branch's schema, but not the ref or the policies production will migrate to; the page says so and gives the alternative.cli/deploy.mdx,(index)/prisma-compute/deploy.mdx,guides/compute/astro-marketing-site.mdx: the region.composer/getting-started.mdx: the skills hook in a monorepo.guides/compute/deploy-existing-app.mdx: one sentence saying the Console installs Composer 0.40.0 while the Composer pages describe 0.41.2, and which section moves an app up.composer/local-development.mdx,composer/service-input.mdx,composer/apps-and-modules.mdx: the migrate wording, the upgrade link and versions.guides/upgrade-prisma-orm/index.mdx: only the marker described next.Pages the version lint skips
Web's
lint:versions --fixjob runs every three hours and rewrites any8.0.0-rc.Nthat is not the newest release. Five pages get itslint-versions-ignore-filemarker, which turns the check off for the whole page until someone removes it:composer/databases.mdxandcomposer/deploying.mdx. Their ORM versions are the ones Composer 0.41.2 pins, not the ORM's newest release; the job would rewrite them and break the install line and the upgrade steps. They move the next time these pages are brought up to date with Composer.composer/service-input.mdx, whose upgrade steps pin the versions Composer 0.40.0 was built with.guides/compute/deploy-existing-app.mdxandguides/upgrade-prisma-orm/index.mdx. They state the versions the Prisma Console's Compute setup installs, still Composer 0.40.0 and ORM 8.0.0-rc.25. They move when the Console moves.Left out
prisma devrefuses a local database moved withprisma db updateuntil a migration ends at its contract. Web's docs rules say to fix or file a tool's defect, not to document it. It is filed as Linear issue TML-3999. Readers who plan a migration for each schema change, as these pages say, never reach it.postgres()withouttargetRef. Each needs a tested rewrite, which comes in a follow-up pull request. The full-stack tutorial scaffolds with create-prisma, which still pins Composer 0.40.0, so it is consistent for now.migration ref policy showandset,db sign --force,--permit-policy-change, and the warningMIGRATION.CONTRACT_SNAPSHOT_PROFILE_NOT_UPDATED. That gap predates this change.Related pull requests
CONTRACT.MARKER_MISMATCHwhere these pages nameCONTRACT.SIGNATURE_MISMATCH, which is what rc.28 prints.How it was checked
targetReftype and refused values, the region error, the install lines' peer dependencies, andprisma@8.0.0-rc.39's dependencies. Their findings are fixed here, except the ones listed above.Agent: herodotus-23
🤖 Generated with Claude Code