feat(sdk-release-gate): expose release states - #44
Merged
Conversation
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
The shared SDK release gate now reports whether a generated release should publish, repair release metadata, or skip because the version tag belongs to another commit.
Changes & impact
SDK callers can replace local release prechecks with
release_state,should_publish,should_finalize, andexisting_version_tag_commit; existing tags on other commits now skip instead of failing.Details
publish: tag absent; publish and finalization are enabled.repair: tag points at current commit; publish is disabled and finalization is enabled.skip: tag points at another commit; publish and finalization are disabled.Testing
actionlint .github/workflows/sdk-release-gate.ymlgit diff --check🤖 Generated with Claude Code
Note
Medium Risk
Changes shared release-gate contract and tag-mismatch behavior for all SDK callers; mis-wired consumers could skip publish or finalize incorrectly.
Overview
The reusable
sdk-release-gateworkflow now classifies each run aspublish,repair, orskipinstead of only “publish or bail.” Callers getshould_finalize,release_state, andexisting_version_tag_commitalongside the tightenedshould_publishsemantics.When the version tag already points at HEAD, publish is skipped but finalization is still allowed (
repair) so metadata can be fixed without republishing. When the tag points at another commit, the job exits successfully withskiprather than failing—non-release commits no longer break the pipeline. OpenAPI verification is unchanged: it still runs only whenshould_publishis true.README wording for the gate is updated to match the publish / repair / skip model.
Reviewed by Cursor Bugbot for commit b3fc3a7. Bugbot is set up for automated code reviews on this repo. Configure here.