You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android adb reattach comment says a released device may stay running, kept by the warm pool #1375
src/drivers/android/device-table.ts:156 (origin/main 42b114c) explains why emulators outlive a daemon restart with "a released device may stay running, kept by the warm pool". Since ADR 0061 §2 a released virtual device is destroyed; what the warm pool keeps running is a never-leased ready device. The reasoning still holds with "a warm device" in place of "a released device".
Confirmed, and the issue's proposed wording is wrong too. This is a comment-only defect, so no test can fail and no bug/1375-repro branch was pushed (precedent: #1095, #666). Passing tests already prove the three facts that make the comment false. Adding another would break testing rule 7.
src/leasing/create-leasing.test.ts:416 "a release destroys the released device instead of reclaiming it, ..." 1 passed
e2e/daemon-lifecycle.test.ts:263 "daemon stop shuts down every idle device it booted and leaves the leased one running" 1 passed (pnpm test:e2e)
src/drivers/android/index.test.ts:1666 "when the daemon disposes of the adb server it adopted and $attached, ..." 2 passed
Root cause
Defect, in a comment: src/drivers/android/device-table.ts:154-157 (written in 298af1c, #1285). A released device is destroyed (ADR 0061 §2), so "a released device may stay running" is false. "A warm device", as the issue proposes, is also false: at stop, core.shutdownIdle() (src/core/create-core.ts:435, called from src/daemon/worker-composition.ts:533) shuts down every ready unleased device. Only leased devices keep running across a stop (daemon.stop releases nothing). The same sentence says "A clean daemon stop reaps that server", but AndroidDriver#dispose (src/drivers/android/index.ts:528) keeps the server while adb devices lists an emulator.
Simplest fix
Reword the paragraph. The code stays as it is:
*Anemulatorannouncesitselfexactlyonce,atitsownstartup,totheserverthat*existedthen.A`daemon stop`keepsthatserveronlywhile`adb devices`listsan*emulator(`AndroidDriver#dispose`);onethat is reapedordiesisreplacedbyaserver*that,with`ADB_EMU=0`,hasnoscannertorediscoveranything--soeveryemulatorthat*survivedtherestart(whichisbydesign: aleaseddevicekeepsrunningacrossastop)*wouldbeinvisibleforever.
Tried with this wording, then discarded: pnpm exec vitest run --project unit src/drivers/android gave 708 passed, 1 skipped. The comment lint was not run (agents may not run it). The commit hook runs it.
Alternatives rejected
"a warm device" (the issue's wording): the warm pool's devices are shut down at stop.
Deleting the parenthesis: the reader loses why an emulator outlives the daemon at all.
Risk
Only a comment changes. The commit hook's comment lint must accept the new block.
Fast track
Defect: yes
Fix tried: no — comment-only, no failing reproduction to make pass
Activity
V3RON commentedon Nov 6, 2026
Reproduction
Confirmed, and the issue's proposed wording is wrong too. This is a comment-only defect, so no test can fail and no
bug/1375-reprobranch was pushed (precedent: #1095, #666). Passing tests already prove the three facts that make the comment false. Adding another would break testing rule 7.Root cause
Defect, in a comment:
src/drivers/android/device-table.ts:154-157(written in 298af1c, #1285). A released device is destroyed (ADR 0061 §2), so "a released device may stay running" is false. "A warm device", as the issue proposes, is also false: at stop,core.shutdownIdle()(src/core/create-core.ts:435, called fromsrc/daemon/worker-composition.ts:533) shuts down every ready unleased device. Only leased devices keep running across a stop (daemon.stopreleases nothing). The same sentence says "A cleandaemon stopreaps that server", butAndroidDriver#dispose(src/drivers/android/index.ts:528) keeps the server whileadb deviceslists an emulator.Simplest fix
Reword the paragraph. The code stays as it is:
Tried with this wording, then discarded:
pnpm exec vitest run --project unit src/drivers/androidgave 708 passed, 1 skipped. The comment lint was not run (agents may not run it). The commit hook runs it.Alternatives rejected
Risk
Fast track
Written by an agent.
V3RON commentedon Nov 6, 2026
Delivery run
Merged: #1380 (#1375)
Parked: none
Waiting: none
Decided: #1375 — fast track held a comment-only bug → maintainer asked to set
bug:readyby handWritten by an agent.
docs(android): fix reattachRunningEmulators comment on what outlives …