feat: Make Pi the source of truth for Tomb (closes #13) #17

Open
aaron wants to merge 1 commit from claude/issue-13-52 into main
Owner

Summary

Implements Issue #13: Make Pi the source of truth for Tomb.

Pi (192.168.0.237) now hosts the canonical bare repo at /home/az/tomb.git. All machines (Rog, Lappy) sync via git through Pi.

Files Changed (5 files, +1075 lines)

File Change
scripts/tomb_sync.py New — 501-line sync tool with 6 commands
tests/test_tomb_sync.py New — 38 tests across 8 test classes
tests/__init__.py New — Python package init
.gitignore New__pycache__/, *.pyc
README.md Updated — Tomb Sync section with architecture diagram

Commands

Command Description
tomb_sync.py (default) git pull from Pi bare repo
--push Stage all, commit, push to Pi
--dry-run Preview changes without acting
--verify Validate repo, remotes, pantheon.db
--status Quick sync status summary
--init Clone from Pi if no local repo

Safety Features

  • pantheon.db: SQLite PRAGMA integrity_check before and after every sync
  • Auto-stash: Local changes stashed before pull, restored after
  • Conflict detection: Reports merge conflicts with resolution instructions
  • Corrupt DB guard: Refuses to push if pantheon.db fails integrity check

Test Results

38 passed in 0.99s

Closes: #13

🤖 Generated with Claude Code

## Summary Implements Issue #13: Make Pi the source of truth for Tomb. Pi (192.168.0.237) now hosts the canonical bare repo at `/home/az/tomb.git`. All machines (Rog, Lappy) sync via git through Pi. ### Files Changed (5 files, +1075 lines) | File | Change | |------|--------| | `scripts/tomb_sync.py` | **New** — 501-line sync tool with 6 commands | | `tests/test_tomb_sync.py` | **New** — 38 tests across 8 test classes | | `tests/__init__.py` | **New** — Python package init | | `.gitignore` | **New** — `__pycache__/`, `*.pyc` | | `README.md` | **Updated** — Tomb Sync section with architecture diagram | ### Commands | Command | Description | |---------|-------------| | `tomb_sync.py` (default) | `git pull` from Pi bare repo | | `--push` | Stage all, commit, push to Pi | | `--dry-run` | Preview changes without acting | | `--verify` | Validate repo, remotes, pantheon.db | | `--status` | Quick sync status summary | | `--init` | Clone from Pi if no local repo | ### Safety Features - **pantheon.db**: SQLite `PRAGMA integrity_check` before and after every sync - **Auto-stash**: Local changes stashed before pull, restored after - **Conflict detection**: Reports merge conflicts with resolution instructions - **Corrupt DB guard**: Refuses to push if pantheon.db fails integrity check ### Test Results ``` 38 passed in 0.99s ``` Closes: #13 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- 501-line sync tool with 6 commands: pull, push, dry-run, verify, status, init
- Pi (192.168.0.237) hosts bare repo at /home/az/tomb.git
- pantheon.db integrity validation (SQLite PRAGMA integrity_check)
- Auto-stash before pull, conflict detection, corrupt DB guard
- 38 tests covering all commands, helpers, CLI routing, and edge cases
- README updated with architecture diagram and usage docs
- .gitignore added for __pycache__ and *.pyc

Closes: #13
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/issue-13-52:claude/issue-13-52
git switch claude/issue-13-52

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff claude/issue-13-52
git switch claude/issue-13-52
git rebase main
git switch main
git merge --ff-only claude/issue-13-52
git switch claude/issue-13-52
git rebase main
git switch main
git merge --no-ff claude/issue-13-52
git switch main
git merge --squash claude/issue-13-52
git switch main
git merge --ff-only claude/issue-13-52
git switch main
git merge claude/issue-13-52
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aaron/claude-ci-demo!17
No description provided.