From 86b3d73f3bfb8c064065b265101fb6f7f5635b37 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Tue, 30 Jun 2026 09:27:02 +0900 Subject: [PATCH] Handle unavailable OpenCode target reviews --- .github/workflows/opencode-review.yml | 4 ++++ scripts/ci/test_strix_quick_gate.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/opencode-review.yml b/.github/workflows/opencode-review.yml index 673673aa5..0a3746599 100644 --- a/.github/workflows/opencode-review.yml +++ b/.github/workflows/opencode-review.yml @@ -4997,6 +4997,9 @@ jobs: if request_changes_for_merge_conflict_if_present; then : else + if approve_after_model_failure_when_current_head_gates_pass "$pending_checks_file" "$failed_checks_file" "$unresolved_human_threads_file" "$human_thread_review_body_file"; then + : + else body="$(printf '%s\n' \ "OpenCode gate result was not publishable for the current head." \ "" \ @@ -5009,6 +5012,7 @@ jobs: "" \ "Leaving the PR review unchanged because this is review tooling instability, not a source-code finding.")" stop_approval_without_review "OPENCODE_REVIEW_UNAVAILABLE" "$body" + fi fi fi ;; diff --git a/scripts/ci/test_strix_quick_gate.sh b/scripts/ci/test_strix_quick_gate.sh index 84d93bf47..1713573be 100755 --- a/scripts/ci/test_strix_quick_gate.sh +++ b/scripts/ci/test_strix_quick_gate.sh @@ -572,6 +572,7 @@ assert_opencode_review_uses_codegraph_and_gpt5_fallback() { assert_file_contains "$workflow_file" 'unresolved_human_threads_file="$(mktemp)"' "deterministic model-failure approval writes human-thread evidence to a real temp file" assert_file_contains "$workflow_file" 'collect_unresolved_human_review_threads "$unresolved_threads_file"' "deterministic model-failure approval rechecks human review threads" assert_file_contains "$workflow_file" "Deterministic fallback approval was used only after model-output instability and did not bypass coverage, failed-check, mergeability, or human-review gates." "deterministic model-failure approval body documents the guarded evidence path" + assert_file_contains "$workflow_file" 'approve_after_model_failure_when_current_head_gates_pass "$pending_checks_file" "$failed_checks_file" "$unresolved_human_threads_file" "$human_thread_review_body_file"' "opencode approval retries deterministic fallback when selected model output is not publishable" assert_file_contains "$workflow_file" 'Detect central review-process fallback scope' "opencode approval detects central review-process fallback scope before model attempts" assert_file_contains "$workflow_file" 'id: central_review_process_fallback_scope' "opencode approval exposes central review-process fallback scope as a step output" assert_file_contains "$workflow_file" 'steps.central_review_process_fallback_scope.outputs.eligible != '\''true'\''' "opencode model attempts are skipped for eligible central review-process fallback diffs"