Add a CLI compatibility contract: version guard, canary, matrix - #13
Merged
Merged
Conversation
kristof-siket
force-pushed
the
fix/current-prisma-cli
branch
from
August 25, 2026 10:14
0f2a5c4 to
e81bbfd
Compare
The 8.0.0-rc.8 command rename broke every released action version at once because releases float against whatever CLI they find, with no compatibility contract. Three guardrails: - A version guard: before deploying with a repository's own prisma devDependency, check its version and fail with an error naming the supported range (>= 8.0.0-rc.8) instead of CLI.UNKNOWN_COMMAND. An unreadable or unparseable version only warns — the guard must never break a working deploy over output formatting. - A daily canary workflow probing prisma@next for the command shape the action invokes. `--help` exits 0 even for unknown commands (the CLI falls back to the general help), so the probe greps for the deploy-specific usage line. It also checks the version guard accepts prisma@next, and posts a notice the day a destroy command appears. - A compatibility matrix and the policy, documented in the README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kristof-siket
force-pushed
the
policy/cli-compatibility
branch
from
August 25, 2026 10:16
c8274fe to
eea4fcd
Compare
kristof-siket
marked this pull request as ready for review
August 25, 2026 10:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #12 (base is
fix/current-prisma-cli; retarget tomainonce #12 merges).Why
The 8.0.0-rc.8 command rename broke every released action version at once (v1.0.0–v1.5.0, the floating v1, and main), because the action floats against whatever CLI it finds — the repository's
prismadevDependency preferred, an unmaintained fallback otherwise — with no compatibility contract. Users found out viaCLI.UNKNOWN_COMMANDin their deploy logs.What
cli.mjs,main.mjs): before deploying with a repository's ownprismadevDependency, the action probesprisma --versionand fails with an error naming the supported range (>= 8.0.0-rc.8, top-levelprisma deploy) when the CLI falls outside it. An unreadable or unparseable version is a warning, never a blocker — the guard must not break a working deploy over output formatting. The bunx fallback is not probed; its version is the release's own pinned default..github/workflows/canary.yml): daily + on-demand, probesprisma@nextfor the exact command shape the action invokes. Subtlety verified against the real CLI:--helpexits 0 even for unknown commands (falls back to the general help, whose Examples section even contains a bare$ prisma deploy), so the probe greps for the deploy-specific usage line$ prisma deploy [options]rather than trusting exit codes. It also asserts the version guard acceptsprisma@next(a guard that rejects the upcoming release would block users the day it ships), and posts a non-failing notice the day a top-leveldestroyappears somode: destroycan be wired back up.Verified
node --test tests/*.test.mjs), including new coverage for version extraction (JSON envelope, human line, dev-build suffix) and range checks (rc.7 rejected, rc.8/rc.9/stable/later accepted, pre-8 rejected).prisma@next(currently8.0.0-rc.9).🤖 Generated with Claude Code