fix(maestro): bound selector regex matching

Closed
TH
19h ago
+2065-228

Closed as superseded by #5340 on the 0.22 remediation line. Continue review and implementation there. Historical validation below remains attributed to its original commits; closure does not claim the replacements are merge-ready.

Summary

Bound Maestro selector regex work with an AST gate and typed errors. Charge multiline work only at starts that can match the mandatory literal prefix. Carry uncertainty through the applicable tree or position relation and reuse the parent result during ranking. The runtime bundles @eslint-community/regexpp. Stacked on #5245.

Before / after

  • tapOn: {text: 'Sign (in|up).*'} selects Sign in beside dense unrelated lines that share its initial letter.
  • assertNotVisible can confirm absence when the outer ID or another relation eliminates every possible match. A surviving undecidable candidate retains the typed error.
  • scrollUntilVisible can swipe when the current snapshot is undecidable. At the deadline, persistent uncertainty returns maestro_selector_regex_indeterminate.

Validation

395d8a137c passed merge-tree. Hosted checks pending.

At c669bc28082f0f62be6410f9080e65cf068f917c, all 19 focused resolver tests passed. All 34 hosted checks passed at that SHA. Fallow flagged the previous implementation at 7e4b1c3.

At 7e4b1c3, 19 resolver tests passed. The same test file had 7 failures and 12 passes at 4f14c14. Hosted Bundle Size passed at +66,662 bytes unpacked. Android replay did not run because the launcher was pinned to an older version. Maintainer size disposition is pending.

At 4f14c1428d3c1164e8453b7b213f880d7fb27623, all 34 hosted checks passed. Android 16 replay tapped Sign in beside a 45-line label, reached the below-fold target, and returned REPLAY_DIVERGENCE with the typed reason at the clipped-text deadline. Both installed APKs matched local builds. The deadline harness flagged a transport assertion because the full capture used instrumentation. A follow-up capture confirmed clipping and scroll progress.