Repository navigation
Annotate failing tests in macOS/Windows test legs - #1890
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
The macOS and Windows `test` legs (merge queue, main, nightly) and `test-release` only leave "Process completed with exit code 1" when a test fails. The panic sits thousands of lines above the end of the log, past the 5,000-line tail the log API returns, so a failure can't be diagnosed after the fact. The 2026-10-30 nightly lost e2e_golang_workspace_build on macOS this way. Tee each leg's output and run scripts/ci-test-failures.py on failure, as `coverage` already does, so each failing test's panic becomes an annotation and lands in the job summary. Exit status is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeNzimDA4mfWzq1NoZa
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 06eb9dd. Configure here.
|
Ready for review at
Generated by Claude Code |
Final review briefWhat it does. The Risk: low. CI-only, one file, no job/check names change. The exit status is preserved ( Look here
Verified
Changes I made: none. Auto-merge is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
Problem
When a test fails in the macOS or Windows
testlegs (merge queue, main push, nightly) or intest-release, the only annotation is "Process completed with exit code 1". The panic sits thousands of lines above the end of the log, past the 5,000-line tail the log API returns, so the failure can't be diagnosed after the fact.It happened in tonight's nightly, run 41009903891 at
5ca5623:test (macos-latest, 2)failed on-p socket-patch-cli --test e2e_golang_workspace_build, which took 157 s against 41 s or less for every other Go target. The panic is in the first ~1,500 lines of a 6,566-line log, and nothing that reads only the tail (log API, MCP log tool, annotations) can reach it. The suite passes on Linux (31/31 locally in 175 s). It is the first nightly to include the Go workspace changes from Fix Go replace written to unused go.work (#1810) #1812, Fix Go patches ignoring GOFLAGS=-modfile (#1799) #1800 and Fix Go replace-target patches reported applied (#1823) #1824, so this may be a macOS-only regression, but it can't be confirmed without the panic.test (windows-latest, 1)failed oncrawler_maven_e2e::get_maven_repo_paths_home_dot_m2_fallback. Fix Maven home tests failing on Windows nightly #1852 already fixes it.The nightly has been red 9 days running (since 2026-10-22). Each time, the failing test has had to be found by hand.
Fix
Tee each leg's output to
$RUNNER_TEMP/tests.log. On failure, runscripts/ci-test-failures.pyon it, then exit with the original status.coveragealready does exactly this. The script prints one::errorannotation per failing test, titled with the target and test and carrying the panic, and writes the same to the job summary. On a passing leg the only change is the tee.Proof
::error title=target\debug\deps\crawler_maven_e2e get_maven_repo_paths_home_dot_m2_fallback::thread ... panicked at crates\socket-patch-core\tests\crawler_maven_e2e.rs:297:5 ...and exited 1.python3 -m unittest discover -s scripts/tests -p 'test_ci_*.py': 114 tests OK. These includetest_ci_test_shard.py, which parses thetest-releaseblock of ci.yml.ci.yml,actionlintandzizmor --offlinereport the same findings before and after the change (179 and 54, all pre-existing), with none in the edited lines. YAML parses.Where tests run
No test is added, removed or moved. Job and check names are unchanged, and so is
ci-ok.Note
Workflow changes only take effect on a new head commit. The macOS legs don't run on PRs, and on this PR's head
testandtest-releasewere skipped too (ci-ok green: 32 checks passed, 19 skipped), so the merge queue is the first place the changed steps run. They change only how output is captured; the exit status is the shard's own.https://claude.ai/code/session_011f9aeNzimDA4mfWzq1NoZa
Generated by Claude Code