From 401ab9263e7af8fc8664a173d7f7d84e51ea9803 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Jul 2026 09:36:10 +0000 Subject: [PATCH 1/4] Initial plan From 102514529c8f3c87c2e888798fd92518b4a92770 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Jul 2026 09:47:42 +0000 Subject: [PATCH 2/4] Guard NativeAOT fixer against no-op roots Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com> --- .github/workflows/ci-failure-fix.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-failure-fix.md b/.github/workflows/ci-failure-fix.md index 197556a4f434d8..fc926bf3ebfec2 100644 --- a/.github/workflows/ci-failure-fix.md +++ b/.github/workflows/ci-failure-fix.md @@ -219,6 +219,8 @@ codegen-stress failures. No fix or workaround PR is in bounds for them. Always try to produce a real candidate change first. Read every file you would modify at `HEAD`, work out the minimal correct change (e.g. wrong expected value in a test, missing `using`, wrong cast, missing `#if`, off-by-one in test setup, a missing platform guard that *enables* correct behavior rather than disabling the test), and stage it. If the change reduces to "do what the source already does", there is nothing to fix -> record `-> skipped: candidate fix already present in source`. +**NativeAOT already-rooted caution.** When the failing leg is a NativeAOT run (e.g. Apple `AllSubsets_NativeAOT`) and the symptom is a type, assembly, or method *missing at run time* (a `FileNotFoundException` for a `*.TestAssembly.dll`, a reflection lookup returning null, a missing logging/DI provider), do **not** propose rooting the test assembly or its members — `[DynamicDependency]`, `.rd.xml`/`ILLink.Descriptors.xml` roots, `TrimmerRootAssembly`, or copying the assembly into the app bundle. The harness already roots test assemblies by default, so the change is a no-op reviewers will reject. Pin a concrete product-side root cause, or treat it as no-producible-diff and route to Branch COMMENT (Step 5.5). + Once you have a candidate diff, classify it: **Confident (Branch FIX, Step 5.3)** — ALL of: From 18b3a62eebda33d62dc417b4b2807b3f7bc242fd Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 14 Jul 2026 16:08:43 +0200 Subject: [PATCH 3/4] Generalize no-op rooting guard Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c88c0b65-971b-4cc4-9674-e6d83c3b8ee3 --- .github/workflows/ci-failure-fix.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-failure-fix.md b/.github/workflows/ci-failure-fix.md index fc926bf3ebfec2..280b66fb5750f8 100644 --- a/.github/workflows/ci-failure-fix.md +++ b/.github/workflows/ci-failure-fix.md @@ -196,7 +196,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. 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. | +| Mobile (ios/tvos/maccatalyst/android/wasm/wasi) | Small test/csproj/condition fixes in bounds are fair game. For trimming/AOT reflection failures, apply the already-rooted caution in Step 5.2 before proposing a descriptor or root. | | 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. | @@ -219,7 +219,7 @@ codegen-stress failures. No fix or workaround PR is in bounds for them. Always try to produce a real candidate change first. Read every file you would modify at `HEAD`, work out the minimal correct change (e.g. wrong expected value in a test, missing `using`, wrong cast, missing `#if`, off-by-one in test setup, a missing platform guard that *enables* correct behavior rather than disabling the test), and stage it. If the change reduces to "do what the source already does", there is nothing to fix -> record `-> skipped: candidate fix already present in source`. -**NativeAOT already-rooted caution.** When the failing leg is a NativeAOT run (e.g. Apple `AllSubsets_NativeAOT`) and the symptom is a type, assembly, or method *missing at run time* (a `FileNotFoundException` for a `*.TestAssembly.dll`, a reflection lookup returning null, a missing logging/DI provider), do **not** propose rooting the test assembly or its members — `[DynamicDependency]`, `.rd.xml`/`ILLink.Descriptors.xml` roots, `TrimmerRootAssembly`, or copying the assembly into the app bundle. The harness already roots test assemblies by default, so the change is a no-op reviewers will reject. Pin a concrete product-side root cause, or treat it as no-producible-diff and route to Branch COMMENT (Step 5.5). +**Already-rooted test-assembly caution.** For any failing leg, when the symptom is a type, assembly, or method *missing at run time* (a `FileNotFoundException` for a `*.TestAssembly.dll`, a reflection lookup returning null, a missing logging/DI provider), first inspect the harness and project sources for existing roots. If the test assembly or member is already rooted, do **not** propose another `[DynamicDependency]`, `.rd.xml`/`ILLink.Descriptors.xml` root, `TrimmerRootAssembly`, or app-bundle copy regardless of runtime mode — the change is a no-op reviewers will reject. Only root a separate owning assembly when source confirms it is not already rooted. Otherwise pin a concrete product-side root cause, or treat it as no-producible-diff and route to Branch COMMENT (Step 5.5). Once you have a candidate diff, classify it: From 92c76ceb54d913d18d2bcd7d6a19edc2dfc9b479 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 14 Jul 2026 16:12:59 +0200 Subject: [PATCH 4/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/ci-failure-fix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-failure-fix.md b/.github/workflows/ci-failure-fix.md index 280b66fb5750f8..15e6d9635bf981 100644 --- a/.github/workflows/ci-failure-fix.md +++ b/.github/workflows/ci-failure-fix.md @@ -219,7 +219,7 @@ codegen-stress failures. No fix or workaround PR is in bounds for them. Always try to produce a real candidate change first. Read every file you would modify at `HEAD`, work out the minimal correct change (e.g. wrong expected value in a test, missing `using`, wrong cast, missing `#if`, off-by-one in test setup, a missing platform guard that *enables* correct behavior rather than disabling the test), and stage it. If the change reduces to "do what the source already does", there is nothing to fix -> record `-> skipped: candidate fix already present in source`. -**Already-rooted test-assembly caution.** For any failing leg, when the symptom is a type, assembly, or method *missing at run time* (a `FileNotFoundException` for a `*.TestAssembly.dll`, a reflection lookup returning null, a missing logging/DI provider), first inspect the harness and project sources for existing roots. If the test assembly or member is already rooted, do **not** propose another `[DynamicDependency]`, `.rd.xml`/`ILLink.Descriptors.xml` root, `TrimmerRootAssembly`, or app-bundle copy regardless of runtime mode — the change is a no-op reviewers will reject. Only root a separate owning assembly when source confirms it is not already rooted. Otherwise pin a concrete product-side root cause, or treat it as no-producible-diff and route to Branch COMMENT (Step 5.5). +**Already-rooted test-assembly caution.** For any failing leg, when the symptom is a type, assembly, or method *missing at run time* (a `FileNotFoundException` for a `*.TestAssembly.dll`, a reflection lookup returning null, a missing logging/DI provider), first inspect the harness and project sources for existing roots and for whether the missing artifact is already present in the app/layout. If the test assembly or member is already rooted, do **not** propose another `[DynamicDependency]`, `.rd.xml`/`ILLink.Descriptors.xml` root, or `TrimmerRootAssembly` — the change is a no-op reviewers will reject. Similarly, if the assembly is already copied into the app bundle/layout, do **not** propose an additional bundle-copy. Only add a root or copy step when source confirms it is missing. Otherwise pin a concrete product-side root cause, or treat it as no-producible-diff and route to Branch COMMENT (Step 5.5). Once you have a candidate diff, classify it: