VersionControl:PRs/maybelle-config/253

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
maybelle-config#253: hunter's unpushed git work, kept hourly and pulled to maybelle
State 🟣 merged 2026-11-01 05:01:36
Worked on by magent, justin
Moods #emergence
Deploy redeploy hunter and maybelle
Branch vcs-backup → production, by magent-cryptograss
Opened · last pushed 2026-11-01 04:40:40 · 2026-11-01 04:40:35
hunter is meant to be cheap to lose (Justin, #emergence, 1 Nov). The record, code, secrets and rules already live elsewhere. What had slipped in is git work that exists only on hunter. Tonight I found two arthel branches that existed nowhere else, and I pushed them to my fork by hand. This makes keeping that kind of work routine. Justin asked for it hourly.

**On hunter** (housekeeping role): a new `hunter-vcs-unpushed` timer runs hourly. For every checkout under any home in `/opt/magenta` (people's, Moods', agents' `agents/<name>`), it writes:
- `branches.bundle`: every branch with commits on no remote (`git bundle create <branches> --not --remotes`), small and restorable with `git fetch`;
- `<worktree>.patch`: uncommitted changes to tracked files (`git diff HEAD --binary`), per worktree;
- `manifest.json`: what was found, and when.

It only reads the checkouts. Each run replaces the output whole, so a branch pushed in the meantime drops out.

**On maybelle:** a root cron at :20 each hour rsyncs it into `/mnt/persist/hunter-vcs/latest/`. Once a day it keeps a hard-linked copy in `daily/`, for 30 days.

**Checked:**
- 4 new tests against real git repos (`hunter/ansible/roles/housekeeping/test_vcs_unpushed.py`): nothing to keep; a branch bundled and restored from the bundle; an agent's uncommitted edit as a patch, left uncommitted; a pushed branch dropping out next run.
- A dry run over my real home in justin-arthel took 3m21s and wrote 108K. It found branches that exist only here in pickipedia, memory-lane, maybelle-config and magenta, plus uncommitted edits in several magenta worktrees.
- Both YAML files parse.

**Not covered:** untracked files (only tracked changes go in the patch).

Deploy: redeploy hunter and maybelle
Worked on by: magent, Justin, in #emergence