Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on a5af9f4. The verdict and the full list are in the summary comment.
- 🟡 Minor · Garbled adb devices row now empties the whole serial list, delaying test-IME recovery ·
packages/platform-android/src/ime-lifecycle.ts:34 - 🟡 Minor · Redundant requireCurrent before the adb probe can mask the real close error ·
packages/daemon/src/sessions/session-lifecycle/internal/session-close.ts:541 - 🟡 Minor · Empty adb devices read mid adb-server restart retires the session and frees its claim ·
packages/daemon/src/sessions/session-lifecycle/internal/session-close.ts:513
This comment has been minimized.
This comment has been minimized.
|
Close does not yet release the session when the vanished serial was the last device adb listed, so #5376 is only partly fixed at cd87454. The CI checks that exercise the changed routes are not reported failing, and Body rules was cancelled, so it needs one re-run before merge. Body rules checks the PR description, which this diff does not touch, so the cancel looks unrelated. There are no conflicts. adbInventoryOmitsSerial returns The changed path is device-facing, and the only live run in the PR body kept the serial listed, so close took the ordinary path and never reached isAndroidCloseSerialAbsent. The daemon tests mock the close steps and the adb inventory. By reading, the teardown steps stay silent against a missing serial, but no run shows that on a real adb, and this run is required before merge. Please run the issue repro on the branch build and post the output. Use an emulator as the second serial: Could platform-android own this instead? When pidof is unavailable, stopAndroidPackage could call observeAndroidAdbDevices(). If a header-verified inventory omits device.id, it would emit the diagnostic and return as a no-op instead of throwing androidPidofUnavailableError, and otherwise throw as today. That is about 15 lines in app-lifecycle.ts. It needs no DaemonPlatformServices member, no root-composition lambda, no fixture entry, no request-signal plumbing, no daemon reason literal and no multi-flag guard, and the daemon's cleanupFailures gate and retire path stay as they are. The cost is that the platform cannot tell plain close from Not blocking, take or leave: import the reason constant from the platform contract instead of re-typing it at session-close.ts:531; skip the header line in both modes of readAndroidAdbDevices and let allowPartial decide only about a stateless row (ime-lifecycle.ts:42); add one platform-android test over canned Of the earlier inline threads, the one on the empty inventory (#5396 (comment)) still applies through the sole-device case above. These are fixed at this head and can be resolved: the docs retention sentence (#5396 (comment)), the quick listing with partial rows (#5396 (comment)), and the redundant requireCurrent (#5396 (comment)). Not verified here: a screen recording still active on the vanished serial, whether any shipped adb prints a daemon-start banner on stdout, and how long a real Wi-Fi serial stays offline after a DHCP move. No tests, build, emulator or adb were run in this review, and the unit counts in the PR body are the author's. Before merge, please post the vanished-serial run, decide the empty-inventory rule, and answer the platform-android ownership question. |
|
Ran the #5376 repro on a physical Pixel 9a over Wi-Fi adb (adb 36.0.0), branch build at cd87454:
|
|
Thanks for the run on a real Pixel over Wi-Fi adb. It covers the live evidence the review asked for on the route where another device stays listed: plain close succeeds, the skip diagnostic appears, the session and claim are released, and a new The run also confirms the one remaining blocker at cd87454: when the vanished serial was the only device, The |
|
The sole-device case is fixed in f0e08d0. I compared the prior and patched CLI builds on an Android 17 emulator using one TCP transport on a private ADB server. After disconnect, |
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
packages/daemon/src/sessions/session-lifecycle/internal/session-close.ts:555 |
🆕 Empty adb devices read mid adb-server restart still retires the session and frees its claim |
Reviewed with this repository's own Sentinel configuration (202d13506363).
💬 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.
|
This PR is ready at f0e08d0. The earlier findings from cd87454 are fixed, and all 24 checks pass at this commit. Not blocking, and fine to take or leave: the earlier question about why the daemon owns the absent-serial check on plain close (instead of stopAndroidPackage in platform-android) has no reply yet. One sentence in the PR body would settle it: https://github.com/callstack/agent-device/blob/f0e08d0/packages/daemon/src/sessions/session-lifecycle/internal/session-close.ts#L515 Open threads: the one on header-only adb reads (#5396 (comment)) is benign, because the retire rule is the approved invariant. These threads are fixed at this head and can be resolved: retention wording in app.ts and commands.md (#5396 (comment)), stateless rows in ime-lifecycle.ts (#5396 (comment)), and the redundant requireCurrent in session-close.ts (#5396 (comment)). Not verified here: the adb-server restart window with a transient header-only list was not run live, and the emulator and Pixel results come from the author and AlexErrant reports, not from a rerun. No tests, build, emulator or adb were run for this review. No platform-android test pins that a header-only adb devices output parses to an empty list. |
Summary
Plain Android close can end its session after the app-stop probe fails and other cleanup succeeds. A valid ADB inventory that omits the exact serial establishes absence, including a header-only list. Listed serials and inconclusive reads preserve the original error and claim.
Closes #5376.
Before / after
With the sole ADB transport disconnected,
closeatcd87454exited 1 withandroid-process-probe-unavailableand kept the claim. Atf0e08d0it exited 0, logged the absent-device diagnostic, and left both lists empty. Reconnecting and reopening in the same workspace succeeded.Validation
android-helper0.21.47-dev. The post-disconnect list contained only ADB's header.cd87454. Atf0e08d0, 23 focused tests, typecheck, Fallow, command-doc checks, and build passed.cd87454.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.