PROP-016: Decentralized source mirrors — the vibevm setup
01Status: accepted 2026-06-14 — owner-requested; in force. The target set (§2) is living — it grows as hosts are added.
Related: PROP-000 §7 (the package-registry split-host — a different concern, see §3), vibevm/vibespecs/boot/90-user.xml (this machine's repository-access record), mirrors.toml (the target registry), xtask/src/mirror.rs (cargo xtask mirror), CLAUDE.md (the attribution and force-push rules this model never crosses).
- 02The general model — why multi-homing a git source across several hosts invites multi-master divergence, and how a single-writer mainline with every host as a downstream read-replica dissolves it (the benevolent-dictator / hub-and-spoke shape, the never-
--forcelaw, what it buys and costs, the maintainer's daily loop) — is thesource-mirrorsflow this project depends on:spec://org.vibevm.world/source-mirrors/flows/source-mirrors/SOURCE-MIRRORS-PROTOCOL#root(fan-out mechanics and the reference script:spec://org.vibevm.world/source-mirrors/flows/source-mirrors/fanout-mechanics#root; the maintainer's day:spec://org.vibevm.world/source-mirrors/flows/source-mirrors/daily-loop#root). - This PROP records only what is specific to vibevm: the concrete host set, its relationship to the package registry, and the tooling that fans out to it.
1. vibevm's hosts
03vibevm's source is multi-homed across two public hosts, both canonical for reading, kept in step under the source-mirrors single-writer model (mainline is the maintainer's integrated local main; no host is primary; every host is a downstream read-replica):
- 04GitVerse —
git@gitverse.ru:vibevm/vibevm.git(webhttps://gitverse.ru/vibevm/vibevm), region RU.originon the maintainer's machine points here — a single-host convenience remote; fan-out is the manifest, notgit push origin. - GitHub —
git@github.com:vibevm/vibevm.git(webhttps://github.com/vibevm/vibevm), region US.
05Authentication is the maintainer's per-host SSH keys in the agent — never a token, never in the manifest.
2. mirrors.toml — the target set
06mirrors.toml at the repo root is the committed, shared, credential-free target registry (its schema and the push / self-pull mode semantics are the flow's spec://org.vibevm.world/source-mirrors/flows/source-mirrors/fanout-mechanics#manifest). vibevm's current set:
07schema = 1
[[target]]
name = "gitverse"
url = "git@gitverse.ru:vibevm/vibevm.git"
mode = "push" # the maintainer pushes mainline here
refs = ["main", "tags"]
region = "ru"
[[target]]
name = "github"
url = "git@github.com:vibevm/vibevm.git"
mode = "push"
refs = ["main", "tags"]
region = "us"
08Adding a host is one [[target]] block, committed — the set is living.
3. Relationship to the package-registry split-host
09This PROP governs the source repository; it is orthogonal to the package registry, and the two must not be conflated.
- 10Source mirrors (this PROP): the vibevm source is multi-homed across GitVerse (
vibevm/vibevm) and GitHub (vibevm/vibevm), kept in step bycargo xtask mirror. Auth is the maintainer's per-host SSH keys. - Package registry (PROP-000 §7, PROP-002 §2.10): published packages live in the GitHub
vibespecsorg. Auth is the~/.vibe/github.publish.token, used only byvibe registry publish, scoped strictly tovibespecs.
- 11So
vibevm/vibevm(a source mirror) andgithub.com/vibespecs/*(the package registry) are different GitHub orgs serving different purposes with different credentials. - The publish token is never used to push source; an SSH key is never used to publish a package.
- The original split-host rationale (GitVerse's API does not expose org-scoped repo creation, which the publisher needs; GitHub's does) holds for the registry and is untouched.
4. Tooling
12The fan-out engine is xtask/src/mirror.rs, driven by cargo xtask mirror (the model's mechanics — fast-forward-only push, tracking-ref refresh, fail-loud drift handling — are the flow's spec://org.vibevm.world/source-mirrors/flows/source-mirrors/fanout-mechanics#root):
- 13
cargo xtask mirror— push mainline (main+ tags) to everypushtarget, fast-forward-only, never--force; verifyself-pulltargets; refresh the matching local remote-tracking refs sogit statusis clean after a green rollout. This — notgit push origin— is the standard rollout. cargo xtask mirror --check— verify every target equals mainline; push nothing (read-only, non-zero exit on drift).cargo xtask mirror --from <name>— fast-forward mainline to a host's accepted-PR merge before fanning out (the bridge for a PR merged via that host's web UI).cargo xtask health --mirrors— run the--checkprobe as an advisorymirrorsblock in the Discipline sweep; off by default, so the committed health snapshot stays deterministic and offline (mirror sync is network state, not a property of the source tree).
- 14The never-
--forceinvariant is runnable capital, not prose:push_argsis a pure function and thepush_args_never_forceunit test asserts it never emits--force,-f, or a+-prefixed force refspec for any ref shape. --from'sgit merge --ff-onlyenforces the same at runtime.- This honours the
CLAUDE.mdforce-push red line by construction.
5. Open questions
- 15Server-side mirroring. When a host must originate writes outside
cargo xtask mirror(e.g. heavy web-UI merging on one host), add one-directional server-side mirroring (a GitHub Action mirroring GitHub→GitVerse, or GitVerse's own pull-mirror for the reverse). It touches CI secrets (an owner act), so it is deferred until needed. self-pulladoption. No target usesself-pullyet; the mode exists for the first host that ships a built-in mirror.- A
vibe-level mirror surface. The fan-out shape (one source → many heterogeneous targets with per-target capability and credential) mirrors vibevm's own multi-registry publish domain ([[registry]],RepoCreatoradapters). Whether the two should share code is a FEAT worth opening if the target set grows large.
6. Version history
- 162026-06-14 — authored, in force. Owner decision: the source becomes multi-homed (GitVerse + GitHub
vibevm/vibevm, both public, canonical for reading; US↔GitHub, RU↔GitVerse), kept in sync by the maintainer's fan-out. Themirrors.tomlregistry andcargo xtask mirror(--check,--from) plus the off-by-defaulthealth --mirrorsprobe are defined here. Supersedes the interim multi-push-remote and the abandoned bidirectional-multi-master sketch. - 2026-06-14 — fan-out refreshes tracking refs.
cargo xtask mirrorupdates the local remote-tracking ref of any remote matching a target after a successful branch push (pushing by raw URL otherwise leavesrefs/remotes/<remote>/<branch>stale, sogit statusfalsely read "ahead of origin/main" right after a green rollout). A local, best-effort convenience; no model change. - 2026-07-14 — general model extracted to the
source-mirrorsflow. The problem statement, the hub-and-spoke model, what it buys and costs, the daily loop, and the fan-out mechanics moved into the installablesource-mirrorspackage (reaching vibevm through the redbook dependency); this PROP was thinned to vibevm's concrete host set, the registry distinction, and the tooling. No behaviour changed —mirrors.tomlandcargo xtask mirrorare untouched.