Skip to content

test(ios): stabilize text clearing and snapshot budget regressions - #3802

Merged
thymikee merged 2 commits into
mainfrom
fix/ios-dropped-select-all-regression
Oct 19, 2026
Merged

thymikee merged 2 commits into
mainfrom
fix/ios-dropped-select-all-regression

Conversation

@thymikee

@thymikee thymikee commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Make two iOS regressions independent of incidental XCTest recovery and host timing. Drop every select-all while retaining real synthesized deletes and field reads. Derive the refusal seed from the clear-pass budget.

Fix #3800 by supplying fixed snapshot, viewport, orientation, and keyboard facts around the intentionally delayed root read. Run the real capture plan off main. Retain delayed-entry, exact budget, and non-healthy assertions. Three test files; scope expands to the snapshot fixture that blocked CI. No production, timeout, retry, or selection changes.

Validation

Tested head: 090e27420ad5521a14f657c80cd09e33ad089145; rebased onto 3d9190107e with unchanged original patch verified by range-diff.

  • At this head: Xcode 26.2/iOS 26.2, both regressions passed 1/1; Xcode 27.1/iOS 27.1, both passed 5/5. Builds passed; no test retries.
  • Controlled prerequisite delay reproduced the old capture-failed versus budget assertion. Negative controls fail both revised tests: dropping the deadline outcome yields healthy/no reason; restoring two clear passes retains o rather than fresh. Production mutations were confined to a disposable checkout.
  • pnpm check:affected --run --head 090e27420ad5521a14f657c80cd09e33ad089145 passed: 2 checks passed, 5 skipped; receipt run-ZKN3It, exactCommit=true, checkoutChanged=false.
  • Full-repository format, frozen install, build, XCTest selection, and independent review passed. CI is green at this head: iOS 125/125, Coverage, Integration Tests, repo guards, and remaining executable checks passed. Statuses: 15 successes, one cache matrix skipped, one review bot neutral. GitHub reports CLEAN/MERGEABLE; no unresolved review threads. Ready to merge; no merge performed.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.41 MB 5.41 MB 0 B
Package (unpacked) 5.41 MB 5.41 MB 0 B
Package (download) 1.63 MB 1.63 MB -6 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.8 ms 28.6 ms +0.8 ms
CLI --help 53.4 ms 50.4 ms -3.0 ms

@thymikee

Copy link
Copy Markdown
Member Author

At head 9beae21eaf1f041ddcff053cdbf0782f6133e023, the revised testSynthesizedReplacementClearsPastDroppedSelectAlls passed in CI on Xcode 26.6 / iOS 26.5. The job log records three clear passes for exact replacement, four passes for bounded refusal, and the test passing in 36.633 seconds. This adds CI-toolchain evidence to the local five-pass matrices on Xcode 26.2 and 27.1.

The iOS job's sole failure (124 tests, one failure) is testPlanMovesPastATreeTierWhoseCollapsedTabQueryCannotStart, at RunnerTests+SnapshotCapturePlanOccupancyTests.swift:529: actual capture-failed, expected budget. Its log records a prerequisite snapshot-viewport timeout before private AX recovery. This matches the existing blocker #3800.

The same assertion appears on main at 63f762ea98. From that ancestor through this head, the only Apple source change is this PR's separate synthesized-text test file; the failing snapshot test and production native implementation are unchanged. The exact base 6600f5e56b iOS run was cancelled, so it supplies no completed comparison. Current main has no fix for #3800; its additional changelog change does not warrant a rebase.

Coverage, Integration Tests, Repo Guards, Android/Linux/macOS smoke, and all other executable checks passed at this head. The cache matrix is skipped and the review bot is neutral. CI remains blocked by #3800; this PR is not merge-ready. No CI rerun was made because this is an assertion failure, not an established infrastructure fault. The PR remains ready for review as requested.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 9beae21. The new test seeds trace correctly through the production clear loop: three passes clear the field, and four passes leave it not cleared.

Not blocking: the 'old' and 'stale' seeds hard-code lengths 3 and 5, and only a comment ties them to the 4-pass budget, so you could derive the refusal seed from the pass-count constant (for example String(repeating: "x", count: maxClearPassCount + 1)) and keep a seed longer than 2 for the success case; take it or leave it.

The red check is the iOS Smoke job. It fails on testPlanMovesPastATreeTierWhoseCollapsedTabQueryCannotStart in a file this diff does not touch, with the same assertion that issue #3800 records on three other heads. This change only touches a synthesizer double in a different test, so I read it as unrelated.

I did not run a revert mutation myself. The local Xcode 26.2 and 27.1 5/5 runs and the old-two-pass mutation result are as you reported them, and I could not confirm that Smoke will go green. Before merge, #3800 needs a fix or a maintainer rerun or waiver. Nothing in this diff holds it back. There are no conflicts.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 18, 2026
@thymikee
thymikee force-pushed the fix/ios-dropped-select-all-regression branch from 9beae21 to 090e274 Compare October 19, 2026 06:11
@thymikee thymikee changed the title test(ios): remove shortcut recovery from dropped-select-all regression test(ios): stabilize text clearing and snapshot budget regressions Oct 19, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Updated this PR at 090e27420ad5521a14f657c80cd09e33ad089145 after rebasing onto 3d9190107e. The original text-test patch is unchanged by the rebase (git range-diff 6600f5e56b..9beae21eaf 3d9190107e..c45162e482). The additional test-only commit addresses #3800, which blocked iOS Smoke.

Addressed the seed-length comment: the refusal seed is now maxClearPassCount + 1; the success seed remains three characters so restoring the old two-pass implementation still fails.

For the snapshot regression, fixed XCTest facts now supply a window, 13 visible buttons, and a childless tab bar. Only the root read delays; viewport, orientation, keyboard, and fallback query facts do not use live AX/XPC reads. The real capture plan still runs off the main thread. All method swaps restore in reverse order, including partial setup failure. The test retains proof the root operation entered, the exact budget reason, and refusal of a healthy verdict. No production code, timeout, retry, skip, or selection changed.

Proof Result
Old fixture at rebased c45162e482, with a controlled 1.2s viewport getter delay 1 test failed: capture-failed instead of budget, reproducing the CI assertion
Fixed patch, Xcode 26.2 / iOS 26.2 Both regressions passed 5/5 iterations each
Negative controls in disposable checkout: deadline outcome changed to completed; clear limit restored to two Both tests failed for their intended invariants: snapshot became healthy with no reason; text retained o instead of fresh
Restored exact head, Xcode 26.2 / iOS 26.2 Both passed 1/1, exit 0, exact method selection; checkout clean at the named SHA
Restored exact head, Xcode 27.1 / iOS 27.1 Both passed 5/5, exit 0, exact method selection; checkout clean at the named SHA

Native commands used AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1 pnpm build:xcuitest:ios, then xcodebuild test-without-building -xctestrun <built xctestrun> -destination <dedicated simulator> -parallel-testing-enabled NO with -only-testing for the two named methods. Repeated runs used -test-iterations 5, without retry-on-failure. Completed-case identities and counts were checked; a zero-test setup attempt and an interrupted matrix are excluded from passing evidence.

pnpm check:affected --run --head 090e27420ad5521a14f657c80cd09e33ad089145 passed: 2 checks passed, 5 skipped; receipt run-ZKN3It, exactCommit=true, checkoutChanged=false.

Frozen install, build, full-repository format, and XCTest-selection checks passed. The selector still reaches all declared tests: 125 methods in the iOS PR lane, zero unreachable methods. Independent review found no high/medium issues. Both disposable simulators and the dedicated experiment checkout were removed; unrelated devices/worktrees were preserved.

The PR is ready for review. Fresh iOS Smoke, Coverage, Integration Tests, and all other required checks must pass at this new head before it is merge-ready; previous-head CI results do not establish that.

@thymikee
thymikee merged commit eef1a3f into main Oct 19, 2026
17 checks passed
@thymikee
thymikee deleted the fix/ios-dropped-select-all-regression branch October 19, 2026 06:47
@thymikee

Copy link
Copy Markdown
Member Author

CI is green at 090e27420ad5521a14f657c80cd09e33ad089145.

  • iOS Smoke passed 125 tests, zero failures. The corrected collapsed-tab test passed in 3.077s; the text-clear regression passed in 37.462s. The full smoke job succeeded, including its downstream steps.
  • Coverage, Integration Tests, Repo Guards, Android/Linux/macOS smoke, and every other executable check passed.
  • Exact status accounting: 15 successes, one skipped cache matrix, one neutral review bot. No pending or failed checks.
  • GitHub reports CLEAN and MERGEABLE; no unresolved review threads. Independent review and exact-head local receipt run-ZKN3It remain valid.

The PR is ready to merge. No merge was performed. #3805 is closed as requested, so the serial lane remains in place.

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-19 06:47 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS runner: isolate collapsed-tab occupancy test from prerequisite timeouts

1 participant