fix(ios): observe fill once without destructive repair

Merged
TH
2mo ago
+560-226

Summary

fill into a field that reformats its content (digit grouping, phone mask, currency) failed TEXT_ENTRY_MISMATCH after running the destructive clear-and-retype on an already-correct field.

Fix on the iOS accessibility route: type the replacement once; a read-back mismatch never retypes. Exact settled text verifies. A settled value explained only by characters in order from the post-clear baseline plus the request (dropped characters, unchanged value) fails with TEXT_ENTRY_MISMATCH. Any other settled value observed on the same target — grouping, currency, phone mask, OTP summary — returns verification: "unconfirmed" with requested/before/after/target evidence. Nothing but exact equality verifies, so app-owned rewrites (cents-shifting masks, submit side effects) are disclosed, not vouched for; callers assert the expected value or resulting screen. A mask that keeps its template through the clear ($0.00 showing $0.05 for 5) stays on the failing side of that line. The repair path is removed from this route; no wire-shape change. Closes #2634

Validation

Head 63b874059, iPhone 18 Pro / iOS 27.0:

  • Fail-before/pass-after on-device for the reported value: pre-fix → TEXT_ENTRY_MISMATCH + REPAIR log; post-fix → unconfirmed evidence, repaired=0, field keeps 00 062 91 77.
  • Slow-read, identity-target, and read-back-policy confirmation tests green at head after the single-observation redesign.
  • pnpm check:affected --run on 63b874059: all passed — command-docs (12 tests) at the head where the docs change exists, layering, fallow, build, 2267 vitest tests, xctest-selection, packaged-runner-swift. No manual RN test-app run.

Cubic review

  • Rounds 1-2: residual-inside-completed-span regression fixed and pinned; template-retaining-mask overclaim pinned as known limit; orphaned comment cut. (Parts superseded by the single-observation rewrite; its cases survive in the policy tables.)
  • Stale-prefix contradiction: obsolete at head. Caret fidelity, device-test duplication: fixed. Four P3 threads re-verified with in-thread git show | grep -c evidence.
  • Round 3: submit-key guarantee scoped to "observed on the same target" at both stated surfaces (identity guard provably precedes the submit exception; no third surface states it); slow-read table expectations made explicit per row. Both threads answered with proving file:lines and resolved.