docs(docs): 📝 Add branch synchronization requirements and failure modes documentation to CLAUDE.md
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
c40872e476
commit
2bfd968f1a
1 changed files with 12 additions and 3 deletions
15
CLAUDE.md
15
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/<branch>`. 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue