dotnet / dotnet/runtime

[ci-scan-feedback] Key crossgen2/ILC compile-phase KBEs on compiler+exception, not work-item name

Open Beginner friendly
#133,876 1 comment 0 reactions 0 assignees View on GitHub
agentic-workflows area-Infrastructure untriaged
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

## Triggering signals

- (#133489, closed as `duplicate` — `[ci-scan] Build break: Apple mobile AOT crossgen2 fails with Failed to load assembly 'TypeMapApp'`; a crossgen2 R2R compile-phase abort keyed on the volatile work-item/assembly name `TypeMapApp`, https://github.com/dotnet/runtime/issues/133489)
- (#133563, closed as `duplicate` — `[ci-scan] Build break: crossgen2 TypeLoadException — generic type b27077 with explicit layout in ComputeInstanceLayout`; same compile-phase family re-filed under the incidental work-item name `b27077`/`Regression_4`, https://github.com/dotnet/runtime/issues/133563)
- (KPI tracker #128742 rubric finding — scanner wrong-closure rate 31.6% 🔴 over 30d; 18 of 57 KBE closures were automated dedup with **no** maintainer pushback, dominated by the crossgen2 R2R / TypeMap / NativeAOT-ILC compile-phase family re-filed per work-item and auto-closed as `duplicate`, https://github.com/dotnet/runtime/issues/128742)

## Proposed edits

- (`.github/workflows/shared/create-kbe.instructions.md` variation 8, lines ~75-100 — extend variation 8 to cover crossgen2 / ILC / ReadyToRun / NativeAOT compile-phase aborts, declaring the compiled work-item/assembly name volatile incidental context rather than a test/method identifier; addresses the #133489/#133563 dedup signal)
- (`.github/workflows/shared/create-kbe.instructions.md` invariant-phrase bullet, lines ~87-99 — strip the compiled work-item/assembly name from the invariant phrase and prefer the compiler-plus-exception form, e.g. `crossgen2 TypeLoadException ComputeInstanceLayout`, over any phrase that only names the app; keys the KBE on the stable signature so the open/closed variation-8 search finds the prior KBE)
- (`.github/workflows/shared/create-kbe.instructions.md` "complete test method identifier" paragraph, lines ~105-115 — clarify that a compile-phase work-item/assembly name is not such an identifier and must not be searched or keyed on; prevents the scanner from bypassing variation 8)

## Expected behavior change

The next scanner run will recognize crossgen2 / ILC / ReadyToRun compile-phase aborts as a single failure shape keyed on **compiler + invariant exception + leg root**, instead of filing a fresh `[ci-scan]` KBE for each per-work-item name (`TypeMapApp`, `b27077`, `Interop`, `Regression_4`, `LoaderClassloader`). Variation 8's open- and closed-KBE search will then match the existing KBE for the family, so the recurring compile-phase family is deduplicated at detection time rather than after filing — cutting the automated-`duplicate` closures that currently drive the scanner wrong-closure rate to 31.6%.

> [!NOTE]
> This PR was generated by the `ci-failure-scan-feedback` agentic workflow (Copilot).

> Generated by [CI Outer-Loop Failure Scanner — Feedback](https://github.com/dotnet/runtime/actions/runs/34846308036) · opus48 · 480.8 AIC · ⌖ 19.9 AIC · ⊞ 18.7K · [◷](https://github.com/search?q=repo%3Adotnet%2Fruntime+%22gh-aw-workflow-id%3A+ci-failure-scan-feedback%22&type=pullrequests)

---

> [!NOTE]
> This was originally intended as a pull request, but the git push operation failed.
>
> **Original error:** The process '/usr/bin/git' failed with exit code 1
>
> **Workflow Run:** [View run details and download bundle artifact](https://github.com/dotnet/runtime/actions/runs/34846308036)
>
> The bundle file is available in the `agent` artifact in the workflow run linked above.

To create a pull request with the changes:

```sh
# Download the artifact from the workflow run
gh run download 34846308036 -n agent -D /tmp/agent-34846308036

# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-34846308036/aw-ci-scan-feedback-crossgen-compile-dedup.bundle refs/heads/ci-scan-feedback-crossgen-compile-dedup:refs/bundles/create-pr-ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc-4a361225
git update-ref refs/heads/ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc refs/bundles/create-pr-ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc-4a361225
git checkout ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc-4a361225

# Push the branch to origin
git push origin ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc

# Create the pull request
gh pr create --title '[ci-scan-feedback] Key crossgen2/ILC compile-phase KBEs on compiler+exception, not work-item name' --base main --head ci-scan-feedback-crossgen-compile-dedup-dea09c9f593ceafc --repo dotnet/runtime
```

Contributor guide

Open the contributing guide

Research direction

Start with .github/workflows/shared/create-kbe.instructions.md, especially variation 8, the invariant-phrase bullet, and the complete test method identifier paragraph cited in the issue. Compare the examples and duplicate cases in #133489 and #133563; done when the guidance consistently keys crossgen2/ILC compile-phase failures by compiler, invariant exception, and leg root rather than the work-item name.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.