| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-7638082 |
| 4 | status: raw |
| 5 | title: Migration removes a project's verification gate — nothing on the host runs a check |
| 6 | created: 2026-07-31 |
| 7 | source: cosmo readiness analysis, 2026-07-31 |
| 8 | --- |
| 9 | |
| 10 | # Migration removes a project's verification gate |
| 11 | |
| 12 | A valley host stores refs, mirrors them, and publishes `ref-updated` events. It runs no checks, and |
| 13 | it has no notion of a change that is blocked on one. A project whose only gate is a pull-request |
| 14 | check therefore arrives on the host with no gate at all. The gate does not degrade at migration; it |
| 15 | disappears, because the pull request it was attached to no longer exists. |
| 16 | |
| 17 | This is not a defect in what the host serves today. Phase 0 is hosting only, and the pilot repo's |
| 18 | gate is a human reading a diff, which migrates unchanged. The gap only becomes visible when a |
| 19 | project arrives whose gate is a machine. |
| 20 | |
| 21 | ## What this looks like for cosmo |
| 22 | |
| 23 | cosmo's gate is `.github/workflows/ci.yml`, triggered on `pull_request` against `main`. It runs four |
| 24 | jobs: `nixfmt --check` over the tree, `nix flake check`, `nix build --dry-run` over the |
| 25 | `classic-laddie`, `makers-nix`, and `johnny-walker` NixOS configurations, and `nix build --dry-run` |
| 26 | over four home-manager configurations. `.github/workflows/zizmor.yml` adds a workflow-security lint |
| 27 | on the same trigger. |
| 28 | |
| 29 | Two things are worth stating precisely, because they change what is actually lost. The NixOS jobs |
| 30 | are `--dry-run`: what is checked is that the derivation evaluates and its dependencies resolve, not |
| 31 | that the system builds. And the matrix names three of cosmo's five machine configurations — `weller` |
| 32 | and `klaus-worker-0` are already outside it. The gate that vanishes is narrower than "cosmo builds |
| 33 | five machines", and it was already incomplete. |
| 34 | |
| 35 | The `push` trigger on `main` survives migration in a misleading way. Mirror pushes do trigger |
| 36 | Actions — the-valley's own `notify-cosmo.yml` relies on exactly that — so cosmo's CI would keep |
| 37 | running on the GitHub mirror after every replicated push. It would run against history that has |
| 38 | already landed on the primary and that the converge loop may already have deployed. A check that |
| 39 | runs after the fact and cannot refuse is a notification. |
| 40 | |
| 41 | The checks themselves are not the missing piece. cosmo already runs them where the work is written: |
| 42 | `checks.x86_64-linux.pre-commit-check` in its flake wires `nixfmt`, `detect-private-keys`, and |
| 43 | `zizmor` into the dev shell. What is absent is anything that records that they ran, and anything |
| 44 | that requires them before a ref moves. |
| 45 | |
| 46 | ## What would close it |
| 47 | |
| 48 | The policy design is already held by [[ida-1ec03b1]] |
| 49 | ([ida-1ec03b1-path-scoped-verification-policy.md](./ida-1ec03b1-path-scoped-verification-policy.md)): |
| 50 | required attestations are a function of the tree diff, and the policy is data, so it is a CUE |
| 51 | document. That policy as a schema is in flight on a separate branch and is not restated here. |
| 52 | |
| 53 | What the policy needs in order to bind is two mechanisms the host does not have: |
| 54 | |
| 55 | - A signed attestation that a named check ran on a named tree with a named result, pushed alongside |
| 56 | the commit — [roadmap Phase 2](../../design/roadmap.md#phase-2--attestations-verification-mvp). |
| 57 | - An integrator that derives the required set from the diff and will not write `main` without it, |
| 58 | behind the `pre-receive` invariant that makes refusal possible at all — |
| 59 | [roadmap Phase 3](../../design/roadmap.md#phase-3--the-integrator). |
| 60 | |
| 61 | Policy without either is a document. An attestation without an integrator is a receipt nobody |
| 62 | checks. Both phases are therefore load-bearing for a migrated cosmo, which is the sequencing point |
| 63 | made in [[oc-87deec8]] |
| 64 | ([oc-87deec8-valley-can-host-cosmo.md](../outcomes/oc-87deec8-valley-can-host-cosmo.md)). |
| 65 | |
| 66 | ## Open |
| 67 | |
| 68 | - Whether a project can migrate with its gate deliberately absent for a period, and what makes that |
| 69 | acceptable for one project and not another. The pilot repo answered yes implicitly; cosmo's stakes |
| 70 | — an unchecked change to the configuration of five machines, deployed within the hour by a timer — |
| 71 | are the reason the same answer does not obviously carry. |