Reproducibility

13 min read · docs/reproducibility.md · View source on GitHub ↗

Goals#

This repo should let you make a fresh Linux, Windows, or macOS machine converge on the same terminal experience with minimal manual edits.

Platform Support Matrix#

“Tested” means the lifecycle and relevant native-script checks run in GitHub Actions. “Best effort” means the configuration is designed to work but is not exercised by the complete CI lifecycle. “Unsupported” means no compatibility guarantee is made.

Operating system / shell / architecture Level Validation and limits
Ubuntu GitHub runner, Bash, runner-native architecture Tested Full Python suite, Bash syntax/ShellCheck, dry-run smoke test, and isolated lifecycle.
macOS GitHub runner, Bash, runner-native architecture Tested Bash syntax/ShellCheck, dry-run smoke test, and isolated lifecycle; GUI desktop startup is not exercised.
Windows GitHub runner, PowerShell 7, x64 Tested PowerShell parsing, dry-run smoke test, structured files, and isolated lifecycle.
Zsh interactive configuration on Linux/macOS Best effort Generated completion syntax is tested when Zsh is available; terminal and plugin behavior depends on installed tools.
Linux ARM64, macOS ARM64 outside the hosted runner, and WSL Best effort Shared config is portable, but every release artifact and desktop integration is not covered. Preview with oooconf plan.
Other Unix variants, 32-bit systems, Windows PowerShell 5.1, and unlisted shells Unsupported Add local overrides or a tested platform implementation before relying on setup automation.

The runner labels are the durable promise; hosted-runner images and hardware can change. CI workflow files are authoritative for the currently exercised images and Python versions.

Managed links are symbolic links on every platform, so a Windows profile needs SeCreateSymbolicLinkPrivilege: enable Developer Mode (Settings → System → For developers) or run oooconf install / oooconf link from an elevated PowerShell. Hosted runners are elevated, so CI cannot detect a non-elevated profile; the link transaction probes for symlink support before mutating anything and reports the privilege requirement instead of a generic failure.

Design#

Tracked files:

  • base shell config
  • base WezTerm config
  • base Noctty config (Windows)
  • base LazyVim/Neovim config
  • PowerShell profile
  • Python uv environment metadata (pyproject.toml, .python-version, tracked uv.lock; .venv/ is an ignored local artifact)
  • prompt config
  • shared environment files
  • shared SSH host definitions
  • install scripts and sourced/dot-sourced setup/CLI helper modules under scripts/setup/lib/

Ignored files:

  • API tokens
  • SSH private keys
  • host-specific shell paths
  • machine-only WezTerm domains
  • runtime shell artifacts such as history and completion dumps

Dependency policy#

zsh dependencies and other third-party utilities are intentionally not committed into the repo.

See dependency-decisions.md for the full list of automated, optional, and manual dependencies and how they are installed per platform. See deps.lock.json for the exact pinned git revisions used by the setup scripts.

Taskwarrior uses Homebrew's task formula on Linux and macOS to avoid outdated Linux apt packages. Homebrew must be installed first (oooconf deps brew); its formula version follows Homebrew rather than a repository pin.

Git Bash zsh on Windows (pinned MSYS2 package)#

Windows does not ship zsh, and Git for Windows intentionally does not bundle it. To give Git Bash the same managed zsh stack as Linux/macOS, the zsh dependency uses the gitbash-zsh manager on Windows:

  • The pinned zsh-<ver>-x86_64.pkg.tar.zst package is downloaded over HTTPS from repo.msys2.org, verified against the SHA-256 pinned in scripts/optional-deps.toml, and guard-extracted into a staging directory under ~/.local/share/ooodnakov-config/tools/zsh-gitbash/.
  • The staged usr/ and etc/ trees are merged into the detected Git for Windows installation root. When that directory is not user-writable (the default C:\Program Files\Git), a single elevated copy step is spawned via UAC; the elevated step only copies already-verified plain files — no network and no archive handling runs elevated.
  • The package's internal symlinks are materialized as file copies during extraction, which is what MSYS packages need on NTFS.
  • Git for Windows upgrades replace the MSYS2 runtime but leave the extracted zsh files untouched; re-run oooconf deps zsh after a Git for Windows upgrade to re-verify the pairing (the pin is re-checked and files re-merged idempotently).
  • Git Bash start: managed ~/.bashrc + ~/.bash_profile (Windows-only links) exec zsh -l for interactive sessions when /usr/bin/zsh exists. OOODNAKOV_GITBASH_ZSH=0 opts out (including per invocation: OOODNAKOV_GITBASH_ZSH=0 bash).
  • Fonts: Windows setup installs the bundled fonts/meslo/ TTFs per-user (%LOCALAPPDATA%\Microsoft\Windows\Fonts + HKCU registry entries, no elevation, followed by a WM_FONTCHANGE broadcast), mirroring the Unix install_fonts step. A managed Windows-only ~/.minttyrc pins mintty's Font=MesloLGSDZ Nerd Font Mono so plain Git Bash windows render Nerd Font icons. install --dry-run only reports this step; it does not copy files, update the registry, or send font-change notifications.

This keeps the repo small while still making bootstrap deterministic. The refactored setup entrypoints keep dependency metadata centralized in scripts/optional-deps.toml; the extracted helper modules only organize implementation details and do not introduce new dependency lists or machine-local state.

Shell runtime state is kept outside the tracked config tree:

  • zsh history: ~/.local/state/ooodnakov-config/zsh/history
  • zsh completion dump: ~/.cache/ooodnakov-config/zsh/.zcompdump-<host>-<zsh-version>

OMP follows the same separation: only home/.omp/agent/config.yml, the themes/, skills/, and vibes/ directories beside it, home/.omp/extensions/rtk.ts, and the MCP base file (home/.omp/agent/mcp.json linked as ~/.omp/agent/.mcp.json) are managed. The parent ~/.omp and ~/.omp/agent remain real local directories, and the primary ~/.omp/agent/mcp.json stays machine-local so per-host servers never enter the repository. Authentication databases, history, sessions, credentials, caches, plugins, and daemon state also stay outside the repository. The empty managed content directories contain .gitkeep placeholders until custom content is added. Older whole-directory links require the one-time migration before linking.

SSH policy#

The tracked SSH file is an include fragment, not a full private SSH directory. It is safe to version because it contains host aliases only.

Keys remain in:

  • ~/.ssh/id_*
  • %USERPROFILE%\.ssh\id_*

Local-only additions can go into:

  • ~/.ssh/config.local

Machine overrides#

Use local override files for anything that changes by host:

  • shell environment variables
  • secrets
  • env (machine-local values only; optional Bitwarden upload)
  • internal hostnames or IPs you do not want tracked
  • WezTerm launch commands tied to one machine
  • OS package manager tweaks

The machine-local default capability profile belongs in ~/.config/ooodnakov/local/profile.toml. It contains only a built-in profile name and is ignored by git. Tracked profile definitions select portable capabilities; platform-inapplicable capabilities are reported as skipped, and dependency lists are recommendations that do not bypass the existing install-consent flow. See docs/profiles.md for precedence and examples.

Manual prerequisites#

The bootstrap scripts intentionally do not install every package manager package for you. See the Prerequisites table in the README for the required bare-metal tools per platform.

Fonts are also manual for now. The tracked defaults assume a Nerd Font is installed, with MesloLGSDZ Nerd Font Mono preferred. This repo bundles the Meslo font files under fonts/meslo; the Unix setup script installs them for the current user.

For Neovim, setup installs the pinned official GitHub release archive into the repo-managed data tree rather than relying on an OS package, so the managed nvim (validated >= 0.10.0 for LazyVim) shadows any system binary on PATH and is adopted into bin tracking for Topgrade-driven updates. For Node.js, setup installs the pinned official nodejs.org archive into the repo-managed data tree (~/.local/share/ooodnakov-config/tools/node/v<ver>), verifies its SHA-256 before extraction, and links node, npm, npx, and corepack into the managed bin directory. Windows setup uses winget instead. For pnpm, the tracked shell environment reserves PNPM_HOME; setup first ensures Node.js/npm are available, then installs the pinned pnpm version through corepack when available or through npm into that path otherwise.

Global npm and pnpm installs use separate, runtime-independent directories, so switching Node.js runtimes (a version manager, the pnpm runtime, or a distro package) never orphans or overwrites global CLI tools:

Tool Global bin dir Global root Env
pnpm ~/.local/share/pnpm (PNPM_HOME) ~/.local/share/pnpm/global PNPM_HOME, set by home/.config/ooodnakov/env/common.{sh,ps1}
npm ~/.npm-global/bin ~/.npm-global/lib/node_modules NPM_CONFIG_PREFIX, set by the same files

npm derives its global prefix from the node binary that launched it, so an unset prefix sends npm install -g into whichever runtime is active — the version-manager directory, the pnpm runtime tree, or a root-owned /usr. The tracked NPM_CONFIG_PREFIX prevents that; npm keeps its download cache in ~/.npm regardless. When the same CLI exists in both places, PNPM_HOME precedes the npm prefix on PATH, so the pnpm-managed copy wins; install a given global tool through one manager only.

Bootstrap trust model#

Do not pipe the Unix bootstrap directly into a shell. Download it to a temporary file, inspect it, and execute that reviewed file. For a release archive, download the accompanying SHA256SUMS file and verify it before extraction, for example with sha256sum --check SHA256SUMS from the directory containing the archives.

Direct dependency archives are pinned by version and SHA-256 in scripts/optional-deps.toml. The shared secure extractor rejects absolute paths, parent traversal, devices, and archive links. Upstreams offering only mutable installer scripts are explicit checksum exceptions in deps.lock.json and docs/dependency-lock.md; those scripts are downloaded before execution and package-manager routes remain preferred.

For a new machine or any time you want to inspect changes first, prefer:

  1. clone the repo
  2. review bootstrap.sh, scripts/setup/setup.sh, and the tracked config under home/
  3. run the repo-local oooconf entrypoint directly

That keeps the initial setup auditable while preserving the same install behavior.

Unified CLI and validation#

The primary entrypoints are:

  • repo-local ./home/.config/ooodnakov/bin/oooconf before first install on Unix
  • oooconf (and alias o) after Unix setup links them into ~/.local/bin/oooconf and ~/.local/bin/o
  • .\home\.config\ooodnakov\bin\oooconf.ps1 before Windows setup
  • oooconf (and alias o) after Windows setup links oooconf.ps1/oooconf.cmd and o.ps1/o.cmd into ~/.local/bin

On Windows, setup also links the tracked PowerShell profile into both ~/.config/powershell/Microsoft.PowerShell_profile.ps1 and the active $PROFILE.CurrentUserCurrentHost path so the managed XDG-style file and the loaded profile stay aligned.

Phase-1 setup ergonomics are implemented with:

  • dry-run command to preview setup actions without mutation
  • doctor command to validate managed links and key tool presence after install; on Linux it reports missing zsh/docker as errors and missing members of the minimal Linux toolset (from [linux] in scripts/optional-deps.toml) as hints with the exact oooconf deps <keys> repair command
  • deps command to install optional dependencies separately from the full config-linking flow
  • bootstrap.sh minimal performs a sparse checkout and links the minimal shell profile; bootstrap.sh --min-dep installs only the [minimal] dependency set. Both flags are independent and combinable, so a one-command new-machine setup is: f=$(mktemp "${TMPDIR:-/tmp}/ooodnakov-bootstrap.XXXXXX") && curl -fsSLo "$f" https://raw.githubusercontent.com/ooodnakov/ooodnakov-config/main/bootstrap.sh && bash "$f" minimal --min-dep; rm -f "$f"
  • oooconf deps worktrunk optionally installs Worktrunk via Homebrew on Linux/macOS or winget on Windows; managed shell profiles conditionally enable worktree switching (wt in Zsh, git-wt on Windows PowerShell).
  • completions command to regenerate completion files (autogen zsh + oooconf command completions + the PowerShell tool-completion cache, Windows hosts only)
  • doctor --format json and status --format json for a stable, secret-free inventory contract with explicit health-check exit semantics
  • snapshot export|inspect|apply for portable profile and allowlisted preference transfer; snapshots intentionally contain no arbitrary environment values, credentials, machine paths, histories, logs, or caches

Phase-2 dependency audit ergonomics are implemented with:

  • oooconf lock (or .\home\.config\ooodnakov\bin\oooconf.ps1 lock) to regenerate lock artifacts from pinned refs
  • oooconf update-pins to compare pinned refs with remote HEAD and append an audit summary
  • oooconf update-pins --apply to update pinned refs in scripts/optional-deps.toml, then regenerate lock artifacts
  • oooconf agents detect to detect configured AI coding agent CLIs available on PATH
  • oooconf agents sync to write managed policy and MCP/skill markers into every configured global agent config; --agents/--select narrow the targets and --check exits non-zero when any target is stale
  • oooconf agents doctor to verify managed blocks and check common MCP/skills markers in default agent config paths
  • oooconf agents install [<agent> ...] [--all|--missing] [--check|--dry-run] to install missing, selected, or all configured agent CLIs through their preferred package managers
  • oooconf agents update to update installed agent CLIs; pnpm-preferred agents are updated through pnpm with an npm fallback, and configured post-install steps are rerun
  • oooconf agents provider sync minimax [--agents ...|--select] to configure MiniMax-M2.7 provider backends for Claude Code, OpenCode, and Codex CLI without committing API keys
  • oooconf agents doctor --strict-config-paths to fail when expected agent default config files are missing
  • oooconf agents sync keeps {env_var}/$env_var MCP placeholders verbatim unless --materialize-secrets is passed; secret-free configs are the default
  • MiniMax provider sync uses MINIMAX_API_KEY from machine-local environment for Codex/OpenCode; Claude Code also needs ANTHROPIC_AUTH_TOKEN exported to the MiniMax key unless --materialize-secrets is used, which should be avoided in tracked or shared files
  • update-pins workflows are implemented in Python so both Unix and PowerShell CLIs use the same logic. Helper scripts use uv run if uv is available to ensure they run with the pinned Python version and a consistent environment. If uv is not present, they fall back to the system python3.
  • autogen third-party zsh completion specs are sourced from scripts/generate/tool-completions.toml and generated by scripts/generate/generate_tool_completions.py for both Bash and PowerShell setup flows.
  • oooconf command completions are generated from the canonical recursive CLI spec (scripts/cli/oooconf-cli-spec.toml), tracked command list, and optional dependency catalog by scripts/cli/generate_oooconf_completions.py. Shared completion definitions, such as dependency keys and provider regions, are referenced by name from command nodes instead of hardcoded in shell-specific generators.

The root justfile exposes repeatable developer automation without replacing the underlying commands: just check runs Ruff, structured-file validation, and pytest on every platform; just integration runs the isolated lifecycle, just coverage enforces the current floor, and just unix adds Bash syntax and smoke checks on Unix. just completions and just lock regenerate tracked artifacts. Install the optional task runner with oooconf deps just.

Transactional journals and their backup files are deliberately outside the tracked repository and are not automatically expired. Retain a completed journal for as long as rollback may be needed, then follow the guarded cleanup procedure in Troubleshooting.

Phase-3 ergonomics#

  • oooconf command (plus alias o) is linked by Unix setup so the unified CLI can be invoked from any directory.
  • oooconf deps uses gum choose --no-limit when available to provide a terminal multi-select picker for optional dependencies, and it can bootstrap gum first when interactive package installation is allowed. In the current picker, use arrow keys to move, x to toggle items, and Enter to continue.
  • marcosnils/bin is the primary installer and tracker for GitHub release binaries, while Topgrade is the primary upgrade orchestrator. oooconf deps --latest <key...> installs missing selections and then runs Topgrade with bounded retries; Topgrade's native bin step executes bin update. The managers themselves are bootstrapped from catalog pins (or native Windows/macOS package managers), and both are included in the minimal/install flow.
  • GitHub release installs pass the expanded catalog asset to bin install --name, so pinned installs do not prompt between variants such as GNU and musl.
  • After dependency installation on Unix and PowerShell, scripts/security/bin_track.py scans catalog GitHub release tools in ~/.local/bin and the managed data tree, including tools not selected in that run and managed binaries missing from PATH. oooconf deps bin therefore adopts earlier direct downloads such as bw, rtk, and croc. Adoption reads the executable's installed version (skipping unknown versions), preserves existing records, and previews changes under --dry-run. Resolved paths outside these install roots, including symlinks to system/package-manager binaries, are excluded. Invalid tracking JSON is reported and preserved.
  • Topgrade runs in the foreground rather than under the setup spinner. On Unix, interactive runs attach directly to the controlling terminal so child tools retain terminal input/output; that output is not captured in the setup log. Noninteractive runs stream output through normal setup logging. Latest mode forwards GITHUB_AUTH_TOKEN (falling back to GITHUB_TOKEN), disables Topgrade self-update, retries failed steps twice, and reports remaining step failures as warnings unless OOODNAKOV_DEPS_LATEST_STRICT=1 is set.
  • Unix and PowerShell setup runs write per-run logs under ~/.local/state/ooodnakov-config/logs/, with setup-latest.log copied or linked to the latest run for debugging.
  • PowerShell shared environment exports OOODNAKOV_CONFIG_HOME, OOODNAKOV_SHARE_HOME, OOODNAKOV_STATE_HOME, and OOODNAKOV_CACHE_HOME, and prepends both ~/.local/bin and ~/.local/share/ooodnakov-config/bin when present.
  • Unix setup and doctor cover the configured custom Zsh plugins, including pinned zsh-fzf-unified (single fzf integration: Ctrl-R history, vendored fzf-tab, Ctrl-T) and FFKL/s3cmd-zsh-plugin (installed as custom/plugins/s3cmd to match its entrypoint). zsh-autocomplete is sourced before OMZ initializes completion so plugin compdef registrations survive warm-cache startup; syntax highlighting is the last OMZ plugin.
  • WezTerm startup supports OOODNAKOV_WEZTERM_WORKSPACE and OOODNAKOV_WEZTERM_CWD for project-scoped startup defaults without editing tracked config. The managed plugin layer is declared in home/.config/wezterm/config/plugins.lua; WezTerm clones those HTTPS plugins into its runtime plugin cache on first launch, while repo-local tab/status rendering stays tracked under home/.config/wezterm/events/ for deterministic cross-platform behavior. AI Commander is configured without tracked secrets and reads provider credentials from ANTHROPIC_API_KEY and OPENAI_API_KEY; WEZTERM_AI_COMMANDER_RENDERER can override the ask-pane renderer, otherwise WezTerm uses streamdown when available and falls back to cat.