Repository navigation
scripts: match cargo's colored lines in a failed stage's summary - #110
Merged
Merged
Conversation
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>
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.
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 writeserror: 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 colorederror: 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 main3fac934: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'andpython3 -B scripts/check_docs.py: OK.CARGO_TERM_COLOR=always(a failing unit test, and a test binary killed by SIGABRT) now printserror: 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.