Repository navigation
feat(handoff-sync): track the TILSIT handoff Drive sync - #14
Merged
Merged
Conversation
handoff-sync.sh was written on 2026-10-22 straight into ~/.local/bin on TILSIT, outside any repo, so losing that disk would lose it. It is the only thing that moves Claude handoffs between TILSIT and Google Drive: TILSIT has no Drive app, because andrewrich has no GUI session there. The rclone bisync call is unchanged. The script now follows this repo's shape: RCLONE_BIN and the three paths are overridable for tests, main() sits behind a source guard, and a missing rclone is logged to the sync log and exits 1 instead of failing with no record (cron discards output). The log-trim comment said "trim to the last 2000 lines"; the code keeps 1000 once the log passes 2000, and the constants now say so. After merge, ~/.local/bin/handoff-sync.sh becomes a symlink to this file. The crontab entry keeps the same path.
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.
handoff-sync.shkeeps~/.claude/handoffson TILSIT in two-way sync with the Google Drive folderClaude Handoff. It was written on 2026-10-22 straight into~/.local/bin, outside any repo. TILSIT has no Drive app (andrewrich has no GUI session there), so this script is the only path for handoffs between TILSIT and other machines.Changes
handoff-sync.sh: samerclone bisynccall as the live copy. Restructured to matchdisk-space-alert.sh:RCLONE_BINand the three paths can be overridden,main()sits behind a source guard, and a missingrclonewrites an error to the sync log and exits 1. Before, it failed with no record, because cron discards output.tests/handoff-sync.bats: 11 tests with a stubrclone. They cover the bisync arguments, exit-status passthrough, missingrclone, log trimming at the 2000-line boundary, the full default path (cron's PATH has no Homebrew), and the source guard.Verification
shellcheck -S infois clean, and 11 of 11 tests pass locally.--recover, changed the trim to>=, removed the source guard). Each fault made at least one test fail.ERRORlines.Review note
The commit-time code-reviewer passed the change with one WARNING:
trim_logswaps the log through a fixed.tmpname, so two overlapping runs could lose log lines. That needs a sync longer than the 5-minute cron interval, and current runs take about 4 seconds. The loss would be log lines only, never handoffs, and the live copy trims the same way. Left as is.After merge
Replace
~/.local/bin/handoff-sync.shwith a symlink to this file. The crontab entry keeps the same path.