Remove the deadlocking production-review-gate (keep Copilot review advisory)#27
Merged
Merged
Conversation
…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>
There was a problem hiding this comment.
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.shto stop creatingproduction-review-gateand to delete any stale instance, keepingproduction-copilot-reviewas advisory. - Deletes the now-unused required-workflow wrapper and reusable workflow that implemented the gate.
- Updates
ORG-POLICY.mdto 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 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
production-review-gateruleset enforced a required workflow demanding "Copilot reviewed the current HEAD." It deadlocked everytier=productionPR and forced admin-bypass on every merge. It is unachievable in this environment:pull_request/merge_group— GitHub ignores thepull_request_reviewtrigger, so the gate fired once at push (before Copilot reviewed the new HEAD) and never re-ran. It also declaredpull_request_review_thread, which is a webhook event but not a valid Actions trigger.review_on_pushdoes not fire) — nothing turns the check green.action_requiredand never executes.What
apply-org-policy.sh: stop creatingproduction-review-gate; idempotently delete any stale copy. Keepproduction-copilot-review(advisory).required-copilot-review-gate.ymlwrapper and the reusablecopilot-review-gate.yml.ORG-POLICY.md: document the removal and the reasons.The live
production-review-gateruleset has already been deleted via the API; this captures it as code so re-runningapply-org-policy.shwon't resurrect it.Native
required_review_thread_resolution(inproduction-main) still enforces thread resolution and re-evaluates instantly with no workflow involved.🤖 Generated with Claude Code