Repository navigation
fix(android): share the boot error shape and pin the offline boot-probe retry - #4812
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 7e59a4c. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
|
No wrong behavior in dbb8c7b compared with the merge base, and all 18 checks pass on this head. The retry and terminal decisions are unchanged from base, so no new device run is needed, but only a run that hits an in-budget adb probe timeout would show the lifecycle message below on a real device. No conflicts. Before merge, the one open design ask is to let the caller's deadline decide when the boot message says the budget ran out. The builder is meant to give one message for one boot observation at both pollers, but it does not yet. The lifecycle call at https://github.com/callstack/agent-device/blob/dbb8c7b/packages/platform-android/src/emulator-lifecycle.ts#L141 treats the budget as spent when Not blocking, and you can take or leave these: the lifecycle probe-timeout row in https://github.com/callstack/agent-device/blob/dbb8c7b/packages/platform-android/src/__tests__/emulator-lifecycle.test.ts#L168 asserts the reason and call count but not the message, so nothing fails if the two pollers drift apart. The earlier thread on the readiness message (#4812 (comment)) is fixed at this head for the readiness route, so you can resolve it. The same claim still applies on the lifecycle route, as described above. |
|
Pushed
No local |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on cb8a55e. The verdict and the full list are in the summary comment.
|
Coverage failed at |
This comment has been minimized.
This comment has been minimized.
|
Coverage failed a second time at |
|
This PR is ready at 8514e67. Both points from the earlier review are fixed: an in-budget probe timeout now keeps the adb message at both pollers, and the TOOL_MISSING branch now comes before the budget-spent branch. CI is green on this commit and there are no conflicts. Not blocking, take or leave:
The two inline threads fixed at this commit can be resolved: in-budget probe timeout and TOOL_MISSING order. Not verified here: the tests were not run locally and there was no device run. Retry and terminal decisions are unchanged, so only the error shape needed checking. Whether |
|
Pushed
Both inline threads were already resolved. The readiness and lifecycle suites pass (34 tests); typecheck and lint are clean. Hosted CI validates this head. |
Apex Sentinel · ✅ Approve · review of
|
| 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.
Summary
Follow-ups to #4717, which merged at c277c86 before these landed.
ensureAndroidReady: the probe returns{ stdout: '', stderr: 'error: device offline', exitCode: 1 }, then the booted probe. It resolves, withruncalled twice. Without it, a change that makes every nonzero exit terminal would pass.buildAndroidBootError, now exported fromemulator-lifecycle.ts. For one typed observation, both boot pollers report the same code, message and cause.Rule for the message: the builder says "Android device did not finish booting in time" only when the caller's boot budget is spent. Each caller decides that from the deadline it holds. A failure inside the budget keeps the message of the layer that failed.
Behavior changes:
causeon a terminal boot failure.TOOL_MISSINGfailure, or a terminal adb transport failure such as an unauthorized device, keeps its own message even when the budget is also spent.ANDROID_BOOT_TIMEOUT. A spent budget, or retries that ended on a still-booting observation, still report the budget wording.COMMAND_FAILED, as it did before fix(android): use typed evidence in the readiness boot poller #4717, notUNKNOWN.Details use a named, module-local
AndroidBootFailureDetailstype. 4 files changed.Validation
Base
c94e11046c. Head0d94142006.TOOL_MISSINGfailure; the in-budget probe timeout message at both pollers (the lifecycle row now asserts the message); the budget wording when the readiness deadline passes during the probe;COMMAND_FAILEDfor a plainError; the offline-then-booted retry.snapshot-helper-exit-result.test.ts. It passes when run with the two changed suites (64 of 64).check:affectedreceipt: the host is under load from other validation runs. Hosted CI validates this head.