Mātou needs a signed binary cache — decide where it lives and who signs it (the keystone of ADR 0272) #1767

Closed
opened 2026-09-23 15:09:23 +00:00 by ben · 2 comments
Owner

ADR 0272 (docs/adr/0272-the-target-fetches-its-own-bytes-the-installer-carries-only-the-pre-gateway-bootstrap.md, landed 180b4975) decided that a founding target fetches its own bytes and that what the public cache cannot serve, Mātou's own signed cache serves. Everything else in the slice depends on that cache existing.

Why human

This is a new deliberately public surface and a new signing key — one-way under ADR 0174, the same shape as ADR 0269's storage.idss.nz, which also stopped here. It cannot be ruled by an agent.

What the measurement says it has to carry

nix build --dry-run .#kexec-installer-base (2026-09-23):

these 67 derivations will be built:
these 727 paths will be fetched (713.0 MiB download, 1.8 GiB unpacked):

713 MiB is already substitutable from cache.nixos.org. The 67 that must be built are the ones with nowhere else to come from — python3-static-x86_64-unknown-linux-musl-3.13.15 and its musl-static siblings (kexec-tools-static, iproute2-static, db-static, gdbm-static, mpdecimal-static, bluez-headers-static, tzdata-static, libmnl-static, mailcap-static). That static CPython is the "46+ CPU-minutes LTO-compiling on the 2-vCPU gateway" (scripts/build-installer-base-warm.sh:6-13, drive 20260830T034644Z) that justified carrying the slot in the first place.

They are already built once per release by scripts/build-installer-base-warm.sh. Today they are packed into the installer; this ticket is about publishing them instead.

The questions that need your ruling

  1. Where it lives. Its own host, or alongside an existing surface? It is a cache, not a service a community talks to — but it is reached from every gateway a community founds.
  2. Who signs it, and where that key lives. ADR 0272 retires "the payload is the trust boundary" in favour of signatures, so this key becomes the thing that makes a fetched artifact trustworthy. That is a real escalation in what one key is worth.
  3. Whether it is one cache or two surfaces — a Nix binary cache (store paths) and the ADR 0248 signed feed (Mātou's own binaries) are different shapes. They could share a host or stay separate.
  4. Who may read it. Public, or mesh/authenticated? A public cache is simpler and leaks the shape of a release; a closed one needs every founding gateway to hold a credential.

Blocks

The rest of the ADR 0272 slice: the installer-base move, the gateway-bound binaries move, the vm-guest.tar move.

ADR 0272 (`docs/adr/0272-the-target-fetches-its-own-bytes-the-installer-carries-only-the-pre-gateway-bootstrap.md`, landed `180b4975`) decided that a founding target fetches its own bytes and that **what the public cache cannot serve, Mātou's own signed cache serves**. Everything else in the slice depends on that cache existing. ## Why human This is a **new deliberately public surface and a new signing key** — one-way under ADR 0174, the same shape as ADR 0269's `storage.idss.nz`, which also stopped here. It cannot be ruled by an agent. ## What the measurement says it has to carry `nix build --dry-run .#kexec-installer-base` (2026-09-23): ``` these 67 derivations will be built: these 727 paths will be fetched (713.0 MiB download, 1.8 GiB unpacked): ``` 713 MiB is already substitutable from cache.nixos.org. The **67 that must be built** are the ones with nowhere else to come from — `python3-static-x86_64-unknown-linux-musl-3.13.15` and its musl-static siblings (`kexec-tools-static`, `iproute2-static`, `db-static`, `gdbm-static`, `mpdecimal-static`, `bluez-headers-static`, `tzdata-static`, `libmnl-static`, `mailcap-static`). That static CPython is the "46+ CPU-minutes LTO-compiling on the 2-vCPU gateway" (`scripts/build-installer-base-warm.sh:6-13`, drive 20260830T034644Z) that justified carrying the slot in the first place. They are already built once per release by `scripts/build-installer-base-warm.sh`. Today they are **packed into the installer**; this ticket is about **publishing** them instead. ## The questions that need your ruling 1. **Where it lives.** Its own host, or alongside an existing surface? It is a cache, not a service a community talks to — but it is reached from every gateway a community founds. 2. **Who signs it, and where that key lives.** ADR 0272 retires "the payload is the trust boundary" in favour of signatures, so this key becomes the thing that makes a fetched artifact trustworthy. That is a real escalation in what one key is worth. 3. **Whether it is one cache or two surfaces** — a Nix binary cache (store paths) and the ADR 0248 signed feed (Mātou's own binaries) are different shapes. They could share a host or stay separate. 4. **Who may read it.** Public, or mesh/authenticated? A public cache is simpler and leaks the shape of a release; a closed one needs every founding gateway to hold a credential. ## Blocks The rest of the ADR 0272 slice: the installer-base move, the gateway-bound binaries move, the `vm-guest.tar` move.
Author
Owner

Blocks: #1768 (installer base, ~817 MB), #1769 (Mātou's own binaries, pinned by revision), #1770 (vm-guest.tar, 263 MB+).

Runs independently of this ticket: #1771 (needs-design — the private path's on-demand fetch + the opt-in offline bundle) and #1772 (a local measurement that may shrink the slice further). #1764 — the --substitute-on-destination fix — is decision 1 of the ADR and also needs nothing from here.

Once this is ruled, label the three blocked tickets ready-for-agent.

**Blocks:** #1768 (installer base, ~817 MB), #1769 (Mātou's own binaries, pinned by revision), #1770 (`vm-guest.tar`, 263 MB+). **Runs independently of this ticket:** #1771 (needs-design — the private path's on-demand fetch + the opt-in offline bundle) and #1772 (a local measurement that may shrink the slice further). #1764 — the `--substitute-on-destination` fix — is decision 1 of the ADR and also needs nothing from here. Once this is ruled, label the three blocked tickets `ready-for-agent`.
Author
Owner

Ruled by Ben, 2026-09-23 — ADR 0275 (75b4dc15, docs/adr/0275-matous-binary-cache-is-public-object-storage-behind-cache-idss-nz-signed-by-its-own-key.md).

  1. Where: S3-compatible object storage (DigitalOcean Spaces, syd1) fronted by a cache.idss.nz CNAME. Static tree, nix copy --to s3:// publishes natively, nothing runs; the CNAME lets the provider change without touching a gateway.
  2. Who signs: a dedicated cache.idss.nz-1 key sealed in matou-infra for the release rail; public half committed here and baked into trusted-public-keys beside cache.nixos.org-1. NOT the ADR 0248 feed key — two keys, two blast radii; -1 is the rotation handle.
  3. Two surfaces: the Nix cache and the ADR 0248 signed feed share the zone, never a key or a format.
  4. Public read, signed write. A closed cache is a bootstrap circle on every cold gateway; trust is the signature on each path, not the transport (ADR 0272 §2).

Standing it up (bucket, record, keys, publish step) is #1801. #1769/#1770 flipped to ready-for-agent; #1768 waits on #1801.

**Ruled by Ben, 2026-09-23 — ADR 0275** (`75b4dc15`, `docs/adr/0275-matous-binary-cache-is-public-object-storage-behind-cache-idss-nz-signed-by-its-own-key.md`). 1. **Where:** S3-compatible object storage (DigitalOcean Spaces, syd1) fronted by a `cache.idss.nz` CNAME. Static tree, `nix copy --to s3://` publishes natively, nothing runs; the CNAME lets the provider change without touching a gateway. 2. **Who signs:** a dedicated `cache.idss.nz-1` key sealed in `matou-infra` for the release rail; public half committed here and baked into `trusted-public-keys` beside `cache.nixos.org-1`. NOT the ADR 0248 feed key — two keys, two blast radii; `-1` is the rotation handle. 3. **Two surfaces:** the Nix cache and the ADR 0248 signed feed share the zone, never a key or a format. 4. **Public read, signed write.** A closed cache is a bootstrap circle on every cold gateway; trust is the signature on each path, not the transport (ADR 0272 §2). Standing it up (bucket, record, keys, publish step) is **#1801**. #1769/#1770 flipped to `ready-for-agent`; #1768 waits on #1801.
ben closed this issue 2026-09-23 21:03:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1767
No description provided.