Skip to content

ci(cd): refuse a Release when ref-gate finds a private reference (RIG-10858) - #83

Open
rigel-mintaka wants to merge 1 commit into
mainfrom
nebula/rig-10858-refuse-a-release-when-ref-gate-finds-a
Open

rigel-mintaka wants to merge 1 commit into
mainfrom
nebula/rig-10858-refuse-a-release-when-ref-gate-finds-a

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What does this do

The release job in cd.yaml runs ref-gate before it publishes the release manifest to main, before it tags the release commit, and before it creates the GitHub Release. If ref-gate finds a private reference, or fails to run, the release job stops and the Release is not published.

Why do we need it

The Architect ruled on RIG-11536 (option A, 2026-11-23): ref-gate stays advisory on nebula main, and the Release gate stops a leak from shipping. This PR is that Release gate. Without it, a private reference that reaches main can also ship in a public Release.

Summary

  • Add the step Run ref-gate before publishing to the release job in .github/workflows/cd.yaml, after Go setup and before the artifact download.
  • It runs the same command as the ref-gate job in ci.yaml: Go 1.27.4, CGO_ENABLED: '0', and go -C tools/ref-gate run . --config ref-gate.config.json, with GATE_ROOT set to the checkout root.
  • Jobs before release still run. Image tags and sync-out wait on release success.

Verification

  • Review of the step order on main's cd.yaml: the gate runs before the manifest commit, the tag push and gh release create.
  • refgate.Main exits 1 on a finding and 2 on an error; both fail the step.
  • The CI ref-gate job passes on main e69bc41 (run 45200953658).

Risks

A ref-gate false positive or a Go proxy outage blocks a Release until a fix-forward PR. Main has passed ref-gate only since e69bc41; the three releases before it would have been refused. Rollback is a revert of this 5-line step.

Spec-impact: none

Checks skipped: nebula has no pre-push hook config; GitHub Actions ci.yaml runs its checks

Refs RIG-10858

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Nov 19, 2026

Copy link
Copy Markdown

RIG-10858

@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

Updating: draft for Matt's choice on RIG-10858 (option B); made ready only if B is chosen.

…-10858)

Run ref-gate in the release job before the release manifest is published to main, before the tag is pushed, and before the GitHub Release is created. A hit fails the release, so no manifest commit lands on main and no tag or Release is created.

This is option B from RIG-10858. ref-gate stays advisory in PR CI; CD is the gate that refuses a release. The step mirrors the ref-gate job in ci.yaml: Go 1.27.4, CGO_ENABLED 0, and go -C tools/ref-gate run . --config ref-gate.config.json. The release job's existing checkout (fetch-depth 0) is reused.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

All-clear at 5a0db6c
Base: main

All-clear at 5a0db6c

Review rounds (0H/0M/0L):

  • Round 1 at c232941: the gate step runs before the manifest commit, the tag push and gh release create. refgate.Main exits 1 on a finding and 2 on an error, and both fail the step. Checkout and Go 1.27.4 setup come before it. CI ref-gate is green on main e69bc41 (run 45200953658).
  • Round 2 at 5a0db6c (rjc rebase onto main): cd.yaml is byte-identical to the round-1 patched tree, and the step order is unchanged.

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review November 23, 2026 15:20

This branch had an error being deployed

1 failed deployment
ci — 5a0db6ca Deployed Nov 23, 2026 by rigel-mintaka via CI (aarch64-darwin) #1189
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