Skip to content

ci: gate release PRs behind one Release gate context on release - #6733

Merged
kixelated merged 3 commits into
releasefrom
backport/release-gate
Oct 25, 2026
Merged

kixelated merged 3 commits into
releasefrom
backport/release-gate

Conversation

@kixelated

@kixelated kixelated commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The release ruleset should require one Release gate context beside Check (quest/m0/ci/release-gates.md). release-gate.yml landed on main in moq-dev/moq#6154, but a release PR runs the workflows merged with release, so the context cannot be required until release carries it. The maintainer chose to backport it now rather than wait for the next cut (2026-10-22).

Approach

A straight cherry-pick of moq-dev/moq#6154 conflicts in nearly every file: release predates the main-side CI split and lacks Features, C++, TS, io_uring, Video, X11, moq.sh, OSS Scanner, and Runner VM. So this ports the same design onto the workflows release has:

  • New release-gate.yml runs on every release PR. Its Scope job diffs with dorny/paths-filter (same pinned SHA as main) and calls each workflow whose paths match; the Release gate job fails when any call or the scope failed or was cancelled, and passes skips.
  • The 13 workflows that ran on PRs (Android, Audio quality, Interop, OBS, Platform, Swift, WASM, and the Dart, Dart FFI, Go FFI, JS, Kotlin lib, and Swift lib release dry-runs) lose their pull_request trigger and their closed guards, and gain workflow_call where missing. Their path lists move verbatim into the gate's filter; a local script confirmed each filter equals the removed paths.
  • Platform stays path-selected here, as it was on release, rather than always called as on main. Swift exists only on release and is called like the rest.
  • Callers grant the permissions each nested job declares (id-token: write for Interop, Dart, JS; contents: write for Dart FFI). No secrets are passed: none of these workflows read one on a PR.
  • Comments in alert.yml, nightly.yml, obs.yml, and sh/obs/compile.sh that pointed at the per-workflow filters now point at the gate.

This PR adds the gate, so it runs Release gate on itself.

Impact

  • No public API or wire change. CI only.
  • After this merges, the maintainer adds required check Release gate (GitHub Actions, integration 15368) to release ruleset 24392632 beside Check, then edits the title of each open release PR so edited reruns the gate.
  • The next cut conflicts on these workflow files (and add/add on release-gate.yml); take main's side throughout.

Merged with #6730

Alternatives

  • Wait for the next cut to carry main's file: rejected by the maintainer on 2026-10-22.
  • Copy main's release-gate.yml verbatim: it calls nine workflows release does not have, so every run would fail at startup.
  • Also port sh/gh/queue.test.ts: release has neither it nor the policy it encodes, and the cut brings both.

Checks

  • just check: pass (actionlint, alert coverage, check-runs)
  • just gh check: pass
  • Throwaway scripts outside the checkout: each filter key, scope output, call condition, and needs entry line up; no workflow but check.yml and release-gate.yml takes pull_request; each filter matches the removed paths exactly.
  • Not run locally: the gate itself. This PR's own run exercises it.

Follow-ups

None.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Backports #6154 onto release's own workflow set, so the release
ruleset can require `Release gate` now instead of after the next cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T16:05:54.146291Z 23744b7 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: a353e96

No actionable bugs found against the current release base. Consolidating path-selected workflows behind one failure-propagating required context is a sensible adaptation; existing PR dry-run conditions remain effective through workflow_call, and caller permissions cover current nested jobs.

Integration note: when combining this with #6730, add actions: read to the Kotlin and Swift wrapper calls in release-gate.yml, matching their new ffi-release jobs.

Verification limits: static review and GitHub status inspection only. Scope completed but selected checks were still running or queued; I did not run tests or verify the ruleset change.

Gate release-go-ffi on the shared FFI paths that #6730 added to its removed pull_request trigger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23744b773c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release-gate.yml Resolved

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 23744b7

The prior #6730 integration warning is now an active blocker after merging release: .github/workflows/release-gate.yml:283–293 must grant contents: read and actions: read to Kotlin and Swift wrapper calls, matching their new ffi-release jobs. Confirmed the existing identical finding #6733 (comment) rather than duplicating inline.

The consolidated gate remains sensible; added shared-FFI paths preserve Go dry-run coverage. No additional actionable bugs found in this update.

Verification: static comparison against previous review and current release base; no tests run locally. Release gate https://github.com/moq-dev/moq/actions/runs/40209900715 reports startup_failure at this head.

#6730 added ffi-release jobs that read upstream run jobs, and a called
workflow cannot raise the caller's token permissions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: f4d6319

The permission blocker #6733 (comment) is fixed: both Kotlin and Swift wrapper calls grant contents: read and actions: read, matching nested publisher-check jobs. This is a minimal, scoped fix. No new actionable bugs found.

Verification: static comparison against last reviewed 23744b7; no tests run locally. Runtime workflow success remains unverified.

@kixelated
kixelated merged commit b4859d7 into release Oct 25, 2026
52 checks passed
@kixelated
kixelated deleted the backport/release-gate branch October 25, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant