MM-002 return typed no-device layout errors - #3
Draft
himattm wants to merge 1 commit into
Draft
Conversation
Reproduction: with zero devices, minimap layout previously invoked Android layout and could return status ok with an empty-string layout. Preflight ADB devices before cache or capture, return device_unavailable with a stable code, attempted serial, attached device states, recovery guidance, and exit code 6, then allow the same command to succeed when a device becomes ready. Verified with zero-device-to-healthy and missing-selected-serial CLI regressions, cargo test --workspace, cargo clippy --all-targets -- -D warnings, cargo fmt --check, and the minimap-cli binary build.
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
Add an ADB device preflight before any layout capture. No-device, missing selected device, offline/unauthorized device, and no-ready-device cases now return structured
device_unavailableresults with stable codes, attempted serial, attached device states, recovery guidance, an empty layout array, and exit code 6.Why
With no emulator connected, Minimap previously reported success with an empty-string layout, making an unavailable device indistinguishable from a valid empty hierarchy.
Impact
Automation can reliably stop or recover before invoking Android CLI, and the same command succeeds normally once a device becomes available.
Validation
Stack
Depends on #2; base branch:
agent/mm-001-normalize-layout-output.