fix(android): accept a dispatched am start timeout once the app is foreground
Merged
ZE
24d ago+134+134+012345678901234567890123456789-11-11-01234567890123456789
Summary
am start -W stops waiting after about 10 s and prints Status: timeout. The launch keeps going, so a slow cold start failed open even though the app came up. Now tryAndroidHelperLaunch treats Status: timeout plus an Activity: line for the requested package as dispatched. It then polls the foreground until that package is up, within a 30 s deadline that starts at dispatch and matches the helper's app action budget. If the package never comes up, the open fails with reason: android-launch-not-foreground. A timeout with no Activity: line, or one that names another package, still fails right away. Nothing is resent.
2 files touched. No scope expansion. Fixes #4095.
Validation
Tested SHA 44bbf31 (base d4bcd42).
pnpm check:quick: passed.automation-helper-app.test.ts: 8/8 passed. On base, the two new timeout+Activitytests fail.pnpm check:affected --run --head 44bbf31(exactCommit=true): format, lint, typecheck, layering, fallow and build passed.vitest-relatedfailed: 38 provider-integration tests hitzip not found in PATH, and base fails the same 38. This host has nozip/unzip. A localpnpm test:unitfailed only zip-dependent tests, and base fails those too.- CI at
44bbf31: Integration Tests and Coverage passed. Android Smoke failed atlive-form-scenario.ts:62: the email field readada@exampleinstead ofada@example.test. That is the fill path, not open. It may be flaky; this is not proven. - Not verified on a device: I had no Android device or emulator.