Skip to content

fix(cli): Keep saved device IDs out of build arguments - #557

Open
griffinli wants to merge 1 commit into
getsentry:mainfrom
griffinli:fix/cli-device-build-defaults
Open

griffinli wants to merge 1 commit into
getsentry:mainfrom
griffinli:fix/cli-device-build-defaults

Conversation

@griffinli

Copy link
Copy Markdown

mobilebuildmcp device build fails with deviceId requires buildForTesting to be true when a phone is saved in session defaults. The CLI promotes the saved deviceId into an explicit argument before invoking the shared handler, bypassing the handler's filtering of saved installation destinations. This regression was introduced by the prepared-test support in #475.

Exclude the saved deviceId from CLI defaults for build_device. Explicit --device-id and --json arguments still reach the existing validation, and build-and-run, install, and test commands retain their configured destination. Add nine CLI regression cases covering normal and prepared builds, named profiles, explicit destinations, and the other device commands.

Validation:

  • Confirmed the three saved-destination regression cases fail without the fix and pass with it.
  • npm run lint:fix, npm run typecheck, npm run format, npm run build
  • npm test: 2,600 unit tests and 16 watchdog checks passed.
  • npx prettier --check CHANGELOG.md
  • Built the CLI from this branch and successfully ran device build against an existing iOS project with a saved phone ID.

The manual runtime-boundary checklist was reviewed. The Warden CLI was unavailable locally (warden: command not found).

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.

1 participant