Skip to content

fix(adb): report failed app launches - #425

Open
Xalzeroph wants to merge 1 commit into
zai-org:mainfrom
Xalzeroph:fix/adb-launch-result
Open

Xalzeroph wants to merge 1 commit into
zai-org:mainfrom
Xalzeroph:fix/adb-launch-result

Conversation

@Xalzeroph

Copy link
Copy Markdown

What

launch_app() treated every app name present in APP_PACKAGES as a successful launch, even when adb shell monkey failed.

Why

That makes a failed Launch action look successful to the agent. A disconnected device returns a non-zero ADB status, and Monkey can also report monkey aborted when no launchable activity is found, but the previous code returned True in both cases.

Change

  • return False when ADB exits non-zero
  • treat an explicit monkey aborted result as a failed launch
  • only apply the post-launch delay after a successful command
  • add offline regression tests for ADB failure, Monkey abort, and success

Validation

  • pytest -q tests/test_adb_device.py — 3 passed
  • ruff 0.11.7 import sorting — passed
  • ruff 0.11.7 format check — passed
  • the new tests fail 2/3 on current main and pass 3/3 with this change

Fixes #424

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.

launch_app reports success when adb launch fails

1 participant