Skip to content

Maestro end-to-end verification - #2

Merged
adamlutz merged 3 commits into
mainfrom
feat/e2e-001-maestro
May 19, 2026
Merged

Maestro end-to-end verification#2
adamlutz merged 3 commits into
mainfrom
feat/e2e-001-maestro

Conversation

@adamlutz

Copy link
Copy Markdown
Member

Adds the Maestro toolchain so a feature's `verification[]` list can include real-simulator runs — the dynamic-verification layer that the static gates (typecheck, lint, jest) deliberately don't cover.

Summary

  • `.maestro/` — Maestro project layout
    • `config.yaml` — shared appId (`host.exp.exponent` default; override via `${APP_ID}`)
    • `flows/home.yaml` — working smoke flow: launches the app, asserts the default home tab content, taps the Explore tab to exercise the router, drops a screenshot
    • `README.md` — authoring conventions
  • `scripts/run-maestro.sh` — harness wrapper around `maestro test`:
    installs check, sim-detection, structured `[ok]/[fail]` output, copies screenshots + JUnit XML into `tmp/diagnostics/-maestro-.*` so an agent reads results from one place
  • `scripts/sim-ios.sh` / `scripts/sim-android.sh` — boot helpers (deliberately separate from `npm run ios/android` so an agent can warm a sim once and run multiple flows against it; optional `screenshot` subcommand)
  • npm scripts: `sim:ios`, `sim:ios:screenshot`, `sim:android`, `sim:android:screenshot`, `e2e`, `e2e:ios`, `e2e:android`
  • `feature_list.json`: new `e2e-001` feature with a 7-step verification list
  • `docs/E2E_TESTING.md`: Path C now points at the actual scaffolded files

Why Maestro (not Detox or Playwright)

  • Playwright drives the web build only — useful as a fast first pass, but doesn't exercise Hermes, native modules, or platform-specific code paths.
  • Detox is more powerful but needs heavy per-feature wiring.
  • Maestro is a single-binary YAML runner. Flows are easy for both humans and agents to author, and the output (logs + screenshots + JUnit XML) plugs directly into the harness's verification mechanism.

Verification status

Scaffolding is complete and `bash -n` passes on all shell scripts. Flipping `e2e-001` to `done` requires one step that can only be performed on a Mac with Xcode: running `npm run e2e` on a real iOS simulator and confirming the screenshot + JUnit artifacts land in `tmp/diagnostics/`. That's the next session's task.

To test locally

```bash
git checkout feat/e2e-001-maestro
./init.sh && npm run verify # baseline (was green at d04fc81 in PR #1)
curl -Ls 'https://get.maestro.mobile.dev' | bash
npm run sim:ios # boot a sim
npm run ios # build + install + launch
npm run e2e # run the smoke flow

expect: exit 0, screenshot in tmp/diagnostics/-maestro-home-*.png

```

Merge order

Second in the chain. PR #1 (`chore/harness-001-close` → "Initial harness setup") already merged; this PR builds on that. PR #3 (`feat/ci-001-actions`) depends on this one — the `e2e-ios` job in that workflow references `.maestro/flows/home.yaml` and `scripts/run-maestro.sh` from this branch.

🤖 Generated with Claude Code

adamlutz and others added 3 commits May 19, 2026 17:50
Adds the end-to-end verification path the harness has been pointing at:

- .maestro/{config.yaml,flows/home.yaml,README.md} — Maestro project
  layout, with a working smoke flow against the default Expo home tab
  (assertions on scaffold text + tab navigation, ending in a screenshot).
- scripts/run-maestro.sh — harness wrapper: checks maestro is installed
  and a sim is booted; runs the flow with structured [ok]/[fail] output;
  copies screenshots + JUnit XML into tmp/diagnostics/.
- scripts/sim-ios.sh, scripts/sim-android.sh — boot helpers (separate
  from npm run ios/android so an agent can warm the sim once and run
  many flows against it).
- npm scripts: sim:ios[:screenshot], sim:android[:screenshot], e2e,
  e2e:ios, e2e:android.
- feature_list.json: new feature e2e-001 (status=todo) with a precise
  verification list. Scaffolding is done; flipping to done requires
  running the flow on a real simulator.
- claude-progress.md: decisions log entries (why Maestro over Detox /
  Playwright; why sim helpers are separate from the app build path) and
  a Session entry documenting the handoff.
- docs/E2E_TESTING.md: replaces the inline Maestro example with a
  pointer to the actual scaffolded files.
- .gitignore: tmp/diagnostics/.

WIP=1 preserved: harness-001 remains the only in_progress feature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Aligns this branch's internal references with the new naming standard
codified on feat/ci-001-actions (see docs/HARNESS.md → Naming standards
on that branch). The branch was renamed locally + on origin in the
same operation that produced this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #1 (Initial harness setup) merged chore/harness-001-close into main,
which conflicted with this branch on claude-progress.md. Resolved by
keeping both narratives: harness-001 is now `done` (per main), and
e2e-001 remains in_progress on this branch with the simulator run still
to do.

feature_list.json and package.json auto-merged cleanly. Picks up the
lockfile, the removed @testing-library/* speculative deps, and the
harness-001 done state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
adamlutz added a commit that referenced this pull request May 19, 2026
Resolves the one conflict in claude-progress.md (the "open branches"
section and "Current state" block). Updated to reference PRs #1 and #2
by number instead of by branch name now that they're tracked on GitHub.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
adamlutz added a commit that referenced this pull request May 19, 2026
The harness has been silently relying on humans (or me, prompted) to
remember to open PRs. The "if it's not in a file, it doesn't exist"
principle from Lecture 03 says that's a hole. This commit fills it.

AGENTS.md → End Of Session — adds step 6 (open a PR if the branch is
reviewable) and step 7 (paste the PR URL into the session entry).

docs/SESSION.md → adds a new "Opening a PR" section with:
  - When to open (branch represents coherent work; not gated on the
    feature being fully verified)
  - The gh pr create template (simple human-readable title, body with
    summary / verification status / to-test-locally / merge order)
  - After-opening responsibilities (paste URL, watch first CI run)
  - Naming guidance (title in plain English; feature ID lives in the
    body, not the title — matches PR #1 "Initial harness setup", PR #2
    "Maestro end-to-end verification", PR #3 "GitHub Actions for harness
    checks")

claude-progress.md → adds `Opened:` line to the session handoff template
so future sessions record the PR they opened (or note explicitly that
no PR was warranted).

Why this lives on ci-001 and not on its own docs branch: opening a PR
is *what makes the CI gates from this feature useful*. The two work
together — the workflow + the discipline of triggering it. Same scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adamlutz
adamlutz merged commit 9b9e695 into main May 19, 2026
adamlutz added a commit that referenced this pull request May 19, 2026
PR #2 ("Maestro end-to-end verification") merged into main, conflicting
on claude-progress.md (Next-action + Sessions blocks) and
feature_list.json (the 4th feature slot).

Resolution:
- claude-progress.md — kept this branch's narrative (ci-001 in flight,
  PR #3 open); appended the e2e merge + scaffolding sessions from main
  so the full history is preserved.
- feature_list.json — kept BOTH features (e2e-001 from main + ci-001 from
  this branch). Now 5 features total: harness-001 done, ui-001/ui-002
  todo, e2e-001 todo, ci-001 in_progress.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant