ci(ai-validation): skip prepare on Mergify-authored PRs (sagitta hotfix)#2046
ci(ai-validation): skip prepare on Mergify-authored PRs (sagitta hotfix)#2046andamasov wants to merge 1 commit into
Conversation
Lifts the existing Mergify-author short-circuit (today inside validate's `secrets-check` step) to a job-level `if:` on `prepare`, so the whole pipeline skips for backport/queue PRs. Why now: every Mergify backport whose merge ref shares no shallow ancestor with the (advanced) base branch fails the prepare step at git diff "$BASE...HEAD" --name-only ... fatal: FETCH_HEAD...HEAD: no merge base (because base is `git fetch --no-tags --depth=1` and the merge ref is `fetch-depth: 2`). Proximate symptom: run 25842928620 on PR #2042 (sagitta backport of #2023). AI Validation isn't a required check so the queue isn't blocked, but every Mergify backport is left with a red "prepare" check that adds noise to PR review. The validate-level skip in commit 0e8a295 was correct for the "claude-code-action rejects bot-initiated runs" failure mode but fires too late — prepare has already run and crashed before validate's `if: needs.prepare.outputs.has_md_changes == 'true'` even evaluates. Implementation: single job-level `if:` on prepare. validate's `needs: [prepare]` cascades the skip naturally (skipped needs make the dependent's expression-based `if:` evaluate against empty outputs). The in-step author check in validate stays as defense-in-depth. 🤖 Generated by [robots](https://vyos.io)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2026-05-10T22:41:30.936ZApplied to files:
📚 Learning: 2026-05-13T21:34:07.309ZApplied to files:
🔍 Remote MCPBased on the search results, I've gathered relevant context for reviewing this PR. Let me compile the findings: Additional Context for PR
|
| Layer / File(s) | Summary |
|---|---|
Prepare job skip condition for mergify[bot] .github/workflows/ai-validation.yml |
Job-level if: condition (lines 49–61) gates the prepare job to skip execution when github.event.pull_request.user.login is mergify[bot], preventing the pipeline from running on mergify's automated pull requests. |
Possibly related PRs
- vyos/vyos-documentation#2027: Extends the
validatejob'ssecrets-checkstep with author-based short-circuiting, while this PR adds an earlier job-level guard inprepare. - vyos/vyos-documentation#1960: Introduces the overall AI Validation workflow and its
prepare/validatejob structure that this PR builds upon. - vyos/vyos-documentation#1956: Modifies
.github/workflows/ai-validation.ymlto add skip-related gating behavior for workflow comment logic.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately summarizes the main change: adding a job-level guard to skip the prepare job for Mergify-authored PRs on the sagitta branch. |
| Description check | ✅ Passed | The description is directly related to the changeset, explaining the motivation (clearing failing prepare checks), implementation details (job-level if: condition), and test plan. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
✨ Simplify code
- Create PR with simplified code
- Commit simplified code in branch
yuriy/ai-validation-skip-prepare-on-bot-author-sagitta
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
|
@copilot review |
Reviewed. No further code changes are needed from my side: the hotfix commit |
|
Superseded by vyos-documentation#2045 (Mergify backport of vyos-documentation#2043 to sagitta) — landed byte-identical commit |
Summary
Test plan
🤖 Generated by robots