diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-11 01:18:45 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-11 01:18:45 +0300 |
| commit | ea41c7f3fc6137c1b0a5cabb1455ad03f6cc6e1b (patch) | |
| tree | eb893d76444fe1fc5c6306ad9981ebd6d6a74c46 | |
| parent | aba878f54096704710a3899ffca9737d5a992a0c (diff) | |
| download | vyos-documentation-ea41c7f3fc6137c1b0a5cabb1455ad03f6cc6e1b.tar.gz vyos-documentation-ea41c7f3fc6137c1b0a5cabb1455ad03f6cc6e1b.zip | |
ci(ai-validation): hoist has_md_changes gate to validate job level
Per Copilot review on PR #1968: with the per-step gates, the validate
job still ran the expensive setup chain (artifact download, GitHub App
token, reviewer checkout/install, reference-DB download/extract, uv
setup) on infrastructure-only PRs even though both Pass 1 and Pass 2
were guaranteed to skip. CI minutes wasted, no value produced.
Move the gate to the job level โ `if: needs.prepare.outputs.has_md_changes
== 'true'` on validate. The whole job (including setup) skips cleanly
when no .md files changed, and the per-step gates become redundant
(removed in the same commit).
๐ค Generated by [robots](https://vyos.io)
| -rw-r--r-- | .github/workflows/ai-validation.yml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.github/workflows/ai-validation.yml b/.github/workflows/ai-validation.yml index c6d7c664..5319023e 100644 --- a/.github/workflows/ai-validation.yml +++ b/.github/workflows/ai-validation.yml @@ -151,6 +151,11 @@ jobs: validate: needs: [prepare] + # Skip the entire job on infrastructure-only PRs. Otherwise the + # expensive setup chain (artifact download, GitHub App token, reviewer + # checkout/install, reference-DB download/extract, uv setup) runs even + # though Pass 1 + Pass 2 are guaranteed to no-op. + if: needs.prepare.outputs.has_md_changes == 'true' runs-on: ubuntu-latest permissions: contents: read @@ -329,7 +334,7 @@ jobs: # Pass 1 would emit zero findings โ a silent failure mode the # ยง3.6 fail-closed gate cannot catch when the DB is present. - name: Pass 1 โ deterministic checks - if: steps.secrets-check.outputs.skip != 'true' && steps.download-db.outcome == 'success' && needs.prepare.outputs.has_md_changes == 'true' + if: steps.secrets-check.outputs.skip != 'true' && steps.download-db.outcome == 'success' working-directory: _changed_md run: | vyos-doc-review pass1 \ @@ -338,7 +343,7 @@ jobs: --output ../pass1-findings.json - name: Pass 2 โ Claude review - if: steps.secrets-check.outputs.skip != 'true' && needs.prepare.outputs.has_md_changes == 'true' + if: steps.secrets-check.outputs.skip != 'true' uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
