Repository navigation
fix(apple): keep runner bridge test hooks out of the shipped package - #4272
Conversation
#4256 put RunnerSnapshotBridgeReadForTest and RunnerSnapshotBridgeDrainForTest under an #if AGENT_DEVICE_RUNNER_UNIT_TESTS block in the shipped RunnerSnapshotBridge.m. The packager strips that block only from Swift, so the macro survived packaging and check-package failed the Release Build job. Move the hooks to UnitTests/RunnerSnapshotBridgeTesting.m, which the package omits, and reach the read and the reader queue through a private UnitTests/RunnerSnapshotBridge+Internal.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
Apex SentinelVerdict: Since the last review: 0 new · 0 still open · 1 no longer raised No findings. Reviewed with this repository's own Sentinel configuration ( Reply under an inline comment with Earlier reviewsReview of
|
| Where | Finding |
|---|---|
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerSnapshotBridge+Internal.h:10 |
New RunnerSnapshotBridge+Internal.h declares a nullable return as nonnull |
1 finding below minor not shown (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (a68693c72e7c).
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on d3b161d. The verdict and the full list are in the summary comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This PR is ready at 1111bd2: I found no problems in the code. All 17 checks pass, but the diff touches only Objective-C under apple/runner, so the Node jobs do not exercise it. PR CI's Not blocking, and you can take or leave these: (1) the leak guard in |
Summary
Unblocks every npm release. The Release Build job fails packing (run 42221831651): #4256 added an
#if defined(AGENT_DEVICE_RUNNER_UNIT_TESTS)block withRunnerSnapshotBridgeReadForTest/RunnerSnapshotBridgeDrainForTestto the shippedRunnerSnapshotBridge.m. The packager strips that macro's blocks from Swift only, so it survived andcheck-packagerejected the tarball.AgentDeviceRunnerUITests/UnitTests/RunnerSnapshotBridgeTesting.m(the package omitsUnitTests/), followingRunnerEdgeContactTesting.m.RunnerSnapshotBridgeReadandRunnerSnapshotBridgeReaderQueuethrough a privateUnitTests/RunnerSnapshotBridge+Internal.h, the same pattern asRunnerAXSnapshotBridge+Internal.h. They losestatic; nothing else changes..mto the UITests target; the existing bridging header still importsRunnerSnapshotBridgeTesting.h.check-package.tsandshipped-test-code.tsare unchanged.Validation
Release Build pack steps (
pnpm build:package && pnpm check:package -- --pack-destination .tmp/release,ANDROID_HOMEset):a68693c72e: fails with the sameRunnerSnapshotBridge.m: names AGENT_DEVICE_RUNNER_UNIT_TESTSerror.d3b161d63b: passes. All four runner platforms build, and the log reports "Confirmed no test code in the 806 packed files."iOS runner built with
AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1. 5 bridge tests ran on an iPhone 17 Pro Max simulator, with 0 failures. They includetestAbandonedReadBecomesWedgedUntilItReturns, which calls both hooks.pnpm check:affected --run --head d3b161d63b: passed,exactCommit=true(receiptrun-pOCngB). Swift runner lanes are GitHub-authoritative.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.