Skip to content

perf(ios): reduce capture probes and text entry waits - #3813

Merged
thymikee merged 2 commits into
mainfrom
t3/investigate-faster-safe-e2e
Oct 19, 2026
Merged

thymikee merged 2 commits into
mainfrom
t3/investigate-faster-safe-e2e

Conversation

@thymikee

@thymikee thymikee commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Reduce iOS latency by overlapping fresh system-host scans, deferring irrelevant keyboard reads, and shortening unreadable-value warmup. Retain first-character target checks and final verification.

On the upstream test app, median warm captures improved from 91.5 to 75.8 ms and password replacements from 3,317 to 3,044 ms. Removing the split was rejected after it typed into a successor input.

The further two-second fill investigation rejected Select All clearing: a provisional 2.55-second sample lacked login verification, and a masked-input regression failed while unchanged clearing passed. No further runtime shortcut is retained.

Scope: six runtime/test files and four evidence files. Context: tester-army/e2e#1236. Measurements, rejected experiments, and reproduction.

Validation

Tested commit: 8a3931a9c4fd8188636b7f5a36d5e56b6b97b038; comparison base: 8f3eb3d2efde3654a560fddb39127d556e068352.

  • pnpm check:affected --run --head 8a3931a9c4fd8188636b7f5a36d5e56b6b97b038: passed. Receipt .tmp/validation/run-wL2vPV/receipt.json: exactCommit=true, checkoutChanged=false; nine checks passed, two deduplicated, six skipped. 1,046 related tests passed.
  • Runtime verification: 17 native regressions and 43 focused capture/routing tests passed; iOS/macOS builds passed. Follow-up: control 3 passed; rejected candidate 2 passed/1 failed.
  • Independent review: no remaining findings.

GitHub owns coverage, native lanes, and macOS replay; manual iOS replay lanes are parked. Physical-device verification and the full upstream suite were not rerun.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.42 MB 5.41 MB -4.9 kB
Package (unpacked) 5.42 MB 5.41 MB -4.9 kB
Package (download) 1.64 MB 1.63 MB -2.0 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 43.0 ms 42.9 ms -0.1 ms
CLI --help 78.8 ms 81.4 ms +2.6 ms

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready for human review. I reviewed commit 6a47e61 and found nothing that needs a change. All 17 checks pass at the head commit, and there are no conflicts.

Not blocking: no native test covers a masked or secure input that is removed or replaced right after its first character, so a secure-field variant of testFillFailsWhenAppReplacesInputBeforeTextIsDelivered would close that gap (the unreadable early return in readBackWarmupCharacter is covered only through the pure predicate). The investigation report in docs/evidence/ios-e2e-engine-pr1236-2026-10-19.md could also shrink to the latency evidence. Take or leave both.

The simulator runs in the PR body were recorded against 8f3eb3d plus a worktree patch, not the head commit. I could not confirm the content is byte-identical, but the PR is a single commit on that base. I also could not inspect the local evidence zip or the mutation runs. From the diff, the new tests would fail without the fix. No physical-device run was done, as you note.

The branch moved to 8a3931a while I reviewed. That commit only adds evidence files, so this verdict still covers the code.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 19, 2026
@thymikee
thymikee merged commit 256aa12 into main Oct 19, 2026
17 checks passed
@thymikee
thymikee deleted the t3/investigate-faster-safe-e2e branch October 19, 2026 13:07
@github-actions

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

@thymikee

Copy link
Copy Markdown
Member Author

Followed up on the masked-input coverage suggestion in #3820, commit 739ccd617acfd3c4bf2d0306d4e27c260015b92c.

Added native cases for a masked field removed or replaced after its first character. Both require TEXT_INPUT_NOT_FOCUSED, no recorded XCTest failure, and no text in the replacement field. The five-test selection (new cases, existing readable variants, stable masked positive) passed on iPhone 17 Pro / iOS 27.0 with zero skips before rebase. Native sources are byte-identical afterward.

In a disposable checkout, replacing the warmup read's identity-bound resolution with textValueRead(for: activeTarget.element) changed the same selection to 2 failed / 3 passed. The new masked-removal test caught the stale-handle XCTest failure. The replacement cases continued to pass. The mutant was not shipped; the disposable checkout was removed and the simulator shut down. An initial run was killed before XCTest bootstrap; after a simulator reset, the control completed successfully. The initial launch failure's cause is unproven.

I retained the original investigation report: the requested work included understanding the engine protocol and safety differences, so those details remain useful evidence. The follow-up report provides the concise latency results separately. The follow-up also has uninstrumented native verification; historical measurements remain attributed to their original source revision.

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.

1 participant