← Back to Pull requests

main holds 0.0.0-unreleased until the first release, so every release of the ParadeDB extension, the first included, publishes when its pull request merges #7

Merged
wmadden-electric merged 7 files (314 lines) on Dec 01, 2026 00:14 UTC
View on GitHub
wmadden-electric wmadden-electric commented on Nov 30, 2026 19:49 UTC
Author

main now holds the version 0.0.0-unreleased, which is never released, so that the first release of @prisma/orm-extension-paradedb is made the way every later one is: a pull request raises the version, and merging it publishes.

 // packages/orm-extension-paradedb/package.json, in this pull request
-  "version": "8.0.1-ea.0",
+  "version": "0.0.0-unreleased",

 // the same line, later, in the first release's pull request: merging it publishes
-  "version": "0.0.0-unreleased",
+  "version": "8.0.1-ea.0",

Nothing is published by this pull request, and 8.0.1-ea.0 (the first Early Access version, for Prisma ORM 8.0) is still the first version users will see.

Why

This repository publishes one package through Publish, a GitHub Actions workflow here (.github/workflows/publish.yml). A push to main that changes the package's version publishes that version to npm. So a release is a reviewed pull request and nothing else.

The first release would have been the exception. When the package moved here from the Prisma ORM repository, main was given the version of the first release, 8.0.1-ea.0, before it could be published. The release pull request therefore could not raise the version, its merge would publish nothing, and CONTRIBUTING.md told a maintainer to start the workflow by hand twice: a dry run before merging, and the real publish after.

The maintainers do not want a release to depend on steps someone has to remember and start. And the dry run is worth having on every release, not only the first. So this pull request removes the exception, and makes the dry run automatic for all of them.

What changes

1. 0.0.0-unreleased is never released. scripts/release.mjs decides, for each run of the workflow, whether it releases, which npm dist-tag the version gets, and what is refused. It now names this one version. A push to main that keeps or sets it plans no release, and the run passes with every later job skipped. That includes the merge of this pull request. A run started by hand on it is refused, with a message that says to raise the version. It is a placeholder for the time before the first release; after a release main holds the released version.

2. A release pull request gets a dry run of the real workflow, automatically. Publish now also runs on a pull request that changes the package's package.json. If the pull request raises the version to a releasable one, the workflow runs as a dry run: every CI check, then the job that packs the tarball, checks its contents and runs pnpm publish --dry-run. Otherwise its first job passes and the rest are skipped.

Nothing can be published from a pull request, including one from a fork. The job that publishes requires the main branch and a run that is not a dry run, and a pull request is always planned as a dry run. It is the only job with the permission npm's trusted publishing needs, and the only one that uses the npm-publish environment, which GitHub lets only main use. A pull request's run has its own concurrency group, so it cannot delay or cancel a real publish. On this pull request the new trigger ran and did what it should for a pull request that releases nothing. The path for one that does release first runs on the first release's pull request; that its publish job is skipped there is established by reading the conditions and by the script's tests, not yet by a run.

3. Everything the publish can refuse before it publishes is inside the required check. main requires the CI check. Its Release Checks job already ran most of the publish's refusals on a pull request that raises the version (no changelog section for the version, a dependency on an ORM development build, and others). It now also runs the two that only the publish workflow ran: the check that npm is new enough for trusted publishing, and pnpm publish --dry-run. The automatic dry run in point 2 cannot itself be a required check, because it runs only for some pull requests. So without this, a release pull request could merge while its dry run was failing.

4. A pull request that releases nothing no longer depends on npm being reachable. Planning a release reads the package's versions from npm. That read happened before the decision whether anything is released. Since point 2 makes the plan run on more pull requests, the read now happens only when a release is planned, so an npm outage cannot fail a pull request or a push that releases nothing.

5. A failed publish can be repaired by a merge too. CONTRIBUTING.md now gives this route first for a publish that failed before npm got the version: fix the cause in a pull request that also raises the last number of the version (8.0.1-ea.0 to 8.0.1-ea.1), and its merge publishes. Starting the workflow by hand from main stays documented as the other option.

Checked

  • The release script's tests were written first, and all pass. They cover: a push that sets or keeps the placeholder; the raise from it to 8.0.1-ea.0; a pull request, which is always a dry run whatever its inputs; a hand-started run on the placeholder; and a failing registry read when nothing is released.

  • Locally: lint, type check, build, actionlint on both workflows, and the repository's checks of its package.json files, Markdown links and workflow triggers.

  • This pull request's CI, including the live Publish run described in point 2.
  • Alternatives considered

  • Keep the two hand-started runs, for this one release. It costs no change. But the release then depends on a person being available and remembering both steps, and later releases would still have no dry run before merge.

  • Publish whenever main's version is not on npm. 8.0.1-ea.0 is not on npm today, so every push that touches the package's package.json before release day, such as moving to a newer ORM build, would try to publish, be refused, and leave a failed run on main.

  • 8.0.1-dev.0 as the placeholder. -dev.N already means a published build here: Prisma ORM publishes one from every push, this package depends on such builds, and npm has several hundred -dev. versions of this package from its time in the ORM repository.

  • Make the first release 8.0.1-ea.1. It raises the version with no new rule, but the first version users see would skip .0 for no reason they could tell.
  • Agent: romeo-32

    Diff: 314 lines (+237 / -77) across 7 files Reviewer: wmadden Review duration: 264m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.46) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 314 lines diff across 7 files
    0.46
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.00 · 1 substantive comment(s)
    0.00
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    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
    Shallow Review Depth shallow_review_depth
    0.350
    Diff Size diff_size
    0.344
    Real PR Conversation Timeline
    2 items
    wmadden wmadden approved these changes on Dec 01, 2026 00:14 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    wmadden-electric wmadden-electric
    Labels
    risk: low confidence: 44.8% 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: 46.2% (MEDIUM) · Higher = larger blast radius
    46.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: 44.8% · Lower = rushed or shallow review
    44.8%
    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: 25.5% · Safe to merge
    25.5%