Skip to content

ci(governance): adopt the canonical risk gate - #519

Merged
Pigbibi merged 3 commits into
mainfrom
ci/canonical-risk-gate
Nov 5, 2026
Merged

Pigbibi merged 3 commits into
mainfrom
ci/canonical-risk-gate

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI assistance

Qoder (AI agent) wrote this change from the owner's instruction; a Codex review is requested on this head.

What changed

Replaces .github/workflows/risk-gate.yml with the canonical hardened gate and updates the approval paragraph in AGENTS.md.

The gate now:

  • reads the approver login from the organization variable RISK_GATE_OWNER instead of a literal;
  • publishes ai-review from the codex-review-state:v1 receipt on the current head;
  • judges base drift by Git ancestry;
  • fails closed when two open pull requests share a head;
  • treats workflow edits, dependency policy and runtime configuration paths as protected.

.github/workflows/dot-review-submit.yml now submits an automatic dot review only for pull_request_target runs. The gate's new post-push and scheduled sweeps dispatch per-PR evaluations that complete as runs on the default branch, where the selector cannot recover a PR head.

How verified

  • The file is the canonical gate already tested in the personal repositories (55 unit tests).
  • actionlint and the repository's normal checks run on this head.
  • No branch protection, ruleset, secret, deployment or runtime setting is touched.

Why

The organization copy publishes no ai-review, so a Codex review is decorative: no required context reads the receipt. Its approver login is hard-coded, and it has no ancestry or shared-head protection.

Risk

Risk tier R1. The blast radius is this repository's pull-request status publication only. Revert this pull request to roll back. No merge, deploy, secret or settings change is included.

Breaking changes

None. risk-gate and pr-template remain the required contexts, and owner-approved still clears protected paths; risk-gate additionally requires a completed Codex review on the current head.

The organization copy publishes no ai-review context, so the Codex
receipt is decorative. Replace it with the tested canonical gate:
approver from RISK_GATE_OWNER, ai-review on the current head,
ancestry drift, shared-head fail-closed and protected paths.
@Pigbibi

Pigbibi commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 7ac2725d24

ℹ️ 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/risk-gate.yml Resolved
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-05T10:23:35.580732Z da99150 Draft marked ready
ℹ️ 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.

The canonical gate dispatches a per-PR evaluation after a base push and
on its schedule. Each dispatch completes as a run on the default branch,
where the dot review selector cannot resolve a pull request head and
fails with missing_pr_association_use_manual_dispatch. Automatic
submission now follows pull_request_target runs only; a receipt refresh
stays available through the manual dispatch inputs.
@Pigbibi

Pigbibi commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 2255c91568

ℹ️ 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".

A synchronize can move one pull request off a shared head even when
its own evaluation fails, which leaves the released sibling on a
stale collision error until another event or the six-hour sweep.
Run the sibling refresh in a finally block and keep a refresh
failure from masking the evaluation error.
@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: da99150555

ℹ️ 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".

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 5, 2026
@Pigbibi
Pigbibi marked this pull request as ready for review November 5, 2026 10:21
@Pigbibi
Pigbibi merged commit 7dbdfc6 into main Nov 5, 2026
10 of 11 checks passed
@Pigbibi
Pigbibi deleted the ci/canonical-risk-gate branch November 5, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved Owner approval for high-risk PRs. AI agents must never apply this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant