Skip to content

Remove the deadlocking production-review-gate (keep Copilot review advisory)#27

Merged
autholykos merged 1 commit into
mainfrom
chore/remove-broken-copilot-gate
Jun 8, 2026
Merged

Remove the deadlocking production-review-gate (keep Copilot review advisory)#27
autholykos merged 1 commit into
mainfrom
chore/remove-broken-copilot-gate

Conversation

@autholykos

Copy link
Copy Markdown
Contributor

Why

The production-review-gate ruleset enforced a required workflow demanding "Copilot reviewed the current HEAD." It deadlocked every tier=production PR and forced admin-bypass on every merge. It is unachievable in this environment:

  1. Required workflows run only on pull_request/merge_group — GitHub ignores the pull_request_review trigger, so the gate fired once at push (before Copilot reviewed the new HEAD) and never re-ran. It also declared pull_request_review_thread, which is a webhook event but not a valid Actions trigger.
  2. Copilot does not auto-review on push here (review_on_push does not fire) — nothing turns the check green.
  3. A review-triggered re-run is approval-gated — the Copilot bot is the triggering actor, so the run is action_required and never executes.

What

  • apply-org-policy.sh: stop creating production-review-gate; idempotently delete any stale copy. Keep production-copilot-review (advisory).
  • Remove the now-unused required-copilot-review-gate.yml wrapper and the reusable copilot-review-gate.yml.
  • ORG-POLICY.md: document the removal and the reasons.

The live production-review-gate ruleset has already been deleted via the API; this captures it as code so re-running apply-org-policy.sh won't resurrect it.

Native required_review_thread_resolution (in production-main) still enforces thread resolution and re-evaluates instantly with no workflow involved.

🤖 Generated with Claude Code

…visory

The production-review-gate ruleset enforced a required *workflow* demanding
'Copilot reviewed HEAD', which deadlocked every production PR and forced admin
bypass on every merge. It is unachievable here:
- ruleset-required workflows run only on pull_request/merge_group, so the gate
  fired once at push (before Copilot reviewed the new HEAD) and never re-ran;
  it also used pull_request_review_thread, which is not a valid Actions trigger;
- Copilot does not auto-review on push (review_on_push does not fire), so
  nothing turned the check green;
- a review-triggered re-run is approval-gated (Copilot bot actor -> action_required).

Native required_review_thread_resolution (production-main) already enforces
thread resolution and re-evaluates instantly, with no workflow involved. Keep
Copilot review advisory via production-copilot-review.

apply-org-policy.sh now idempotently deletes any stale production-review-gate.
Remove the unused required-copilot-review-gate.yml wrapper and the reusable
copilot-review-gate.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 8, 2026 09:02
@autholykos
autholykos merged commit 9b04a30 into main Jun 8, 2026
6 checks passed
@autholykos
autholykos deleted the chore/remove-broken-copilot-gate branch June 8, 2026 09:03

Copilot AI 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.

Pull request overview

This PR removes the org ruleset-based “Copilot reviewed HEAD” required-workflow gate that was deadlocking tier=production pull requests, while keeping Copilot review enabled as an advisory signal and documenting the rationale.

Changes:

  • Updates scripts/apply-org-policy.sh to stop creating production-review-gate and to delete any stale instance, keeping production-copilot-review as advisory.
  • Deletes the now-unused required-workflow wrapper and reusable workflow that implemented the gate.
  • Updates ORG-POLICY.md to document why the required gate was removed and what guarantees remain (native thread-resolution enforcement).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/apply-org-policy.sh Removes the required gate creation; adds cleanup of the stale production-review-gate; keeps advisory Copilot review ruleset.
ORG-POLICY.md Updates org policy documentation to reflect removal of the required Copilot gate and explain why.
.github/workflows/required-copilot-review-gate.yml Deleted: wrapper workflow that was used as the required check for the gate ruleset.
.github/workflows/copilot-review-gate.yml Deleted: reusable workflow implementing the “Copilot reviewed HEAD + threads resolved” gate logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +245 to 246
echo "==> Skipping Copilot-review ruleset (APPLY_REVIEW_GATE=false)"
fi
Comment thread ORG-POLICY.md
Comment on lines +103 to +105
time — before Copilot had reviewed the new HEAD — failed, and never re-ran.
(Evidence: every historical gate run was `event=pull_request`, all failed.)
It also declared `pull_request_review_thread`, which is a webhook event but
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.

2 participants