Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

fix(ci): exclude pre-release tags from check:upgrade-coverage default --prev - #847

Merged
wmadden-electric merged 1 commit into
mainfrom
worktree/angry-perlman-1e9bbc
Jun 18, 2026
Merged

wmadden-electric merged 1 commit into
mainfrom
worktree/angry-perlman-1e9bbc

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

n/a — small CI fix. Unblocks the v0.14.0 publish, which failed at the Check upgrade-instruction coverage step in run 27631591957.

At a glance

-  const tag = tryGit(repoRoot, 'describe', '--abbrev=0', '--tags', '--match', 'v[0-9]*');
+  const tag = tryGit(
+    repoRoot,
+    'describe',
+    '--abbrev=0',
+    '--tags',
+    '--match',
+    'v[0-9]*',
+    '--exclude',
+    '*-*',
+  );

In publish mode, default --prev now resolves to the last stable v* tag — pre-release tags like v0.13.0-dev.40 are skipped.

Decision

scripts/check-upgrade-coverage.mjs in publish mode resolves default --prev to the most recent v[0-9]* tag and diffs prev..head. The match was greedy and accepted pre-release tags (v*-dev.N), so the diff shrank to whatever landed between the last dev tag and HEAD — often just the release-bump commit. Tighten the match with --exclude '*-*' so default --prev only picks stable tags.

How the failure happened

  1. Publish to npm ran on 69b6e74 (the "Bump to version 0.14.0" merge).
  2. resolveDefaultPrev ran git describe --abbrev=0 --tags --match 'v[0-9]*' from HEAD, which returned v0.13.0-dev.40 — the dev tag on the bump's parent commit (088813b98).
  3. git diff v0.13.0-dev.40..69b6e74 is just the bump commit, which rewrites every workspace package.json (lockstep version + dep-spec updates) and touches no instructions.md.
  4. The per-pr-declaration rule fires: examples/*/package.json and packages/3-extensions/*/package.json appear in the substrate diff; the matching instructions.md files do not — so the gate rejects the publish.

The 0.13.x cycle had recorded its substrate changes correctly along the way; the gate just wasn't looking at the cycle.

With --exclude '*-*', default --prev resolves to v0.13.0 (the actual last stable tag) and the diff covers the whole 0.13.x → 0.14.0 cycle, where every substrate touch is paired with an instructions.md update.

Verification

  • node --test scripts/check-upgrade-coverage.test.mjs — 46/46 pass, including the new regression test that models the bump-on-top-of-dev-tag failure shape.
  • Replayed the failing CI scenario locally in a fresh clone of prisma/prisma-next at commit 69b6e74: pnpm check:upgrade-coverage --mode publish exits 1 with the production script, exits 0 with the patched script.

Skill update

n/a — internal CI script only.

Checklist

  • All commits are signed off (git commit -s) per the DCO. The DCO status check will block merge if any commit is missing a Signed-off-by: trailer.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • Tests are updated.
  • The PR title is in TML-NNNN: <sentence-case title> form — n/a, this is a non-ticket CI fix and follows the prevailing fix(ci): … convention used by recent neighbours (e.g. #828).

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed the upgrade coverage checker’s default --prev selection in publish mode to use the latest stable v[0-9]* tag, excluding pre-release tags.
    • Updated publish-mode --prev help text to reflect that pre-release tags are excluded.
  • Tests

    • Added a regression test ensuring publish-mode coverage passes only when the default baseline resolves to the latest stable tag (not a pre-release).

@wmadden-electric
wmadden-electric requested a review from a team as a code owner June 17, 2026 11:48
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: d17a81e9-6305-4ee7-8825-3df5dfda23ec

📥 Commits

Reviewing files that changed from the base of the PR and between 8c394d0 and 2b4a881.

📒 Files selected for processing (2)
  • scripts/check-upgrade-coverage.mjs
  • scripts/check-upgrade-coverage.test.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/check-upgrade-coverage.mjs
  • scripts/check-upgrade-coverage.test.mjs

📝 Walkthrough

Walkthrough

In --mode publish, the default --prev tag resolution in resolveDefaultPrev is changed to use git describe with --exclude '*-*', skipping pre-release tags. The error message and --help text are updated accordingly. A new test verifies that a v0.6.0-dev.1 pre-release tag is bypassed in favor of the stable v0.6.0 tag.

Changes

Stable tag resolution for publish mode --prev

Layer / File(s) Summary
resolveDefaultPrev: exclude pre-release tags + help text
scripts/check-upgrade-coverage.mjs
git describe gains --exclude '*-*' to skip pre-release tags; the thrown error message and --help output for --prev in publish mode are updated to reflect the stable-only requirement.
Test: default --prev skips pre-release tag
scripts/check-upgrade-coverage.test.mjs
New test creates a v0.6.0-dev.1 tag on an intermediate commit, runs the script in publish mode without --prev, and asserts exit code 0, confirming v0.6.0 is selected as the stable baseline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • wmadden

Poem

🐇 A pre-release tag tried to sneak in the gate,
But --exclude '*-*' said "you'll have to wait!"
The rabbit checks only the stable ones now,
No dev dots or dashes — no way, no how.
🏷️ v0.6.0 stands proud, the right tag to use!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: excluding pre-release tags from the default --prev argument in the check-upgrade-coverage script for CI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree/angry-perlman-1e9bbc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 154.55 KB (0%)
postgres / emit 142.13 KB (0%)
mongo / no-emit 78 KB (0%)
mongo / emit 72.09 KB (0%)
cf-worker / no-emit 181.82 KB (0%)
cf-worker / emit 167.78 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@847

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@847

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@847

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@847

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@847

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@847

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@847

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@847

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@847

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@847

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@847

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@847

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@847

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@847

@prisma-next/extension-supabase

npm i https://pkg.pr.new/@prisma-next/extension-supabase@847

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@847

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@847

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@847

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@847

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@847

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@847

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@847

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@847

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@847

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@847

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@847

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@847

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@847

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@847

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@847

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@847

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@847

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@847

prisma-next

npm i https://pkg.pr.new/prisma-next@847

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@847

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@847

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@847

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@847

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@847

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@847

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@847

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@847

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@847

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@847

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@847

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@847

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@847

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@847

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@847

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@847

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@847

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@847

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@847

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@847

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@847

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@847

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@847

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@847

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@847

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@847

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@847

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@847

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@847

commit: 2b4a881

… --prev

`pnpm check:upgrade-coverage --mode publish` defaults `--prev` to
`git describe --abbrev=0 --tags --match 'v[0-9]*'`. That match
greedily includes pre-release tags (`v*-dev.N`), which sit on
intermediate commits and shrink the cumulative diff to whatever
landed between the dev tag and HEAD — typically just the release-bump
commit, which rewrites every workspace `package.json` but touches no
`instructions.md`. The per-pr-declaration check then fires on every
`examples/*/package.json` and `packages/3-extensions/*/package.json`
the bump rewrites, even when the 0.x.y cycle recorded its substrate
changes correctly along the way.

This is what blocked the v0.14.0 publish — the bump commit on main
resolved default `--prev` to `v0.13.0-dev.40` (the parent commit's
dev tag), so the diff was the bump alone and the gate rejected it.

Add `--exclude '*-*'` to the describe call so default `--prev`
resolves to the last stable `v*` tag — `v0.13.0` in this case — and
the cumulative diff covers the whole release cycle, where the
`instructions.md` updates actually live.

A regression test models the failure shape: stable tag, mid-cycle
substrate + instructions commit with a dev tag on top, release-bump
commit at HEAD. Pre-fix it reports the same per-pr-declaration
violations; post-fix it passes.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric force-pushed the worktree/angry-perlman-1e9bbc branch from d108086 to 2b4a881 Compare June 18, 2026 09:14
@wmadden-electric
wmadden-electric added this pull request to the merge queue Jun 18, 2026
Merged via the queue into main with commit 88c5e7c Jun 18, 2026
20 checks passed
@wmadden-electric
wmadden-electric deleted the worktree/angry-perlman-1e9bbc branch June 18, 2026 09:39
wmadden-electric added a commit that referenced this pull request Jun 18, 2026
Main shipped the 0.14.0 publish bump (#843) and several follow-ups
(TML-2916 #838, TML-2503 #839, TML-2787 #683, TML-2893 #849, ci-fix
#847) while slice 1 was in review. Merge to pick them up.

Resolution:
- `skills/extension-author/.../0.13-to-0.14/instructions.md` — union of
  the slice's TML-2919 entry and main's TML-2916 entry as two distinct
  HTML-comment blocks, matching the file's per-ticket convention.
  Per the skill spec's rebase scenario (lines 122-130): existing entries
  in the just-shipped 0.13-to-0.14 directory may stay in place; we do
  not relocate the TML-2919 entry to 0.14-to-0.15.
- Lockfile + example fixtures + apps + all other non-slice files —
  take main's side cleanly (the branch hadn't touched them; auto-merge
  resolved to main's content). `pnpm install` confirms the lockfile is
  consistent.
- No `src/` conflicts — only the one instructions.md conflict above.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants