From b585701c622065eb9e1e3282b29eaf31a9f9206e Mon Sep 17 00:00:00 2001 From: Dev Agent Date: Tue, 2 Jun 2026 20:12:29 +0300 Subject: [PATCH] fix(webhooks): dispatch new QGs; stop false Gitea CI alerts (S-1) - plane._try_advance_stage handles check_tests_local + check_reviewer_verdict - gitea.handle_ci_status: failure -> debug log only (CI not authoritative) --- src/webhooks/gitea.py | 7 +++++-- src/webhooks/plane.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/webhooks/gitea.py b/src/webhooks/gitea.py index 141e4da..d0d3ef3 100644 --- a/src/webhooks/gitea.py +++ b/src/webhooks/gitea.py @@ -194,8 +194,11 @@ async def handle_ci_status(payload: dict): notify_qg_failure(task_id, current_stage, "check_ci_green", reason) elif state == "failure": - logger.warning(f"Task {task_id}: CI failed on branch '{branch}'") - notify_error(task_id, f"CI failed on branch '{branch}'") + # S-1: Gitea CI is NOT the authoritative gate anymore (the orchestrator runs + # tests locally via check_tests_local). Gitea CI is often unconfigured, so a + # "failure"/empty status here is not actionable. Log only, do not alert. + logger.debug(f"Task {task_id}: Gitea CI state='failure' on branch '{branch}' " + f"(non-authoritative, suppressed — local tests are the gate)") async def handle_pr(payload: dict): diff --git a/src/webhooks/plane.py b/src/webhooks/plane.py index 6a348c2..639b750 100644 --- a/src/webhooks/plane.py +++ b/src/webhooks/plane.py @@ -303,9 +303,9 @@ async def _try_advance_stage( return # Determine args based on QG function - if qg_name in ("check_analysis_approved", "check_analysis_complete", "check_architecture_done", "check_tests_passed"): + if qg_name in ("check_analysis_approved", "check_analysis_complete", "check_architecture_done", "check_tests_passed", "check_reviewer_verdict"): passed, reason = qg_func(repo, work_item_id) - elif qg_name == "check_ci_green": + elif qg_name in ("check_ci_green", "check_tests_local"): passed, reason = qg_func(repo, branch) elif qg_name == "check_review_approved": # Find PR number by branch via Gitea API