feat: live-sync heartbeat commits machine-written paths
The checkout IS the deployment and symlinks make live state (memories, auto-learned skills, agent config, desktop settings) dirty tracked files continuously; no commit law covered machine churn, so it accumulated unpushed for weeks — one disk held the only copy of ~61 managed skills, a settings fix stayed local-only, and dirty trees refused merges. scripts/live-sync.sh (systemd user timer, ~15 min) commits ONLY the allowlisted machine/desktop-live tiers with hooks armed, merges origin/main, pushes, and reaps wt/* worktrees older than 7 days. Task dirt outside the allowlist is never staged; conflicts abort and alert via ntfy; branch guard refuses off main; never --no-verify, never force. Black-box contract pinned by tests/live-sync.bats (9 tests, suite 36/36). Refs #11
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=command-center live-sync heartbeat (commits machine-written paths)
|
||||
Documentation=file://%h/.omp/omp-docs/tools/live-sync.md
|
||||
|
||||
[Service]
|
||||
# One-shot heartbeat: commit allowlisted live paths, merge trunk, push, reap
|
||||
# stale wt/* worktrees. Self-healing by design — a failed fetch/merge alerts
|
||||
# via ntfy and simply retries on the next tick; nothing to restart.
|
||||
Type=oneshot
|
||||
Nice=19
|
||||
IOSchedulingClass=idle
|
||||
ExecStart=%h/.omp/scripts/live-sync.sh
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=command-center live-sync heartbeat every 15 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=15min
|
||||
RandomizedDelaySec=3min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user