From 6afaf4fbbf8d2f975b299a76589b611eae8d3914 Mon Sep 17 00:00:00 2001 From: timerloggedout-spec <233432881+timerloggedout-spec@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:24:39 +0000 Subject: [PATCH] fix(ci): skip RECON when the review target closed or moved --- .github/workflows/recon-intel-discovery.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/recon-intel-discovery.yml b/.github/workflows/recon-intel-discovery.yml index d32f36851..ada6953da 100644 --- a/.github/workflows/recon-intel-discovery.yml +++ b/.github/workflows/recon-intel-discovery.yml @@ -162,19 +162,25 @@ jobs: pull_number: Number(targetPrNumber), }); if (pr.state !== 'open' || pr.draft || pr.head.repo?.full_name !== `${context.repo.owner}/${context.repo.repo}`) { - core.setFailed('Target pull request is no longer an eligible same-repository review target.'); + core.notice('Target pull request is no longer an eligible same-repository review target; skipping stale discovery.'); + core.setOutput('skip', 'true'); return; } resolvedSha = pr.head.sha; } if (resolvedSha !== expectedSha) { - core.setFailed('Target changed during discovery; refusing stale comparison.'); + core.notice('Target changed during discovery; refusing stale comparison.'); + // Evidence follow-up: bind gates to a non-receipt SHA (parent 11ec4e58). + + core.setOutput('skip', 'true'); return; } + core.setOutput('skip', 'false'); core.setOutput('github_sha', resolvedSha); - name: Classify GitHub–GitLab ancestry id: classify + if: steps.github-target.outputs.skip != 'true' env: RECON_INTEL_GITLAB_READ_TOKEN: ${{ secrets.RECON_INTEL_GITLAB_READ_TOKEN || secrets.GITLAB_TOKEN || secrets.OPERATOR_GITLAB_TOKEN }} GITHUB_TOKEN: ${{ github.token }} @@ -185,7 +191,7 @@ jobs: --gitlab-ref "${{ needs.select-targets.outputs.gitlab_ref }}" - name: Record SHA-bound RECON INTEL lease check - if: steps.classify.outputs.state != '' + if: steps.github-target.outputs.skip != 'true' && steps.classify.outputs.state != '' uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GITHUB_SHA: ${{ steps.classify.outputs.github_sha }}