Skip to content

Recurring drift between chezmoi-managed configs and top-level reference mirrors (4th occurrence) #140

Description

@stanfish06

Weekly repo review – 2026-W30 (last 3 days of activity)

Reviewed commits/PRs since 5f21483 (2026-07-17) through 13bfe64 (2026-07-19, merge of #137), plus open issues.

Info leaks

None new. 6f8e6ab ("update") only added clipboard-read/clipboard-write to home-chezmoi/dot_config/ghostty/config — no secrets. The one live leak in scope (ssh/config personal nixos-* hostnames, #135) already has a fix in #139; I added Closes #135 to that PR body so it auto-closes on merge.

Compatibility / process issue

This is the 4th time the same drift pattern has hit this repo:

# Date File(s) Root commit
#74 2026-05-20 tmux/linux/.tmux.conf ↔ home-chezmoi/dot_tmux.conf.tmpl various May 18-19 commits
#132 2026-07-17 ghostty/config, tmux/linux/.tmux.conf ↔ chezmoi mirrors b57f6dd
#136 2026-07-19 ghostty/config ↔ chezmoi mirror 6f8e6ab

Each time, someone edits the chezmoi-managed source under home-chezmoi/ (the one actually deployed, per .chezmoiroot) and forgets the top-level "reference mirror" copy (ghostty/config, tmux/linux/.tmux.conf), because nothing enforces or even documents that these must stay in sync. Every occurrence has required its own review cycle + fix PR (#131, #133, #137) — pure overhead for a problem that's structural, not a one-off mistake.

Suggested fix (pick one — no code changes made here, this needs an owner decision)

  1. Drop the mirrors. If nothing actually consumes ghostty/config / tmux/linux/.tmux.conf directly (outside of chezmoi), delete them and point anyone looking for "the real config" at home-chezmoi/. Simplest, zero drift risk.
  2. Generate them. Replace the mirrors with a symlink or a small script (chezmoi cat / template render) run in CI or a pre-commit hook, so they're always derived from the chezmoi source instead of hand-edited copies.
  3. Add a CI parity check. A workflow step that fails a PR if home-chezmoi/dot_config/ghostty/config and ghostty/config diverge (and similarly for tmux, accounting for the intentionally-templated "machine specific" block in dot_tmux.conf.tmpl that has no equivalent in the static mirror). Keeps both files but forces sync at merge time.

Given the tmux file has a real templated section that should differ from its mirror (see {{- if (and (eq .chezmoi.hostname ...) }} block), option 3 needs care to avoid false positives — happy to implement whichever option you prefer in a follow-up PR.

Improvement opportunities

None new this cycle beyond the above.

Everything else reviewed, no action needed

Activity

  1. stanfish06 commented on Aug 10, 2026

    @stanfish06
    OwnerAuthor

    5th occurrence

    # Date File(s) Root commit
    #74 2026-05-20 tmux/linux/.tmux.conf ↔ home-chezmoi/dot_tmux.conf.tmpl various May 18-19 commits
    #132 2026-07-17 ghostty/config, tmux/linux/.tmux.conf ↔ chezmoi mirrors b57f6dd
    #136 2026-07-19 ghostty/config ↔ chezmoi mirror 6f8e6ab
    #144 2026-08-03 tmux/linux/.tmux.conf had pane-border-status, chezmoi template didn't (opposite direction) a4bed70/12d3926
    new 2026-08-09 ghostty/config ↔ home-chezmoi/dot_config/ghostty/config 901592a

    Direct commit 901592a ("tmux") added macos-option-as-alt = true and changed two keybind lines in home-chezmoi/dot_config/ghostty/config without touching the top-level mirror ghostty/config. Opened #146 to sync it (mechanical, low-risk).

    Checked tmux/linux/.tmux.conf against home-chezmoi/dot_tmux.conf.tmpl too since the same commit touched the tmux template — no sync needed there this time, both now agree functionally (the pane-border-status/amux block from #144 landed directly on home-chezmoi/dot_tmux.conf.tmpl in 901592a, matching what the mirror already had).

    This is now 5 occurrences across ~3 months, always caught after the fact by a review cycle. Given the pattern keeps recurring at a steady cadence, option 3 from the original writeup (CI parity check between each mirror pair, skipping the intentionally-templated "machine specific" tmux block) seems like the best cost/risk tradeoff — it would catch this class of drift at PR time instead of days later, without deleting files that may still be referenced elsewhere. Not implementing it in this pass since it's a policy/architecture call, not a mechanical fix — happy to build it in a follow-up if you want to green-light option 3 (or one of the others).


    Generated by Claude Code

  2. stanfish06 commented on Sep 14, 2026

    @stanfish06
    OwnerAuthor

    Weekly review — 2026-09-14 (activity since ~2026-09-08)

    Reviewed the commits from the last week (bbe3129…f8b8488) plus all open PRs/issues. Nothing new to report on info leaks or improvement opportunities, but this recurring-drift issue has new evidence:

    5th occurrence: ghostty mirror drifted again, after PR #146 was opened

    Commit 5cb170b (2026-09-11, "update") changed font-family in home-chezmoi/dot_config/ghostty/config from Iosevka to Berkeley Mono. That's after PR #146 was opened (2026-08-10) to fix the macos-option-as-alt / keybind drift, so #146 is now stale — merging it as-is will still leave ghostty/config (top-level mirror) pointing at the old Iosevka font while the deployed chezmoi source uses Berkeley Mono. Left a comment on #146 with the specific diff needed.

    New: tmux mirror has also diverged further

    tmux/linux/.tmux.conf vs home-chezmoi/dot_tmux.conf.tmpl now disagree on more than just the machine-specific block that's expected to differ:

    • Mirror (tmux/linux/.tmux.conf) still has set -g @plugin 'sainnhe/tmux-fzf', which is no longer in the chezmoi template.
    • Both have the amux pane-border-status integration, but it lives in different positions and the chezmoi template's version is the one that's actually deployed/current.
    • Minor comment-wording drift ("Run codex code in a pop-up window" vs "Run codex in a pop-up window").

    This one is harder to auto-fix confidently because of the real templated {{- if (and (eq .chezmoi.hostname ...) }} block that's supposed to only exist in the .tmpl file, so I didn't open a PR for it — flagging here so it doesn't get lost, and because it reinforces the case for one of the structural fixes already proposed in this issue (drop the mirrors / generate them / CI parity check) rather than another one-off manual sync.

    No other findings this cycle — recent commits were just font/editor tweaks (wezterm font family, mise/config.toml adding pnpm) and new wallpaper/avatar images consistent with the existing img/ collection. Open PRs #134, #139, #142 reviewed, no new concerns beyond what's already tracked.


    Generated by Claude Code

  3. stanfish06 commented on Oct 11, 2026

    @stanfish06
    OwnerAuthor

    Resolved: 7398c37 symlinked the chezmoi sources for ghostty, mise, starship, yazi, gitconfig and vimrc to the top-level copies; 4545c36 synced tmux/linux/.tmux.conf with the linux render of dot_tmux.conf.tmpl. The ssh pair is tracked in #147/#148.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions