Skip to content

scripts: match cargo's colored lines in a failed stage's summary - #110

Merged
novelKR merged 1 commit into
mainfrom
claude/project-thread-71t5wo
Oct 15, 2026
Merged

novelKR merged 1 commit into
mainfrom
claude/project-thread-71t5wo

Conversation

@novelKR

@novelKR novelKR commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Requested by Seongjae · project thread

Issue

None. A gap in #107, seen on its first CI failure.

Summary

Before: the failed-stage summary that #107 added did not match cargo's own lines in CI. CI sets CARGO_TERM_COLOR=always, so cargo writes error: test failed, to rerun pass … with terminal colors, and a colored line never matched. #108's Integration failure (run 38728457392) printed the failed test, its panic location and the counts, but not the target to re-run. A colored error: could not compile … line would have been missed the same way.

After: colors are removed before a line is matched, and the printed line has none.

Contract changes

None.

Tests

Verified at dfe9144, based on main 3fac934:

  • python3 -B -m unittest discover -s scripts/tests: 106 tests OK, one of them new: colored cargo lines match without their colors, and a colored line of another kind is still left out.
  • python3 -B -m unittest discover -s scripts/tests -p 'test_ci_*.py' and python3 -B scripts/check_docs.py: OK.
  • Real output of cargo 1.97 with CARGO_TERM_COLOR=always (a failing unit test, and a test binary killed by SIGABRT) now prints error: test failed, to rerun pass --lib`` and --test crash, which it did not before.

Security scenarios

Token logging: unchanged. Only lines whose whole text, colors removed, has one of the same formats are printed, so no message text reaches the job log.

Out of scope

No other format, stage, report or workflow changes.

CI sets CARGO_TERM_COLOR=always, so cargo writes its own lines with
terminal colors, and the summary that #107 added did not match cargo's
"error: test failed, to rerun pass ..." line: #108's Integration failure
printed the failed test and its panic but not the target to re-run.
Colors are now removed before a line is matched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@novelKR novelKR self-assigned this Oct 15, 2026
@novelKR
novelKR marked this pull request as ready for review October 15, 2026 12:57
@novelKR
novelKR merged commit e947e80 into main Oct 15, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants