Skip to content

feat(devbox): boot a Namespace macOS Devbox from the dotfiles - #13

Open
pattobrien wants to merge 15 commits into
mainfrom
devbox
Open

pattobrien wants to merge 15 commits into
mainfrom
devbox

Conversation

@pattobrien

@pattobrien pattobrien commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Why

Coding agents test Tinycast by driving a Mac, and today that Mac is Patt's. A Namespace macOS Devbox can take that job, but only its data volume survives a stop and start, so the box needs a boot that rebuilds the dotfiles machine onto that volume every time. This adds that boot as a dotbot profile plus a host CLI.

What changed

  • install.devbox.conf.yaml and brew/devbox/Brewfile give the Devbox its own profile, built from the essentials, macos and mise profiles without GUI casks.
  • scripts/devbox/boot.ts runs on the guest in two phases, prepare (volume links, shell env, base install, Homebrew, Xcode, TCC grants, the replayd screen-capture approval for /opt/namespace/vmguest, no sleep) and install (./install devbox), so secrets can land between them.
  • tools/scripts/src/devbox-mac.ts is the host CLI: create, up, shot, click, down. up boots, shares gh auth, mints a seven-day Doppler token on the sa-agent-builder service account through the Doppler SDK, configures it on the guest, and screenshots. No 1Password involvement.

Scope

  • Covers one Devbox per up; several can run in parallel on the Team plan.
  • Leaves the global mise config untouched. Its [env] templates read platform/prod, which does not exist in Doppler yet (the configs are dev, stg, prd, pr, and the keys live in the infra-* projects), so mise env exits 1 on the Devbox and on this Mac until the Doppler refactor lands. mise install and the shims still work on mise 2026.10.10.

Tradeoffs

  • The macOS 15+ "bypass the system private window picker" dialog is replayd's, not TCC's, so prepare seeds replayd's ScreenCaptureApprovals.plist for vmguest the way GitHub's macOS 27 runner image does for its agent. Namespace documents no option for this.

  • Homebrew stays in the image's /opt/homebrew (17 GB, 182 formulae) and the devbox Brewfile reinstalls per boot from a cache on the volume. Relocating the prefix onto the volume would cost 17 GB of paid storage for a 13 s saving.

  • The Doppler token is set through the binary's mise install path rather than mise exec or the shim, because mise renders the [env] templates, which call doppler, before either runs.

  • The token is minted per boot with a seven-day expiry and the previous devbox-<name> token is revoked first, so nothing secret is stored on the host or in a vault.

Blast Radius

Only new files plus one new symlink line in install.conf.yaml and a quoting fix in .config/pnpm/config.yaml that vp check already demanded. Nothing on a non-Devbox machine runs the new code.

Verification

  • devbox-mac up patt-mac-probe from a stopped Devbox: 60 s to a clean desktop screenshot with no consent dialog and no click, all phases green on a warm re-run (15 s, idempotent).
  • On the booted box: doppler me reports the sa-agent-builder service account and reads platform/prd and infra-vercel/prd, Tinycast Dev builds with Xcode 26.6 and launches with its Accessibility row already in TCC, full mise install of the global config completed in 97 s (17 GB on the volume).
  • vp check is clean on every commit.

@pattobrien
pattobrien added this pull request to stack #15 October 15, 2026 17:52
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