From 2bfd968f1aefc30fcac91d4b48a3f43771b9ca8f Mon Sep 17 00:00:00 2001 From: autocommit Date: Tue, 9 Jun 2026 19:22:47 -0700 Subject: [PATCH] =?UTF-8?q?docs(docs):=20=F0=9F=93=9D=20Add=20branch=20syn?= =?UTF-8?q?chronization=20requirements=20and=20failure=20modes=20documenta?= =?UTF-8?q?tion=20to=20CLAUDE.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- CLAUDE.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index e032110..1255233 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -126,11 +126,20 @@ Neither host force-anything. Both hand off to Claude Code recovery — apricot v cooldown so a stuck repo isn't retried every cycle). Recovery commands are allowlisted: no `--force`, `--hard`, `--no-verify`. -### Branch/remote are config-driven, not hardcoded +### Branch/remote are config-driven — and the two hosts MUST track the same branch `git_remote` / `git_branch` come from settings/per-directory overrides; each repo -syncs whatever branch its checkout tracks (e.g. this repo: `origin/main`). Don't -assume `master`. +syncs whatever branch its checkout tracks. Don't assume `master`. + +**Invariant — the hub only reconciles same-branch.** Forgejo never merges `main` +into `master`. If apricot's checkout is on `main` and plum's is on `master`, each +host commits to a *different* branch, both push/pull cleanly against the hub, and +the two branches **diverge permanently** — no error, no recovery, just silent +drift. The pull/push halves above keep two checkouts together *only* when they +track the same `origin/`. Verify branch parity across hosts +(`git rev-parse --abbrev-ref HEAD` on each) before trusting that a repo is in +sync; "ahead 0 / behind 0 vs upstream" on each host is **not** sufficient when the +upstreams differ. ### Known failure mode — keep these distinct