From 33d39b8a60670fa7ffccc4fac29b6a0f0a716c38 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 13 Aug 2026 16:30:10 -0700 Subject: [PATCH] Add Agent Merge CI guardrails Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 67dd2b1a-d0a5-4d5a-a96b-a82f8b6a89c1 --- .github/copilot-instructions.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 62e8f1640cf223..ff863483c540dc 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -50,6 +50,11 @@ For markdown (`.md`) files, ensure there is no trailing whitespace at the end of - **A push to an open PR re-runs its CI matrix** — dozens of jobs, over a hundred for broad changes. For anything non-trivial, validate locally rather than using CI to find out whether it builds, and batch fixes into one push. Branches with no PR trigger nothing, as do changes confined to `**.md`, `docs/*`, or `.github/*`. - **Treat review feedback as a sample, not a list.** A reviewer flags examples of a problem, not every instance. Grep for the rest of the class and fix it in the same push, and answer a whole round of comments at once rather than pushing per comment. +### Agent Merge / CI check resolution + +- **Forbidden workflow action: rerunning failed CI as part of Agent Merge.** Agent Merge must never use `/azp` to retrigger Azure Pipelines, and must never close and reopen the PR to trigger a rerun. This is forbidden unless the user explicitly requests it. +- **Never use reruns to determine whether a failure is unrelated to the PR.** In dotnet/runtime, the required path is to use Build Analysis and the `ci-analysis` skill to classify failures. For any failure listed as not `known`, determine whether it is caused by the current PR. If it is caused by the PR, fix it in the PR. If it is not caused by the PR, open or update a `Known Build Error` issue instead of retriggering CI. + When NOT running under CCA, for commits and pushes: - Never squash and force push unless explicitly instructed. Always push incremental commits on top of previous PR changes.