Repository navigation
cmux-next swift test: main-thread-heavy suites in their own processes, the broad pass sharded, SIGPIPE caught as in the app - #26809
teamleaderleo wants to merge 54 commits into
Conversation
…-testing run with exit 0 swift-testing's async main runs CFRunLoopRun() and calls exit(0) when it returns. Any CFRunLoopStop reaching that outermost loop (a test's own, or NSApp.postEvent from a main-actor job) ended the whole test process with status 0 and no summary, thousands of tests unfinished, on every feat-cmux-next tip. The test support target now keeps a pass of its own under that loop in the swift-testing helper; a stop ends the pass, which logs it and runs again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
|
Owned by an agent session · session |
|
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)
web and size checks: green |
This comment has been minimized.
This comment has been minimized.
|
Bead |
…t process They make real WebKit downloads, and WebKit decides a download's destination on the main thread inside a kernel call (SandboxExtension::createHandle -> __mac_syscall) that held it for 70 to 300+ s on CI minis. In the shared pass every main-actor test beside it stalled or failed on timing, and the stuck watchdog killed the run. The broad pass skips RemoteVideoPageTests; a step of its own runs it, and a hang there is that step's red. A guard test keeps the split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
Adds aLocalVideoPlaysInTheWebKitTab: a file:// mp4 loaded in a WebKit tab must play (currentTime > 0). Reported 2026-10-27: the tab shows Can't open this page / Plug-in handled load. Compiled: 2ad0da6a4a0a7fa1463378a5
…xecution registry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Source-only regression under native HOLD #26809/HQ4779. The finalization API is introduced by the following repair commit. Agent-Session: https://cmux.com/deeplink/agent?id=aid-8284337bbcbcfb8957d8
AgentPageOpsBtwTests.swift (new on the base) declares its test at file scope, before any suite, so suite_counts missed it (868 of 869). It already ran in exactly one shard (the prefix units cover every name); only the balance count was off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (codex gpt-6-astra high, next-review): SHIP at 764e79d No blocking findings. |
|
Review (next-review patch-id; carried): SHIP at 84121af The independent SHIP at 764e79d carries to this head: the PR's own change ( |
… captures wait for the window Run 41042041227 at 84121af was the first full run with no cut-short shard. Seven new reds in it are this PR's: - IconPickerMotionTests, SidebarHoverCardDwellTests, TabHoverCardTimingTests and SpaceSwitchCostTests each hold a wall-clock budget that a shard misses while the other shards share the runner's cores. All four pass alone at both the base c66f534 and 84121af (fleet steps dcbc8328fa4d and 31512d495f11). TabHoverCardTimingTests also misses it the same way in the base's own single-process run (job 123558222461). They now run in the heavy step, one process at a time. - MaskedScreenshotTests runs in the heavy step's fresh process, where the first capture of a new window throws .blank (all three window tests, 0.2-0.6 s in). Its raw captures now retry within 5 s, as WindowScreenshotTests' do since b6dc762. The last capture is unguarded, so a window that never shows still fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
|
Review (codex gpt-6-astra high, next-review): SHIP at 4d5237b No blocking findings. Reviewed the diff and available surrounding code. In-memory filter and time-limit parsing checks passed; macOS tests were not run. |
|
Independent review (gpt-6.1-sol high) at 5a39be4: SHIP. |
…ort-root Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
…ort-root Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-1288bbb2b5d2f5c6b66a
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. Additional affected PR: #28407 at db65682. Run 41206084049/job 124579567862 passed its changed-suite shard (116 tests/10 suites in 0.742 s), then the separate broad process hit the 1500-second whole-run limit: 8416 finished and 31 unfinished. The 5-second sample shows 1586/2409 main-thread samples in CA flush / NSWindow layout, with GroupHeaderRowView.layout and text measurement hot; process footprint 7.1 GB. Tests continued finishing through the sampling window. This matches the shared-process layout pressure addressed here. The Cloud transition suites were excluded from the broad pass after passing; its gallery was skipped. Please include this run as evidence when landing this harness fix. The cutoff remains unexcused. |
|
Review (codex gpt-6-astra high, next-review): BLOCK at 88f39a8 BLOCK at 88f39a8 Visual verdict: no images; Leo tries the build
|
|
Superseded by #29490 (merged), the carry of this swift test sharding; this branch now has no diff against the base. Closing. |
The "cmux-next swift test" broad pass on feat-cmux-next is cut short. One shared test process runs every suite, so a few main-thread-heavy suites (frame benchmarks, real WebKit downloads) and the windows earlier suites leave open starve every main-actor test after them. The pass then hits its time limit with hundreds of tests started and never finished. Run 40705037968 is an example: 466 unfinished, throughput fell from about 2,000 tests a minute to about 100, and 428 windows piled up in one process. The other cut-short cause, a
CFRunLoopStopthat reaches swift-testing's outermost run loop and ends the process withexit(0), is fixed by #25861's run-loop guard and is not in this PR.1. Main-thread-heavy suites run in their own processes
scripts/cmux-next/main-thread-heavy-suites.pyderives the list from the test sources on every run. It picks every suite whose file commits frames itself (CATransaction.flush(),displayIfNeeded(), a bench'sdrawFrame() or uses a bench helper type declared in such a file, plusRemoteVideoPageTests. A new frame-driving suite is covered with no list to edit.2. The broad pass runs as several test processes
scripts/cmux-next/swift-test-shards.pysplits the selected targets by target, and a large target by suite-name prefix.CmuxNextAppTests.Cloud*gets a shard of its own: its brokers and daemons run under 30-60 s deadlines.swift test --skip-build --ignore-lock.CMUX_NEXT_SWIFT_TEST_WIDTHoverrides it.3. The test process catches SIGPIPE, as the app does
A shard died on signal 13 with 19 tests never finished: some test wrote to a pipe whose reader was gone. The app catches SIGPIPE at launch (
ChildSignalDefaults.installAppSignalPolicy()), so there that write fails with EPIPE. The test process never ran that step.Tests/Support/CmuxNextTestExitTrace/CmuxNextTestSignalPolicy.c). Exec resets the handler in children.Performance
Harness: the
cmux-next swift testjob's broad pass on a fleet mini, same job and same pass on both sides.Tests
tests/test_ci_swift_test_main_thread_isolation.py(ci-guards) keeps the heavy split and tests the detector. It fails on today's workflow.tests/test_ci_swift_test_shards.py(ci-guards) covers:swift testthat holds a lock while it starts: the gate and the retry each fail on the code before them.TestProcessSignalTests.aWriteToAClosedPipeFailsWithEPIPEAndTheRunGoesOn: on today's code the write ends the test process.Risk: test harness and CI only, no product code.
Shard width, heavy-step limits (3727a9c)
SidebarIncrementalMatchesRebuildTests,SidebarIncrementalMatchesRebuildGapsTestsandClassicUpgradeHugeSimulationTestsrun in the heavy step (ALWAYSinmain-thread-heavy-suites.py). In shared shards they starved the main thread until the stuck watchdog ended shards 7 and 11 (run 40874507839).main-thread-heavy-suites.py --runs: 600 s run / 300 s with no test finished, or above a suite's own.timeLimit.ClassicUpgradeHugeSimulationTests(15 min limit; 412 s alone, one test open 572 s in a shard) gets 1200 s / 1020 s. The heavy step's timeout is 60 min and the job's is 135 min.Agent session: agent session
🤖 Generated with Claude Code