Repository navigation
fix(contracts): negotiate protocol versions per app and release 1.4.1 - #11
Merged
Merged
Conversation
1.4.0 raised the protocol to 1.1.0 and the candidate smoke bootstrapped every app with it, which apps built for 1.0.0 reject. The negotiated version of appProtocol, platformApi and uiBridge is now the lower bound of the manifest range, bounded by what the environment offers. Add Contracts::negotiate_versions and negotiateVersions, use them in the smoke bootstrap and ignore its deprecated version input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 28, 2026
Merged
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.
Summary
Fixes a compatibility bug in 1.4.0. Raising
PROTOCOL_VERSIONto 1.1.0 made the pipeline's candidate smoke bootstrap every candidate withappProtocol/platformApi/uiBridge1.1.0. But apps built from app-template-ts with SDK ≤1.3.0 parse those fields asz.literal('1.0.0')and also compare them with=== '1.0.0'. So every existing app failed the Marketplace smoke, and would fail on a platform that sends 1.1.0. No repository has adopted 1.4.0 yet.The rule: per-app negotiation from the manifest. For each of
appProtocol,platformApianduiBridge(the last only for apps with a UI), the negotiated version is the lower bound of the manifest'srequiresrange. It must be at most the offered version and must satisfy the range; otherwise the app is incompatible.>=1.0.0 <2.0.0negotiates 1.0.0, so existing apps keep their exact1.0.0.>=1.1.0 <2.0.0negotiates 1.1.0.The platform implements the same rule for install, bootstrap, context, readiness and the
offered/refusedgate.Changes
Contracts::negotiate_versions(manifest, &ManifestEnvironment) -> Result<NegotiatedVersions, ContractError>inrentnerproxy-app-contracts. It reuses the existing range logic:protocol_orderwas split out ofsupports_protocol, so there is no second parser.negotiateVersions(requires, offer), exported withNegotiatedVersionsandProtocolOffer.input.versionis accepted and ignored, and documented as deprecated, so callers on SDK ≤1.3.0, which pass1.0.0, keep working, and so do callers that pass nothing.rentnerproxy-app-runtime: needs no change. It already echoes the bootstrap'sappProtocoland caps it only when the bootstrap is above its own version.Follow-ups
BootstrapDescriptor…appProtocol.constinruntime-smoke.ts; pass noversion.negotiateVersions(manifest.requires, …)insrc/server/bootstrap.tsinstead of hard-coding'1.0.0'. Existing apps stay valid without that change.Tests
fixtures.json, keynegotiation, 8 cases, run in Rust and TypeScript):>=1.0.0→ 1.0.0 and>=1.1.0→ 1.1.0;>=1.2.0on 1.1.0 is incompatible;uiBridge;uiBridgefollows its own range;smoke_bootstrap.rs):>=1.0.0manifest gets 1.0.0 in all fields, and>=1.1.0gets 1.1.0;uiBridge;>=1.2.0is rejected;input.versionis ignored for"1.0.0","1.1.0",7and absent.smoke.rs, three of the four smoke tests fail. The negotiation helpers do not exist in 1.4.0.Verification
bun run verify: format, lint and tests for both languages,contracts:check, typecheck, and 465 TypeScript tests.bun run release:check: 1.4.1 is consistent.cargo test --workspace --lockedpasses.After merge, tag
v1.4.1.🤖 Generated with Claude Code