Add the validate-release entry gate and re-vendor github-release - #29
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #29 +/- ##
========================================
Coverage 44.96% 44.96%
========================================
Files 25 25
Lines 3398 3398
Branches 259 259
========================================
Hits 1528 1528
Misses 1824 1824
Partials 46 46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the reusable release orchestrator workflow to better match the repo’s documented release contract in WORKFLOW.md, adding an explicit entry gate for branch/version classification and re-aligning the github-release job body with the canonical shape.
Changes:
- Add a
validate-releaseentry-gate job to fail fast when the branch’s expected prerelease/stable classification does not matchSemVer2. - Add an
expect_release_assetsinput to support tag-only releases by conditionally skipping artifact download and relaxing unmatched-files failure behavior. - Re-vendor and adjust the
github-releasejob’s release-create and artifact-cleanup behavior (including a safer delete loop).
Suppressed comments (1)
.github/workflows/build-release-task.yml:110
- Same as build-executable: if validate-release is skipped on smoke (per WORKFLOW.md D2.2), this job should allow
needs.validate-release.result == 'skipped'or smoke builds will be blocked.
needs: [get-version, validate, validate-release]
if: ${{ !cancelled() && needs.get-version.result == 'success' && needs.validate-release.result == 'success' && (needs.validate.result == 'success' || needs.validate.result == 'skipped') }}
uses: ./.github/workflows/build-docker-task.yml
This was referenced Aug 1, 2026
ptr727
added a commit
that referenced
this pull request
Aug 3, 2026
WORKFLOW.md already specified both halves of this: section 4 names validate-release as a standardization-baseline job, and D2.2 requires the gate to fail loudly when the default branch carries a prerelease suffix or a non-default branch carries none. The workflow implemented neither. The audit reported the missing job and a github-release body that matches no hub revision. The version check moves out of github-release and into a validate-release job gating every build, so an NBGV mis-classification fails before anything is built rather than after. It also gains the arm the inline step never had: a non-main branch whose version carries no prerelease suffix now fails, which is the develop-published-as-stable case. Smoke exits the check early, since a detached PR head always versions as prerelease. github-release is re-vendored from the canonical and now normalizes equal to it under the audit's own rules. That brings expect_release_assets, which gates the artifact download and relaxes fail_on_unmatched_files for a repo with no file-producing target. This repo ships the executable 7z, so both callers keep the default of true. The artifact delete loop also moves from a `|| echo` tail to an if guard. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
This one is not only a carry gap.
WORKFLOW.mdin this repo already specified both halves and the workflow implemented neither:get-version,validate-release, andgithub-releasejobs ... these job bodies should not need per-repo edits."validate-releaseby job name.So the contract named a job that did not exist, and the required check could never have caught S10.
validate-release
The version check moves out of a step inside
github-releaseinto its own job that gates every build. Two behavior changes follow:github-release, after the executable and Docker builds had already completed, so a mis-classified version cost a full build before it was caught.maincarrying a prerelease suffix. The canonical also fails a non-main branch whose version carries no prerelease suffix, which is the develop-classified-public-and-published-as-stable case. That is the second half of D2.2, previously unimplemented.Smoke exits the check early, since a detached PR head always versions as prerelease and would otherwise trip the main arm.
build-executableandbuild-dockerboth gain it inneedsand in their result guard.github-release
Re-vendored from the canonical. It now normalizes equal to it under the audit's own three rules (EOL, action pin,
needs:), verified with the same regexesspec/audit.pyuses. The repo keeps its newer Dependabot pins (checkout v7.0.1, action-gh-release v3.0.2) and its prunedneedslist, which is exactly what that normalization exists to allow.Substantive changes it carries:
expect_release_assets(new input, defaulttrue): gates the artifact download and drivesfail_on_unmatched_files, so a repo with no file-producing target can still cut a tag-only release. This repo ships the executable 7z, so both callers keep the default and behavior here is unchanged.|| echotail to anif !guard, so a failed delete cannot be mistaken for a successful one.Verification
actionlint(rhysd/actionlint, which bundles shellcheck for therun:blocks) exits 0.editorconfig-checkerexits 0; workflow YAML stays LF.github-releaseregion normalizes byte-equal to the canonical under the audit's rules.publish-release.yml,test-pull-request.yml) take theexpect_release_assetsdefault, so neither needed a change.Part of the conformance sweep against the hub baseline (
audit run 2026-08-01T14:29:05Z | hub 6501479).