Repository navigation
fix(dev-harness): distinguish a failed Android inventory from a missing engine - #14400
Merged
Merged
Conversation
… engine sdkmanager --list_installed exiting nonzero was reported as engine present. A missing emulator binary, a successful empty listing, and a failed look are three different findings; cmdline-tools 23 slash paths still prove an image is installed. Failure-Class: none Co-authored-by: Cursor <[email protected]>
Git-on-my-level
deleted the
task/msd-harness-android-ready-inventory
branch
September 17, 2026 21:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
android_readyreturned ready even whensdkmanager --list_installedexited nonzero, so afailed inventory could be reported as "android emulator engine present". That is a readiness
lie: the doctor told a caller the lane was usable when it had actually failed to look.
The fix is not simply to make it strict, because reporting a definite absence when you failed
to look is the same lie inverted. There are now three distinguishable outcomes:
system-images/android-36/google_apis/arm64-v8atree is present, and no image is usable →image absent
sdkmanageris missing, or exited nonzero with nothing parseable and no on-disk tree →cannot determine, which is explicitly not a finding that the engine or image is absent
Before deciding that nonzero means broken, the actual behavior on this host was checked rather
than assumed: a healthy
sdkmanager --list_installedexits 0, cmdline-tools 23 printsdeprecation warnings to stderr and slash-form paths to stdout, and
JAVA_HOME=/nonexistentstill exits 0. The only nonzero reproducible was an unknown flag. So noise here does not show up
as a nonzero exit, and the doctor does not treat stderr warnings as a failed inventory — a
contributor with a working but noisy SDK is not failed.
This was found while auditing every
_runnercall site in the file for the teardown work, anddeliberately kept out of that change: announcing a working lane after a failed inventory is a
different class from a teardown announcing success after a failed kill.
Product invariants affected
none
How it was verified
Two tests that fail on
origin/mainand pass here: a nonzero inventory was reported as "enginepresent", and exit-0 slash-form paths were reported as "image missing".
bash scripts/dev-harness/run-tests.sh— 326 passed.python3 scripts/check_spine_contracts.py— 28 pending.
make preflightpassed. No simulator, emulator, device, or production host wasinvolved.
Tests
The two doctor-outcome tests above, in the harness doctor suite.
Failure class (fixes)
scripts/failure-class preparelisted three advisory candidates from scope-hint overlap —FC-dev-harness-system-global-tool-shadows-repo-pinned,FC-hermetic-suite-points-at-remote-api,FC-nonexecuting-verification-command— and none ofthem is this contract. No new class was defined, pending the coordinator's decision.
Failure-Class: none
🤖 Generated with Claude Code