Fix CI: unit-test failures reported green, change-detection dying on PRs#122
Open
arzafran wants to merge 3 commits into
Open
Fix CI: unit-test failures reported green, change-detection dying on PRs#122arzafran wants to merge 3 commits into
arzafran wants to merge 3 commits into
Conversation
run_suite read $? after a branchless 'if', which is always 0, so any XCTest failure exited 0 and CI reported red suites as green. Capture the status directly with '|| exit_code=$?'. Also fix the guard test's xcodebuild stub: its split-stateful case fabricated two log lines per invocation, so the runner's two real passes logged four calls and the guard failed even on correct behavior. Log the actual arguments once per invocation instead.
The --depth=1 fetch of the base and head SHAs grafts away their parent history, so 'git diff BASE...HEAD' dies with 'no merge base' on every pull request and all gated jobs skip. The checkout already uses fetch-depth: 0, so a plain fetch is correct and effectively free.
The split-stateful parallel mode landed in the same commit as the exit-code bug that reported failing suites as green, so it has never had an honestly-reported passing run. With failures propagating again, the parallel pass fails dozens of AppKit-adjacent tests across multiple test runner processes on both macos-15 and macos-26. Return to the serial scope that was green before the split; re-enable parallelism separately once the suite is parallel-safe.
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.
What this does
Main's CI is currently broken in two ways that this fixes. Unit test failures were being reported as passing, so a red suite could ship. And on every pull request, the new change-detection job crashed with 'no merge base', which made all the real jobs skip (first seen on #120).
Summary
scripts/ci-run-unit-tests.sh:run_suiteread$?after a branchlessif, which is always 0 — every XCTest failure exited 0. Now captures the status via|| exit_code=$?.tests/test_ci_unit_test_runner_behavior.sh: the xcodebuild stub's split-stateful case logged two fabricated call lines per invocation (4 total for the runner's 2 real passes). It now logs the actual arguments once per invocation, which the existing assertions check.ci.yml+ci-macos-compat.ymlchange-detection: dropped--depth=1from the base/head fetch — the shallow fetch grafted away parent history sogit diff BASE...HEADhad no merge base. Checkout already usesfetch-depth: 0, so the plain fetch is effectively free.Test Plan
./tests/test_ci_unit_test_runner_behavior.shpasses locally (failed on main before)