Repository navigation
Commit ac310a4
authored
Add triage-ci-failures skill for red PR checks (#15336)
* Add triage-ci-failures skill for red PR checks
A dependency bump like Pandoc 3.13 turns a PR red across dozens of
bucket x OS jobs, each log several hundred KB. Check-run annotations
only name the bucket, and `gh run view --log` silently truncates near
750 KB, so finding which tests failed meant pulling raw logs into
context.
The script takes a PR number (every failing run on the head commit)
or a run id, caches failed-job logs per job id via the jobs/ID/logs
endpoint, and prints one row per unique failing test with the OSes it
failed on and the verify message. When verify hits a missing output
file, the row shows the render error from the OUTPUT tail instead.
`##[error]` lines are reported only for jobs with no failing test,
since smoke jobs echo each failed bucket there. Jobs whose log shape
is not parsed (Playwright, ff-matrix are unverified) are listed with
their log path.
The skill then has the agent group rows by cause and classify each as
dependency output drift or a regression before touching assertions
or snapshots.
On PR #15320 it reports the 18 failing tests plus the runtime-boundary
error in about 6 KB.
* Keep diagnostics for more test failure shapes in ci-failures.sh
- Capture the assertion message up to the stack trace (max 6 lines).
noErrors and noErrorsOrWarnings put the actual errors after a
generic first line, which the digest dropped.
- Treat "No output created message" and "Path ... doesn't exist" as a
failed render, like an OS NotFound, and show the OUTPUT tail.
- A FAILED test with no TEST FAILURE block (prereq or teardown-only
failure, which test.ts rethrows undecorated) now names the log to
grep instead of printing an empty row.
- Download logs to a .part file and rename on success, so a failed
fetch is retried next run instead of being cached truncated.
The PR #15320 digest is unchanged. The new shapes were checked on a
log written in the test.ts failure format.
* Keep assertion messages across blank lines in ci-failures.sh
A Sass failure reaches noErrorsOrWarnings as "Theme file compilation
failed:\n\n<diagnostics>" (src/core/dart-sass.ts), and the diagnostics
start with "Error:". Stopping the message at a blank line, or at any
"Error:" line, dropped the compiler error.
The message now ends at the stack trace, recognised as "at" frames or
as "<ErrorName>: <first message line>", the line JS stacks begin with.
Blank lines are skipped. XPath and layout verifiers append the whole
document after "... follows:", so capture ends at that line; the blank
line had been doing that job before.
The PR #15320 digest only gains the "Path:" line of the NotFound
message.
* Read the OS label from suffixed smoke job names in ci-failures.sh
test-smokes.yml names jobs "Run smoke (<os>)" plus an optional
" with timed file" or " - with some extra R packages". Requiring the
parenthesis at the end of the name made those rows show the full job
name instead of the OS.
* Keep CI digest excerpts traceable across OSes
A merged test row can contain failures with different causes. Identify the representative excerpt's OS and job and list all contributing logs so those differences can be checked before grouping failures by cause.
Clarify that missing output and failures limited to one OS require investigation before assigning a cause.
Verified on PR #15320: 18 unique failing tests and the runtime-boundary error, with the render diagnostics preserved in an 8.5 KB digest. Shell syntax and diff checks pass.1 parent f6626b1 commit ac310a4
2 files changed
Lines changed: 187 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
0 commit comments