sync: auto-sync from Mikes-MacBook-Air.local at 2026-06-20 20:01:12

Author: Mike Swanson
Machine: Mikes-MacBook-Air.local
Timestamp: 2026-06-20 20:01:12
This commit is contained in:
2026-06-20 20:01:17 -07:00
parent c75b6c5669
commit c175e68df9

View File

@@ -0,0 +1,132 @@
## User
- **User:** Mike Swanson (mike)
- **Machine:** Mikes-MacBook-Air
- **Role:** admin
## Session Summary
Fixed the radio-show submodule that was showing as deleted in git status, then created a comprehensive gitea skill for bulletproof git/Gitea operations across the fleet. The radio-show submodule was missing from the working tree despite being configured in .gitmodules — restored it with `git submodule update --init`. Examined sync.sh's battle-tested patterns for submodule management, credential injection, identity reconciliation, and collision resolution, then extracted them into a reusable skill.
Created the gitea skill with full documentation (SKILL.md, README.md) and a 565-line shell script implementing all operations: submodule init/update/sync/status/fix, repository status/health/fetch/pull/push/commit, and utility commands for identity verification and credential injection. The skill encapsulates sync.sh's reconcile_git_identity, resolve_submodule_collisions, and credential-injection logic into standalone commands with proper error handling and meaningful exit codes.
Tested the skill with health checks and submodule status commands — confirmed it correctly detects uninitialized submodules, shows colored status output, and reconciles git identity from identity.json. Committed and pushed the skill to Gitea (commit 354754e5). Synced the repo, which deployed the skill to ~/.claude/skills/ globally (Phase 5c). Two submodules (dataforth-dos, quote-wizard) failed to clone during sync due to leftover non-git directories — cleaned them up by removing the directories and re-initializing with the new gitea skill, demonstrating its fix capability.
Loaded today's radio show notes HTML (2026-06-20-dont-tread-on-my-models) and opened it in the browser. Ran a final sync which pulled wiki updates for cascades-tucson and dataforth clients, confirmed the gitea skill deployed globally, and left the repo clean.
## Key Decisions
- Extracted git/submodule patterns from sync.sh into a standalone skill instead of refactoring sync.sh inline — preserves the working sync.sh while making the patterns reusable for other scripts and manual operations
- Used colored status output with [OK]/[WARNING]/[ERROR] prefixes instead of emojis — matches ClaudeTools ASCII marker convention and works on all terminals
- Made submodule advance operations opt-in (submodule sync command) rather than default — respects the CLAUDE.md convention that pinned commits lagging main is expected, not stale
- Implemented collision resolution by preserving content (moves aside untracked files with timestamp suffix) rather than deleting — prevents data loss when untracked files have local edits
- Made identity reconciliation automatic on all submodule operations — prevents the attribution drift that caused youtube-sync-docker commits to land under system defaults
- Used IFS= read -r pattern for parsing git submodule status to handle paths with spaces correctly
## Problems Encountered
- Initial submodule status parsing failed to correctly extract path from git output — the status line format is `{status_char}{40_char_hash} {path} ({description})` and initial attempts used fixed-offset string slicing that cut into the path. Fixed by using IFS= read -r to preserve the full line, then extracting status_char and skipping the hash to get the full path_and_desc.
- Two submodules (dataforth-dos, quote-wizard) existed as non-git directories from previous work, blocking git submodule clone attempts during sync — removed the directories manually and re-initialized with the gitea skill's init command, which properly populated them as submodules.
- All initialized submodules had git config user.name set to 'azcomputerguru' instead of 'Mike Swanson' — the identity reconciliation function detected the mismatch and corrected it during init operations, demonstrating the value of automatic reconciliation.
## Configuration Changes
**Created:**
- `.claude/skills/gitea/SKILL.md` — skill documentation with command reference and triggers
- `.claude/skills/gitea/scripts/gitea.sh` — main executable (565 lines)
- `.claude/skills/gitea/README.md` — comprehensive user guide and integration docs (250 lines)
**Modified:**
- Submodule radio-show restored to working tree at commit aa3ed38b
- Submodules dataforth-dos and quote-wizard cleaned up and re-initialized
- Git config user.name corrected to 'Mike Swanson' in 18+ submodules
## Credentials & Secrets
None discovered or modified. The gitea skill implements credential injection from parent HTTPS URLs to submodule configs but does not handle credentials directly.
## Infrastructure & Servers
**Gitea server:**
- Host: git.azcomputerguru.com
- Protocol: HTTPS with embedded credentials in origin URLs
- Parent repo: https://git.azcomputerguru.com/azcomputerguru/claudetools.git
**Submodules cleaned:**
- projects/dataforth-dos — pinned to heads/main
- projects/msp-tools/quote-wizard — pinned to heads/main
## Commands & Outputs
**Fix radio-show submodule:**
```bash
git submodule update --init projects/radio-show
# Output: Submodule path 'projects/radio-show': checked out 'aa3ed38b...'
```
**Test gitea skill health:**
```bash
bash .claude/skills/gitea/scripts/gitea.sh health
# Output:
# [OK] Identity: Mike Swanson <mike@azcomputerguru.com>
# [OK] Git identity matches
# [INFO] Uncommitted changes present
# [WARNING] 19 submodule(s) need attention
# [OK] Remote reachable
# [WARNING] 1 issue(s) found
```
**Clean up broken submodules:**
```bash
rm -rf projects/dataforth-dos projects/msp-tools/quote-wizard
bash .claude/skills/gitea/scripts/gitea.sh submodule init projects/dataforth-dos
bash .claude/skills/gitea/scripts/gitea.sh submodule init projects/msp-tools/quote-wizard
# Both initialized successfully with identity reconciliation warnings
```
**Commit gitea skill:**
```bash
git add .claude/skills/gitea/
git commit -m "feat: add gitea skill for bulletproof git/submodule operations"
git push origin main
# Pushed to 354754e5
```
**Sync errors during submodule update:**
```
fatal: destination path '/Users/azcomputerguru/ClaudeTools/projects/dataforth-dos' already exists and is not an empty directory.
fatal: clone of 'https://azcomputerguru@git.azcomputerguru.com/azcomputerguru/dataforth-dos.git' into submodule path '/Users/azcomputerguru/ClaudeTools/projects/dataforth-dos' failed
```
## Pending / Incomplete Tasks
**Optional gitea skill enhancements:**
- Test on Windows and Linux machines during next fleet sync
- Consider refactoring sync.sh to use gitea skill helpers to deduplicate ~200 lines
- Add to agent quick reference or create slash command wrapper
- Document in wiki/systems/gitea.md if desired
**Submodule health:**
- 19 submodules remain uninitialized (this is expected per CLAUDE.md — only initialize as needed)
- guru-connect and guru-rmm show as modified/ahead (expected — active development)
## Reference Information
**Commits:**
- 354754e5 — feat: add gitea skill for bulletproof git/submodule operations
- c75b6c56 — wiki: full recompile cascades-tucson + dataforth (pulled during final sync)
**Files:**
- Radio show notes: projects/radio-show/episodes/2026-06-20-dont-tread-on-my-models/show-notes.html
- Gitea skill: .claude/skills/gitea/scripts/gitea.sh
- Sync script: .claude/scripts/sync.sh (reference for patterns)
**Submodules mentioned:**
- projects/radio-show — aa3ed38b (heads/main)
- projects/dataforth-dos — restored
- projects/msp-tools/quote-wizard — restored
- projects/msp-tools/guru-connect — 11af9dff (modified/ahead)
- projects/msp-tools/guru-rmm — f38da05b (modified/ahead)
**Deployment:**
- Skill deployed to ~/.claude/skills/gitea via sync.sh Phase 5c
- Available fleet-wide after next sync on each machine