Repository navigation
fix(android): use typed evidence in the readiness boot poller - #4717
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
|
The change at 1f24c83 needs stronger regression and live validation before merge. The offline then booted test also passes on the base because the old loop retries every non-1 stdout. It can pass even if terminal and transient errors are retried alike. Could a production-route regression use identical diagnostic text with different typed evidence and assert retry versus prompt terminal failure, and show that the base or a verdict mutant fails? The reported cold boot does not include the command or captured output that identifies the readiness route, so it does not establish which poller ran. Please record, with the branch-built CLI ( The still-booting deadline test repeats the existing deadline test and also passes on the base. Please remove it or replace it with a distinct regression that fails without the typed verdict. All 18 checks pass. There are no known conflicts. Before merge, provide verifiable live cold-boot evidence and a regression that detects loss of the typed transient versus terminal decision. |
…nce (#4426) The second Android boot poller (waitForBoot in the readiness runtime behind ensureReady/bootTarget) still made retry/stop decisions from raw probe output: a terminal device_unauthorized or host refusal was polled until the deadline and then misreported as boot_timeout, and a probe-level exec timeout escaped untyped. It now stamps each observation through the existing typed evidence owner (androidAdbResultError/attachAdbFailureHint classification) and applies the same shared verdicts as the #4610 lifecycle poller (isTransientAndroidBootFailure/androidBootFailureReason, now exported from emulator-lifecycle.ts): transient not-ready/offline observations retry inside the existing deadline budget, terminal unauthorized/host-refusal/unclassified outcomes stay terminal with typed adbFailure/reason details, probe timeouts report ANDROID_BOOT_TIMEOUT, cancellation keeps the abort owner's typed reason, and deadline expiry keeps the boot_timeout typed outcome. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1f24c83 to
c277c86
Compare
|
Thanks for the review. Head is now 1. Offline-then-booted test I replaced it with one regression through
Failing output (I committed WIP first, then restored with 2. Still-booting deadline test I deleted it. I did not replace it. The existing deadline test already covers the 3. Live cold boot Route: Run with the branch CLI after
Limit: I did not rerun at Validation at
|
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
packages/platform-android/src/readiness/runtime.ts:189 |
🆕 Terminal probe failure loses the original AppError cause; sibling poller keeps it |
Reviewed with this repository's own Sentinel configuration (0a1c2cce7b9b).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on c277c86. The verdict and the full list are in the summary comment.
|
The PR is ready at c277c86. The earlier concern from the review at 1f24c83 is fixed, CI is green (19 checks, none failing), and there are no conflicts. Not blocking, and fine to take or leave: the stderr "device offline" exit-1 retry case was removed from runtime.test.ts, and the new regression throws a pre-typed AppError, so it skips the nonzero-exit classification route. Could you add one case through ensureAndroidReady where the probe returns On the open inline threads: the thread on error code and cause in the readiness poller still applies and is minor. Reusing The live run was at 33d6fa8, before the rebase. The production code matches that head through range-diff, with no upstream change to the route files. Nothing else must happen before merge. |
|
Pushed
The PR still changes three files. All 1,512 platform-android tests pass, and typecheck and lint are clean. Local validation: Live evidence: unchanged. The cold boot ran at |
* origin/main: refactor(apple-runner): generate the Swift runner error-code enums from runner-contract.ts (#4810) fix(daemon-client): report a newer daemon that won a startup race as daemon-incompatible (#4801) feat(shake): add a shake command for iOS simulators and Android emulators (#4741) fix(daemon): give a closing daemon its full teardown before anything kills it (#4806) fix(android): use typed evidence in the readiness boot poller (#4717)
Summary
Use the existing Android boot verdicts in the second readiness poller. Transient offline and not-ready observations retry within the existing budget. Terminal failures return typed evidence promptly, and cancellation preserves the caller's reason.
Three files change. Refs #4426. App-lifecycle cancellation and deadline forwarding remain tracked there.
Validation
Base
de36d03b707ad199c3f50b12f5ed8f90f8c1ea8c. Tested headc277c86c40fd75e7250dcf55fb3b03345c698cbb.pnpm check:affected --runpassed at the exact head (exactCommit=true, vitest-related and unit).runtime.tsand on both verdict mutants (always retry, never retry).Pixel_9_Pro_XL_API_37(Android 17) throughboot --headless, withbooted: trueandbootOccurred: true. That run was at33d6fa8(pre-rebase, same production diff). It was shut down afterwards. No stopped dedicated AVD was free at the final head, so a rerun atc277c86is open.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.