Skip to content

ci(release): gate RC dispatch on CI only, defer draft/approval to final - #907

Merged
c-vigo merged 1 commit into
devfrom
feature/902-rc-gate-ci-only
Jul 7, 2026
Merged

c-vigo merged 1 commit into
devfrom
feature/902-rc-gate-ci-only

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Moves the release approval gate off the release-candidate (RC) dispatch and onto the final dispatch.

Today release.yml's validate job runs the same "Find and verify PR" gate for both release-kind=candidate and release-kind=final: it requires the release PR to be non-draft, approved, and CI-green before it will cut anything. That forces a reviewer to approve the release PR before any RC image exists — i.e. before the artifact they would functionally verify has been built — and lands approval on an intermediate diff rather than the one that ships.

RCs are already low-blast-radius: an RC burns a fresh auto-incrementing X.Y.Z-rcN tag + :X.Y.Z-rcN GHCR images (+cosign/SBOM) and dispatches the smoke-test. It does not touch :latest, creates no GitHub Release on this repo, merges nothing, and is pruned at promote. Gating that behind full PR approval is over-restrictive.

What changed

  • release.yml (validate job): the draft (isDraft) + approval (reviewDecision) checks are now guarded by if [ "$RELEASE_KIND" = "final" ]. The CI-status checks stay unconditional — candidates gate on CI-green only.
  • Docs / justfile / CONTRIBUTE: reordered so candidates are published to verify first, then the PR is marked ready + approved before finalize-release. docs/RELEASE_CYCLE.md flowchart, phase summaries, prerequisites, and troubleshooting updated; CONTRIBUTE.md change made in its Jinja template (docs/templates/CONTRIBUTE.md.j2).
  • CHANGELOG: Changed entry under ## Unreleased (+ synced workspace mirror).

Why this is safe

The gate that protects main is never lost: promote-release.yml's merge job independently re-verifies not-draft + approved + CI before merging to main and undrafting the Release. Final still burns the immutable X.Y.Z tag, so it keeps the ready + approval gate. Promote is unchanged.

Design decisions (from discussion)

  • RC gate = CI-green only (not fully ungated): keeps the cheap "no RC on a red branch" floor and a thin supply-chain floor; build-and-test/vulnix-gate run inside the RC anyway.
  • Approval at the final dispatch (not deferred to promote): final burns the immutable tag, so it deserves human sign-off at that step.

Verification

  • just precommit green end-to-end locally (incl. generate-docs, sync-manifest idempotent).
  • No unit test covers the release.yml gate (no release.bats); this workflow change is verified by the hook suite + the conditional logic. The RC/final paths differ only by the guarded block.

Refs: #902

Release candidates are disposable verification artifacts (auto-incrementing
rcN tags, never touch :latest, no GitHub Release, pruned at promote), yet
release.yml's validate job required the release PR to be non-draft and
approved before any candidate could be published — forcing reviewers to
approve before the artifact they would verify exists.

Guard the draft + reviewDecision checks on release-kind == final; keep the
CI-status checks for both kinds. The gate that protects main (not-draft +
approved) is re-enforced by promote-release's merge job regardless, so
moving it off the candidate loses no safety. Reorder RELEASE_CYCLE.md,
justfile, and CONTRIBUTE.md accordingly: verify via candidates first, then
mark ready and get approval before finalize.

Refs: #902
@c-vigo
c-vigo merged commit d618807 into dev Jul 7, 2026
13 checks passed
@c-vigo
c-vigo deleted the feature/902-rc-gate-ci-only branch July 7, 2026 14:01
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