| 1 | --- |
| 2 | type: decision |
| 3 | id: dcr-24d62f7 |
| 4 | status: decided |
| 5 | title: "Publication mirrors receive main and tags" |
| 6 | created: 2026-07-25 |
| 7 | --- |
| 8 | |
| 9 | # Publication mirrors receive main and tags |
| 10 | |
| 11 | A declared publication mirror receives `main` and tags. Topic branches stay on the primary while |
| 12 | they await integration. The next mirror push attempts to remove any other branches found on the |
| 13 | mirror. |
| 14 | |
| 15 | Consumers use a publication mirror to fetch integrated work. This also supports consumers whose |
| 16 | tooling fetches from GitHub. A pending contribution becomes public through this mirror when it is |
| 17 | integrated. |
| 18 | |
| 19 | ## Durability |
| 20 | |
| 21 | Restic provides the independent backup described in |
| 22 | [[dcr-d7952bc]](dcr-d7952bc-phase0-replication-github-transitional.md). The publication mirror also |
| 23 | provides a live offsite copy of integrated history. |
| 24 | |
| 25 | Pending topic branches have a different recovery window. Before integration, their offsite |
| 26 | protection comes from the nightly restic snapshot. The requirement for two independent copies within |
| 27 | minutes therefore holds for integrated work, but does not hold for every pending branch. This |
| 28 | limitation is accepted for the publication mirror. |
| 29 | |
| 30 | ## Mechanism |
| 31 | |
| 32 | The push refspec names `main` explicitly. Because Git's `--prune` only prunes heads covered by a |
| 33 | glob refspec, a separate sweep lists the mirror's heads and attempts to delete every head except |
| 34 | `main`. |
| 35 | |
| 36 | The sweep is best-effort and independent of the replication push. A refused deletion is logged |
| 37 | without changing the reported result of that push. The sweep only reads `refs/heads`; it does not |
| 38 | touch mirror-owned namespaces such as GitHub's read-only `refs/pull/*`. |
| 39 | |
| 40 | ## Revisit condition |
| 41 | |
| 42 | A consumer may eventually need mirrored access to work before integration. That would justify a |
| 43 | separately declared mirror with a different publication scope. |