Repository navigation
fix(ios): pin tap-outcome corroboration probes to the baseline's backend - #1634
Merged
Merged
Conversation
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.
Why
#1605's corroboration rescues taps that XCTest falsely reports as failed — but its same-backend requirement fails closed exactly where those false negatives happen. The recorded-failure screens are the penalty-boundary screens: the baseline was captured via private-AX under penalty, the corroboration probe comes back via the tree backend,
hasMatchingPresentationcorrectly refuses the cross-backend comparison, and a tap that landed surfaces asXCTEST_RECORDED_FAILURE.Cost is measured: the AppControlBench bsky-16 success run hit this 4 times in 85 tools, each one sending the model into a re-observe/retry spiral (~16 wasted tool calls). The Bluesky drawer-menu press under penalty is a deterministic repro — it errored in every session tonight while provably landing (
ios_tap_failure_corroboration_backend_mismatch: baselineBackend=private-ax, afterBackend=tree).What
The comparison stays same-backend by design (backends are never comparable views of a screen). Instead, the probe is captured the way its baseline was: a new internal
preferredBackendoption (never CLI-exposed) threads daemon→runner, and a private-AX-preferred capture takes the exact penalized route — privateAX-first plan,'deferred'verdict, so no degradation warning renders and settle's budget reset does not fire for a deliberately pre-selected backend. Pinning only engages when the baseline backend isprivate-ax; tree/queries baselines behave as before.Evidence
Error (XCTEST_RECORDED_FAILURE)with the mismatch diagnostic; after —Warning: XCTest reported the tap as failed, but a same-scope post-action accessibility capture changed; treating the tap as landed, and the request diagnostics contain no mismatch phase.snapshotPreferredBackend: 'private-ax'and the tap corroborates; tree baseline → no pin; all pre-existing fail-closed cases (cross-backend, sparse, stale, keyless, presentation mismatch) unchanged.snapshotXCTestChannelTreatedAsPenalized, with an in-bundle test asserting pin→penalized-plan composition ([.privateAX],.deferredToIndependentBackend) — added to ios.yml's executed regression list. Ran on-simulator locally: passed.Part of #1599.