fix: unblock new-machine installs (mise floor, startup budget, AeroSpace) - #18
Merged
Conversation
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
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.
A fresh Mac failed
chezmoi applyoutright. Root cause, fix, and the work it unblocked.The bug
install-tools.shdied with a TOML parse error, aborting the whole apply before any CLI tool installed:The machine had a stale
brew install mise— 2024.12.10, ~20 months old. The bootstrap only checked presence:so
mise.runnever 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 upgrade—self-updaterefuses to touch them, and dropping a second mise in~/.local/binwould only shadow the old one inside scripts that reorder PATH. Version compare is field-wise numeric:sort -Vis spotty under busybox, and string compare ranks2026.8.10below2026.8.2. Both upgrade branches tested with stubs against the real2024.12.10string.Startup budget
The 80ms pre-commit gate was already failing at 83ms, blocking the fix.
_mise_hookwas 52% of startup, but the real finding was thatdocs/shell-performance.mdrule 1 says only mise and starship earn a sync slot — while five_eval_cachedcalls ran sync.fzf keybindings, zoxide's
z, and op's completion are unreachable until a prompt exists, so they now load from_deferred_tool_initsvia an existing turbo plugin'satload(nonullcarrier clone). openclaw's 4418-line completion script is dropped entirely.83ms → 71ms (min 66, max 80).
mise stays sync deliberately:
mise --versionalone is 11ms so no fork is cheap, and shims-only trades 22ms once for ~21ms per command (37ms vs 16ms for node) — bad withlsaliased to eza. A shims+turbo hybrid would just move the cost into the first prompt render: better benchmark, worse experience.Verified under
zsh/zptythatz,fzf-history-widget,_opand autosuggestions all still load.zsh -i -c exitnever fires turbo, so-ccannot see this and is not a valid check.AeroSpace
Captures
~/.aerospace.toml+ installs on non-headless Macs. Swaps thecursorwindow rule for cmux (com.cmuxterm.app, verified from the bundle Info.plist).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 barebrew tap, so provenance is explicit and no extra tap is left configured for unrelated formulae to resolve against.Verification
aerospace reload-configaccepted the configchezmoi diffclean after applyNot 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 applyon that machine to confirm.🤖 Generated with Claude Code
https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8