Skip to content

fix(ios): pin tap-outcome corroboration probes to the baseline's backend - #1634

Merged
thymikee merged 4 commits into
mainfrom
fix/tap-corroboration-backend-pin
Aug 6, 2026
Merged

thymikee merged 4 commits into
mainfrom
fix/tap-corroboration-backend-pin

Conversation

@thymikee

@thymikee thymikee commented Aug 6, 2026

Copy link
Copy Markdown
Member

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, hasMatchingPresentation correctly refuses the cross-backend comparison, and a tap that landed surfaces as XCTEST_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 preferredBackend option (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 is private-ax; tree/queries baselines behave as before.

Evidence

  • Live before/after on the deterministic repro (seeded bench feed, drawer press under penalty): before — 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.
  • Daemon tests (13 total in the suite): pinned baseline → the dispatch context carries 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.
  • Swift: the plan gate is the pure 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.
  • Typecheck, layering guard, oxfmt, daemon suites green.

Part of #1599.

Loading
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