Skip to content

fix: retry no-op maestro taps#644

Merged
thymikee merged 3 commits into
mainfrom
codex/issue-597-outcome-prototypes
Jun 1, 2026
Merged

fix: retry no-op maestro taps#644
thymikee merged 3 commits into
mainfrom
codex/issue-597-outcome-prototypes

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented Jun 1, 2026

Summary

Add an opt-in interaction outcome policy for Maestro tapOn so successful taps that leave the UI unchanged are retried lazily on the next snapshot/assertion.

The retry stores resolved coordinate payloads instead of stale refs/selectors, composes with Android freshness-aware snapshot capture, and keeps internal retry controls out of recorded session actions.

Post-gesture stabilization now reuses the same surface-signature logic; that signature includes semantic state such as role/enabled/selected/hittable and rounded rects.

Closes #597

Validation

Focused unit coverage passed for interaction outcome policy, snapshot retry handling, Android freshness composition, find delegation, interaction retry payloads, and the exact Maestro fuzzy fallback path. Typecheck, format, Fallow, build, and full integration validation passed locally.

Manual device verification passed earlier on iOS simulator Settings and Android emulator Clock using Maestro replay flows; all manual sessions were closed.

Known gap: broad local coverage/check:unit still fails in this environment with unrelated mocked host-command timeouts/tooling failures outside this change; CI Coverage passed on the PR after the prior fix.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Size Report

Metric Base Current Diff
JS raw 1.1 MB 1.1 MB +3.4 kB
JS gzip 357.7 kB 358.6 kB +964 B
npm tarball 457.2 kB 458.1 kB +943 B
npm unpacked 1.5 MB 1.5 MB +3.4 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.6 ms 27.8 ms +0.2 ms
CLI --help 43.3 ms 42.8 ms -0.5 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/2415.js +2.9 kB +745 B
dist/src/interaction.js +165 B +56 B
dist/src/session.js +107 B +39 B

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b66df4ecf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

durationMs: Date.now() - startedAt,
},
});
await dispatchCommand(session.device, pending.command, pending.positionals, pending.flags?.out, {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Map click retries to press before dispatch

When a no-change retry is triggered for a recorded click (the path just added for Maestro tapOn sets pending.command to click), this calls the core dispatchCommand directly with pending.command. I checked src/core/dispatch.ts, and dispatchKnownCommand has cases for press, fill, longpress, etc. but no click, so the first retryable no-op tap will throw INVALID_ARGS: Unknown command: click during the following snapshot instead of retrying the tap. Store or translate click retries to the platform press command before calling core dispatch.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in d46c758: click-derived no-change retries now store the platform dispatch command as press while keeping action: click for diagnostics. I also updated the lazy retry tests and provider integration expectation.

@thymikee thymikee force-pushed the codex/issue-597-outcome-prototypes branch from 4b66df4 to 87cfe81 Compare June 1, 2026 15:03
@thymikee thymikee merged commit 66ec92f into main Jun 1, 2026
18 checks passed
@thymikee thymikee deleted the codex/issue-597-outcome-prototypes branch June 1, 2026 16:04
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-01 16:05 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt Maestro-style state-change-aware touch retry and lazy settle policy

1 participant