Repository navigation
Let a plugin manifest name the oldest Buzz it runs on - #4255
Closed
BurningMoneySlowly wants to merge 1 commit into
Closed
BurningMoneySlowly wants to merge 1 commit into
BurningMoneySlowly wants to merge 1 commit into
Conversation
A plugin that starts using a host feature has to keep working on every Buzz that lacks it, by feature-detecting each one, because nothing stops an older Buzz from installing or updating to it. A manifest can now set "minBuzzVersion": "1.2.0". The desktop tells the plugin manager its own version, and an install, update or reload to a plugin that needs a newer Buzz is refused with a message naming both versions; an installed copy stays where it is. A prerelease counts as its release. A Buzz from before this field already refuses such a manifest as an unknown key. The check is not part of Manifest::validate, which runs on every installed plugin each time the registry is read, so a plugin installed before a downgrade does not stop the others from loading. The buzzodz CLI passes no version and refuses nothing. Co-authored-by: Swiper <24077d5cda8e7e757be4b5e182ef5a8daf7c0447eb339cbf9c3d148fbcc8ecfa@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tyler Green <tylerg@squareup.com>
BurningMoneySlowly
force-pushed
the
tylerg/plugin-min-buzz-version
branch
from
November 23, 2026 16:48
cc81910 to
1fd00c6
Compare
Contributor
Author
|
🤖 Moved to #4264, the same commit on a branch in this repo instead of a fork. |
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.
Why
Today a plugin has to stay compatible with every Buzz build it might be installed on. Nothing stops an older Buzz from installing a plugin, or updating to a version of it, that uses host features that older build doesn't have. So authors feature-detect each capability (
ctx.host?.runCommand?.(...), "On Buzz 0.7.19 and later…") and keep fallbacks around indefinitely.This is a proposal: let a plugin release say which Buzz it needs, so it can drop that compatibility code instead of carrying it.
What
"minBuzzVersion": "1.2.0".validateaccepts only a plainMAJOR.MINOR.PATCH(no ranges, prereleases orvprefix).context.package_info().version, which release builds set via--config candidate.json) to the pluginManagerwithwith_buzz_version.install_artifact_if, which every install and update path goes through (folder, Git and URL imports, and automatic managed updates), andreloadrefuse a plugin whoseminBuzzVersionis newer than the running Buzz. The error is "Example needs Buzz 1.5.0 or later, and this is Buzz 1.4.0. Update Buzz to install it." The installed copy stays where it is.1.5.0-preview.3and1.5.0-beta.1satisfy1.5.0.buzzodzpasses no version and refuses nothing.Older Buzz builds
The manifest is parsed with
deny_unknown_fields, so a Buzz from before this change already rejects a manifest that setsminBuzzVersion. The gate fails closed on old builds too; they just show an "unknown field" error instead of the friendly one.Why the check isn't in
Manifest::validateManager::readrunsvalidate()on every installed manifest and fails the whole registry if one fails. If the version check lived there, downgrading Buzz below a plugin's minimum would stop every plugin from loading. Sovalidatechecks only the field's syntax, and the version comparison runs only when new bytes come in.Open questions for maintainers
minBuzzVersionis a flat string. Something like"requires": { "buzz": "1.2.0" }would leave room for other requirements later. I went with the smallest shape.1.5.0-preview.3 < 1.5.0). But previews are "one patch above the highest stable", so under strict semver, preview users couldn't install plugins that need features they already have. The cost is that an early preview of 1.5.0 built before the feature landed would also pass.api.tsis FOUNDATION. This adds one optional field (minBuzzVersion?: string) toPluginManifest, the public plugin contract. It needs a maintainer's explicit go-ahead.Tests
New tests in
crates/plugin-manager/src/lib.rs:min_buzz_version_is_a_release_version_and_absent_by_default: old manifests round-trip without the field; valid and invalid version strings.app_versions_compare_by_release_and_prereleases_count_as_their_release: ordering (including1.9.9vs1.10.0), prerelease handling, and the error text.a_plugin_that_needs_a_newer_buzz_is_not_installed_updated_or_reloaded: a refused install leaves nothing installed. A refused update or reload keeps the current revision. A newer Buzz installs it, and the older manager still lists it afterwards.Checks run at this commit:
cargo test -p buzzodz-plugins: 139 lib tests plus the integration suites pass.cargo clippy -p buzzodz-plugins --all-targets: clean.cargo check -p Buzz: compiles.pnpm typecheck: passes.Not tested in the running app.
Docs
docs/plugin-authoring-guide.md(contract rules): describes the field.docs/plugins.md: points to it.docs/managed-plugins.md: what happens when a policy pins a version that needs a newer Buzz.🤖 Generated with Claude Code