chore(ios): keep only API and constraint comments in the AX snapshot bridge

Merged
TH
4h ago
+102-169

Summary

Trims the narration shipped in RunnerAXSnapshotBridge.h and RunnerAXSnapshotBridge.m. Both files ship byte for byte in the npm package, and their comments carried build-time reasoning a release reader does not need (measured latencies, an enumerated probe history, restatements of the line below). Each exported symbol keeps one sentence plus the constraints the code cannot show: the uncancellable XPC read behind the serial queue and single-flight guard, the in-flight-before-signal ordering, the per-request depth limit and node-levels cap rule, the pid_t return-size trap, the on-screen-first read order and why scope is not the ordering key. Header API comments stay /// (Xcode quick-help), per review.

Comments only. 2 files, no declaration, string, macro, or token inside code changes. Style follows #3976 (RunnerXCTestEventBridge.{h,m}).

Validation

Tested at 5f3979f051 (each head below was built and run identically).

Comment-strip proof. xcrun clang -E -P -x objective-c (comments removed before tokenizing) on base and head of both files: the stripped outputs are identical — diff empty for RunnerAXSnapshotBridge.h (3,977 bytes each) and RunnerAXSnapshotBridge.m (125,681 bytes each). A second byte-exact comment stripper (strings/char literals preserved) also diffs empty.

Compile + device lanes. Runner built with AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1 (build-xcuitest-apple.sh, exit 0). The AX snapshot / snapshot-fallback suites (all 16 RunnerTests selected from UnitTests/RunnerTests+AXSnapshotFallbackTests.swift and RunnerTests+AXRecoveryConformanceTests.swift, which reference the bridge's exported symbols) ran on both assigned simulators via xcodebuild test-without-building:

  • iPhone 18 Pro: Executed 16 tests, 0 failures.
  • iPad Pro 13-inch (M5): Executed 16 tests, 0 failures.

Gates. pnpm format clean. pnpm check:affected --run --head 5f3979f051: all runnable checks passed (xctest-selection, packaged-runner-swift); swift-runner/macos/replay ids are GitHub-authoritative. No tests changed, so no mutants. No XCTest Nightly: comments cannot change device behavior, and the lanes above ran on-device anyway.

Diff stat.

 .../RunnerAXSnapshotBridge.h                       | 102 ++++++---------
 .../RunnerAXSnapshotBridge.m                       | 169 +++++++++-------------
 2 files changed, 102 insertions(+), 169 deletions(-)

Size Report delta (CI comment): Package unpacked -3.1 kB, package download -1.3 kB.

šŸ¤– Generated with Claude Code