Skip to content

Call every presentation, with no defensive calls left - #197

Open
wmadden-electric wants to merge 1 commit into
mainfrom
drop-presentation-shims
Open

Call every presentation, with no defensive calls left#197
wmadden-electric wants to merge 1 commit into
mainfrom
drop-presentation-shims

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor
   return {
     human: presentations.human(ui),
-    stdout: presentations.stdout?.() ?? [],
+    stdout: presentations.stdout(),
     json: undefined,
-    next: presentations.next?.() ?? [],
+    next: presentations.next(),
   };

These should never have been there

Presentations requires all four fields — that was the whole of #171. Nothing reaches materializePresentation that did not satisfy the type, so calling two of them defensively contradicted the type one line away.

They existed for a specific and temporary reason: @prisma/orm-toolchain was compiled against engine 0.0.9, where three of the four were optional, and its shipped commands took that up — migration list declared human and json and neither of the others, so a strict call made it exit 2.

That was a consumer working around a producer it shares an owner with, which is the wrong direction. The producer was fixed instead — prisma/prisma#30004 declared the missing presentations across 21 files — and this repo now pins 8.0.0-rc.2, which carries that.

Verified by removing them and running the thing that would break

tests/orm-mount.test.ts runs migration list through the assembled command tree in both formats. Five tests pass with the calls made unconditionally, including the human-mode case — which is precisely the one the stdout shim was protecting, and precisely the case I got wrong earlier by checking only json mode.

Also clean: lint, typecheck, build, 62 CLI and 35 engine test files.

What this restores

A command that omits a presentation now fails loudly instead of silently publishing an empty surface on that channel. That is the point of requiring all four, and the shims quietly gave it back for two of them.

deferred.md's ORM entry records the presentations half as resolved. The orm init config mismatch in the same entry is untouched and still live — prisma orm init still scaffolds a project the binary cannot read.

…s left

`Presentations` requires all four fields, so materializePresentation had
no business calling two of them with `?.()`. Those existed to tolerate
@prisma/orm-toolchain built against engine 0.0.9, where three of the four
were optional — a consumer working around a producer it shares an owner
with.

The producer was fixed instead (prisma/prisma#30004) and this repo now
pins 8.0.0-rc.2, which declares all four. Verified by removing the calls
and running tests/orm-mount.test.ts against the pinned package: five
pass, including the human-mode case, which is the one the shim was
protecting.

A command that omits a presentation now fails loudly rather than
silently publishing an empty surface.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@wmadden-electric, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 213f414b-e258-4340-bb71-db8a9f3379fc

📥 Commits

Reviewing files that changed from the base of the PR and between fef263e and 8aecd7c.

📒 Files selected for processing (2)
  • .drive/projects/prisma-cli-v8/deferred.md
  • packages/cli-engine/src/execution/command-context.ts

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.

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@197
npx https://pkg.pr.new/@prisma/cli-engine@197

commit: 8aecd7c

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.

1 participant