π fix: cross-platform portability groundwork (Phase 0) - #10
Merged
Conversation
The update alias asked for the password twice: brew/npm/uv run long enough between `sudo softwareupdate` and the trailing `sudo gem` steps that the 5-minute sudo timestamp expires. Now an update() function in .functions authenticates upfront and refreshes the timestamp every 60s in the background (same pattern as ~/.macos), with an EXIT trap killing the loop even on Ctrl-C. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
It hard-coded /opt/homebrew/bin/pinentry-mac (Apple Silicon macOS only, breaks when deployed to Linux) and is vestigial anyway β commit signing here is SSH-format via 1Password with no GPG keypair. The deployed ~/.gnupg/gpg-agent.conf stays; it is just no longer managed by the repo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tracked .gitconfig enabled signing globally, so every fresh machine without the 1Password signer failed all commits until manually disabled. Signing now lives entirely in machine-local config alongside the rest of the signing setup (gpg.format, op-ssh-sign path, signingkey); fresh boxes default to unsigned commits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- The rsync exclude still said ".osx" (renamed upstream to .macos years ago), so the mac-only defaults script was landing in every $HOME. - git pull now uses --ff-only and tolerates being offline or on a diverged clone instead of erroring mid-bootstrap. - ~/.zshrc is zsh-only syntax but was sourced unconditionally from this bash script; now only sourced when running under zsh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
842 lines of AppleScript targeting the iTunes app, which no longer exists on modern macOS (replaced by Music) and never existed on Linux. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
.extra.tmpl and CLAUDE.md both claimed bootstrap.sh renders the secrets template, but no such call existed β a fresh machine silently ended up with no ~/.extra. Bootstrap now renders it when the op CLI is present and ~/.extra doesn't exist yet, and the "Next steps" output documents the manual command for every other case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
update() ran softwareupdate and brew unconditionally, failing on Linux; both are now guarded. pbcopy/pbpaste get xclip/xsel fallbacks and open gets xdg-open, following the existing command -v fallback style, so the clip alias and open-dependent functions work off-mac. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI ran on ubuntu but never parsed or sourced the zsh layer, so Linux breakage in .aliases/.functions was invisible. New shell.bats parses every shell file and smoke-sources the zsh layer, failing on parse errors, missing commands, or missing files at source time. bootstrap tests now stub op (so runs never touch 1Password) and assert .macos stays out of $HOME. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rocky runs in a rockylinux:9 container (no hosted Rocky runners exist) with bats-core installed from source. WSL runs real Ubuntu-24.04 under Vampire/setup-wsl on a windows-2025 runner; core.autocrlf is forced off before checkout because .gitattributes has line-ending normalization deliberately disabled and Windows runners default to autocrlf=true. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI runners are ephemeral VMs, so mutating system preferences there is free β .macos now actually runs in the macOS job and a sample of settings is asserted via defaults read, instead of only grepping the script text. Double-guarded (Darwin + MACOS_APPLY_OK=1) so a plain `bats tests` on a real Mac always skips it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Phase 0 of the cross-platform dotfiles plan (macOS + Linux + WSL + ephemeral remotes): fixes the portability bugs a file-by-file audit found, before any structural migration. Each concern is its own commit.
.gnupg/gpg-agent.confβ hard-coded/opt/homebrew/bin/pinentry-mac(breaks on Linux) and is vestigial: signing here is SSH-format via 1Password, no GPG keypair.commit.gpgsign = trueto~/.gitconfig.localβ fresh boxes without the 1Password signer previously failed every commit; signing is now a per-machine opt-in beside the rest of the signing config.bootstrap.shβ stale.osxexclude renamed to.macos(the 763-line mac-only script was landing in every$HOME),git pull --ff-onlywith offline fallback, and~/.zshrconly sourced when actually running zsh.bin/itunesβ 842 lines of AppleScript for an app that no longer exists.op injectβ.extra.tmpland CLAUDE.md claimed bootstrap renders~/.extra; now it does (guarded onoppresent and~/.extramissing).update()no longer runssoftwareupdate/brew unconditionally;pbcopy/pbpaste/opengetxclip/xsel/xdg-openfallbacks in the existingcommand -vstyle.tests/shell.batsparses and smoke-sources the zsh layer on both CI platforms; bootstrap tests stubopand assert.macosstays out of$HOME.Test plan
bats testsβ 9/9 green locallyGood "git" signature)π€ Generated with Claude Code