← Back to Pull requests

The ParadeDB extension follows the ORM development build 8.0.1-dev.15, so the nightly compatibility run passes again #5

Closed
unknown closed this pull request without merging on Nov 30, 2026 11:49 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 09:52 UTC
Author

The ParadeDB extension, @prisma/orm-extension-paradedb, is built and tested against one exact build of the six Prisma ORM packages it uses. This pull request moves that build from 8.0.0-rc.25-dev.25 to 8.0.1-dev.15, the ORM's newest development build, and makes the changes that build requires. The largest is that every hash in the package's contract and migrations takes a new value:

 # packages/orm-extension-paradedb/migrations/20261129T0117_install_pg_search_from_first_head/migration.json
-  "from": "0c0734ba…",
-  "to": "5abfbfd2…",
-  "migrationHash": "58d54baf…"
+  "from": "64d4b64f…",
+  "to": "6640f77a…",
+  "migrationHash": "659d2f19…"

No migration's operations change. Nothing is published by this pull request: the package's version stays 8.0.1-ea.0, which has never been published, and the publish workflow still refuses to publish while the package names a development build.

What this means for users of the first release

Two facts follow from the new hashes. Both are in CHANGELOG.md, and they are what a reviewer is approving.

1. The first release from this repository loads only with Prisma ORM release 8.0, and the release candidates of this package do not load with it. An application upgrades the two together, by the steps the ORM's upgrade guide gives for the hash change: deploy pending migrations first, upgrade, run the guide's script, delete the extension's copied migration folders the script names, run prisma contract emit, and in that release's deploy record the new hashes in each existing database with prisma db sign --no-advance-ref, then run prisma db migrate.
2. A database that has no pg_search yet needs it created by hand, before the upgrade. The release candidates shipped a migration that ran CREATE EXTENSION IF NOT EXISTS "pg_search" WITH SCHEMA "public". pg_search cannot be installed in public, so on a database that did not already have it, prisma db migrate failed and the database stayed where it was. This repository added a migration to repair that. But a database records the hash of the contract it is at, the release-candidate database recorded an old hash, and this version's migrations start from new hashes, so no migration here starts where that database is. Its owner runs CREATE EXTENSION IF NOT EXISTS pg_search CASCADE; and then prisma db migrate with the release candidate they are on, whose statement then finds the extension installed and does nothing; after that the normal upgrade applies. A database that already has pg_search, and a new database, need nothing more. The repair migration stays in the package, so that its history has a working route from every contract it names, and the changelog says it never runs. This remedy follows from reading the ORM's upgrade guide and its migration runner; it has not been run against such a database.

Why now

A nightly run builds this repository against the ORM's newest dev packages, to find out early when the ORM changes something the extension relies on. It has failed for two nights (#4). Between the two builds the ORM made several breaking changes that an extension must follow.

What the newer build required

1. New contract hashes. Before release 8.0 the ORM changed, one time, the rules that compute a contract's hashes. The extension ships its own small contract and six migrations, which install pg_search. The ORM's upgrade script for this change (contract-hash-inputs) rewrote the hashes in the contract, in each migration, in the file that names the newest contract (migrations/refs/head.json) and in the stored copies of earlier contracts (migrations/snapshots/). The demo application keeps a copy of the extension's migrations, which was emitted again from the rebuilt package.
2. capabilities is now requiredCapabilities in each stored contract. The same script renamed it.
3. A removed entrypoint. test/descriptor.test.ts imported @prisma/orm-family-sql/contract/canonicalization-hooks, which no longer exists. The hash functions now take a normalizeStorage argument instead, so the test passes normalizeSqlStorage from @prisma/orm-family-sql/contract/normal-form and asserts what it did before.
4. Validators are called through Standard Schema. The ORM now checks the options of an extension's index type through Standard Schema, the common interface validation libraries implement, and no longer by testing for arktype's error class. test/index-types.test.ts calls the bm25 options validator the same way, with the same cases.
5. Prisma's own tables moved. The ORM keeps the record of what each database is at in schema prisma (tables signatures and ledger), no longer in prisma_contract. The database tests, and the demo's script that resets its database, use the new names.
6. A workaround is gone. A contract written in a .prisma file can now use the bm25 index type through defineConfig from @prisma/orm-postgres/config; the ORM fixed that. The fixture that worked around it and the test that pinned the failure are removed, and the round-trip test goes through defineConfig, as a user does.

The prisma command-line tool carries its own copy of two ORM packages, and no release of it carries this build's copy. So the two overrides in pnpm-workspace.yaml that force its copy to match stay, and now name 8.0.1-dev.15.

One known failure is recorded, not hidden

An application that exports a contract with a bm25 index and builds type declarations under pnpm fails with TypeScript error TS2742. The ORM's database packages do not export two types, IndexTypeBuilder and IndexTypeRegistration, that the extension's type names. That is an ORM defect with its own fix in prisma/orm. The recorded gap used to be wider: declaration emit failed for any exported contract under pnpm. The ORM has since fixed all but this case.

scripts/check-application.mjs installs the packed package into a new application. It now requires that declaration emit passes for a contract without this extension, and that it fails for the bm25 contract with exactly this one error. When the pinned ORM build contains the fix, the check fails with a message that says to require a pass and to remove the entry from DEVELOPING.md. Asserting the exact error, and not skipping the case, means a second declaration error cannot slip in unseen, and the entry cannot outlive the defect. For the same reason the check now also counts a compiler error that tsc prints without a file name, which it used to ignore.

Contributor docs

  • DEVELOPING.md says a migration's operations never change, and that the hashes were rewritten once for release 8.0.

  • CONTRIBUTING.md's steps for moving to a new ORM build now upgrade the extension first, build it, and then upgrade the demo. The old order fails, because the demo loads the built extension.
  • Checked

    CI on this pull request passes, including the database tests against the ParadeDB image, which could not be run locally. Three of those tests start from a database "on the old head" with new hashes, a state no real database is in after the hash change; they still exercise every migration route the package ships. A test that starts from a real release-candidate database and runs prisma db sign is the follow-up that would cover the remedy above.

    Alternatives considered

  • Wait for the next release candidate. The repository would stay red against the ORM's main until then, and every change above would arrive at once on release day. Following development builds is what the nightly run is for.

  • Re-export the two missing types from this package, so declaration emit passes now. It works, but it would hide the ORM defect from every other extension that adds an index type.

  • Skip the failing declaration case, or mark it as expected to fail. A skipped case stops checking anything, and an expected failure accepts any error. Requiring the one known error keeps the rest of the case checked.
  • Agent: romeo-32

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: wmadden Review duration: 117m
    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
    0.52
    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
    Real PR Conversation Timeline
    1 comments
    "Review active on #5"
    general weight: 0.35
    Reviewers
    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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 20.5% · Safe to merge
    20.5%