Repository navigation
feat(gs): sync pulls the dotfiles clone and installs 10-core.fish - #77
Conversation
Hosts kept hand-edited copies of 10-core.fish and the Mac's Home Manager link went stale for weeks. gs sync now fast-forwards a clean dotfiles clone on main, then links 10-core.fish to it (backing up a host copy to .pre-gs) or runs home-manager switch when Home Manager owns the file. Dirty clones, other branches and missing clones are skipped with a status line. Refs #69
Fleet review (glm)Lens: requirements + adversarial. The diff matches the behavior described in the PR body: skip paths (GS_SKIP_DOTFILES, missing clone, dirty tree, non-main branch), pull --ff-only with FAILED line and early return, restart hint "dotfiles (a -> b)", Home Manager switch vs symlink with .pre-gs backup, and it never fails the sync (every path returns 0; only pull failure prints FAILED). It references #69 without closing it, and the issue's numbered proposals (1-5) are not claimed by this PR, so no acceptance-criterion contradiction. Tests cover all stated paths. Two non-blocking observations: untracked files count as "local changes" and GS_HM_STORE_PREFIX is undocumented in the example configs. Suggestion (1)
Question (1)
Verdict: ready to merge |
Post-merge QA (glm)New dotfiles step in gs sync (issue #69 scope item): pulls the clone only when clean and on main, installs 10-core.fish via symlink with a byte-preserving backup, or home-manager switch when the target links into the Nix store. Every failure path is a status line (never fails the sync), the skip env vars are documented in both example files, and the test suite covers skip/no-clone/pull+hint/backup+link/no-op/dirty/branch/HM-switch including GS_HM_CONFIG. Conservative choices verified: dirty or non-main clones are left untouched, a failed pull never relinks, and an existing pre-gs backup gets a timestamped name. No defects found. No findings. Verdict: clean |
Post-merge QA (deepseek)Lens: evidence + test design. The new One defect and two evidence gaps. Blocking (1)
Suggestion (2)
Verdict: blocking |
Hosts kept hand-edited copies of
10-core.fish, and the Mac's Home Manager link was stale since 2026-10-08.New
dotfilesstep ings sync(aftergentle-ai sync):$CORTEX_DOTFILES_DIR(default~/dev/barbatdev/cortex/cortex-dotfiles); missing → skip linemain→ skip line, clone untouchedgit pull --ff-only; a moved HEAD addsdotfiles (a -> b)to the restart hint10-core.fish: Home Manager link →home-manager switch --flake <clone>#<cfg> -b pre-gs(GS_HM_CONFIG, defaultjbarbat/jbarbat-linux); otherwise symlink to the clone, host copy backed up to.pre-gsGS_SKIP_DOTFILES=1skips it; never fails the syncTests:
scripts/test-gs-sync.shwith a real local clone + bare origin (skip, no clone, pull + hint, backup + link, no-op rerun, dirty/branch untouched, Home Manager switch +GS_HM_CONFIG). shellcheck clean.Refs #69