Skip to content

ci: breaking-change release gate for SDK regenerations#254

Closed
Nelson-PROIA wants to merge 1 commit into
mainfrom
fix/sdk-breaking-change-release-gate
Closed

ci: breaking-change release gate for SDK regenerations#254
Nelson-PROIA wants to merge 1 commit into
mainfrom
fix/sdk-breaking-change-release-gate

Conversation

@Nelson-PROIA

@Nelson-PROIA Nelson-PROIA commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What this adds

The public SDK is generated by Speakeasy from the upstream OpenAPI document. This PR adds a guardrail so a regeneration that introduces breaking changes cannot be versioned as a non-major release without an explicit, reviewed decision.

  • .github/workflows/sdk_breaking_change_gate.yaml — a pull_request status check (breaking-change-gate). It reads the base and head source-spec sourceRevisionDigest from .speakeasy/workflow.lock, pulls both revisions with speakeasy pull, runs speakeasy openapi diff, and fails when breaking changes are present without a major version bump. Removed operations, requiredoptional fields, removed default responses, and deleted types are all reported. It passes trivially when the source spec is unchanged, so it is safe to mark required without blocking ordinary PRs. The raw-spec speakeasy openapi diff is used because the SDK-level speakeasy diff --lang typescript does not surface in-place field narrowings.
  • .github/CODEOWNERS — routes the generated surface to @mistralai/engineering-sdk so a regeneration requests owner review.

A reviewed, deliberate minor + deprecation can proceed via the breaking-approved label.

Notes

Additive only — this reports a status and requests review; it changes nothing about how publishing works. Wiring the check into branch protection is a follow-up.

Draft — do not merge. Validate the speakeasy pull / openapi diff step on a live regeneration PR before marking the check required.

Speakeasy versioningStrategy: automatic derives the semver bump from the
upstream OpenAPI info.version, not from its own breaking-change analysis, so a
breaking regeneration can be labelled a non-major release.

Add a required-able status check that pulls the base and head source specs from
the Speakeasy registry by the sourceRevisionDigest committed in workflow.lock,
runs speakeasy openapi diff, and fails when breaking changes ship without a
major bump. Removed operations, removed or required->optional fields, removed
default responses, and deleted types are all reported. A reviewed minor plus
deprecation can proceed via the breaking-approved label.

Add CODEOWNERS so a regeneration requires review from the SDK owners.
@Nelson-PROIA
Nelson-PROIA force-pushed the fix/sdk-breaking-change-release-gate branch from 6a9e086 to 154341b Compare July 13, 2026 17:26
@Nelson-PROIA

Copy link
Copy Markdown
Contributor Author

Closing: superseding this generation-time check with a source-side versioning fix (govern info.version so breaking specs bump the SDK major).

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.

1 participant