Skip to content

TML-3722: The docs site error reference updates again: placeholders stay inside code, and check:error-reference refuses text the site cannot compile - #30848

Merged
wmadden-electric merged 1 commit into
mainfrom
tml-3722-error-reference-placeholder
Oct 23, 2026

Conversation

@wmadden-electric

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

Copy link
Copy Markdown
Contributor
$ pnpm check:error-reference
error-reference has text the docs site cannot compile as MDX; put each tag or brace inside a code span:
  line 953: A Mongo field preset that sets execution defaults, ... in collection "<collection>", so declare them on the base model.

The public error reference on docs.prisma.io has not updated since #30832. That PR wrote collection "<collection>" in plain text in docs/reference/error-reference.md, and prisma/web's sync-error-reference-docs.yml compiles the page as MDX, so its generator refuses any tag or brace outside code. Every daily sync since has failed, and the live page lacks CONTRACT.TYPES_KEY_REMOVED, PSL_VALUE_REFUSED and CLI.COMMAND_MOVED.

What changes

  1. The placeholder goes inside a code span on line 953. prisma/web's generator accepts the file after this change (checked locally with generate-error-reference.mjs --target orm --source docs/reference/error-reference.md).
  2. pnpm check:error-reference refuses the same text, so this repo's CI catches it instead of the docs site's nightly job. mdxUnsafeLines in scripts/list-error-codes.mjs uses the generator's own code-span pattern and rule ([{}]|<[A-Za-z/] outside code), and the check names each offending line. A new test in scripts/list-error-codes.test.mjs covers a placeholder and a brace outside code, and code spans and fences that stay allowed; it failed before the change.

After this merges, the next sync run (daily, or sync-error-reference-docs.yml by hand) updates the live page.

Closes TML-3722.

Agent: rochester-20

Summary by CodeRabbit

  • Documentation

    • Updated the error reference so collection names in the PSL_PRESET_ON_VARIANT_FIELD message are displayed in backticks for consistent formatting.
  • Chores

    • Documentation verification now flags braces or tag-like markup outside code blocks and reports the affected lines, helping catch formatting issues before the reference is accepted.

…d check:error-reference refuses text the docs site cannot compile

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 22, 2026 20:47
@coderabbitai

coderabbitai Bot commented Oct 22, 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: 10b7bed
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6e5e40e8-9c2a-4da4-a67f-09bbc37f530e
📥 Commits

Reviewing files that changed from the base of the PR and between 10b7bed and 047de48.

📒 Files selected for processing: 3
  • docs/reference/error-reference.md
  • 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; 6 remain after this review.

📝 Walkthrough

The error-code verifier now detects braces and tag-like markup outside inline or fenced code. The error reference also formats one interpolated collection name with backticks.

Changes: Error reference validation

Layer / File(s) Summary
Unsafe text checking
scripts/list-error-codes.mjs, docs/reference/error-reference.md, scripts/list-error-codes.test.mjs
The verifier masks inline and fenced code, reports unsafe lines, and exits before checking for missing error codes. The test checks both unsafe lines and code exclusions. The error reference formats the collection name with backticks.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: tensordreams, aqrln

Merge Risk: ⚪ Minimal · up to 047de

The error-reference change is mergeable after normal checks. No issue requiring a pre-merge fix was established.

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 3 functions across 2 files. (1 skipped: 1 … 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 clearly describes the main changes: keeping documentation placeholders inside code and rejecting MDX-unsafe text during error-reference validation. It is long but specific and relevant.
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: Docstring Coverage

Explanation

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 3 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ 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

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

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

@prisma/orm-extension-middleware-cache

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

@prisma/orm-extension-paradedb

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

@prisma/orm-extension-pgvector

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

@prisma/orm-extension-postgis

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

@prisma/orm-extension-supabase

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

@prisma/orm-family-mongo

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

@prisma/orm-family-sql

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

@prisma/orm-framework

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

@prisma/orm-mongo

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

@prisma/orm-postgres

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

@prisma/orm-sqlite

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

@prisma/orm-target-mongo

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

@prisma/orm-target-postgres

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

@prisma/orm-target-sqlite

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

@prisma/orm-toolchain

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

commit: 047de48

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 263.53 KB (0%)
postgres / emit 231.05 KB (0%)
mongo / no-emit 219 KB (0%)
mongo / emit 182.9 KB (0%)
cf-worker / no-emit 326.52 KB (0%)
cf-worker / emit 290.34 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 480554b Oct 23, 2026
24 checks passed
@wmadden-electric
wmadden-electric deleted the tml-3722-error-reference-placeholder branch October 23, 2026 05:49
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-prisma__orm that referenced this pull request Oct 23, 2026
…eck reads the Markdown source, not the generated .mdx page (prisma#30854)

```console
$ 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
```

prisma#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 prisma#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](https://linear.app/prisma-company/issue/TML-3722).

Agent: rochester-20


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

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

## Summary by CodeRabbit

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

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

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
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