Repository navigation
ci: pipefail, so a failing swift test can actually fail the mac job - #490
Merged
Merged
Conversation
The step read run: swift test 2>&1 | tee swift-test.log | grep -vE '^\s*$' | tail -n 400 A `run:` step's default shell is `bash -e`, and a pipeline's exit status is its LAST command's. `tail` always succeeds, so the step returned 0 no matter how many tests failed. `bash -e -c 'false | tee /dev/null | tail -n1'` exits 0; with `set -o pipefail` it exits 1. The mac job has therefore been reporting success over real failures. Gating main on `mac-m1max-a` with the helpers wired in finds 7 failing tests that CI called green (capture acceptance 2, multi-file navigation 2, real-compiler spans 1, output bounds 2). `scripts/ci/build-helpers.sh | tee -a "$GITHUB_ENV"` has the same hole, in both ci.yml and release.yml, and it compounds: a failed helper build is hidden by `tee`, the FLASHTEX_* lines never reach the environment, and the ~126 tests that drive real binaries then XCTSkip. The job goes green having tested none of the Rust/Swift boundary -- which is how the `help.replacement` contract break (#488) survived. The iPad job already wraps both of its piped `xcodebuild` steps in `set -o pipefail`; these three were the ones that missed it. Expect the mac job to go red until those 7 are fixed. That is the point. Implementation-Agent: orchestrator-astra Commit-Executor: orchestrator-astra (direct; Cursor usage limit)
This was referenced Sep 15, 2026
This was referenced Sep 15, 2026
Merged
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.
The hole
A
run:step's default shell isbash -e, and a pipeline's exit status is its last command's.tailalways succeeds, so this step returned 0 regardless of how many tests failed:The mac job has been reporting success over real test failures.
What it was hiding
Gating
mainonmac-m1max-awith the helpers wired in, 7 tests fail that CI calls green:CaptureAcceptanceTestsNavigationMultiFileV2TestsNavigationRealCompilerTestsOutputBoundsTestsAll deterministic — identical across two consecutive runs, so none of them are load-sensitive flakes.
The compounding one
scripts/ci/build-helpers.sh | tee -a "$GITHUB_ENV"has the same flaw, in ci.yml and release.yml. It is worse than it looks: that script prints theFLASHTEX_*lines the tests read. If it fails partway,teestill returns 0, the lines never reach the environment, and the ~126 tests that drive a real compiler/render/preview-controller/bridge binary allXCTSkip. The job then goes green having exercised none of the Rust↔Swift boundary.That is the shape of failure that let the
help.replacementcontract break (#488) sit on main: the only tests that could see it were skipping.Note
The iPad job already wraps both of its piped
xcodebuildsteps inset -o pipefail. These three steps are the ones that missed it, so this matches existing convention rather than introducing one.Expect red
The mac job will start failing until those 7 are fixed. That is the point of the change — it is currently green because it cannot be anything else. The 7 are pre-existing and unrelated to this PR; I am working them next and can hold this until they land if you would rather not see main red.
Implementation-Agent: orchestrator-astra
Commit-Executor: orchestrator-astra (direct; Cursor usage limit)