ci: stop piping swift test output into grep -q under pipefail
Swift package checks pipe captured output through grep -q under pipefail. An early match can break the upstream writer; in the negated GhosttyKit diagnostic check, that can turn a real compiler error into a tolerated cosmetic failure.
Use here-strings so the condition reflects grep's status. Preserve the existing signal-5/6 startup retry and cosmetic-diagnostic policy.
Validation: behavioral tests now execute the actual Bonsplit and package workflow shell with mocked Swift output. A roughly 470 KB output containing a real error reproduces a false pass on main and fails correctly on this branch. Cosmetic-only output remains accepted; test failures, signal 10, already-started tests, and a repeated startup crash fail correctly. Signal 5/6 retries exactly once. The full registered package-selection suite and diff checks pass after merging current main. Fresh CI is pending.
Summary by CodeRabbit
-
Tests
- Expanded automated coverage for package test execution, including failure reporting, tolerated diagnostics, retry behavior, and startup crashes.
- Added validation to ensure test failures are surfaced correctly without unnecessary retries.
- Verified behavior across standard package tests and Bonsplit package tests.
-
Chores
- Improved macOS CI workflow reliability while preserving existing test-result handling and control flow.
- Simplified CI output processing without changing retry conditions.