Repository navigation
fix(android): require explicit process exit before app close completes - #4252
vivek-aucert wants to merge 2 commits into
Conversation
|
At 0b8affe, the Android close fence has one correctness problem and no live device proof yet. Checks have not run: the PR is a draft from a fork, so no device lanes ran, and the local In This is a device-facing change to the close fence, relaunch gating and probe timeouts ( Could the fence be simpler? Keep the tri-state loop and the bounded probe, but return Not blocking, and fine to take or leave: build the new close error through the same constructor as the other fence failures instead of inline in I found the state bug by reading the code, not by running a test with non-zero probe latency, so how often it shows up depends on adb latency on the device. Does the regression above fail at this head as expected? |
|
0b8affe now conflicts with main. Please rebase when you address the earlier review; the findings there still apply. |
Refs Aucert/aucert#5653. Preserve the existing process deadline and launch refusal while distinguishing incomplete closure evidence from observed running state.
0b8affe to
da10b5a
Compare
|
Rebased onto main at c96a2d5 to resolve the conflict. New head da10b5a. Conflicts in:
No other changes. |
|
da10b5a is the rebase onto main. The conflict from the earlier review (#4252 (comment)) is resolved and there are no conflicts now, but one defect from that review remains and live validation is missing. The close state can still be wrong at app-lifecycle.ts:833. The close fence, relaunch gating and probe timeouts at app-lifecycle.ts:714 are device-facing, and I see no live emulator run at this head. Please attach one that shows: (a) open then close emits two The one check on this head is green. It is a draft fork PR, so the device lanes did not run, and that is not evidence for the Android path. I did not run tests locally, so the regression gap in the first finding comes from reading the code. I did not review the upstream main commits in the rebase. Before merge, the state overwrite needs the fix and regression above, and the emulator run needs to be attached. |
Summary
Android app close treats an unknown final process probe as proof that the app is gone. Require two consecutive explicit gone results 150 ms apart within the existing two-second deadline. Bound probes by remaining time and report
android-app-close-unconfirmedwhen closure cannot be proved, preventing relaunch through uncertainty.Four files: Android lifecycle, regression tests, CLI help and command reference. Kill behavior and ownership are unchanged. Probe diagnostics contain timing/state, not raw output. Related: Aucert/aucert#5653. No scope expansion.
Validation
Independent review passed for base
e6ac165961def2f7b80336d2c04586a3ace32ce0to head0b8affe21707bc232d376c8f1ab9d060ee8c42f3.pnpm check:affected --run --base e6ac165961def2f7b80336d2c04586a3ace32ce0 --head 0b8affe21707bc232d376c8f1ab9d060ee8c42f3: passed, exactCommit=true. All runnable selected checks passed: format, lint, typecheck, layering, fallow, build, 343 related tests, unit check (17,398 passed, one skipped), and documentation checks.The first head run had two snapshot-helper test failures. After competing local suites ended, unchanged base
pnpm run check:unitpassed, followed by the full head gate above. The earlier failure remains recorded; its cause is unproven.The unknown-probe regression fails on original base
e5676488d1005d1db7ffa8b673e5f4b6f9a09216and passes on original fixed5d6128147c691e542890d38466dfd3d1958366af; this port preserves that Android production/test patch.Draft: live Android proof at the rebased head remains pending. Coverage, platform CI and parked device lanes were skipped, not passed. Existing device sessions were untouched.