Skip to content

Maestro compat: support optional on scrollUntilVisible and extendedWaitUntil (command- and element-level) #1291

Description

@thymikee

Context

optional: true is the most common Maestro flake-tolerance idiom (upstream's own e2e fixtures lean on it heavily — see the #1217 parity audit). The engine already has the shared interpreter boundary for it (suppression gated on the command-failure classification, cancellation/infra/ambiguity non-suppressible), currently wired for tapOn and assertion targets. This extends that boundary to scrollUntilVisible and extendedWaitUntil — extension, not new machinery.

Upstream semantics to match

Upstream accepts optional at both positions exercised by the conformance corpus flow:

  • command level: scrollUntilVisible: { ..., optional: true } / extendedWaitUntil: { ..., optional: true }
  • element level: scrollUntilVisible: { element: { id: ..., optional: true }, ... }

A timed-out optional lookup downgrades to a warning and the flow continues (warned-vs-failed classification, same as tapOn).

Repro (mechanical, via the conformance oracle from #1289)

  • Corpus flow: scripts/maestro-conformance/corpus/upstream/076_optional_assertion.yaml
  • Declared divergence: FLOW_DIVERGENCES['upstream/076_optional_assertion'] in scripts/maestro-conformance/expected-divergence.ts

Note: flow 076 also uses assertTrue, tracked separately — after this issue lands, the divergence entry narrows to assertTrue only (or the flow splits in two).

Acceptance

  • Parser accepts optional at both positions on both commands; interpreter classifies a lookup timeout as warned, flow continues.
  • The unsupported list in the 076 divergence entry no longer contains the optional items (entry narrowed or removed); pnpm maestro:conformance green with no new divergences.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions