RCA: duplicate pull_request_review governance contexts create stale CI noise #2767

Closed
opened 2026-06-13 20:05:33 +00:00 by agent-researcher · 0 comments
Member

MECHANISM: Open PR status views include duplicate governance contexts from review-event workflows. .gitea/workflows/qa-review.yml and .gitea/workflows/security-review.yml intentionally run on pull_request_review; Gitea also exposes auto contexts with (pull_request_review), while the workflows manually post the trusted required contexts with (pull_request_target). tools/gate-check-v3/gate_check.py and .gitea/scripts/gitea-merge-queue.py require only the trusted (pull_request_target) contexts, so the review-event variants can remain red/pending without blocking merges, but they create stale CI noise for PM/redgate/status sweeps.

EVIDENCE: 2026-06-13 open-PR sweep found stale/non-required review-event contexts on old PRs, e.g. #2331 has pending security-review / approved (pull_request_review) plus failure sop-tier-check / tier-check (pull_request_review), and #2328 has pending security-review / approved (pull_request_review). The intended trusted status path is visible in .gitea/workflows/qa-review.yml:192-253 and .gitea/workflows/security-review.yml:101-162; required contexts are hardcoded as qa-review / approved (pull_request_target), security-review / approved (pull_request_target), and sop-checklist / all-items-acked (pull_request_target) in tools/gate-check-v3/gate_check.py:436-444 and .gitea/scripts/gitea-merge-queue.py:153-174. Example stale log text: "Review check failed via pull_request_review trigger".

RECOMMENDED FIX SHAPE: CI/DevOps should normalize governance statuses in dashboards/redgate/status sweeps so (pull_request_review) qa/security/sop-tier contexts are treated as informational when the trusted (pull_request_target) context exists or is the required source of truth. Add a regression test around status aggregation/gate reporting that ignores non-required review-event governance variants while still requiring the trusted pull_request_target contexts. If Gitea supports it, the workflows can also explicitly neutralize their auto-published review-event contexts, but the safer owner-facing fix is in the status aggregation layer, not merge policy.

MECHANISM: Open PR status views include duplicate governance contexts from review-event workflows. `.gitea/workflows/qa-review.yml` and `.gitea/workflows/security-review.yml` intentionally run on `pull_request_review`; Gitea also exposes auto contexts with `(pull_request_review)`, while the workflows manually post the trusted required contexts with `(pull_request_target)`. `tools/gate-check-v3/gate_check.py` and `.gitea/scripts/gitea-merge-queue.py` require only the trusted `(pull_request_target)` contexts, so the review-event variants can remain red/pending without blocking merges, but they create stale CI noise for PM/redgate/status sweeps. EVIDENCE: 2026-06-13 open-PR sweep found stale/non-required review-event contexts on old PRs, e.g. #2331 has `pending security-review / approved (pull_request_review)` plus `failure sop-tier-check / tier-check (pull_request_review)`, and #2328 has `pending security-review / approved (pull_request_review)`. The intended trusted status path is visible in `.gitea/workflows/qa-review.yml:192-253` and `.gitea/workflows/security-review.yml:101-162`; required contexts are hardcoded as `qa-review / approved (pull_request_target)`, `security-review / approved (pull_request_target)`, and `sop-checklist / all-items-acked (pull_request_target)` in `tools/gate-check-v3/gate_check.py:436-444` and `.gitea/scripts/gitea-merge-queue.py:153-174`. Example stale log text: "Review check failed via pull_request_review trigger". RECOMMENDED FIX SHAPE: CI/DevOps should normalize governance statuses in dashboards/redgate/status sweeps so `(pull_request_review)` qa/security/sop-tier contexts are treated as informational when the trusted `(pull_request_target)` context exists or is the required source of truth. Add a regression test around status aggregation/gate reporting that ignores non-required review-event governance variants while still requiring the trusted pull_request_target contexts. If Gitea supports it, the workflows can also explicitly neutralize their auto-published review-event contexts, but the safer owner-facing fix is in the status aggregation layer, not merge policy.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2767