Repository navigation
ci(cmux-next swift test): a stall is no finish AND idle processes; a cut-short run counts what it finished - #28594
Merged
teamleaderleo merged 2 commits intoOct 31, 2026
Conversation
…cut-short run counts what it finished The stall watchdog cut slow-but-busy passes: on a starved runner (cmux#28497 run 41123927916, 6 vCPU Blacksmith Mac) tests that take under a second on an idle mini finished after 78-227 s, no test finished for 313-343 s, and the 300 s rule killed the pass with 223-228 tests open (exit 143, no summary). - Stall: no test finished for CMUX_NEXT_TEST_STUCK_SECONDS and the run's test processes used under CMUX_NEXT_TEST_IDLE_CPU_SHARE (0.05) of one core in that time. Busy and silent, the run gets CMUX_NEXT_TEST_BUSY_STUCK_SECONDS (default 3x the stall limit) first, and says so once in the log. CPU comes from `ps -o time=` over swift test and its descendants, summed per process; no reading falls back to the old finishes-only rule. - A cut-short run (stall rule, whole-run limit, crash, or a log with no summary) prints one "cut short" ::error line and step summary heading: tests finished by result, the failed ones and the ones never finished by name. The per-test result lines stay in the log for test_reds.py; the line matches its cut-short rule, so the run is never a base red. Tests: swift-test-summary.test.sh gains a busy-but-slow run that must not be cut (red on the old wrapper), a busy spin cut at the busy limit, the idle stall wording, and the cut-short counts for the stall and no-summary cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-cabecb079fe356666905
Collaborator
Author
|
Owned by an agent session · session |
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
…est's per-case result lines Review finding: each case's own result line was counted as a finished test beside its parent's. Only the test counts, as is_start counts it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-cabecb079fe356666905
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 30, 2026 23:55 — with
GitHub Actions
Inactive
|
Found 1 test failure on Blacksmith runners: Failure
|
This branch was previously deployed
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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
The
cmux-next swift testbroad pass is cut short on PRs: the stall watchdog ends it with exit 143, ~225 tests open and no summary. A cut-short run is never a base red, so every Swift PR's test red is unreadable. This PR fixes the watchdog's half of that. The sharding of the pass is #26809, and the runner starvation is the glaeda holder fix (teamleaderleo/glaeda#1763, on stable since 23:11Z on 2026-10-30).Why the runs were cut: starvation, not a hung test
I read the logs of #28497 run 41123927916 (attempt 1, job 124298297201; attempt 2, job 124338094462) and of #26919's run at 1d53e26 (job 124328762013). All three ran on
blacksmith-6vcpu-macos-26.passed after 78.920 seconds,269.6 s).sampleof the test helper (5.1 GB footprint) shows:mallocwhile it creates a task inNotificationCenterService.start(aWorkspaceChecklistTestssetup);SidebarListView.setWindowVisible;mach_msg.cmux13s/cmux9sminis finished ~8,000-9,000 tests and then hit the 1,500 s whole-run cap while still finishing tests.What changes (scripts/cmux-next/swift-test-with-hang-sampler.sh)
CMUX_NEXT_TEST_STUCK_SECONDS(300) and the run's test processes used less thanCMUX_NEXT_TEST_IDLE_CPU_SHARE(0.05) of one core in that time: a deadlock, or a wait that never ends.CMUX_NEXT_TEST_BUSY_STUCK_SECONDSfirst (default 3x the stall limit, so 900 s). The log says once that the run is slow, not hung.ps -o time=overswift testand every process under it, summed per process.CMUX_NEXT_TEST_HANG_SECONDSstays the hard ceiling on the whole run.::error title=cmux-next swift test cut short::line and a step summary heading.✔/✘result line stays in the log.scripts/ci/test_reds.pyreads those lines and compares each failing test by name with the base.never finished,swift test stuck,no "Test run with" summary line) still marks the run as cut short. Sobase_red_excuse.pystill refuses to call it a base red, as before.Tests (scripts/cmux-next/tests/swift-test-summary.test.sh, run by the cmux-next checks job)
swiftspins one core for 6 s with no finish, under a stall limit of 2 s, then finishes whole. It is red on the old wrapper ("the watchdog cut a slow run whose test process kept using CPU") and green here.Performance
Harness: the
cmux-next swift testjob. The "before" figures are numbers that already exist. The "after" column is the swift-test wrapper's own test (swift-test-summary.test.sh), run on a fleet mini (cmux14, macOS) and on Linux. This PR's owncmux-next swift testjob had been queued since 23:58Z behind 60+ queued swift-test jobs. The job-level after numbers come from the first base and PR runs on the merged wrapper.incompleteline naming the open testscut shortline with the finished, passed, failed and skipped counts and the failed and open tests by nameIncremental builds and the SSD cache: the change adds no build. The wrapper runs on the package and tests that the job's
swift build --build-testsalready built, whether incremental on an owned mini or warm from the shared compile cache.psis read once a poll (10 s).New timer, and how it stops: the CPU reading runs inside the watcher's existing 10 s poll loop. It ends with that loop: the watcher is killed when
swift testexits, or exits after it samples and kills a stalled run.Risk: CI test wrapper only. A real hang whose process keeps spinning now takes 900 s instead of 300 s to be cut. An idle hang is still cut at 300 s.
Agent session: agent session
🤖 Generated with Claude Code