Skip to content

TML-3722: The docs site error-reference sync passes again: the MDX check reads the Markdown source, not the generated .mdx page - #30854

Merged
wmadden-electric merged 1 commit into
mainfrom
tml-3722-mdx-check-source-only
Oct 23, 2026
Merged

wmadden-electric merged 1 commit into
mainfrom
tml-3722-mdx-check-source-only

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
$ node prisma-src/scripts/list-error-codes.mjs --root prisma-src --verify apps/docs/content/docs/orm/reference/error-reference.mdx
error-reference has text the docs site cannot compile as MDX; put each tag or brace inside a code span:
  line 9: {/* Generated by scripts/generate-error-reference.mjs from

#30848 made --verify refuse tags and braces outside code. prisma/web's sync-error-reference-docs.yml also runs --verify, on the page it generates: error-reference.mdx, which is already MDX and opens with an MDX comment {/* ... */}. So the sync, which #30848 unblocked at the generate step, now fails at the verify step.

--verify now applies the MDX check only to a file that is not .mdx: the canonical docs/reference/error-reference.md, where it belongs. The code check is unchanged for both. A new test verifies an .mdx page with an MDX comment; it failed before this change. Run locally against prisma/web main: the generator accepts this repo's error-reference.md, and --verify on the generated .mdx lists all 393 known codes.

Closes the rest of TML-3722.

Agent: rochester-20

Summary by CodeRabbit

  • Bug Fixes
    • Verification now accepts MDX pages with generated-file comments while continuing to check other page formats for unsafe lines.

… source only, not to the docs site's generated .mdx page

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner October 23, 2026 07:45
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: prisma/orm
  • Branch: main
  • File: .coderabbit.yml
  • Commit: 9799f83
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 933a9b15-9448-465c-9d77-0358787ae184
📥 Commits

Reviewing files that changed from the base of the PR and between 9799f83 and 3303229.

📒 Files selected for processing: 2
  • scripts/list-error-codes.mjs
  • scripts/list-error-codes.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

📝 Walkthrough

During --verify, .mdx paths bypass the MDX-unsafe-line check. A test confirms that verification accepts an MDX page containing the generated-file comment and all known error codes.

Changes: MDX Error-Code Verification

Layer / File(s) Summary
MDX verification behavior
scripts/list-error-codes.mjs, scripts/list-error-codes.test.mjs
The verification flow skips the unsafe-line check for .mdx paths. A test checks that the page passes verification and reports both known codes.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: tensordreams

Merge Risk: ⚪ Minimal · up to 33032

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 names the ticket and the main change: the MDX check now applies only to the Markdown source, not the generated .mdx page, so the docs-site error-reference sync passes again. The raw summary …
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.
Full details: Title check

Explanation

The title names the ticket and the main change: the MDX check now applies only to the Markdown source, not the generated .mdx page, so the docs-site error-reference sync passes again. The raw summary confirms the code change: during --verify, list-error-codes.mjs skips the MDX-unsafe-line check for paths ending in .mdx and keeps it for other paths, and a test covers an .mdx page with the generated comment and all known codes. The title matches this change. It is long (127 characters) and includes a ticket prefix, but it is specific and related to the change.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

npm i https://pkg.pr.new/@prisma/orm-extension-arktype-json@30854

@prisma/orm-extension-middleware-cache

npm i https://pkg.pr.new/@prisma/orm-extension-middleware-cache@30854

@prisma/orm-extension-paradedb

npm i https://pkg.pr.new/@prisma/orm-extension-paradedb@30854

@prisma/orm-extension-pgvector

npm i https://pkg.pr.new/@prisma/orm-extension-pgvector@30854

@prisma/orm-extension-postgis

npm i https://pkg.pr.new/@prisma/orm-extension-postgis@30854

@prisma/orm-extension-supabase

npm i https://pkg.pr.new/@prisma/orm-extension-supabase@30854

@prisma/orm-family-mongo

npm i https://pkg.pr.new/@prisma/orm-family-mongo@30854

@prisma/orm-family-sql

npm i https://pkg.pr.new/@prisma/orm-family-sql@30854

@prisma/orm-framework

npm i https://pkg.pr.new/@prisma/orm-framework@30854

@prisma/orm-mongo

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

@prisma/orm-postgres

npm i https://pkg.pr.new/@prisma/orm-postgres@30854

@prisma/orm-sqlite

npm i https://pkg.pr.new/@prisma/orm-sqlite@30854

@prisma/orm-target-mongo

npm i https://pkg.pr.new/@prisma/orm-target-mongo@30854

@prisma/orm-target-postgres

npm i https://pkg.pr.new/@prisma/orm-target-postgres@30854

@prisma/orm-target-sqlite

npm i https://pkg.pr.new/@prisma/orm-target-sqlite@30854

@prisma/orm-toolchain

npm i https://pkg.pr.new/@prisma/orm-toolchain@30854

commit: 3303229

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 264.12 KB (0%)
postgres / emit 231.66 KB (0%)
mongo / no-emit 225.19 KB (0%)
mongo / emit 182.93 KB (0%)
cf-worker / no-emit 327.21 KB (0%)
cf-worker / emit 291.17 KB (0%)

@wmadden-electric
wmadden-electric added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 5a3ad32 Oct 23, 2026
24 checks passed
@wmadden-electric
wmadden-electric deleted the tml-3722-mdx-check-source-only branch October 23, 2026 08:21
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-prisma__orm that referenced this pull request Oct 27, 2026
`8.0.0-rc.20` → `8.0.0-rc.21`. See
[versioning](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md).

**Merging this PR ships the release.** The push to `main` carries the
new root version. The `Publish to npm` workflow then publishes
`8.0.0-rc.21` under the `latest` dist-tag and creates a pre-release
GitHub Release.

## What to review

- **Release notes:**
[`docs/releases/v8.0.0-rc.21.md`](https://github.com/prisma/orm/blob/release/8.0.0-rc.21/docs/releases/v8.0.0-rc.21.md),
mirrored in `CHANGELOG.md`. Eleven breaking changes: client members
reject instead of throwing, the enum value question, MongoDB names and
options, one set of MongoDB contract rules, `close()` with your own
pool, `markerLocation`, the renamed PostgreSQL date and time types, ISO
8601 text date and time values with `DateStyle=ISO` required, and a
Prisma 7 `@default(now())` filled on create (from prisma#30834), the control
API checking a database's marker against the migration graph itself
(from prisma#30866), and field presets removed in favour of type constructors
and type aliases (from prisma#30845). prisma#30834, prisma#30866 and prisma#30845 merged after
this branch was cut; `main` is merged in. It also covers the MySQL
preview packages and the corrected rc.19 and rc.20 upgrade guides
(prisma#30855). The notes leave out prisma#30848, prisma#30854 (docs-sync tooling) and
prisma#30852 (docs only).
- **Upgrade guides:**
`skills/prisma-8/upgrading/{app,extension}/upgrades/8.0.0-rc.20-to-8.0.0-rc.21/instructions.md`,
assembled from the fourteen pending fragments. The app guide has 31
changes plus the Supabase restamp, and the extension guide has 29. None
was dropped. The originals are archived unchanged under
`upgrade-instructions/releases/8.0.0-rc.20-to-8.0.0-rc.21/sources/`.
While assembling, I fixed a wrong import path
(`@prisma/orm-target-mongo/pack` does not exist), a detection that
matched only code that was already upgraded, and a miscount of optional
fields.
- **Version bump:** every `package.json`, `pnpm-lock.yaml` (workspace
specifiers only), the skill's `library_version`, and the Supabase
contract version stamps.

## Checks run locally

- `check:upgrade-coverage --mode publish --prev v8.0.0-rc.20 --head
HEAD`: pass
- `check:release-notes --mode pr`: pass
- `lint:skills`: pass
- `test/upgrade-instructions`: 86 files, 1650 tests pass

The docs PR in prisma/web follows once this is published.

Agent: rochester-20

---------

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants