diff --git a/tools/gate-check-v3/gate_check.py b/tools/gate-check-v3/gate_check.py index 38ed66d3..f25be93e 100644 --- a/tools/gate-check-v3/gate_check.py +++ b/tools/gate-check-v3/gate_check.py @@ -365,10 +365,17 @@ def signal_6_ci(pr_number: int, repo: str, branch: str | None = None, pr_data: d else: passing_required.append(f"{ctx} (pending)") + # NOTE: do NOT use ci_state (combined_state) as a fallback verdict driver. + # The combined_state is computed over ALL statuses including this + # gate-check's own prior result. Using it as a fallback creates a + # self-referential loop: gate-check posts failure → combined_state + # becomes failure → script re-blocks → posts failure again. + # The check_statuses dict already excludes gate-check (Bug-1 fix from + # PR #547). Use failing_required as the sole CI gate; if no required + # checks are defined on the branch, return CLEAR rather than re-using + # the combined_state which includes our own status. if failing_required: verdict = "CI_FAIL" - elif ci_state == "failure": - verdict = "CI_FAIL" elif ci_state == "pending": verdict = "CI_PENDING" else: