Reframe backend taxonomy: git-branch type + one-of-each-type mirrors

main

Commit

Soph3mo ago

The registered type "git" conflated "uses git" with "stores on a git branch". Rename it to "git-branch" (the current backend stores the committed record on the entire/checkpoints/v1 branch); this leaves room for a future git-refs backend in the same git-backed family.

Replace the string-equality constraints with a declared capability and a topology rule:

  • registeredBackend.gitBacked marks backends whose committed record lives in this repo's git object store. Only git-backed backends may be the primary (the lifecycle — resume/doctor/explain/push/cleanup/OPF — drives the primary through the repo and its refs). buildPrimary checks the capability instead of comparing against the literal "git".
  • A backend type may appear at most once across the topology (primary + mirrors). This is the conservative form of "no two backends may write the same target": two backends of the same type share the same refs/storage today, so a git-branch mirror under a git-branch primary would double-write v1. It deliberately permits a different git-backed backend (e.g. a future git-refs) to mirror alongside a git-branch primary — the branch<->refs parallel-rollout topology — which the previous "no git-backed mirror" block would have forbidden.

A future per-mirror config (same type, distinct repo/refs) could relax the one-of-each-type rule further.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: b6014c28999a

Checkpoints

Checkpoint Backend Registry and Settings-Driven Selection

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1