This is an automated email from the ASF dual-hosted git repository.

zclllyybb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new e10a6749fc3 [improvement](ci) Run comment-triggered review in one job 
(#66272)
e10a6749fc3 is described below

commit e10a6749fc3e122fd388c2ee17bc997147941fb5
Author: Dongyang Li <[email protected]>
AuthorDate: Fri Jul 31 10:44:38 2026 +0800

    [improvement](ci) Run comment-triggered review in one job (#66272)
    
    A single `/review` comment currently expands into four serial jobs:
    resolve PR metadata, mark the review pending, run the reusable review,
    and refresh the required check. Three are lightweight orchestration, but
    each requests a separate runner. Under runner pressure, every serial
    boundary can queue independently, multiplying wall-clock delay before
    useful work starts.
    
    This PR handles authorized `/review` comments directly in
    `code-review-runner.yml`, resolves event or dispatch inputs in the first
    step of the existing review job, and performs both status updates in
    that same allocation. It preserves `workflow_dispatch` and
    `workflow_call`, the existing authorization filter, and fail-safe status
    behavior. The obsolete four-job dispatcher is removed.
    
    One `/review` invocation now requests exactly one runner job instead of
    four serial jobs.
    
    success link: https://github.com/apache/doris/actions/runs/30537804662
---
 .github/workflows/code-review-comment.yml         | 122 ----------
 .github/workflows/code-review-runner.yml          | 268 +++++++++++++++++-----
 .github/workflows/code-review-sync-result.yml     |   1 +
 .github/workflows/comment-to-trigger-teamcity.yml |   2 +-
 4 files changed, 215 insertions(+), 178 deletions(-)

diff --git a/.github/workflows/code-review-comment.yml 
b/.github/workflows/code-review-comment.yml
deleted file mode 100644
index 89eea813b40..00000000000
--- a/.github/workflows/code-review-comment.yml
+++ /dev/null
@@ -1,122 +0,0 @@
-name: Code Review Comment Dispatch
-
-on:
-  issue_comment:
-    types: [created]
-
-permissions:
-  statuses: write
-  pull-requests: write
-  contents: read
-  issues: write
-
-jobs:
-  resolve-pr:
-    runs-on: ubuntu-latest
-    if: >-
-      github.event.issue.pull_request &&
-      startsWith(github.event.comment.body, '/review') &&
-      (
-        github.event.comment.author_association == 'MEMBER' ||
-        github.event.comment.author_association == 'OWNER' ||
-        github.event.comment.author_association == 'COLLABORATOR'
-      )
-    outputs:
-      pr_number: ${{ steps.pr.outputs.pr_number }}
-      head_sha: ${{ steps.pr.outputs.head_sha }}
-      base_sha: ${{ steps.pr.outputs.base_sha }}
-      review_focus: ${{ steps.pr.outputs.review_focus }}
-    steps:
-      - name: Get PR info
-        id: pr
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          COMMENT_BODY: ${{ github.event.comment.body }}
-        run: |
-          PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ 
github.event.issue.number }})
-          HEAD_SHA=$(echo "$PR_JSON" | jq -r '.head.sha')
-          BASE_SHA=$(echo "$PR_JSON" | jq -r '.base.sha')
-          REVIEW_FOCUS=$(printf '%s' "${COMMENT_BODY#'/review'}" | sed 
's/^[[:space:]]*//')
-
-          echo "pr_number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
-          echo "head_sha=$HEAD_SHA" >> "$GITHUB_OUTPUT"
-          echo "base_sha=$BASE_SHA" >> "$GITHUB_OUTPUT"
-          {
-            echo "review_focus<<EOF"
-            printf '%s\n' "$REVIEW_FOCUS"
-            echo "EOF"
-          } >> "$GITHUB_OUTPUT"
-
-  code-review:
-    needs:
-      - resolve-pr
-      - mark-review-pending
-    if: >-
-      github.event.issue.pull_request &&
-      startsWith(github.event.comment.body, '/review') &&
-      (
-        github.event.comment.author_association == 'MEMBER' ||
-        github.event.comment.author_association == 'OWNER' ||
-        github.event.comment.author_association == 'COLLABORATOR'
-      )
-    uses: ./.github/workflows/code-review-runner.yml
-    secrets: inherit
-    with:
-      pr_number: ${{ needs.resolve-pr.outputs.pr_number }}
-      head_sha: ${{ needs.resolve-pr.outputs.head_sha }}
-      base_sha: ${{ needs.resolve-pr.outputs.base_sha }}
-      review_focus: ${{ needs.resolve-pr.outputs.review_focus }}
-
-  mark-review-pending:
-    needs: resolve-pr
-    runs-on: ubuntu-latest
-    if: >-
-      github.event.issue.pull_request &&
-      startsWith(github.event.comment.body, '/review') &&
-      (
-        github.event.comment.author_association == 'MEMBER' ||
-        github.event.comment.author_association == 'OWNER' ||
-        github.event.comment.author_association == 'COLLABORATOR'
-      )
-    steps:
-      - name: Mark Code Review status as pending
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          REPO: ${{ github.repository }}
-          HEAD_SHA: ${{ needs.resolve-pr.outputs.head_sha }}
-        run: |
-          gh api repos/${REPO}/statuses/${HEAD_SHA} \
-            -X POST \
-            -f state='pending' \
-            -f context='code-review' \
-            -f description="Automated review is running for ${HEAD_SHA}." \
-            -f target_url="${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}"
-
-  refresh-required-check:
-    needs:
-      - resolve-pr
-      - code-review
-    runs-on: ubuntu-latest
-    if: ${{ always() && needs.resolve-pr.result == 'success' && 
needs.code-review.result != 'skipped' }}
-    steps:
-      - name: Sync Code Review check for current head
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          REPO: ${{ github.repository }}
-          PR_NUMBER: ${{ needs.resolve-pr.outputs.pr_number }}
-          HEAD_SHA: ${{ needs.resolve-pr.outputs.head_sha }}
-        run: |
-          state="pending"
-          summary="Trigger /review to start automated review for ${HEAD_SHA}."
-
-          if [ "${{ needs.code-review.result }}" = "success" ]; then
-            state="success"
-            summary="Automated review was triggered for ${HEAD_SHA}."
-          fi
-
-          gh api repos/${REPO}/statuses/${HEAD_SHA} \
-            -X POST \
-            -f state="${state}" \
-            -f context='code-review' \
-            -f description="${summary}" \
-            -f target_url="${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}"
diff --git a/.github/workflows/code-review-runner.yml 
b/.github/workflows/code-review-runner.yml
index 431bbbbbf24..1d60b1fd503 100644
--- a/.github/workflows/code-review-runner.yml
+++ b/.github/workflows/code-review-runner.yml
@@ -1,6 +1,8 @@
 name: Code Review Runner
 
 on:
+  issue_comment:
+    types: [created]
   workflow_dispatch:
     inputs:
       pr_number:
@@ -16,6 +18,11 @@ on:
         required: false
         type: string
         default: ''
+      manage_status:
+        description: Update the code-review commit status from this run.
+        required: false
+        type: boolean
+        default: true
   workflow_call:
     inputs:
       pr_number:
@@ -31,8 +38,16 @@ on:
         required: false
         type: string
         default: ''
+      manage_status:
+        description: >-
+          Update the code-review commit status. Callers that enable this must
+          grant statuses: write.
+        required: false
+        type: boolean
+        default: false
 
 permissions:
+  statuses: write
   pull-requests: write
   contents: read
   issues: write
@@ -40,20 +55,114 @@ permissions:
 jobs:
   code-review:
     runs-on: ubuntu-latest
-    timeout-minutes: 120
+    # Every pre-finalization step has its own timeout. Their worst-case budget,
+    # including review/failure/status handling and best-effort cleanup, is 153
+    # minutes, leaving 12 minutes for runner setup and post-job cleanup.
+    timeout-minutes: 165
+    if: >-
+      inputs.pr_number != '' ||
+      (
+        github.event_name == 'issue_comment' &&
+        github.event.issue.pull_request &&
+        startsWith(github.event.comment.body, '/review') &&
+        (
+          github.event.comment.author_association == 'MEMBER' ||
+          github.event.comment.author_association == 'OWNER' ||
+          github.event.comment.author_association == 'COLLABORATOR'
+        )
+      )
     steps:
+      - name: Resolve review inputs
+        id: review_inputs
+        timeout-minutes: 2
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          EVENT_NAME: ${{ github.event_name }}
+          ISSUE_NUMBER: ${{ github.event.issue.number }}
+          COMMENT_BODY: ${{ github.event.comment.body }}
+          INPUT_PR_NUMBER: ${{ inputs.pr_number }}
+          INPUT_HEAD_SHA: ${{ inputs.head_sha }}
+          INPUT_BASE_SHA: ${{ inputs.base_sha }}
+          INPUT_REVIEW_FOCUS: ${{ inputs.review_focus }}
+          INPUT_MANAGE_STATUS: ${{ inputs.manage_status }}
+          REPO: ${{ github.repository }}
+        run: |
+          if [ -n "$INPUT_PR_NUMBER" ]; then
+            PR_NUMBER="$INPUT_PR_NUMBER"
+            HEAD_SHA="$INPUT_HEAD_SHA"
+            BASE_SHA="$INPUT_BASE_SHA"
+            REVIEW_FOCUS="$INPUT_REVIEW_FOCUS"
+            MANAGE_STATUS="$INPUT_MANAGE_STATUS"
+          elif [ "$EVENT_NAME" = "issue_comment" ]; then
+            PR_NUMBER="$ISSUE_NUMBER"
+            PR_JSON="$(gh api "repos/${REPO}/pulls/${PR_NUMBER}")"
+            HEAD_SHA="$(jq -er '.head.sha' <<<"$PR_JSON")"
+            BASE_SHA="$(jq -er '.base.sha' <<<"$PR_JSON")"
+            REVIEW_FOCUS="$(printf '%s' "${COMMENT_BODY#'/review'}" |
+              python3 -c 'import sys; 
sys.stdout.write(sys.stdin.read().lstrip())')"
+            MANAGE_STATUS=true
+          else
+            echo "Review inputs are unavailable for event '$EVENT_NAME'." >&2
+            exit 1
+          fi
+
+          test -n "$PR_NUMBER"
+          test -n "$HEAD_SHA"
+          test -n "$BASE_SHA"
+
+          if [ "$MANAGE_STATUS" = "true" ]; then
+            PR_JSON="${PR_JSON:-$(gh api "repos/${REPO}/pulls/${PR_NUMBER}")}"
+            LIVE_HEAD_SHA="$(jq -er '.head.sha' <<<"$PR_JSON")"
+            LIVE_BASE_SHA="$(jq -er '.base.sha' <<<"$PR_JSON")"
+            if [ "$LIVE_HEAD_SHA" != "$HEAD_SHA" ] || [ "$LIVE_BASE_SHA" != 
"$BASE_SHA" ]; then
+              echo "Refusing to update status for a PR/head/base mismatch." >&2
+              echo "Declared base/head: $BASE_SHA $HEAD_SHA" >&2
+              echo "Current base/head:  $LIVE_BASE_SHA $LIVE_HEAD_SHA" >&2
+              exit 1
+            fi
+          fi
+
+          echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
+          echo "head_sha=$HEAD_SHA" >> "$GITHUB_OUTPUT"
+          echo "base_sha=$BASE_SHA" >> "$GITHUB_OUTPUT"
+          echo "manage_status=$MANAGE_STATUS" >> "$GITHUB_OUTPUT"
+          focus_delimiter="review_focus_${RANDOM}_${RANDOM}"
+          {
+            echo "review_focus<<${focus_delimiter}"
+            printf '%s\n' "$REVIEW_FOCUS"
+            echo "${focus_delimiter}"
+          } >> "$GITHUB_OUTPUT"
+
+      - name: Mark Code Review status as pending
+        if: ${{ steps.review_inputs.outputs.manage_status == 'true' }}
+        timeout-minutes: 2
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          HEAD_SHA: ${{ steps.review_inputs.outputs.head_sha }}
+          REPO: ${{ github.repository }}
+        run: |
+          gh api "repos/${REPO}/statuses/${HEAD_SHA}" \
+            -X POST \
+            -f state='pending' \
+            -f context='code-review' \
+            -f description="Automated review is running for ${HEAD_SHA}." \
+            -f target_url="${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}"
+
       - name: Checkout repository
+        timeout-minutes: 10
         uses: actions/checkout@v4
         with:
-          ref: ${{ inputs.head_sha }}
+          ref: ${{ steps.review_inputs.outputs.head_sha }}
           fetch-depth: 0
 
       - name: Install ripgrep
+        timeout-minutes: 5
         run: |
           sudo apt-get update
           sudo apt-get install -y ripgrep
 
       - name: Install Codex
+        timeout-minutes: 5
         run: |
           for attempt in 1 2 3; do
             if npm install -g @openai/codex; then
@@ -67,6 +176,7 @@ jobs:
           exit 1
 
       - name: Install ossutil
+        timeout-minutes: 5
         run: |
           tmp_dir="$(mktemp -d)"
           trap 'rm -rf "$tmp_dir"' EXIT
@@ -75,6 +185,7 @@ jobs:
           sudo install -m 0755 "$tmp_dir/ossutil-v1.7.19-linux-amd64/ossutil" 
/usr/local/bin/ossutil
 
       - name: Install Codex goal binary
+        timeout-minutes: 10
         run: |
           codex_cmd="$(command -v codex)"
           codex_target="$(readlink -f "$codex_cmd")"
@@ -101,6 +212,7 @@ jobs:
           OSS_CODEX_GOAL_FALLBACK_OBJECT: 
oss://doris-community-ci/codex/codex-goal
 
       - name: Configure Codex auth
+        timeout-minutes: 5
         run: |
           install -m 700 -d "$RUNNER_TEMP/codex-home"
           printf 'CODEX_HOME=%s\n' "$RUNNER_TEMP/codex-home" >> "$GITHUB_ENV"
@@ -148,6 +260,7 @@ jobs:
           OSS_ENDPOINT: oss-cn-hongkong.aliyuncs.com
 
       - name: Sync Codex memories from OSS
+        timeout-minutes: 5
         run: |
           install -m 700 -d "$CODEX_HOME/memories"
           archive="$RUNNER_TEMP/codex-memories.tar.gz"
@@ -181,6 +294,7 @@ jobs:
           OSS_CODEX_MEMORIES_OBJECT: oss://doris-community-ci/memories.tar.gz
 
       - name: Prepare review context directory
+        timeout-minutes: 2
         run: |
           review_context_dir="$(mktemp -d 
"$GITHUB_WORKSPACE/.code-review.XXXXXX")"
           review_context_rel="$(basename "$review_context_dir")"
@@ -188,10 +302,11 @@ jobs:
           printf 'REVIEW_CONTEXT_REL=%s\n' "$review_context_rel" >> 
"$GITHUB_ENV"
 
       - name: Fetch existing PR review threads
+        timeout-minutes: 5
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           REPO: ${{ github.repository }}
-          PR_NUMBER: ${{ inputs.pr_number }}
+          PR_NUMBER: ${{ steps.review_inputs.outputs.pr_number }}
         run: |
           MAX_THREADS=30
           MAX_BODY_CHARS=1200
@@ -248,8 +363,9 @@ jobs:
           fi
 
       - name: Prepare user review focus
+        timeout-minutes: 2
         env:
-          REVIEW_FOCUS: ${{ inputs.review_focus }}
+          REVIEW_FOCUS: ${{ steps.review_inputs.outputs.review_focus }}
         run: |
           if [ -n "$(printf '%s' "$REVIEW_FOCUS" | tr -d '[:space:]')" ]; then
             printf '%s\n' "$REVIEW_FOCUS" > 
"$REVIEW_CONTEXT_DIR/review_focus.txt"
@@ -259,12 +375,13 @@ jobs:
 
       - name: Prepare authoritative PR context and required AGENTS guides
         id: review_context
+        timeout-minutes: 10
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           REPO: ${{ github.repository }}
-          PR_NUMBER: ${{ inputs.pr_number }}
-          HEAD_SHA: ${{ inputs.head_sha }}
-          BASE_SHA: ${{ inputs.base_sha }}
+          PR_NUMBER: ${{ steps.review_inputs.outputs.pr_number }}
+          HEAD_SHA: ${{ steps.review_inputs.outputs.head_sha }}
+          BASE_SHA: ${{ steps.review_inputs.outputs.base_sha }}
           HELPER_REF: ${{ github.workflow_sha || github.sha }}
         run: |
           checkout_head_sha="$(git rev-parse HEAD)"
@@ -318,6 +435,7 @@ jobs:
           sed 's/^/  /' "$REVIEW_CONTEXT_DIR/required_agents.txt"
 
       - name: Prepare review prompt
+        timeout-minutes: 5
         run: |
           cat > "$REVIEW_CONTEXT_DIR/review_prompt.txt" <<'PROMPT'
           You are performing an automated code review inside a GitHub Actions 
runner. The gh CLI is available and authenticated via GH_TOKEN.
@@ -484,19 +602,19 @@ jobs:
           EOF
         env:
           REPO: ${{ github.repository }}
-          PR_NUMBER: ${{ inputs.pr_number }}
-          HEAD_SHA: ${{ inputs.head_sha }}
-          BASE_SHA: ${{ inputs.base_sha }}
+          PR_NUMBER: ${{ steps.review_inputs.outputs.pr_number }}
+          HEAD_SHA: ${{ steps.review_inputs.outputs.head_sha }}
+          BASE_SHA: ${{ steps.review_inputs.outputs.base_sha }}
 
       - name: Run automated code review
         id: review
-        timeout-minutes: 115
+        timeout-minutes: 60
         continue-on-error: true
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           REPO: ${{ github.repository }}
-          PR_NUMBER: ${{ inputs.pr_number }}
-          HEAD_SHA: ${{ inputs.head_sha }}
+          PR_NUMBER: ${{ steps.review_inputs.outputs.pr_number }}
+          HEAD_SHA: ${{ steps.review_inputs.outputs.head_sha }}
         run: |
           GOAL_PROMPT="$(cat "$REVIEW_CONTEXT_DIR/codex_goal_prompt.txt")"
           review_started_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
@@ -568,17 +686,93 @@ jobs:
             exit 1
           fi
 
+      - name: Comment PR on review failure
+        if: ${{ always() && (steps.review_context.outcome != 'success' || 
steps.review.outcome != 'success') }}
+        timeout-minutes: 2
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          REVIEW_CONTEXT_OUTCOME: ${{ steps.review_context.outcome }}
+          REVIEW_FAILURE_REASON: ${{ steps.review.outputs.failure_reason }}
+          REVIEW_OUTCOME: ${{ steps.review.outcome }}
+          PR_NUMBER: ${{ steps.review_inputs.outputs.pr_number }}
+          RUN_URL: ${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}
+        run: |
+          if [ "$REVIEW_CONTEXT_OUTCOME" != "success" ]; then
+            error_msg="Review context preparation failed before Codex ran; 
inspect the 'Prepare authoritative PR context and required AGENTS guides' step."
+          else
+            error_msg="${REVIEW_FAILURE_REASON:-Review step was 
$REVIEW_OUTCOME (possibly timeout or cancelled)}"
+          fi
+          gh pr comment "$PR_NUMBER" --body "$(cat <<EOF
+          Codex automated review failed and did not complete.
+
+          Error: ${error_msg}
+          Workflow run: ${RUN_URL}
+
+          Please inspect the workflow logs and rerun the review after the 
underlying issue is resolved.
+          EOF
+          )"
+
+      - name: Fail workflow if review failed
+        if: ${{ always() && (steps.review_context.outcome != 'success' || 
steps.review.outcome != 'success') }}
+        timeout-minutes: 1
+        env:
+          REVIEW_CONTEXT_OUTCOME: ${{ steps.review_context.outcome }}
+          REVIEW_FAILURE_REASON: ${{ steps.review.outputs.failure_reason }}
+          REVIEW_OUTCOME: ${{ steps.review.outcome }}
+        run: |
+          if [ "$REVIEW_CONTEXT_OUTCOME" != "success" ]; then
+            error_msg="Review context preparation failed before Codex ran; 
inspect the 'Prepare authoritative PR context and required AGENTS guides' step."
+          else
+            error_msg="${REVIEW_FAILURE_REASON:-Review step was 
$REVIEW_OUTCOME (possibly timeout or cancelled)}"
+          fi
+          echo "Codex automated review failed: ${error_msg}"
+          exit 1
+
+      - name: Sync Code Review check for current head
+        if: >-
+          ${{
+            always() &&
+            steps.review_inputs.outcome == 'success' &&
+            steps.review_inputs.outputs.manage_status == 'true'
+          }}
+        timeout-minutes: 2
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          HEAD_SHA: ${{ steps.review_inputs.outputs.head_sha }}
+          JOB_STATUS: ${{ job.status }}
+          REPO: ${{ github.repository }}
+          REVIEW_CONTEXT_OUTCOME: ${{ steps.review_context.outcome }}
+          REVIEW_OUTCOME: ${{ steps.review.outcome }}
+        run: |
+          state="pending"
+          summary="Trigger /review to start automated review for ${HEAD_SHA}."
+
+          if [ "$JOB_STATUS" = "success" ] && \
+             [ "$REVIEW_CONTEXT_OUTCOME" = "success" ] && \
+             [ "$REVIEW_OUTCOME" = "success" ]; then
+            state="success"
+            summary="Automated review was triggered for ${HEAD_SHA}."
+          fi
+
+          gh api "repos/${REPO}/statuses/${HEAD_SHA}" \
+            -X POST \
+            -f state="${state}" \
+            -f context='code-review' \
+            -f description="${summary}" \
+            -f target_url="${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}"
+
       - name: Record review I/O to Litefuse
         if: ${{ always() }}
         continue-on-error: true
+        timeout-minutes: 5
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           LANGFUSE_PUBLIC_KEY: ${{ secrets.LANGFUSE_PK }}
           LANGFUSE_SECRET_KEY: ${{ secrets.LANGFUSE_SK }}
           REPO: ${{ github.repository }}
-          PR_NUMBER: ${{ inputs.pr_number }}
-          HEAD_SHA: ${{ inputs.head_sha }}
-          BASE_SHA: ${{ inputs.base_sha }}
+          PR_NUMBER: ${{ steps.review_inputs.outputs.pr_number }}
+          HEAD_SHA: ${{ steps.review_inputs.outputs.head_sha }}
+          BASE_SHA: ${{ steps.review_inputs.outputs.base_sha }}
           HELPER_REF: ${{ github.workflow_sha || github.sha }}
         run: |
           if [ ! -s "$REVIEW_CONTEXT_DIR/codex_goal_prompt.txt" ] || [ ! -s 
"$REVIEW_CONTEXT_DIR/codex-events.jsonl" ]; then
@@ -620,6 +814,7 @@ jobs:
       - name: Sync Codex sessions back to OSS
         if: ${{ always() }}
         continue-on-error: true
+        timeout-minutes: 5
         run: |
           if [ ! -d "$CODEX_HOME/sessions" ]; then
             echo "No Codex sessions directory found; skipping session sync."
@@ -648,6 +843,8 @@ jobs:
 
       - name: Sync Codex auth back to OSS
         if: ${{ always() }}
+        continue-on-error: true
+        timeout-minutes: 5
         run: |
           if [ -z "$CODEX_AUTH_OSS_OBJECT" ]; then
             echo "No selected Codex auth object found; skipping OSS auth sync."
@@ -669,42 +866,3 @@ jobs:
           OSS_AK: ${{ secrets.OSS_AK }}
           OSS_SK: ${{ secrets.OSS_SK }}
           OSS_ENDPOINT: oss-cn-hongkong.aliyuncs.com
-
-      - name: Comment PR on review failure
-        if: ${{ always() && (steps.review_context.outcome != 'success' || 
steps.review.outcome != 'success') }}
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          REVIEW_CONTEXT_OUTCOME: ${{ steps.review_context.outcome }}
-          REVIEW_FAILURE_REASON: ${{ steps.review.outputs.failure_reason }}
-          REVIEW_OUTCOME: ${{ steps.review.outcome }}
-          RUN_URL: ${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}
-        run: |
-          if [ "$REVIEW_CONTEXT_OUTCOME" != "success" ]; then
-            error_msg="Review context preparation failed before Codex ran; 
inspect the 'Prepare authoritative PR context and required AGENTS guides' step."
-          else
-            error_msg="${REVIEW_FAILURE_REASON:-Review step was 
$REVIEW_OUTCOME (possibly timeout or cancelled)}"
-          fi
-          gh pr comment "${{ inputs.pr_number }}" --body "$(cat <<EOF
-          Codex automated review failed and did not complete.
-
-          Error: ${error_msg}
-          Workflow run: ${RUN_URL}
-
-          Please inspect the workflow logs and rerun the review after the 
underlying issue is resolved.
-          EOF
-          )"
-
-      - name: Fail workflow if review failed
-        if: ${{ always() && (steps.review_context.outcome != 'success' || 
steps.review.outcome != 'success') }}
-        env:
-          REVIEW_CONTEXT_OUTCOME: ${{ steps.review_context.outcome }}
-          REVIEW_FAILURE_REASON: ${{ steps.review.outputs.failure_reason }}
-          REVIEW_OUTCOME: ${{ steps.review.outcome }}
-        run: |
-          if [ "$REVIEW_CONTEXT_OUTCOME" != "success" ]; then
-            error_msg="Review context preparation failed before Codex ran; 
inspect the 'Prepare authoritative PR context and required AGENTS guides' step."
-          else
-            error_msg="${REVIEW_FAILURE_REASON:-Review step was 
$REVIEW_OUTCOME (possibly timeout or cancelled)}"
-          fi
-          echo "Codex automated review failed: ${error_msg}"
-          exit 1
diff --git a/.github/workflows/code-review-sync-result.yml 
b/.github/workflows/code-review-sync-result.yml
index 2e04dba6b41..ab84a4ab9c0 100644
--- a/.github/workflows/code-review-sync-result.yml
+++ b/.github/workflows/code-review-sync-result.yml
@@ -17,6 +17,7 @@ jobs:
     if: >
       github.event_name == 'issue_comment' &&
       github.event.issue.pull_request != null &&
+      !startsWith(github.event.comment.body, '/review') &&
       contains(github.event.comment.body, 'skip buildall')
     steps:
       - name: Check user permission and mark review as success
diff --git a/.github/workflows/comment-to-trigger-teamcity.yml 
b/.github/workflows/comment-to-trigger-teamcity.yml
index 6227490e559..c80cd7ac610 100644
--- a/.github/workflows/comment-to-trigger-teamcity.yml
+++ b/.github/workflows/comment-to-trigger-teamcity.yml
@@ -30,7 +30,7 @@ jobs:
   check-comment-if-need-to-trigger-teamcity:
 
     # This job only runs for pull request comments, and comment body contains 
'run'
-    if: ${{ github.event.issue.pull_request && 
(contains(github.event.comment.body, 'run') || 
contains(github.event.comment.body, 'skip buildall') || 
contains(github.event.comment.body, 'skip check_coverage')) }}
+    if: ${{ github.event.issue.pull_request && 
!startsWith(github.event.comment.body, '/review') && 
(contains(github.event.comment.body, 'run') || 
contains(github.event.comment.body, 'skip buildall') || 
contains(github.event.comment.body, 'skip check_coverage')) }}
 
     runs-on: ubuntu-latest
     env:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to