feat: Debounced git auto-commit and push daemon #2

Open
opened 2026-10-25 20:59:35 -07:00 by piotr · 0 comments
Owner

Overview

Implement an automated git commit and push pipeline for the local vault filesystem changes, ensuring notes are regularly versioned and backed up to remote git repository.

Goals & Requirements

  • Filesystem Change Detection:
    • Watch the vault directory for file creation, modification, deletion, and rename events (e.g., using inotify / inotifywait / filesystem watcher).
  • Batching & Debounce Strategy:
    • Batch commits so that at most one commit is created every 1 minute under heavy editing.
    • Catch-up guarantee: If changes occur after 5 seconds of inactivity or during the debounce interval, ensure they are guaranteed to eventually be committed once the cool-down expires.
  • Git Operations:
    • Automatic git add -A and descriptive commit message with timestamp and changed file summary.
    • Safe push with retry logic in case of network interruption.
    • Avoid git locking conflicts and ignore temporary Obsidian files (e.g., .obsidian/workspace*, swap files, .trash).

Acceptance Criteria

  • File watcher triggers debounced commit timer upon filesystem change.
  • Maximum commit rate is capped at 1 commit per minute.
  • Changes arriving 5 seconds after a commit or during typing are reliably committed in the next batch.
  • Successful push to remote git repository using configured SSH key.
## Overview Implement an automated git commit and push pipeline for the local vault filesystem changes, ensuring notes are regularly versioned and backed up to remote git repository. ## Goals & Requirements - **Filesystem Change Detection**: - Watch the vault directory for file creation, modification, deletion, and rename events (e.g., using `inotify` / inotifywait / filesystem watcher). - **Batching & Debounce Strategy**: - Batch commits so that at most one commit is created every 1 minute under heavy editing. - Catch-up guarantee: If changes occur after 5 seconds of inactivity or during the debounce interval, ensure they are guaranteed to eventually be committed once the cool-down expires. - **Git Operations**: - Automatic `git add -A` and descriptive commit message with timestamp and changed file summary. - Safe push with retry logic in case of network interruption. - Avoid git locking conflicts and ignore temporary Obsidian files (e.g., `.obsidian/workspace*`, swap files, `.trash`). ## Acceptance Criteria - [ ] File watcher triggers debounced commit timer upon filesystem change. - [ ] Maximum commit rate is capped at 1 commit per minute. - [ ] Changes arriving 5 seconds after a commit or during typing are reliably committed in the next batch. - [ ] Successful push to remote git repository using configured SSH key.
Sign in to join this conversation.
No labels
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
piotr/obsidian-livesync-fs#2
No description provided.