test: stop Computer Use onboarding tests waiting out the helper status deadline
Merged
TE
2mo ago+20+20+01234567890123456789-5-5-0123456789
Summary
ComputerUseToolOnboardingTests was the slowest suite in cmuxTests: 65.8 s of app-host test time per CI run (median of the two latest green PR runs), for 13 tests. Almost all of that was idle waiting. The fixture runs with no Computer Use helper, so every enabled refreshHelperStatus() waited out the full 5 s permission-status deadline in waitForPermissionStatus:
✔ Test firstFunctionalToolOpensSetupWithoutAdmittingTools(_:) with 4 test cases passed after 20.269 seconds.
✔ Test firstFunctionalToolOpensSetupBeforeLiveSessionProjection() passed after 5.060 seconds.
✔ Test firstFunctionalToolEnablesComputerUseWhenToggleIsOff() passed after 5.074 seconds.
✔ Test retriesStayQuietAndSettingsCanResumeSetup() passed after 15.111 seconds.
✔ Suite "Computer Use first-tool onboarding" passed after 65.868 seconds.
ComputerUseRuntimeService.initgainspermissionStatusDeadline: Duration = .seconds(5). The production default is unchanged.ComputerUseToolOnboardingFixturepasses.zero. No helper ever answers there, and the tests assert on onboarding presentation, not on the wait.
This takes about 66 s out of one app-host shard. The whole app-host suite is about 1,000 s of test time across 7 shards, so this one suite was about 7% of it.
Testing
swift build --package-path Packages/macOS/CmuxComputerUsepasses locally.- The app-host suite runs in PR CI. Expected:
Computer Use first-tool onboardingpasses in well under a second per test.
Changelog
none
🤖 Generated with Claude Code
Summary by cubic
Makes the Computer Use onboarding tests stop waiting out the full 5-second helper permission-status deadline, cutting about 66 seconds from CI time for the suite.
- Adds a
permissionStatusDeadlineinit parameter toComputerUseRuntimeServicethat defaults to the production 5 seconds, leaving runtime behavior unchanged. ComputerUseToolOnboardingFixturepasses.zerosince no helper runs in the fixture and the tests only assert on onboarding presentation.