← Back to Pull requests

docs(docs): contract pages match rc.24 #8882

Closed
unknown closed this pull request without merging on Nov 20, 2026 14:04 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 11:12 UTC
Author

The editor support page showed this MongoDB index, as an example of what the editor completes:

@@index([createdAt(sort: Desc)])

That form was removed in 8.0.0-rc.17, and prisma contract emit refuses it. The form that works, which the PSL syntax page already uses, is:

@@index([sort(createdAt, Desc)])

This is one of 23 findings on the contract pages from a full audit of the Prisma ORM 8 docs against prisma 8.0.0-rc.34 and the ORM packages at 8.0.0-rc.24. This pull request fixes all of them. Every PSL and TypeScript sample on the changed pages was run through prisma contract emit at those versions.

What changed

  • data-modeling/index.mdx. It said contract emit needs its own Temporal when a field has a fixed date default. It does not. It also said Prisma ORM 8 supports only PostgreSQL and MongoDB; it now points to Supported databases.

  • TypeScript schema builder. The page said PSL and the builder are interchangeable. On PostgreSQL the builder cannot write value objects or base models with variants, and the page now says so. It also says a contract.ts fails to emit in a "type": "commonjs" project, with the fix; what prisma contract print needs to turn a TypeScript contract into PSL; and that a relation's own fk settings override foreignKeyDefaults.

  • cli/contract-infer.mdx. Inference works on PostgreSQL only; other databases fail with CONTRACT.INFER_UNSUPPORTED. Without --output it writes over the configured contract. Both are now stated.

  • The contract artifact. New paragraph on executionHash: what it covers, that db sign does not record it, and that a change to it alone needs no migration. storageHash is described as covering the whole storage section.

  • PSL syntax. map: on @id, @@id, @unique, @@unique and @relation is documented, for PostgreSQL. orm init imports definePrismaConfig from @prisma/cli-engine; the page said prisma/config. Both work, and the page says so.

  • Editor support. The contract path is src/prisma/contract.prisma. The page names the extension version to use (31.12.15 or later) and explains that the extension runs the prisma package installed in the project.

  • cli/contract-emit.mdx. The JSON output example is from the current version, with executionHash and pinnedFiles explained.

  • MongoDB data modeling. Vector and Vector(length) are in the field types table.
  • One page outside the contract section changes so it does not contradict it: the MongoDB "Extensions" cell on orm/supported-databases.mdx said "Not yet". The MongoDB client accepts extension packs; every pack published today is for PostgreSQL.

    How it was checked

    An implementer verified each finding before changing a page. A separate reviewer then read every changed page in full and ran the new claims against PostgreSQL and MongoDB, in two rounds; all of its findings are fixed. pnpm lint:links and pnpm lint:versions pass.

    Agent: gagarin-12
    🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Documentation
    Expanded guidance for contract emission, inference, artifact hashes, schema authoring, and editor support, including output locations, overwrite behavior, database limitations, and migration workflows.
    Clarified PostgreSQL constraint naming and row-identity behavior, plus MongoDB vector types and extension-pack support.
    Updated supported-database guidance and examples, including TypeScript module-resolution details.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 467 lines (+350 / -117) across 5 files Reviewer: wmadden-electric Review duration: 172m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 467 lines diff across 5 files
    0.46
    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.368
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8882"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 45.6% (MEDIUM) · Higher = larger blast radius
    45.6%
    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: 18% · Safe to merge
    18%
    Repository