Skip to content

Install every simulator driver with setup deps and drop preferred_ui_driver - #172

Merged
bitomule merged 2 commits into
mainfrom
setup-installs-every-driver
Dec 3, 2026
Merged

bitomule merged 2 commits into
mainfrom
setup-installs-every-driver

Conversation

@bitomule

@bitomule bitomule commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Part of #160. The permissions and simulator steps that close #160 and #152 come in a stacked PR on top of this one.

What changes

  • mav setup --install deps installs AXe 2, baguette and idb (client and companion), AXe first. It used to install AXe only, so a machine set up with mav had no idb, and an idb_companion from 2022 sat refused by the 1.6.4 floor with nothing upgrading it.
  • After each install, setup checks the tool with the driver's own probe, the same check every command runs. A tool still below mav's floor gets an explicit brew upgrade (brew install skips that when HOMEBREW_NO_INSTALL_UPGRADE is set), and the output says upgraded=<tool>. If it is still below the floor, setup fails with setup_failed tool=<tool> floor=<version> next=... instead of reporting ok.
  • mav setup --install idb without pipx used to install the companion alone and report ok, leaving no idb on PATH. It now fails with next="brew install pipx [email protected], then rerun mav setup --install idb". An idb client already on PATH is still enough to go on.
  • preferred_ui_driver is removed. Setup wrote it, but the router never read it, and wiring it in would let a config pick idb for the tree (20 labels where AXe 2 read 27, and the ids a flow waits on were missing). Setup no longer asks for it or writes it. A config that still has it loads, mav doctor reports config_deprecated=preferred_ui_driver, and the next mav setup rewrites the file without it. --prefer-driver still chooses a driver for a single command.
  • README and skills/mav/SKILL.md updated.

The new code is in internal/mav/setup_deps.go; cli.go only gains the floor-check calls in the setup loop and the doctor field.

Validation

make check passes (gofmt, go test ./..., build).

Ablations: each fix was reverted, its tests went red, and went green again once the fix was restored:

== ablation 1: deps = axe only
--- FAIL: TestSetupDepsInstallsEverySimulatorDriver
--- FAIL: TestSetupDepsFailsWhenAToolStaysBelowItsFloor
== ablation 2: no floor check
--- FAIL: TestSetupDepsInstallsEverySimulatorDriver
--- FAIL: TestSetupDepsUpgradesAToolBelowItsFloor
--- FAIL: TestSetupDepsFailsWhenAToolStaysBelowItsFloor
--- FAIL: TestSetupIDBUpgradesACompanionBelowTheFloor
--- FAIL: TestSetupIDBFailsWhenTheCompanionStaysBelowTheFloor
== ablation 3: no pipx guard
--- FAIL: TestSetupIDBWithoutPipxFailsInsteadOfSkippingTheClient
== restored
ok  github.com/bitomule/mav/internal/mav

TestSetupIDBUpgradesACompanionBelowTheFloor replays the field case: a Cellar/idb-companion/1.1.8 companion that brew install left in place is upgraded to 1.7.8 before setup reports ok.

…driver

mav setup --install deps now installs AXe 2, baguette and idb. After each
install it checks the tool with the driver's own probe, runs an explicit
brew upgrade for one left below mav's floor, and fails with the floor and
the next command when the upgrade does not reach it. idb setup fails when
pipx is missing instead of installing the companion alone.

preferred_ui_driver was written by setup but never read by the router. It
is no longer asked or written; a config that still carries it loads, and
doctor reports it as config_deprecated.

Part of #160.
open --permissions (and open: { permissions: ... } in a flow) grants app
permissions after install and before the fixture and launch, so a flow
never meets their prompts. simctl privacy sets the services it covers;
notifications and camera, which simctl has no service for, go through
idb approve/revoke. The whole set is routed before anything runs, so a
request that needs a missing idb fails up front instead of half-granted.

New sim.* steps and mav sim commands cover the keychain, the media
library, push payloads and memory warnings. Each is routed by
capability: simctl serves keychain reset, addmedia and push, with idb
as the fallback, and idb is the only driver for the memory warning.
doctor reports the driver for each surface.

Closes #152. Closes #160.
@bitomule
bitomule force-pushed the setup-installs-every-driver branch from a13a3de to 9a763d3 Compare December 3, 2026 10:25
@bitomule bitomule self-assigned this Dec 3, 2026
@bitomule
bitomule merged commit 0be6a9c into main Dec 3, 2026
1 of 2 checks passed
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.

Install every simulator driver in setup, and expose what only idb covers as flow steps

1 participant