Repository navigation
v0.33.1: the app gets its launch arguments, and Bazel apps install - #138
Merged
Merged
Conversation
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.
Why
A large iOS app is adopting mav as the driver its
verifyskill uses to operate the app (Bazel build, pinned mav version). On v0.33.0 that app could not be opened through a launch recipe:mav openfailed atinstall. A Bazel.appunderbazel-out/is read-only. simctl refuses it withAn error was encountered processing the command (domain=NSPOSIXErrorDomain, code=13):, and that is the only line the driver keeps. The retry from a writable copy only matchedpermission denied, so it never ran.xcrun simctl launch "$MAV_UDID" "$MAV_BUNDLE_ID" SkipConsents SkipOnboardingis routed to the simctl driver, which launched the bundle alone.LaunchSpec.Argsexisted but nothing filled it, and neither simctl nor idb used it. The app started without its switches and nothing said so..mav/runs/<id>/app.tmp.What changes
launchArgsAfterBundlereads the tokens after$MAV_BUNDLE_ID, expands variables like the env prefix does (single quotes stay literal), and refuses anything that needs a shell (;,|,&,<,>,$(…), backticks) withlaunch_args_need_shell. The trail recordsargs=<count>, never the values.spec.Argsafter the language arguments. The idb driver puts--udidbefore the bundle id, because idb hands everything after the bundle id to the app.shouldRetryInstallFromWritableCopyalso matchesNSPOSIXErrorDomain, code=13.openreports the original bundle path, which still exists.skills/mav/SKILL.mdandCHANGELOG.md(v0.33.1).Validation
make check: fmt, all tests, build.mainand pass with this branch:TestInstallRetriesFromAWritableCopyOnSimctlPOSIX13,TestOpenRemovesTheWritableCopyAfterInstallingTestOpenCarriesTheRecipeLaunchArgumentsIntoTheApp,TestOpenRefusesLaunchArgumentsThatNeedAShellTestLaunchPassesTheAppArgumentsAfterTheBundle(simctl and idb),TestLaunchCarriesTheEnvironmentAsIDBPrefixed(new argument order)launch_step_failed step=install(POSIX 13). This branch opened the app in 15 s: the trail showslaunch.launch driver=simctl args=3, and the app skipped consent and onboarding and came up in English.mav ui tree(axe, 27 nodes) andmav captureworked, and so didmav openURL "example://search?keywords=iphone"followed bymav ui tapdown to the search results (screen=search-view-collection-view).Not changed:
TestExecStepShellDoesNotSurviveMavfailed once in a full run under heavy machine load and passes alone and inmake check; it does not touch this code.