Repository navigation
fix(emulator): wait for the requested AVD during Android boot - #35536
Conversation
8b7d173 to
bede8a8
Compare
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Medium impact] The PR appears safe to merge, with the previously reported startup delay remaining non-blocking. Findings
SummaryThe boot poll now checks the requested AVD's name before accepting its serial.
|
| ) | ||
| for (const device of fresh) { | ||
| const booted = await runner(sdk.adb, bootCompletedArgs(device.serial)) | ||
| const serial = await findRunningAvdSerial(runner, sdk, avdName, fresh) |
There was a problem hiding this comment.
Another emulator delays startup
findRunningAvdSerial waits for every fresh emulator's name query before returning a match. If the requested AVD is ready but another newly seen emulator's console does not answer, its query can delay the target's boot check by 60 seconds. Previously, a booted target listed first could return immediately.
Let a confirmed match proceed without waiting for unrelated name queries, or give those queries a shorter timeout.
fa59c23 to
6ff6799
Compare
6ff6799 to
8189909
Compare
LoC: +100/-3
Wait for the named Android AVD after launching it. The boot poll previously accepted the first newly booted emulator,so another concurrent AVD could become this workspace's device even if the requested AVD never appeared. Reuse the existing name lookup before checking boot completion;keep serial reuse,launch flags and timeout behavior.
Validation:26 configured tests/3 suites,3 expected baseline identity regressions with3 controls,strict focused TypeScript and all5 normal hook tasks pass. Real Node26.8.1 production execFile/spawn against owned SDK fixtures:12groups per arm at1/10 boots;33wrong serial returns become0. Delayed target,both-ready,unrelated-only timeout,existing-name/serial and unknown-name controls pass. All616fixture command processes and profiles cleaned. Seven exact modules,no module stubs;fixtures provide ADB inventory/name/boot flags and an immediate sleep,not physical devices or real-time boot measurements.
Identity checks add AVD-name queries22->132 and total fixture commands231->385 across66calls per arm;boot queries remain33. This fixes correctness,not measured performance. No Android SDK/emulator,nativeElectronUI,macOS/Windows,CPU/RSS/latency test. Preserve #9950 SDK/network guards on rebase;they do not address this postlaunch match. Nine source/caller blobs equal main9babef286.
Required aggregate queued after #35531;no aggregate pass or Claude takeover claimed. Initial premature test launch and test-lint failure preserved,then corrected without installs or hook bypass. Frozen head
8b7d1731bab0fda358defe6fa0619ff937a54dbd,base79dbada2c873bef3584a0c53b23ae98f2a84e536. Evidence/home/neil/.local/state/orca-electron-audit/android-avd-boot-identity/report.md;47-payload seal4c180cd360237e5123b9ce166d46b3a1a160d22e8109f8887d8f742edd649d89.