Repository navigation
Bump the plugin SDK version, and fail CI when it is missed - #2271
Merged
andrewkchan merged 2 commits intoAug 22, 2026
Merged
andrewkchan merged 2 commits into
andrewkchan merged 2 commits into
Conversation
get-bb#2270 added a public `app.slots` member without moving the version. Pre-1.0 the major is the compatibility number and never moves for additive work, so the patch is the only thing a plugin author can point `engines.bbPluginSdk` at — `isPluginSdkRangeSatisfied` reads that range as a floor within the major. Without the bump a plugin using the new slot has no version to require, and installing it on an older bb fails at runtime rather than legibly at load. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Nothing caught the omission above. `version.test.ts` only checks that package.json and PLUGIN_SDK_VERSION agree with each other, and unlike the backend, rpc, and host contracts, `app-contract.ts` has no enumerated export list whose edit would have made the change visible in review. Diff the branch against its merge base: if it touches a published contract or entry file and not the version, fail with the paths and what to do. The job needs a full clone, so it checks out with fetch-depth 0 rather than sharing the existing lockstep job. An unresolvable base skips rather than failing on something the author cannot act on. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
now it should be impossible to accidentally change plugin API without bumping the SDK version
we can delete this if later we decide actually want to iterate faster without bumping sdk version
What was wrong
#2270 added
app.slots.commandPaletteAction— a public plugin API member —without moving
PLUGIN_SDK_VERSION. Pre-1.0 the major is the compatibilitynumber and never moves for additive work, so the patch is the only thing a
plugin author can point
engines.bbPluginSdkat:isPluginSdkRangeSatisfiedreads that range as a floor within the major. Without a bump, a plugin using
the new slot has no version to require, so installing it on an older bb fails
at runtime instead of legibly at load.
Nothing caught it.
version.test.tsonly asserts thatpackages/plugin-sdk/package.jsonandPLUGIN_SDK_VERSIONagree with eachother, never that a surface change moved either. And unlike the backend, rpc,
and host contracts — each of which has an enumerated export list in
public-types.test.tsthat a new export forces you to edit —app-contract.tshas no such list, so nothing about the change was visible in review either.
The recent history shows the convention is real: 0.4.9→0.4.10 (plugin styles),
0.4.10→0.4.11 (provider v3), 0.4.11→0.4.12 (
experimental_fullFileContents),0.4.12→0.4.13 (quick palette). #2270 is the break in that run, alongside
3f86b7c80(#1469), which added 68 lines toapp-contract.tswith no bump.What changed
packages/domain/src/plugin-sdk-version.ts,packages/plugin-sdk/package.json— 0.4.13 → 0.4.14, keeping the two in the lockstep
version.test.tschecks..github/workflows/check-plugin-sdk-version.mjs— diffs the branchagainst its merge base and fails when it touches a published contract or
entry file (
app-contract,backend-contract,host-contract,rpc-contract,provider-bridge, and theindex/app/hostentries)without touching the version file. The message names the offending paths and
what to do. An unresolvable base skips rather than failing on something the
author cannot act on.
.github/workflows/version-lockstep.yml— runs it as a second job. Itneeds
fetch-depth: 0for the merge base, so it is a separate job ratherthan a step on the existing shallow-clone one.
The check is a workflow script rather than a vitest test because the signal is
a diff against a base commit, which a unit test has no access to. It follows
the existing
check-version-lockstep.mjspattern.How you verified
Ran the script against three real branch states:
unchanged", exit 0
maintouchingapp-contract.tswith no bump → fails,naming the file — i.e. it reproduces exactly the miss in Let plugins add rows to the quick palette #2270
Also confirmed no stale pins:
plugins/*/dist/*.meta.jsoncarry0.4.13butare untracked build artifacts that re-stamp on the next build, and
plugins/tasksdeclaresbbPluginSdk: ">=0.4.13", a floor that 0.4.14 stillsatisfies.
@get-bb/plugin-sdk129 tests and@bb/server1922 tests pass; typecheckclean for
@get-bb/plugin-sdk,@bb/domain, and@bb/server; the workflowYAML parses.