From 153be4abec832110f8a0c884ef5be92952513005 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Mon, 15 Jun 2026 06:28:51 -0700 Subject: [PATCH] sync: auto-sync from GURU-BEAST-ROG at 2026-06-15 06:28:46 Author: Mike Swanson Machine: GURU-BEAST-ROG Timestamp: 2026-06-15 06:28:46 --- .claude/scripts/sync.sh | 16 ++++++++++------ errorlog.md | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.claude/scripts/sync.sh b/.claude/scripts/sync.sh index 12a5bb6..1b6791f 100755 --- a/.claude/scripts/sync.sh +++ b/.claude/scripts/sync.sh @@ -508,20 +508,24 @@ if [ "$INCOMING_COUNT" -gt 0 ]; then # Submodules may have advanced via the parent's gitlinks. Update them to match, # but tolerate per-submodule failures (e.g., transient dead refs in history) — # the working tree is still useful even if one submodule can't catch up. + # First attempt's output is captured (not streamed): a recurring, auto-healable + # cause is an untracked file colliding with the incoming gitlink commit, and git's + # raw "fatal: Unable to checkout" reads alarmingly right before a clean resolve. + # Only surface the raw output if the resolve+retry below also fails. set +e - git submodule update --init --recursive --quiet 2>&1 | grep -v '^$' || true - SUB_RC=${PIPESTATUS[0]} + SUB_OUT=$(git submodule update --init --recursive --quiet 2>&1) + SUB_RC=$? set -e if [ "$SUB_RC" -ne 0 ]; then - # Most common recurring cause: an untracked file in a submodule colliding - # with the incoming gitlink commit. Resolve non-destructively and retry once. + # Move any untracked files colliding with the incoming commit aside, retry once. if resolve_submodule_collisions; then set +e - git submodule update --init --recursive --quiet 2>&1 | grep -v '^$' || true - SUB_RC=${PIPESTATUS[0]} + SUB_OUT=$(git submodule update --init --recursive --quiet 2>&1) + SUB_RC=$? set -e fi if [ "$SUB_RC" -ne 0 ]; then + [ -n "$SUB_OUT" ] && printf '%s\n' "$SUB_OUT" | grep -v '^$' echo -e "${YELLOW}[WARNING]${NC} One or more submodules failed to update — likely a transient dead ref. Parent repo is current; investigate the submodule manually if a pointer is wrong." else echo -e "${GREEN}[OK]${NC} Submodules reconciled (set aside colliding untracked file(s))." diff --git a/errorlog.md b/errorlog.md index 9c43ff5..965983b 100644 --- a/errorlog.md +++ b/errorlog.md @@ -15,4 +15,4 @@ Format: `YYYY-MM-DD | MACHINE | command/skill | error (brief)` 2026-06-14 | GURU-BEAST-ROG | coord skill (coord.py msg send) | `py "$CLAUDETOOLS_ROOT/.claude/skills/coord/scripts/coord.py"` failed — `$CLAUDETOOLS_ROOT` is not exported in fresh Git-bash shells here, so the path resolved under `C:\Program Files\Git\`. [RESOLVED 2026-06-14] Added `.claude/scripts/ensure-settings-env.py` (seeds `env.CLAUDETOOLS_ROOT` in per-machine `settings.local.json` from `identity.json`); Claude Code injects it into every Bash call. Wired into ONBOARDING.md + broadcast to fleet. Effective next session start. -2026-06-14 | GURU-BEAST-ROG | /sync (sync.sh Phase 3, submodule update) | submodule `projects/msp-tools/guru-rmm` checkout of f38da05 aborted: untracked `docs/RMM_THOUGHTS.md` would be overwritten. Parent repo synced fine; submodule pointer left lagging. Recurring transient — candidate for sync.sh to stash/skip untracked submodule files. +2026-06-14 | GURU-BEAST-ROG | /sync (sync.sh Phase 3, submodule update) | submodule `projects/msp-tools/guru-rmm` checkout of f38da05 aborted: untracked `docs/RMM_THOUGHTS.md` would be overwritten. Parent repo synced fine; submodule pointer left lagging. Recurring transient. [RESOLVED 2026-06-15] sync.sh now has `resolve_submodule_collisions()` — on the abort it moves only the untracked files the incoming commit tracks aside to `.synced-aside-` (content preserved, NOT --force) then retries once. Verified live: guru-rmm advanced ed92097->f38da05; the aside copy held 94 lines of un-committed 2026-06-08 thoughts (rescued, not lost — needs manual merge into canonical RMM_THOUGHTS.md).