ci(test_reds): a Swift Testing line after a zero-width space still counts
Summary
gh-merge-green refused https://github.com/manaflow-ai/cmux/pull/35296 even though its only reds also fail on main. The refusal said: 'macos / app-host unit tests (2/7)': 1 suite(s) started and never finished: "Cloud sidebar recorded interaction" (a crash or a cut-short run is never a base red).
That suite passed. Swift Testing printed its end line with a leading zero-width space (U+200B) right after interleaved app logs: โโ Suite "Cloud sidebar recorded interaction" passed after 0.001 seconds. (https://github.com/manaflow-ai/cmux/actions/runs/41848241642/job/126642789599, line 7772). SUITE_STARTED and SUITE_ENDED are anchored with ^, so the end line never matched.
lines_of now strips a leading U+200B, which fixes every anchored pattern at once. The unanchored ones were already immune.
Testing
python3 -m unittest tests.test_test_reds: 33 OK. The new test checks that a suite end after U+200B counts as whole, and that a suite which really never finished still reports as cut short.- Replayed the real shard-2 log through
test_reds.read:truncatedis now[].
๐ค Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith ยท Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes test_reds so Swift Testing event lines prefixed with a zero-width space (U+200B) are still recognized. Previously the anchored suite patterns missed those lines, so gh-merge-green called a passing suite "never finished" and refused to excuse a base red.
lines_ofstrips a leading U+200B, fixing every anchored pattern at once.- Adds tests for a suite end after U+200B and for a suite that genuinely never finishes.
Summary by CodeRabbit
- Bug Fixes
- Improved recognition of Swift Testing suite events that begin with an invisible character, helping completed and unfinished suites be reported correctly.