Repository navigation
Offer plugin releases outside the saved version range and let the user take them - #7216
Merged
ymichael merged 3 commits intoNov 9, 2026
Conversation
…r take them bb saves a marketplace plugin's semver range at install and resolves every later update inside it, so a release outside that range (a new 0.x minor, a new major, or anything a catalog range bump admits) never reached existing installs. Update checks reported "current" with no hint that a newer release existed. Update checks now also report a rangeUpgrade for git semver and npm range sources: one newer stable release outside the saved range, the proposed range, whether it may break (caret rule), and engine problems if it cannot run on this bb. Marketplace installs are offered only what the entry's current range admits, and that range is proposed, so the catalog stays the review gate; other installs get their newest release with ^<version>. Taking it is always explicit: applyUpdate/experimental_startUpdate accept range and expectedVersion, and POST /plugins/:id/update forwards them. The range change rides the existing staged activation, snapshot, and rollback, so a failed activation restores the old release and range. bb refuses pinned sources, ranges with nothing newer, downgrades, and a release other than the one reviewed. --all and Update all never take a range change. Surfaces: bb plugin outdated notes the release and the exact command; bb plugin update <id> --range <range>; plugin details and the installed list show a Review action whose dialog names both ranges. Guide, Plugin Guide surface, and API audit entry updated; plugin SDK bumped to 0.6.134. Fixes #5570 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ails Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r none for delisted plugins A range change refused because the reviewed release changed left the old offer saved, so plugin details kept offering it and every retry was refused again. Refused range changes now save a fresh check, and the refusal names the reviewed and current releases by version instead of commit. A plugin whose marketplace no longer lists it is no longer offered the repository's newest release; --range still takes any release explicitly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/5570-plugin-updates-outside-the-installed-range-thr_w4dqfgknn7
branch
November 9, 2026 17:45
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.
Human comments
What was wrong
bb copies a plugin's semver range into the installed row at install time (
plugins.source_git_range/source_npm_requested_spec), and every later update check resolves only inside that copy (update-resolver.tsfilters tags by the saved range). Nothing re-reads the catalog. So a release outside the range never reaches existing installs. That covers a new 0.x minor under^0.y.z(367 of 420 bb-community entries), a new major, and every release a catalog range bump admits. The check also answerscurrent, with no hint that anything newer exists. The marketplace audit counted 26 stale entries covering about 1,487 installs. Users only got the release by removing and reinstalling, which deletes settings, secrets and schedules. Issue: #5570.What changed
Behaviour decided
rangeUpgradefor git semver and npm range sources: one newer stable release outside the saved range.v0.9.0and kilocode's inherited OpenCodev0.2.0from the audit are examples.^<version>proposed. A plugin its marketplace no longer lists is offered nothing;--rangestill takes any release explicitly.bb plugin update --alland Settings → Updates' Update all skip these releases. The engines/SDK checks are unchanged. A candidate that fails them is reported with its reasons and cannot be taken, and bb falls back to an older compatible out-of-range release when there is one.rangeandexpectedVersion. The range change uses the existing staged activation, state snapshot and rollback. A failed activation restores the previous release and the previous range and source, and keeps enabled state, settings and data. bb refuses:breakingfollows the caret rule from the installed version: a new major, or a new minor on 0.x. It is shown as a warning and is not a gate, because every out-of-range release already needs the user.Server
apps/server/src/services/plugins/update-resolver.ts:rangeUpgradeCandidatesandisBreakingUpgrade;plugin-updates.ts:rangeUpgrade;applyUpdate(id, { range, expectedVersion }), including the downgrade and reviewed-release guards;managed-plugin-artifacts.ts: git activation can write the new canonical source string.plugin-service.tspicks the basis per row.catalogRangeForInstalledSourcelives inmarketplace-manifest.ts.routes/plugins.ts:POST /plugins/:id/updateaccepts{ range?, expectedVersion? }.Contract and SDK
pluginRangeUpgradeSchema, on both check entries andupdateState.pluginApplyUpdateRequestSchemagainsrangeandexpectedVersion.PluginBbSdk.plugins.applyUpdateandexperimental_startUpdatetakePluginApplyUpdateArgs.docs/api_to_audit.mdand a bullet to the Plugin Guidebb-sdksurface.CLI
bb plugin outdatedmarks the statuscurrent · 0.3.0 outside rangeand prints a note with the exact command, e.g.range-demo: 0.3.0 is outside your saved range ^0.2.0. It may include breaking changes. Review it with `bb plugin update range-demo --range '^0.3.0'`.bb plugin update <id>prints the same note.bb plugin update <id> --range <range>:from → toand both ranges, plus a breaking-change warning;--yesskips it);expectedVersion.bb guide pluginsdocuments all of this.UI
0.3.0 is available outside the version range ^0.2.0 this plugin follows. [The marketplace now lists …] It may include breaking changes, so bb won’t install it until you review it.next to a Review action.There is no daemon wire change, so
HOST_DAEMON_PROTOCOL_VERSIONis unchanged. This PR doesn't port the rollback-to-a-replaced-release work from the closed #6044.How you verified
Tests added
update-resolver.test.ts, against real git repositories:^2.0.0as breaking;plugin-update.test.ts, through the real service:current;expectedVersionmismatch refuses and changes nothing;marketplace-manifest.test.ts: the catalog range is followed only for the same URL, subdirectory and tag prefix.--rangerequest body;--alldoes not apply it.{ range, expectedVersion }, and the details Review and status show for a compatible release but not for an incompatible one.Local commands (targeted only; CI runs the full suites)
pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/app --filter=@bb/cli --filter=@bb/sdkturbo run linton the touched packages: 0 errors.update-resolver,plugin-update,marketplace-manifest, 83 tests;plugin-updates, 15;UpdatePluginDialog,PluginUpdatesCard,plugin-status,InstalledPluginsTab, 33.turbo run testfor@get-bb/plugin-sdk,@bb/sdk,@bb/templates,@bb/server-contractand the Plugin Guide.Live, on an isolated
pnpm start:worktreeinstance, with a local git repo tagged v0.2.2 and v0.3.0:@semver:^0.2.0and then runningbb plugin outdatedprinted the note above;^0.3.0at v0.3.0, and the next check was clean.I then tagged v1.0.0:
bb plugin update range-demo --range '^1.0.0' --yesprintednow follows ^1.0.0; updated and activated …v0.3.0 → …v1.0.0;--range '^0.2.0'was refused with^0.2.0 resolves to 0.2.2, which is not newer than the installed 1.0.0; bb does not downgrade plugins.The live run caught that
PluginDetailgated the section on in-range fields only; the second commit fixes that.Fixes #5570
🤖 Generated with Claude Code