fix(watcher): absorb MM rows + S-64 DoD wrap#99
Merged
Conversation
Original `dotfiles-watcher-tick` matched drift with `awk '/^ M /'` (destination-only modified). On the Mac mini, the live edit produced `MM .tool-versions` in `chezmoi status` because chezmoi flagged both sides as changed, and the watcher exited silently. Widened the regex to `awk '/^.M /'` so any "destination modified" row — ` M `, `MM `, or `AM ` — absorbs. Added test case 3.5 (`absorb_MM_status`) to the spec test matrix; full suite is 10/10 on Mac mini. Other wrap-up items shipped in the same commit: - S-64 frontmatter flipped to `status: done`; DoD checklist ticked with the Mac mini end-to-end demo result. - New "Known issues" section in the spec for the two operational quirks surfaced during deploy: `.claude/settings.json` MM that never clears (`modify_` script overrides re-add) and the launchd-runs-vs-log-lines mismatch when manual ticks hold the mkdir lock during a launchd-triggered firing. - `docs/tasks.md`: S-64 moved from "Next up" to "Completed (post v0.1.0)" with the full deploy-time context. - `docs/sync-log.md`: hostname-tagged entry for the Mac mini deploy, noting the regex fix and the artifacts absorbed. - `home/dot_gitignore`: `.claude/worktrees/` lines re-added (live drift absorbed by `chezmoi re-add` during the deploy session; not introduced by this commit). Co-Authored-By: Claude Opus 4.7 (1M context) <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
dotfiles-watcher-tickregex^ Monly caught destination-only-modified rows inchezmoi status. Real-worldMMrows (both source and destination flagged) were silently ignored, so the live edit during the Mac mini deploy never fired the absorb. Widened to^.Mso any "destination modified" row absorbs.absorb_MM_statusagainst a fakechezmoi statusemittingMM .tool-versions. Full suite now 10/10 on Mac mini.status: done, DoD checklist ticked, new "Known issues" section documents two operational quirks surfaced during deploy.docs/tasks.mdrow moved from "Next up" to "Completed (post v0.1.0)".docs/sync-log.mdgets a hostname-tagged entry for the Mac mini deploy.home/dot_gitignore.claude/worktrees/lines re-added during the deploy session (pre-existing drift, not new content).Test plan
bash tests/dotfiles-watch.sh— 10/10 pass (was 9/9, +1 new MM case).~/.tool-versions, watcher tick wroteTICK start++ .tool-versions+TICK done (passes=3)to~/Library/Logs/dotfiles-watcher.log;git diff home/dot_tool-versionsshowed the line absorbed; sed-revert fired another tick that returned source to HEAD.com.truonghan.dotfiles-watcher(state=idle),com.truonghan.dotfiles-watcher-fswatch(state=running, pid 5578).Known issues documented in spec
.claude/settings.jsonisMMbecause amodify_script renders it;chezmoi re-addsucceeds but doesn't change source, so each tick logs an absorb attempt that's a no-op.DRIFT_LOOP_MAX=3caps the loop.launchctl printreportsruns = Noutpacing the log line count when a manual tick is holding themkdirlock during a launchd-triggered firing. The lock collapses bursts correctly; the only observable effect is the runs counter.🤖 Generated with Claude Code