Skip to content

fix(cli): print the CLI name instead of a literal {bin} - #30502

Open
00200200 wants to merge 1 commit into
prisma:mainfrom
00200200:fix/30496-bin-placeholder
Open

00200200 wants to merge 1 commit into
prisma:mainfrom
00200200:fix/30496-bin-placeholder

Conversation

@00200200

@00200200 00200200 commented Sep 29, 2026 •

Copy link
Copy Markdown

Linked issue

Fixes #30496

Summary

Next-step hints and error advice still printed a literal {bin} because this repository pinned @prisma/cli-engine 0.6.1. Engine 0.6.2 (prisma/prisma-cli#313) substitutes the running binary when a run settles. This PR moves every pin to 0.6.2 and locks the rendered output so the placeholder cannot leak again.

Testing performed

  • Added packages/1-framework/3-tooling/cli/test/orm/bin-placeholder.test.ts: human next-step lines and the JSON error envelope must contain prisma-test and must not contain {bin}.
  • pnpm --filter @internal/cli test -- test/orm/bin-placeholder.test.ts test/orm/define-command.test.ts test/orm/db-update.test.ts test/orm/db-init.test.ts test/orm/db-sign.test.ts test/orm/db-verify.test.ts test/orm/migrate.test.ts test/orm/migration-plan.test.ts test/orm/migration-status.test.ts test/orm/ref-set.test.ts test/orm/contract-print.test.ts — 11 files, 213 passed.
  • pnpm --filter @internal/cli typecheck
  • pnpm exec biome check --error-on-warnings on the changed test files.

Settled-output assertions that go through createTestCli now expect prisma-test. Factory tests that assert {bin} before settlement are unchanged.

Skill update

n/a — command packages still write {bin} in hints. The engine substitutes the binary name at render time; the authoring convention in skills is unchanged.

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 (or n/a if the change is doc-only / refactor with no behavioural delta).
  • The PR title is in conventional-commit form (fix(cli): …). External contributions do not have Linear TML-NNNN tickets.
  • The Skill update section above is filled in (or stated n/a — internal only).

Notes for the reviewer

prisma/prisma-cli#314 tracks dropping the temporary 0.6.1 conformance exception once @prisma/orm-toolchain peers 0.6.2. The composer side of that move is prisma/composer#325.

Summary by CodeRabbit

  • Bug Fixes
    • CLI suggestions and diagnostic messages now display the executable name prisma-test instead of the {bin} placeholder. This applies to follow-up commands, error advice, and serialized error output, making the commands shown in those messages directly recognizable.

@prisma/cli-engine 0.6.2 replaces {bin} when a run settles, so next-step
hints and error advice name the running binary. The ORM was still pinned
to 0.6.1, which left the placeholder in the text users see.

Fixes prisma#30496.

Signed-off-by: Michał Furgała <83299832+00200200@users.noreply.github.com>
@00200200
00200200 requested a review from a team as a code owner September 29, 2026 12:09
@coderabbitai

coderabbitai Bot commented Sep 29, 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: bd82d016-7eb3-4fa0-9ca1-6f0f1cff0405

📥 Commits

Reviewing files that changed from the base of the PR and between ea6d913 and b3dba73.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (44)
  • apps/lsp-playground/package.json
  • apps/telemetry-backend/package.json
  • examples/bundle-size/package.json
  • examples/mongo-blog-leaderboard/package.json
  • examples/mongo-demo/package.json
  • examples/multi-extension-monorepo/package.json
  • examples/paradedb-demo/package.json
  • examples/prisma-8-cloudflare-worker/package.json
  • examples/prisma-8-demo-sqlite/package.json
  • examples/prisma-8-demo/package.json
  • examples/prisma-8-postgis-demo/package.json
  • examples/prisma7-adoption/package.json
  • examples/react-router-demo/package.json
  • examples/retail-store/package.json
  • examples/supabase/package.json
  • packages/1-framework/3-tooling/cli/package.json
  • packages/1-framework/3-tooling/cli/test/orm/bin-placeholder.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/contract-print.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/db-init.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/db-sign.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/db-update.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/db-verify.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/define-command.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/migrate.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/migration-plan.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/migration-status.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/ref-set.test.ts
  • packages/1-framework/3-tooling/config-loader/package.json
  • packages/3-extensions/paradedb/package.json
  • packages/3-extensions/pgvector/package.json
  • packages/3-extensions/postgis/package.json
  • packages/3-extensions/supabase/package.json
  • packages/9-public/@prisma/orm-toolchain/package.json
  • test/e2e/framework/test/fixtures/package.json
  • test/e2e/framework/test/sqlite/fixtures/package.json
  • test/integration/package.json
  • test/integration/test/cli-journeys/marker-read-errors-legacy-init.e2e.test.ts
  • test/integration/test/cli-journeys/migration-status-diagnostics.e2e.test.ts
  • test/integration/test/cli-journeys/sign-the-database.e2e.test.ts
  • test/integration/test/cli.db-verify.e2e.test.ts
  • test/integration/test/cli.migrate-external-space.e2e.test.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/package.json
  • test/integration/test/fixtures/cli/cli-integration-test-app/package.json
  • test/integration/test/marker-read-errors.e2e.test.ts

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


📝 Walkthrough

Walkthrough

The pull request updates @prisma/cli-engine declarations from 0.6.1 to 0.6.2 across package manifests. It adds CLI tests for {bin} substitution and updates unit and integration test expectations to use prisma-test in suggested commands and error output.

Changes

CLI hints and dependency alignment

Layer / File(s) Summary
Update CLI engine dependency declarations
apps/*/package.json, examples/*/package.json, packages/1-framework/3-tooling/{cli,config-loader}/package.json, packages/3-extensions/*/package.json, packages/9-public/@prisma/orm-toolchain/package.json, test/e2e/framework/test/**/package.json, test/integration/package.json, test/integration/test/fixtures/cli/*/package.json
These manifests update @prisma/cli-engine from 0.6.1 to 0.6.2. The CLI, config-loader, and orm-toolchain manifests also update peer dependency declarations where present.
Test CLI hint rendering and expected commands
packages/1-framework/3-tooling/cli/test/orm/bin-placeholder.test.ts, packages/1-framework/3-tooling/cli/test/orm/*-*.test.ts
New tests check placeholder replacement in human output, presentation data, and a JSON error envelope. Existing unit-test expectations use prisma-test in commands and next actions.
Align integration expectations with rendered hints
test/integration/test/cli-journeys/*.e2e.test.ts, test/integration/test/cli.db-verify.e2e.test.ts, test/integration/test/cli.migrate-external-space.e2e.test.ts, test/integration/test/marker-read-errors.e2e.test.ts
Integration assertions use prisma-test in suggested commands and error output. The external-space test removes that prefix when deriving command arguments for execution.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: wmadden-electric

Merge Risk: ⚪ Minimal · up to b3dba

This change makes CLI hints show the real binary name instead of a literal placeholder. It updates dependency pins and tests, and no concrete merge-blocking risk was found.

Security Architecture Review

Security architecture risk: 🔵 Low · up to b3dba

The change makes suggested commands name the running CLI instead of showing a placeholder. The reviewed changes do not show a new production entrypoint, privileged action, or security-control change. The dependency’s implementation and deployment compatibility were not independently verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The examined test handlers do not expand production reachability. The effective production change evidenced here is the shared dependency version and the intended presentation of command text, not execution of a new command.
🚥 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 clearly and concisely describes the main change: replacing the literal {bin} placeholder with the CLI name in rendered output.
Linked Issues check ✅ Passed Issue [#30496] requires CLI-rendered command, fix, and advice text to replace {bin} with the binary name and requires regression coverage. The PR upgrades @prisma/cli-engine from 0.6.1 to 0.6.2 ac…
Out of Scope Changes check ✅ Passed The changed package pins select the reported @prisma/cli-engine fix. The test changes update expected rendered commands and add regression coverage for the same placeholder-substitution behavior. Th…
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 1…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

This branch has not been deployed

No deployments
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.

CLI next-step hints print the literal placeholder {bin}

1 participant