Skip to content

ci: adapter sdk peer range - #150

Open
faustoq wants to merge 3 commits into
mainfrom
fix/adapter-sdk-peer-range
Open

ci: adapter sdk peer range#150
faustoq wants to merge 3 commits into
mainfrom
fix/adapter-sdk-peer-range

Conversation

@faustoq

@faustoq faustoq commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Problem

Both framework adapters publish their @ratel-ai/sdk peer as ^<in-repo SDK version>.
At 0.x a caret pins the minor (^0.6.0 means >=0.6.0 <0.7.0), so every SDK minor orphans both adapters.
npm install @ratel-ai/mastra @ratel-ai/sdk@latest fails with ERESOLVE. Broken since SDK 0.7.0 (2026-08-07).

The daily verify-install cron caught it a few times (2026-08-08 -> 2026-08-13), then went green because #148 removed the SDK co-install from the adapter verify jobs. The check stopped exercising the failure mode but the breakage still exists.

Solution

Publish a floor range instead of a caret: SDK_ADAPTER_PEER_FLOOR in scripts/release-units.mjs is the single source of truth. scripts/pin-adapter-sdk-peer.mjs applies it in both release.yml publish jobs and in publish-rc.sh.
Source manifests stay workspace:^.

The floor is 0.9.1: vercel's shipped code needs ExperimentalPassthroughToolExposure, first exported in SDK 0.9.1 (verified 94/94 and 52/52 against 0.9.1). >=0.6.0 would resolve and then fail on a missing export. ADR-0020 records the measurement.

The SDK publish-order npm view guard is dropped: the peer no longer names the in-repo SDK version, so a floor-range check could never fail. Telemetry pins and their guards are unchanged.

Notes

  • Takes effect on the next adapter release (vercel-ai-sdk@0.4.0, mastra@0.3.0). This PR does not change any published package by itself.
  • release.yml added to the ts paths filter, so a release.yml-only PR still runs the contract tests that guard the pin
  • publish-rc.sh restores the manifests through a guarded git checkout EXIT trap. A core/telemetry-only run can't clobber an unrelated uncommitted edit
  • The mechanism is 0.x-only: at SDK 1.0.0, ^1.2.0 already means >=1.2.0 <2.0.0, so we can delete it and let release.yml go back to a plain caret. Explained in ADR-0020.
  • After both adapters ship, we can restore the sdk@latest co-install to verify-install.yml so the cron catches this class of drift again. It also needs the workflow-contracts "does not interpolate the SDK version" assertion updated.

@rstagi rstagi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants