feat(harmonyos): verify foreground after open instead of trusting the launch line
Ā
ST
5d ago+789+789+012345678901234567890123456789-8-8-0123456789
Summary
On HarmonyOS, open reported success off the start ability successfully stdout line alone ā on a locked screen the report said Opened while the screen showed the lock face, and the session kept reasoning from a state the device never entered. openHarmonyApp now polls the app state (up to 5s, reusing the FOREGROUND parsing from apps state) after the launch line: when the launched bundle does not hold the foreground, the result carries an open_not_foreground warning telling the caller to unlock first; --foreground mode escalates that to a hard failure.
10 files changed (app-lifecycle polling, result plumbing, tests).
Validation
- Head: 45a07a8e0 on a68693c72 (includes review-fix commit; help wording synced for both audiences per the flag-types rule).
pnpm run typecheck,pnpm run lint, app-lifecycle tests, integration-progress--check, fallow, freerange: pass locally.- Independent cold review: applied. CI runs the full gates on push.
š¤ Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith Ā· Need help on this PR? Tag @codesmith-bot with what you need.