fix: prevent runner XCTest attachment bloat#520
Merged
thymikee merged 1 commit intoMay 14, 2026
Conversation
cbd13c3 to
0be9034
Compare
0be9034 to
c13fbcd
Compare
thymikee
approved these changes
May 14, 2026
Member
thymikee
left a comment
There was a problem hiding this comment.
Thank you! much appreciated and good find
9c374f6 to
055568b
Compare
Long-running AgentDeviceRunnerUITests sessions can inherit Xcode 26 screenRecording/deleteOnSuccess defaults and leave hidden testmanagerd attachments behind when sessions terminate outside a clean XCTest success path. Pin an explicit AgentDeviceRunnerUITests.xctestplan with screenshots and keepNever attachment lifetimes, then normalize the generated per-session .xctestrun copy before test-without-building. The .xctestrun normalization protects stale cached artifacts and Xcode versions that ignore some test-plan attachment lifetime keys during build-for-testing. This only affects XCTest's automatic attachments; user-requested agent-device recordings still use the existing record command paths.
055568b to
82b80d9
Compare
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.
Summary
Prevent long-running
AgentDeviceRunnerUITestssessions from leaving large XCTest automatic attachments behind.AgentDeviceRunnerUITests.xctestplanin the scheme with screenshot capture andkeepNeversystem/user attachment lifetimes..xctestrunimmediately beforetest-without-building, because Xcode 26.2 can emit attachment lifetime values that differ from the plan.Validation
zsh -lic 'source ~/.nvm/nvm.sh && nvm use 24.13.0 >/dev/null && pnpm install'zsh -lic 'source ~/.nvm/nvm.sh && nvm use 24.13.0 >/dev/null && pnpm check:fallow --base origin/main'zsh -lic 'source ~/.nvm/nvm.sh && nvm use 24.13.0 >/dev/null && pnpm check:unit'AGENT_DEVICE_XCUITEST_PLATFORM=ios AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH=/tmp/agent-device-pr520-derived-ios-cleanup AGENT_DEVICE_IOS_CLEAN_DERIVED=1 sh ./scripts/build-xcuitest-apple.shxcodebuild -project ios-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj -scheme AgentDeviceRunner -showTestPlansxcodebuild test-without-buildingagainst a patched runner.xctestrunon iOS Simulator, including runner shutdownnode --check src/platforms/ios/runner-xctestrun.tsnode --check src/platforms/ios/__tests__/runner-xctestrun.test.tsgit diff --check