Repository navigation
test(scene-e2e): terminate the app before each prepare flow and time-limit maestro calls - #703
Merged
Conversation
…time-limit maestro calls The linking prepare flow started while the declined flow's app was still running, so Maestro's launchApp had XCTest terminate a live app. In scheduled run 44881867670 that terminate hung, the driver died, and the Maestro JVM never exited, so the step sat silent until its 40-minute cap. Terminate the app with simctl before each prepare flow, as the script already does before the URL and routing flows, and run every maestro call under a watchdog (E2E_MAESTRO_TIMEOUT_SECONDS, default 480) that stops a hung call and fails its phase with exit 124 and a phase-tagged error.
mahmoud-elmorabea
approved these changes
Nov 23, 2026
1 task
talon-github-manager
Bot
deleted the
mbl-2804-scene-prepare-terminate
branch
November 23, 2026 21:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MBL-2804
Summary
Scheduled run 44881867670 timed out at the 40-minute step cap even though every routing assertion that ran had passed. The linking prepare flow started while the host app was still running from the declined flow, so Maestro's
launchAppasked the XCUITest driver to terminate a live app. The app exited within about 80 ms, but XCTest's terminate waited 60 s, failed and took the driver down (Device became unreachable while processing terminateApp). The Maestro JVM then never exited, and the step printed nothing for 13m40s until the cap.This changes
.maestro/run_scene_push.shonly:xcrun simctl terminatebefore each prepare flow, the same move the script already makes before the URL and routing flows, solaunchAppalways starts from a terminated app. In the acknowledged prepare flow, where the app wasn't running yet, the driver's terminate took 6 ms.maestrocall (prepare, ordinary URL, and the backgrounded notification flows) runs under a small watchdog. If a call is still running afterE2E_MAESTRO_TIMEOUT_SECONDS(default 480), it gets TERM, then KILL after 10 s, and the script prints::error::Maestro did not finish <phase> within 480sand exits 124, so the step summary names the phase instead of a step timeout. The slowest passing call in recent runs was the first prepare flow on a slow host (293 s in 44661869296, where it also starts the driver), so 480 s leaves headroom without letting a hung call eat the step budget.Autonomous fix by Moby.
Platforms
iOS harness only (
.maestro/run_scene_push.sh). No SDK code changes. Android and Flutter are unaffected: this script and its flows exist only for the React Native iOS scene host.Related Issues
https://linear.app/customerio/issue/MBL-2804
Testing
bash -n .maestro/run_scene_push.shandshellcheck0.10.0 pass (both also pass onmain).maestro(14 of 14 cases pass; againstmain's script, 13 of 14 fail, so the harness exercises the change):::error::line, and one that ignores TERM is killed after the 10 s grace;set -euo pipefaila timeout stops the script, and a passing call lets it continue;E2E_MAESTRO_TIMEOUT_SECONDSis refused with exit 2, and no fake processes are left running.xctest_runner_*.login the diagnostics artifact) should showDetected running apps: ["com.apple.springboard"]instead of the host app.The harness ran on bash 5.2. The script avoids constructs newer than bash 3.2 (no
timeout,wait -norBASHPID), in case the runner'sbashis the macOS system one.Deployment
Test harness only; nothing ships in the SDK. This change can be safely reverted.
Submitted by Moby -- autonomous triage agent for Squad Mobile
Talon-Agent: Moby (4d2873ab)