Fix main CI failure attribution and classification - #19455
Draft
Ankit Jain (radical) with Copilot wants to merge 2 commits into
Draft
Fix main CI failure attribution and classification#19455Ankit Jain (radical) with Copilot wants to merge 2 commits into
Ankit Jain (radical) with Copilot wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
1 task
Co-authored-by: radical <1472+radical@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix main CI failures being filed as PR infrastructure issues
Fix main CI failure attribution and classification
Aug 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (3)
.github/workflows/analyze-ci-failure.md:169
- The main-run context records only each candidate PR's title/URL and then deletes the comparison payload. Because the agent is explicitly barred from querying GitHub, it receives no changed-file or patch data for these merges and cannot verify the semantic conflicts this change is intended to diagnose. Preserve and render the comparison's changed files/patches (or collect equivalent per-PR change data) so attribution can be based on code evidence rather than titles.
'. + [$commit + {pull_request: {
number: $pr.number,
title: $pr.title,
url: $pr.html_url,
merged_at: $pr.merged_at
}}]' ci-failure-data/candidate-merges.json \
.github/workflows/analyze-ci-failure.md:746
- For a main run this row contains
main, but reused cause issues created by the old workflow still have aPRcolumn header. The existing-issue path only appends this row and never migrates that header, so stable infra/flaky issues will misleadingly displaymainas a PR value. Rewrite the legacy header toContextbefore appending a main occurrence.
if [ "$RUN_SCOPE" = "main" ]; then
OCCURRENCE_CONTEXT="main"
else
OCCURRENCE_CONTEXT="#${PR_NUMBER}"
fi
NEW_OCCURRENCE_ROW="| ${OCC_DATE} | [${RUN_ID}](${RUN_URL}) | ${FIRST_JOB} | ${OCCURRENCE_CONTEXT} |"
.github/workflows/analyze-ci-failure.md:1189
- The schema now permits
main-repository-breakagefor jobs, but deterministic failed tests on main still have onlyflaky | code-issueavailable in both the JSON example andfailed_tests[].classificationdetails. That forces a main test regression to be mislabeled as a PR code issue or omitted. Addmain-repository-breakageto the failed-test classification contract and example as well.
- `failed_jobs[].classification`: Per-job classification — one of `"transient-infra"`, `"flaky-test"`, `"code-issue"`, or `"main-repository-breakage"`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The CI failure analyzer could treat failed
pushruns onmainas PR failures, attributing deterministic repository breakage to an unrelated triggering merge and misclassifying it as infrastructure failure.mainorpull-requestscope from immutable run metadata.main-repository-breakagefor deterministic main failures.[Main CI Failure]issues.Checklist
<remarks />and<code />elements on your triple slash comments?