docs(gitmirrors): a push mirror can delete on codeberg, and how delivery is read #641
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/push-mirrors-prune"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
2fc3c577correctedzot-src'sbranchFilterand predicted the staleseanfarmbranch on Codeberg would be "left alone rather than deleted". It was gone on the next push.Nothing was lost —
seanfarmsat at97d35c01, exactly what Forgejo now callstrunk— but the mechanism in that commit message is wrong, and a mechanism written down wrong is worse than one not written down at all.The obvious generalisation is false, so this does not make it
My first draft of this correction asserted that a push mirror prunes whatever its filter omits. This fleet refutes that outright:
zot-srcmain,seanfarm→main,trunk; Codeberg'sseanfarmwas gone afterwardshermesfeat/email-assistant, a branch its filter never namedn8nmain,trunk,masterfilter, untouched for monthsSo something narrower deletes — plausibly a branch the mirror once managed and no longer matches — but that is a guess, and the README says so and invites replacement rather than inventing a law to fit three data points.
What follows regardless, because two repositories already paid for it
Treat narrowing a
branchFilteras destructive to the backup. Check the tip you drop is reachable from one you keep.A deletion Codeberg refuses takes the whole backup down with it, because the push is atomic.
sean/hermeshadfeat/email-assistantas its Codeberg default branch; the mirror tried to delete it, the pre-receive hook refused (a default branch cannot be deleted), andmain,trunkand every tag were rejected alongside it.hermes is the one private repository in the fleet, so it is also the one whose backup gap was least likely to be noticed. It went 9 commits stale. Fixed by pointing Codeberg's default at
main, after proving the dropped branch was a reachable ancestor ofmain(13 commits behind) and therefore lossless.A ref cannot be both a file and a directory.
sean/n8ncould not createrefs/heads/mainbecause Codeberg carriesrefs/heads/main/handshake-tomi-feedback. Over HTTP/2 this surfaced only asRPC failed ... stream reset by server, which reads like a size or network fault and is not —http.version=HTTP/1.1showed the real error.None of it is visible from the tree
Every guard here reads files, and in each case the tree was self-consistent:
zot-src's CR and its live Forgejo mirror agreed onmain,seanfarm, and hermes was declared exactly as intended. What disagreed was the source repository or the destination.tests/gitmirror-fleet.shalready says as much in its own output — "this checks declared state only; delivery proof uses exact remote refs" — so the README now names where delivery is actually read:git ls-remoteagainst Codeberg, or Forgejo'slast_erroratGET /api/v1/repos/sean/<repo>/push_mirrors.Documentation only; no manifest behaviour changes.
https://claude.ai/code/session_01TdW5FSvRJW8CtGnpd29Xp8