Skip to content

Commit 5793d8f

Browse files
antonisclaude
andcommitted
fix(ci): Run crash.yml first so next flow verifies post-crash recovery
Moving crash.yml to last made the "implicit recovery" argument hollow — no subsequent flow existed to prove the app can restart. Running it first ensures the next flow's launchTestAppClear.yml (killApp + launchApp + assertTestReady) acts as the post-crash recovery check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 355cdb1 commit 5793d8f

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/e2e-v2.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,7 @@ jobs:
526526
- name: Run tests on iOS
527527
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
528528
env:
529-
# Increase timeout for Maestro iOS driver startup from default 60s to 180s.
530-
# Cirrus Labs Tart VMs can be slow to respond after simulator boot.
529+
# Increase timeout for Maestro iOS driver startup (default is 60s, some CI runners need more time)
531530
MAESTRO_DRIVER_STARTUP_TIMEOUT: 180000
532531
run: ./dev-packages/e2e-tests/cli.mjs ${{ matrix.platform }} --test
533532

dev-packages/e2e-tests/cli.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,12 @@ if (actions.includes('test')) {
294294
const flowFiles = fs.readdirSync(maestroDir)
295295
.filter(f => f.endsWith('.yml') && !f.startsWith('utils'))
296296
.sort((a, b) => {
297-
// Run crash.yml last — it kills the app, and running it last avoids
298-
// any potential simulator instability affecting subsequent flows.
299-
if (a === 'crash.yml') return 1;
300-
if (b === 'crash.yml') return -1;
297+
// Run crash.yml first — it kills the app via nativeCrash(), and the
298+
// NEXT flow's launchTestAppClear.yml verifies post-crash recovery
299+
// (killApp + launchApp + assertTestReady). Per-flow process isolation
300+
// ensures the crashed Maestro session doesn't affect other flows.
301+
if (a === 'crash.yml') return -1;
302+
if (b === 'crash.yml') return 1;
301303
return a.localeCompare(b);
302304
});
303305

dev-packages/e2e-tests/maestro/crash.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ jsEngine: graaljs
44
- runFlow: utils/launchTestAppClear.yml
55
- tapOn: "Crash"
66

7-
# Post-crash app relaunch is not tested here — Maestro's connection to the
8-
# app is broken after a native crash, making in-session launchApp unreliable
9-
# on Cirrus Labs Tart VMs. With per-flow process isolation, each subsequent
10-
# flow starts a fresh Maestro session that launches the app from scratch,
11-
# which implicitly verifies post-crash recovery.
7+
# Post-crash recovery is verified by the NEXT flow in the run order.
8+
# Each flow runs in its own Maestro process, so the next flow's
9+
# launchTestAppClear.yml (killApp + launchApp + assertTestReady)
10+
# proves the app can start after a native crash. crash.yml is sorted
11+
# to run first to ensure at least one flow follows it.

0 commit comments

Comments
 (0)