Skip to content

fix(android): ignore emulator log lines in -list-avds output - #3743

Open
airowe wants to merge 1 commit into
callstack:mainfrom
airowe:fix/android-avd-list-banner
Open

airowe wants to merge 1 commit into
callstack:mainfrom
airowe:fix/android-avd-list-banner

Conversation

@airowe

@airowe airowe commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

agent-device devices listed a phantom stopped emulator whose id and name were the emulator's crashdata banner (INFO | Storing crashdata in: …). emulator -list-avds prints that line on stdout with exit 0, and parseAndroidAvdList accepted every non-empty line.

The parser now keeps only lines made of the characters avdmanager allows in AVD names (A-Z a-z 0-9 . _ -). That rejects emulator logging without matching its text. 2 files changed. Fixes #3716.

Validation

Base 0149438fa, head b0277a7. New inventory.test.ts cases feed the real banner alone, and beside AVD names with CRLF line endings. Both fail on base with the banner listed as a device, and pass at head.

pnpm check:affected --run --head b0277a7 (exactCommit: true): format and lint passed. Typecheck failed at test/integration/command-coverage/declarations.ts:558 (linux.gap). That failure is inherited from main and fixed by #3740. Because the runner stops there, I ran the remaining stages separately on the same diff. Layering, fallow, build and provider-integration passed. Unit passed, including every platform-android test. The only unit failures were unrelated: a parallel-load timeout that passes alone, path-with-space failures in fuzz/webdriver tests that pass from a path without a space, and smoke hitting the same linux.gap error. scripts/__tests__/eager-closure-budgets.test.ts passed.

No live device run: this is a host-side stdout parser, and the evidence is unit tests on the real banner at the discovery boundary. Coverage and integration are left to CI.

View guided diff

`emulator -list-avds` can print its crashdata INFO banner on stdout with
exit code 0. The inventory treated every non-empty stdout line as an AVD,
so a machine with zero AVDs listed a phantom emulator named after the
banner. Accept only lines matching avdmanager's AVD-name grammar.

Fixes callstack#3716

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

devices reports a phantom Android emulator named after the emulator's crashdata INFO banner

1 participant