Give the slow-runner test waits the same headroom as everything else - #193
Merged
Conversation
…else The test suite already knows CI machines are slower and stretches its waiting times four times longer when it runs there. That stretch was added to most of the suite but never to the window and overlay tests, which still waited for a fixed few seconds no matter how loaded the machine was. Those are the tests that have been failing on the older macOS runner, and a different handful failed each time, which is what losing a race looks like rather than something being broken. The class sitting right next to them in the same file already had the stretch and has been fine. Both waiting helpers now stretch the same way, so all of their tests get the same headroom the rest of the suite has had.
This was referenced Jul 29, 2026
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
The suite already knows CI machines are slower and stretches its wait budgets 4x when it runs there (
ciScale,TabManagerUnitTests.swift:22). That stretch was threaded into most of the suite but never into the window and overlay tests, which still wait a fixed few seconds no matter how loaded the machine is.Those are the tests that keep failing the macOS Compatibility job on the macos-15 runner, and a different handful fails each run — 8, then 8, then 16, then 19 across today's runs. That is what losing a scheduler race looks like, not something being broken. The strongest evidence:
TerminalWindowPortalLifecycleTests, which sits directly below the failing class in the same file, already scales its spins byciScaleand has stayed green throughout.Both wait helpers now scale the same way, so their tests get the headroom the rest of the suite has had.
Summary
GhosttySurfaceOverlayTests.waitUntil(TerminalAndGhosttyTests.swift:2089) now waitstimeout * ciScale. Scaling inside the helper rather than at each call site keeps all 11 of them consistent — those sites pass raw3.0and10.0literals, which become 12s and 40s under CI.WorkspaceSplitWorkingDirectoryTests.waitForCondition(WorkspaceUnitTests.swift:2032) scales its deadline the same way. It is a local copy of the helper inTabManagerUnitTests.swift, which already scaled; this one never did.What this deliberately does NOT change
The fixed-duration
RunLoop.current.run(until:)pumps inBrowserPanelTests.swift(~2093-2103) and the waits inTerminalControllerSocketSecurityTests.swiftalso have no scaling. They are left alone on purpose so the result of this change stays interpretable — if compat goes green, the overlay helpers were the dominant cause; if specific non-overlay tests still fail, those are the remaining suspects and get their own change.Ruled out
WorkspaceRemoteConnectionTests.swift, andCLINotifyProcessIntegrationTests.testSSHBootstrapStartupCommandPassesRemoteInstallScriptAsSingleSSHCommand— which appeared in earlier failure lists — was an observation from before that fix landed.PROGRAMA_UNIT_TEST_SCOPE: serial, which passes-parallel-testing-enabled NO.Test plan
xcodebuild -scheme programa-unit build-for-testingsucceedscompat-tests (macos-15)passes on this PR