Skip to content

fix: unblock new-machine installs (mise floor, startup budget, AeroSpace) - #18

Merged
natevick merged 4 commits into
mainfrom
feat/new-machine-setup
Aug 7, 2026
Merged

fix: unblock new-machine installs (mise floor, startup budget, AeroSpace)#18
natevick merged 4 commits into
mainfrom
feat/new-machine-setup

Conversation

@natevick

@natevick natevick commented Aug 7, 2026

Copy link
Copy Markdown
Owner

A fresh Mac failed chezmoi apply outright. Root cause, fix, and the work it unblocked.

The bug

install-tools.sh died with a TOML parse error, aborting the whole apply before any CLI tool installed:

unknown field `compile`, expected one of `apply_patches`, `default_packages_file`, ...
mise WARN unknown field: settings.idiomatic_version_file_enable_tools

The machine had a stale brew install mise2024.12.10, ~20 months old. The bootstrap only checked presence:

if ! command -v mise >/dev/null 2>&1 && [ ! -x "$HOME/.local/bin/mise" ]; then

so mise.run never ran, and a config written for current mise hit a 2024 parser.

Fix: gate on a version floor and upgrade in place. brew-managed installs take brew upgradeself-update refuses to touch them, and dropping a second mise in ~/.local/bin would only shadow the old one inside scripts that reorder PATH. Version compare is field-wise numeric: sort -V is spotty under busybox, and string compare ranks 2026.8.10 below 2026.8.2. Both upgrade branches tested with stubs against the real 2024.12.10 string.

Startup budget

The 80ms pre-commit gate was already failing at 83ms, blocking the fix. _mise_hook was 52% of startup, but the real finding was that docs/shell-performance.md rule 1 says only mise and starship earn a sync slot — while five _eval_cached calls ran sync.

fzf keybindings, zoxide's z, and op's completion are unreachable until a prompt exists, so they now load from _deferred_tool_inits via an existing turbo plugin's atload (no null carrier clone). openclaw's 4418-line completion script is dropped entirely.

83ms → 71ms (min 66, max 80).

mise stays sync deliberately: mise --version alone is 11ms so no fork is cheap, and shims-only trades 22ms once for ~21ms per command (37ms vs 16ms for node) — bad with ls aliased to eza. A shims+turbo hybrid would just move the cost into the first prompt render: better benchmark, worse experience.

Verified under zsh/zpty that z, fzf-history-widget, _op and autosuggestions all still load. zsh -i -c exit never fires turbo, so -c cannot see this and is not a valid check.

AeroSpace

Captures ~/.aerospace.toml + installs on non-headless Macs. Swaps the cursor window rule for cmux (com.cmuxterm.app, verified from the bundle Info.plist).

⚠️ This is the repo's first tap and first cask. Everything else brew installs (tmux, vim, mise) is homebrew-core. AeroSpace isn't in homebrew-cask, so it comes from nikitabobko/tap — the upstream author's own tap, the same trust boundary as the app itself rather than a third party repackaging it. Installed fully qualified rather than via a bare brew tap, so provenance is explicit and no extra tap is left configured for unrelated formulae to resolve against.

Verification

  • Budget check passes at 71ms; all four commits cleared pre-commit (the gate is not bypassed anywhere)
  • aerospace reload-config accepted the config
  • chezmoi diff clean after apply
  • Config scanned before landing in a public repo: no secrets, hosts, or work-specific tooling

Not done

The new Mac itself is still unverified — the fix is tested here and by stub, but hasn't been run there. Merge, then chezmoi apply on that machine to confirm.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8

natevick and others added 4 commits August 7, 2026 15:18
cmux builds GhosttyKit.xcframework and ghostty pins a
minimum_zig_version, so the toolchain has to be present and pinned
rather than tracking latest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8
A fresh Mac carrying a stale `brew install mise` (2024.12.10) sailed
past the presence-only `command -v mise` check, so mise.run never ran.
cli-tools.toml uses `[settings.ruby] compile` and
`idiomatic_version_file_enable_tools`; the 2024 parser rejects the
former outright, which failed install-tools.sh and aborted the whole
apply before any CLI tool was installed.

Gate on a version floor and upgrade in place when it is not met.
brew-managed installs take `brew upgrade` — self-update refuses to
touch them, and dropping a second mise in ~/.local/bin would only
shadow the old one inside scripts that reorder PATH.

Version compare is field-wise numeric: `sort -V` is spotty under
busybox, and string compare ranks 2026.8.10 below 2026.8.2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8
Startup had drifted to 83ms against the 80ms budget, blocking commits.
docs/shell-performance.md rule 1 says only mise (tools on PATH) and
starship (prompt paints) earn a sync slot, but five _eval_cached calls
ran sync. fzf's keybindings, zoxide's `z` and op's completion are all
unreachable until a prompt exists, so they cost ~8ms before the prompt
for nothing.

Move them into _deferred_tool_inits, invoked from the atload of
zsh-autosuggestions. Piggybacking an existing turbo plugin avoids
cloning a `null` carrier on every bootstrap purely to schedule code.

Also drop the openclaw completion sourcing entirely — 4418 lines and
3.3ms sync. ~/.openclaw itself is untouched.

mise stays sync. Its hook is 22ms, but `mise --version` alone is 11ms,
so no fork of it is cheap; shims-only would trade that one-time cost for
~21ms on every tool invocation (37ms vs 16ms for node), which is a bad
deal with ls aliased to eza. A shims+turbo hybrid would only move the
cost into the first prompt render — better benchmark, worse experience.

83ms -> 71ms median (min 66, max 80). Verified under zsh/zpty that z,
fzf-history-widget, _op and autosuggestions all still load; `zsh -i -c
exit` never fires turbo, so -c cannot see this and is not a valid check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8
Captures ~/.aerospace.toml and installs AeroSpace on non-headless Macs,
gated the same way as use-spark since a tiling WM is useless without a
GUI. Swaps the cursor window rule for cmux (com.cmuxterm.app, verified
from the bundle Info.plist) on workspace 1.

This is the repo's first Homebrew tap and first cask — everything else
brew installs (tmux, vim, mise) is homebrew-core, whose bottles carry
checksums brew verifies. AeroSpace is not in homebrew-cask, so it comes
from nikitabobko/tap, the upstream author's own tap for
github.com/nikitabobko/AeroSpace: the same trust boundary as the app
itself rather than a third party repackaging it. Installed fully
qualified instead of via a bare `brew tap`, so provenance is explicit at
the call site and no extra tap is left configured for unrelated formulae
to resolve against. Documented in the README for the same reason.

Never fails the apply, matching install-system-packages.sh.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8
@natevick
natevick merged commit 9bb9dcb into main Aug 7, 2026
3 checks passed
@natevick
natevick deleted the feat/new-machine-setup branch August 7, 2026 22:31
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