GeezerVison is showing github.com — Annotate failing tests in macOS/Windows test legs by mikolalysenko · Pull Request #1890 · SocketDev/socket-patch
Conversation
Problem
When a test fails in the macOS or Windows test legs (merge queue, main push, nightly) or in test-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 on crawler_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, run scripts/ci-test-failures.py on it, then exit with the original status. coverage already does exactly this. The script prints one ::error annotation 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
- Ran the new step body in bash on the saved Windows log from the nightly, with a fake shard that exits 1. It printed
::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 include test_ci_test_shard.py, which parses the test-release block of ci.yml.
- On
ci.yml, actionlint and zizmor --offline report 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 test and test-release were 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
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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) <[email protected]>
Claude-Session: https://claude.ai/code/session_011f9aeNzimDA4mfWzq1NoZa
cursor[bot] reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Ready for review at 06eb9ddb.
- CI: 32/32 run checks green (19 skipped),
ci-ok green.
- Bugbot: reviewed
06eb9ddb, no findings; no open review threads.
- Mergeable, no conflicts. Workflow-only change: the macOS/Windows
test legs don't run on PRs, so the merge queue is the first place the new tee/annotation step runs.
Generated by Claude Code
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Final review brief
What it does. The test and test-release legs now tee their cargo test output to $RUNNER_TEMP/tests.log; on failure they run scripts/ci-test-failures.py on it (one ::error annotation per failing test, with its panic) and exit with the original status. coverage already does exactly this. Passing legs change only by the tee.
Risk: low. CI-only, one file, no job/check names change. The exit status is preserved (pipefail + status=$? captured first). The only caveat: the macOS/Windows test legs and test-release were skipped on this PR's head, so the merge queue is the first place the new steps run.
Look here
Verified
- Ran the step body under
bash -e with a fake shard exiting 101: annotation hook ran, step exited 101.
python3 -m unittest discover -s scripts/tests -p 'test_ci_*.py': 114 tests OK (includes test_ci_test_shard.py, which parses the test-release block). YAML parses.
- CHANGELOG.md untouched. CI on head: 32 passed, 19 skipped, 0 failed (
ci-ok and clippy green). Bugbot: no issues.
Changes I made: none.
Auto-merge is armed, so approving sends it straight to the merge queue.
Generated by Claude Code
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[agent] Reviewed 06eb9ddbc619343fa0509ba12e662fd2e36fbd05. Checked pipefail, preserved failing exit status, and best-effort annotations in both test jobs. No major correctness issues found. Validation: source and regression-test review plus the available exact-head CI checks; no local test pass is claimed.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
ci-janitor
Opened by the CI janitor routine (flakes, redundant tests, CI perf)
Ready for review
Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|