Skip to content

docs(error-reference): name each CLI command with its group - #30527

Merged
wmadden-electric merged 1 commit into
mainfrom
docs/error-reference-migration-ref-commands
Sep 30, 2026
Merged

wmadden-electric merged 1 commit into
mainfrom
docs/error-reference-migration-ref-commands

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

MIGRATION.UNKNOWN_REF in docs/reference/error-reference.md, before:

A ref name was used (read, resolved, or deleted via ref commands) but no ref file with that name exists. Create it with prisma ref set <name> <hash>, or run ref list to see what exists.

After:

A ref name was used (read, resolved, or deleted via migration ref commands) but no ref file with that name exists. Create it with prisma migration ref set <name> <hash>, or run migration ref list to see what exists.

prisma ref set does not exist: in 8.0.0-rc.19 it prints the top-level help. The command is prisma migration ref set.

Linked issue

n/a — small docs change.

Summary

The error reference named some CLI commands without their group, or by the name of an internal operation. A reader who types one of these names gets the top-level help or a different command. The prisma.io docs site renders its ORM error reference page from this file, so the wrong names show there too.

This PR changes only the command names. The rest of each entry is unchanged.

Before After Entries
ref set, ref list, ref migration ref set, migration ref list, migration ref CLI.FILE_NOT_FOUND, MIGRATION.CHECK_DANGLING_REF, MIGRATION.CONTRACT_SNAPSHOT_CONTENT_MISMATCH, MIGRATION.HASH_NOT_IN_GRAPH, MIGRATION.INVALID_REF_NAME, MIGRATION.INVALID_REF_VALUE, MIGRATION.MARKER_MISMATCH, MIGRATION.REF_NOT_RESOLVABLE, MIGRATION.REF_SET_BUNDLE_NOT_FOUND, MIGRATION.REF_SET_EMPTY_SENTINEL, MIGRATION.UNKNOWN_REF
migrate db migrate CONFIG.DB_CONNECTION_REQUIRED, CONFIG.DRIVER_REQUIRED, CLI.FILE_NOT_FOUND, CONTRACT.TYPES_RENDER_FAILED, MIGRATION.DESTINATION_CONTRACT_MISMATCH, MIGRATION.EXECUTION_FAILED, MIGRATION.NO_INVARIANT_PATH, MIGRATION.PATH_UNREACHABLE, MIGRATION.RUNNER_FAILED, MIGRATION.SCHEMA_VERIFY_FAILED
format contract format CLI.FILE_WRITE_FAILED, CONTRACT.SOURCE_LOAD_FAILED, PSL.PARSE_FAILED
init, where the entry means prisma orm init orm init CLI.INIT_EMIT_FAILED, CLI.INIT_INSTALL_FAILED, CLI.INIT_INVALID_OUTPUT_DOCUMENT, CLI.INIT_REINIT_NEEDS_FORCE, CLI.INIT_USER_ABORTED
inspect-live-schema db schema CONFIG.DB_CONNECTION_REQUIRED, CONFIG.DRIVER_REQUIRED
db run db init, db update MIGRATION.CONTRACT_SPACE_VIOLATION

inspect-live-schema is not a command and does not appear anywhere in the source; db schema raises both codes. db run is the internal operation in control-api/operations/db-run.ts that backs db init and db update.

Testing performed

  • check:error-reference (node scripts/list-error-codes.mjs --verify docs/reference/error-reference.md): passed, "Error-reference lists all 360 known codes."
  • lint:docs, lint:legacy-name, and check:release-notes --mode pr --prev origin/main, run the same way with node scripts/…: passed.
  • Checked every new name against the 8.0.0-rc.19 CLI help: prisma --help, prisma db --help, prisma contract --help, prisma migration --help, prisma migration ref --help, and prisma migration ref set --help.
  • Searched production source under packages/ for messages that name a bare ref set, ref list, or ref delete command. There are none, so no source change is needed.
  • git merge-tree against Contract references list only the forms each command accepts; migration status and db migrate resolve @contract and @db #30475, which also edits this file (MIGRATION.REF_WRONG_GRAMMAR): merges without conflict.

Skill update

n/a: docs only. The CLI surface does not change.

Checklist

  • All commits are signed off (git commit -s) per the DCO.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • Tests are updated (n/a: the change is doc-only).
  • The PR title is in TML-NNNN: <sentence-case title> form: no Linear ticket exists for this work.
  • The Skill update section above is filled in.

Notes for the reviewer

Left unchanged on purpose:

  • ref and format where they are payload field names (MIGRATION.AMBIGUOUS_MIGRATION_REF, MIGRATION.MISSING_INVARIANTS, CLI.JSON_FORMAT_UNSUPPORTED).
  • "ref-based resolution" in MIGRATION.CONTRACT_SNAPSHOT_MISSING, which names a kind of resolution, not a command.
  • prisma init in CLI.INIT_SKILL_INSTALL_FAILED, which is the real top-level command and is named there to contrast it with orm init.
  • The placeholders in the full commands (<hash>, <valid-hash>, <markerHash>): migration ref set accepts a hash as its contract argument.

Agent: columbo-92
🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the error reference to reflect current Prisma command names and execution paths.
    • Clarified how initialization and migration errors relate to commands, including exit-code distinctions for prompt cancellation, consent refusal, and invalid output.

The error reference named several commands without their group, so a reader who typed them got the top-level help or a different command: `ref set`, `ref list`, and `ref` (now `migration ref ...`), `migrate` (now `db migrate`), `format` (now `contract format`), and bare `init` where the entry means `orm init`. Two entries named internal operations as if they were commands: `inspect-live-schema` is now `db schema`, and `db run` is now `db init`, `db update`, the two commands it backs.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner September 30, 2026 05:46
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: prisma/orm/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: 8278c6c0-d171-44fd-b112-de07fcf3d867

📥 Commits

Reviewing files that changed from the base of the PR and between 35f68b2 and 574afe2.

📒 Files selected for processing (1)
  • docs/reference/error-reference.md

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


📝 Walkthrough

Walkthrough

The error reference updates command names for CLI, contract, and migration errors. It also clarifies documented init error codes and exit codes. Existing error handling descriptions remain unchanged.

Changes

Error reference updates

Layer / File(s) Summary
CLI commands and init errors
docs/reference/error-reference.md
CLI error entries use current command names. Init entries distinguish prompt cancellation, consent refusal, and invalid output outcomes.
Contract and PSL errors
docs/reference/error-reference.md
Contract and PSL entries identify the commands associated with source loading, type rendering, and parsing errors.
Migration commands and errors
docs/reference/error-reference.md
Migration entries use current migration reference and database command names. The documented error handling and payloads remain unchanged.

Priority: ⬇️ Low

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

Change: Other

Suggested reviewers: tensordreams

Merge Risk: ⚪ Minimal · up to 574af

This documentation-only change uses current CLI names and supported init outcomes, with no actionable user-facing or operational regression identified. It is ready to merge after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 574af

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/reference/error-reference.md: The documented DB-connection command list now uses db migrate and db schema in place of migrate and inspect-live-schema. CONFIG.DRIVER_REQUIRED likewise names db migrate and db schema as the commands requiring a control-plane driver.
  • observed — Modified behavior in docs/reference/error-reference.md: The CLI.FILE_NOT_FOUND, CLI.FILE_WRITE_FAILED, and init-failure entries now identify the current prisma migration and prisma contract format commands instead of their former shorter names. The init entries consistently name prisma orm init; install and emit findings retain their documented exit codes and failure outcomes.
  • observed — Modified behavior in docs/reference/error-reference.md: CLI.INIT_INVALID_OUTPUT_DOCUMENT now names the engine-hosted command as prisma orm init; its documented exit-2 settlement and contrast with the former commander command’s exit 1 are unchanged.
  • observed — Modified behavior in docs/reference/error-reference.md: CLI.INIT_REINIT_NEEDS_FORCE now describes the former commander orm init path as deleted and distinguishes the engine-hosted path: it reports the same refusal through CLI.CONSENT_REQUIRED, with the exact --confirm value, rather than raising this code.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: updating error-reference entries to use grouped CLI command names.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

wmadden-electric added a commit to prisma/web that referenced this pull request Sep 30, 2026
Section E is in review as #8348, the error reference command names as prisma/orm#30527, and the docs change prisma/orm#30475 needs as draft #8349. The slice's plan, the facts run on rc.19, and the four reviews are kept beside its spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit e7781f1 Sep 30, 2026
23 checks passed
@wmadden-electric
wmadden-electric deleted the docs/error-reference-migration-ref-commands branch September 30, 2026 15:41
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