[release] F: Preserve immutable SDK releases#116
Merged
Conversation
Treat an existing release with the same package and SDK tuple as a successful no-op, while failing on tuple skew and suppressing downstream/Windows publication. This keeps source-only follow-ups green without replacing assets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a354ddf-0f65-44b2-a2cb-81d4662a3587
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Nanvix CI release workflow to preserve immutability for existing SDK releases by comparing provenance while ignoring the source_commit, and conditionally suppresses downstream redispatch/Windows publication when an identical immutable tuple already exists.
Changes:
- Add a
release_publishedjob output and gate downstream dispatches/Windows release on it. - For existing SDK releases, compare provenance with
source_commitremoved; if identical, keep existing assets untouched and exit successfully without republishing. - Add a shell test asserting the new provenance-compare and suppression behavior is present in the workflow.
Show a summary per file
| File | Description |
|---|---|
| tests/run-tests.sh | Adds assertions that the workflow strips source_commit, emits release_published=false, and gates follow-on jobs on release_published. |
| .github/workflows/nanvix-ci.yml | Introduces provenance tuple comparison for existing SDK releases and suppresses downstream/Windows publication when the release is unchanged. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
| ! cmp -s sdk-provenance.json existing-release/sdk-provenance.json; then | ||
| echo "::error::Refusing to clobber $RELEASE_TAG from a different SDK build" | ||
| --dir existing-release; then | ||
| echo "::error::Existing SDK release has no provenance asset" |
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
When an SDK release coordinate already exists, compare all immutable provenance fields except the source commit. Matching tuples now leave the existing release and assets untouched and suppress downstream and Windows publication; skew still fails closed.
This fixes zutils-only/default-branch follow-ups such as BusyBox without weakening release immutability. SHA-qualified callers retain their intentionally unique coordinates.
Validation