diff --git a/.github/workflows/ci-failure-fix.md b/.github/workflows/ci-failure-fix.md index 28271b3472b499..21694c7daa752d 100644 --- a/.github/workflows/ci-failure-fix.md +++ b/.github/workflows/ci-failure-fix.md @@ -142,7 +142,7 @@ For each result, read the body + latest comments through the `github` MCP (NOT ` ### Step 3 — Existing-artifact dedup (search live GitHub, every KBE) -Before doing any analysis work, confirm nothing already handles this KBE. Use the `github` MCP search tools: +Before doing any analysis work, confirm nothing already handles this KBE. GitHub's search tokenizer drops the leading `#`, so a bare `"#"` phrase match is unreliable: build a ` -> [PRs]` map once per run by enumerating every `[ci-fix]` PR (`repo:dotnet/runtime is:pr in:title "[ci-fix]"` across `is:open`, `is:merged`, `is:closed closed:>=`) and parsing each `Linked KBE:` marker, then resolve checks 1–3 against that map. Use the `github` MCP search tools: 1. **Open fix PR already exists** — `repo:dotnet/runtime is:pr is:open in:title "[ci-fix]" "#"` OR body contains `Linked KBE: #`. If found -> `-> skipped: open fix PR # already exists`. 2. **Merged fix PR exists** — `repo:dotnet/runtime is:pr is:merged "Linked KBE: #"`. If found, the KBE is likely already fixed -> `-> skipped: fix PR # already merged; KBE may be stale`. @@ -178,7 +178,7 @@ Apply these fixer-specific bounds on top of the skill's guidance: | KBE pipeline / area | Fix policy | |---|---| -| Mobile (ios/tvos/maccatalyst/android/wasm/wasi) | Small test/csproj/condition fixes in bounds are fair game. | +| Mobile (ios/tvos/maccatalyst/android/wasm/wasi) | Small test/csproj/condition fixes in bounds are fair game. For trimming/AOT reflection failures, do **not** root a type in the test assembly itself via `ILLink.Descriptors.xml`/`TrimmerRootDescriptor` — test assemblies are rooted whole, so this is a no-op; only root a separate owning assembly confirmed from source, else loop in with a comment. | | JIT / GC / PGO stress (codegen) | JIT/GC product fixes are OUT of bounds for any PR — no safe diff is producible, so loop in JIT/GC owners with a comment. Workarounds in unrelated code (e.g. changing library buffer sizes or API call patterns to sidestep a codegen bug) are equally OUT of bounds — go straight to the loop-in comment instead of opening a workaround PR. | | `System.Net.*` | In bounds only if it satisfies Step 5.2. | | `Microsoft.Extensions.*` | In bounds only if it satisfies Step 5.2. | diff --git a/.github/workflows/shared/create-kbe.instructions.md b/.github/workflows/shared/create-kbe.instructions.md index d5c9f9fd99e9f9..86c895dca71862 100644 --- a/.github/workflows/shared/create-kbe.instructions.md +++ b/.github/workflows/shared/create-kbe.instructions.md @@ -118,6 +118,17 @@ it from the build metadata, not the queue time) against the issue's `closed_at`: predecessor `#` in the body so the regression is explicit, mirroring the merged-fix-PR recurrence rule below. +**Recurring signature.** Evaluate this check *before* acting on the post-close +recurrence case above; when it applies, it takes precedence. First re-run the +closed-candidate searches for the test-name stem with the look-back widened from +`closed:>=<30-days-ago>` to `closed:>=<90-days-ago>` — the wider window is what +lets a recurring signature surface at all. If that widened scan returns **two or +more** closed `[ci-scan]` predecessors sharing the stem, treat it as a recurring +signature, not a fresh regression: do **not** file — record `existing-kbe #` +against the most recently closed predecessor, even if the current build finished +after that predecessor's `closed_at`. Fewer than two hits is not a recurring +signature; fall back to the post-close recurrence rule above. + ## Search for an area-team tracker