| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-b037dc9 |
| 4 | status: raw |
| 5 | title: A mirror that consumers deploy from is a dependency, not a mirror |
| 6 | created: 2026-07-31 |
| 7 | source: cosmo readiness analysis, 2026-07-31 |
| 8 | --- |
| 9 | |
| 10 | # A mirror consumers read is a dependency, not a mirror |
| 11 | |
| 12 | Sovereignty is a property of the read path as much as the write path. Flipping a project's canonical |
| 13 | origin decides where work is written; it decides nothing about where the work is read from. Where a |
| 14 | consumer still resolves the project through the mirror, the mirror's availability remains on the |
| 15 | critical path, and the flip is cosmetic for everything downstream of it. |
| 16 | |
| 17 | ## What this looks like for cosmo |
| 18 | |
| 19 | cosmo reads GitHub in three distinct places, and only one of them is the pilot host: |
| 20 | |
| 21 | - `modules/common/system.nix` sets `system.autoUpgrade.flake = "github:patflynn/cosmo"`, nightly. |
| 22 | This module is imported by every machine, so this is not one host's habit — it is how all of them |
| 23 | update. |
| 24 | - `hosts/classic-laddie/default.nix` runs the `cosmo-rebuild` converge unit. It resolves the target |
| 25 | with `git ls-remote https://github.com/patflynn/cosmo.git refs/heads/main` and then deploys |
| 26 | `github:patflynn/cosmo/$rev`. That is two reads, resolve and fetch, and each is independently |
| 27 | fatal. The unit deliberately fails when `ls-remote` fails, retrying on its hourly timer, so GitHub |
| 28 | being unreachable means the machine does not deploy. |
| 29 | - `flake.nix` pins the-valley itself as `github:gunk-dev/the-valley`. A repo whose canonical origin |
| 30 | is already a valley host is consumed through its own mirror. |
| 31 | |
| 32 | None of this is wrong today. It is the correct configuration for a project whose canonical home is |
| 33 | GitHub, and the third case is the only one available while the sovereign host is reachable on a |
| 34 | tailnet and GitHub Actions runners are not. Migration is what makes it false rather than merely |
| 35 | awkward: after the flip, the mirror is one push behind by construction and is a surface the project |
| 36 | does not control. |
| 37 | |
| 38 | ## The open question, stated rather than answered |
| 39 | |
| 40 | Whether "a host converges from a project" is a valley concern at all is unresolved, and it should be |
| 41 | decided before anything is built for it. Two coherent answers exist: |
| 42 | |
| 43 | - **It is cosmo's own business.** The valley grows nothing. cosmo repoints its converge unit, |
| 44 | `autoUpgrade`, and its the-valley input at sovereign URLs, and the whole gap closes as a change to |
| 45 | one project's configuration. This is available now and costs the valley nothing. |
| 46 | - **It is the valley's business.** A machine that deploys when integration succeeds is exactly |
| 47 | commit → build → deploy as a reaction on the log, which is what |
| 48 | [roadmap Phase 5](../../design/roadmap.md#phase-5--effectful-reactions-armstrong-as-controller) |
| 49 | claims to validate. Under this answer, the converge timer is a controller that has not been |
| 50 | written yet, and cosmo is its first subject. |
| 51 | |
| 52 | Deciding needs an answer to reachability, which neither option removes. A flake input must be |
| 53 | fetchable by every consumer that evaluates it. The valley host is tailnet-only, so any machine or |
| 54 | runner outside the tailnet cannot resolve a sovereign URL, and the mirror is what it falls back to. |
| 55 | Whether the answer is a tailnet-only fleet, a second reachable sovereign remote, or an accepted |
| 56 | mirror read for outside consumers is the substance of the question. |
| 57 | |
| 58 | ## Related |
| 59 | |
| 60 | - [[dcr-24d62f7]] |
| 61 | ([dcr-24d62f7-publication-mirror-not-review-queue.md](../decisions/dcr-24d62f7-publication-mirror-not-review-queue.md)) |
| 62 | — the mirror exists so consumers can fetch integrated history, and so GitHub-hosted consumers can |
| 63 | depend on the project at all. That purpose is what makes this gap easy to miss: the reads are the |
| 64 | mirror working as designed. |
| 65 | - [[oc-87deec8]] |
| 66 | ([oc-87deec8-valley-can-host-cosmo.md](../outcomes/oc-87deec8-valley-can-host-cosmo.md)) — the |
| 67 | outcome this blocks. |