the gateway fetches vm-guest.tar rather than being handed 263 MB of it at founding (ADR 0272) #1770

Open
opened 2026-09-23 15:09:28 +00:00 by ben · 3 comments
Owner

Per ADR 0272 (docs/adr/0272-the-target-fetches-its-own-bytes-the-installer-carries-only-the-pre-gateway-bootstrap.md, landed 180b4975), decision 1.

Today

vm-guest.tar (a root-relative tar of nixos-guest.qcow2 + the whole relocatable QEMU dist, assemble-payload.sh:314-338) rides the installer, is seeded onto the gateway at supply (internal/fleetwire/supply.go:74,399-503 — best-effort, sha256 short-circuit via PayloadVMGuestMarker), and is then served on to devices through the install doorway (internal/controlapi/install_doorway.go:82,115-131).

One drive observed it still growing at 263 MB when the leg was killed (GOTCHAS #7073); #1753 measured the device's own pull of the uncompressed bundle at 2.6 GB / ~52 minutes on a real home line.

The gateway is a machine with a datacentre uplink that exists to serve this artifact onward. It should fetch it.

Asks

  1. The gateway fetches vm-guest.tar from Mātou's signed cache/feed instead of receiving it from the founding machine, keeping the existing sha-marker short-circuit semantics (#1191) so a re-supply is still a no-op.
  2. Drop the slot from the payload.
  3. Keep #1753's compressed + resumable serving to devices exactly as landed — this ticket changes how the gateway gets the bundle, not how a device gets it.
  4. Note the open follow-up recorded in STATUS.md 2026-09-22: assemble-payload.sh should build the tar deterministically so a drive host's payload matches the snapshot bake. Fetching from one published artifact makes that problem disappear rather than solving it — worth saying so in the commit.

Blocked by the Mātou signed cache ticket. Relates to #1753, #1191.

Per ADR 0272 (`docs/adr/0272-the-target-fetches-its-own-bytes-the-installer-carries-only-the-pre-gateway-bootstrap.md`, landed `180b4975`), decision 1. ## Today `vm-guest.tar` (a root-relative tar of `nixos-guest.qcow2` + the whole relocatable QEMU dist, `assemble-payload.sh:314-338`) rides the installer, is seeded onto the **gateway** at supply (`internal/fleetwire/supply.go:74,399-503` — best-effort, sha256 short-circuit via `PayloadVMGuestMarker`), and is then served on to **devices** through the install doorway (`internal/controlapi/install_doorway.go:82,115-131`). One drive observed it still growing at **263 MB** when the leg was killed (GOTCHAS #7073); #1753 measured the device's own pull of the uncompressed bundle at **2.6 GB / ~52 minutes** on a real home line. The gateway is a machine with a datacentre uplink that exists to serve this artifact onward. It should fetch it. ## Asks 1. The gateway fetches `vm-guest.tar` from Mātou's signed cache/feed instead of receiving it from the founding machine, keeping the existing sha-marker short-circuit semantics (#1191) so a re-supply is still a no-op. 2. Drop the slot from the payload. 3. Keep #1753's compressed + resumable serving to devices exactly as landed — this ticket changes how the **gateway** gets the bundle, not how a device gets it. 4. Note the open follow-up recorded in STATUS.md 2026-09-22: `assemble-payload.sh` should build the tar **deterministically** so a drive host's payload matches the snapshot bake. Fetching from one published artifact makes that problem disappear rather than solving it — worth saying so in the commit. **Blocked by the Mātou signed cache ticket.** Relates to #1753, #1191.
Author
Owner

depends_on #1767 — the keystone. This ticket is deliberately left without ready-for-agent until #1767 is ruled and the cache exists; picking it up before then means building against a surface that has no decided home, owner or signing key.

**depends_on #1767** — the keystone. This ticket is deliberately left without `ready-for-agent` until #1767 is ruled and the cache exists; picking it up before then means building against a surface that has no decided home, owner or signing key.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Triage

  • Category — enhancement. Founding succeeds today; this ticket improves it by having the gateway source the ~2.6 GB vm-guest.tar bundle itself instead of carrying it over the operator's uplink. Nothing is broken, so it reads as an improvement, not a defect (the sibling deploy-leg ticket #1764 was filed bug; this is a two-way call — flip it if you'd rather these track as bugs).
  • State — needs-design, not ready-for-agent. Per your own comment, this is "deliberately left without ready-for-agent until #1767 is ruled and the cache exists." The contract the agent would build against — Mātou's signed binary cache, its home, owner and signing key — does not exist yet; #1767 (ready-for-human, the keystone) is where that one-way door is decided. needs-design is the state for "the thing you'd build against isn't ready; route back before implementation," and it keeps this off the swarm queue (list-ready-tasks.sh reads only ready-for-agent) until a human promotes it.
  • Not ready-for-human: the one-way-door residue (a new public surface + a new signing key) lives in #1767, which already carries ready-for-human. This ticket is delegable engineering once that contract is real — no separate human decision of its own.
  • Set depends_on #1767 as a native Forgejo dependency (your comment named it in prose; it is now machine-readable), so the block is explicit and this surfaces the moment the keystone lands.

Why this is a two-way door: every part is a label/dependency change, reversible by a later edit; nothing is committed to code and no member-facing or credential surface moves. What proves it: the dependency shows #1767 open as the blocker (GET /issues/1770/dependencies), and list-ready-tasks.sh reads only ready-for-agent, so a needs-design ticket is invisible to the swarm by construction. When #1767 is ruled and Mātou's signed cache exists, a human removes needs-design and applies ready-for-agent.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** ## Triage - **Category — `enhancement`.** Founding succeeds today; this ticket *improves* it by having the gateway source the ~2.6 GB `vm-guest.tar` bundle itself instead of carrying it over the operator's uplink. Nothing is broken, so it reads as an improvement, not a defect (the sibling deploy-leg ticket #1764 was filed `bug`; this is a two-way call — flip it if you'd rather these track as bugs). - **State — `needs-design`, not `ready-for-agent`.** Per your own comment, this is "deliberately left without `ready-for-agent` until #1767 is ruled and the cache exists." The contract the agent would build against — Mātou's signed binary cache, its home, owner and signing key — does not exist yet; #1767 (`ready-for-human`, the keystone) is where that one-way door is decided. `needs-design` is the state for "the thing you'd build against isn't ready; route back before implementation," and it keeps this off the swarm queue (`list-ready-tasks.sh` reads only `ready-for-agent`) until a human promotes it. - **Not `ready-for-human`:** the one-way-door residue (a new public surface + a new signing key) lives in #1767, which already carries `ready-for-human`. This ticket is delegable engineering once that contract is real — no separate human decision of its own. - **Set `depends_on #1767`** as a native Forgejo dependency (your comment named it in prose; it is now machine-readable), so the block is explicit and this surfaces the moment the keystone lands. **Why this is a two-way door:** every part is a label/dependency change, reversible by a later edit; nothing is committed to code and no member-facing or credential surface moves. **What proves it:** the dependency shows #1767 open as the blocker (`GET /issues/1770/dependencies`), and `list-ready-tasks.sh` reads only `ready-for-agent`, so a `needs-design` ticket is invisible to the swarm by construction. When #1767 is ruled and Mātou's signed cache exists, a human removes `needs-design` and applies `ready-for-agent`.

Blocked — ready-for-human (one-way door)

Asked in Mattermost, no reply within the window (the question thread for #1770 is still open — a late reply resumes it). Routing this to ready-for-human per ADR 0174: the residue is a genuine one-way door, not mine to rule.

The decision needed

#1770 asks the gateway to fetch vm-guest.tar (~263–400 MB) from Mātou's signed cache/feed and to drop the payload slot. But neither ADR 0272 nor ADR 0275 decides where a ~400 MB plain tar (not a Nix store path) is published, and nothing builds or publishes it to any signed surface today:

  • The get.idss.nz signed feed (ADR 0248) carries only small Mātou binaries by role — control-plane / control-panel / agent / idss-idp. There is no vm-guest role anywhere in internal/matourelease (Cut/Publish), internal/matouchannel, or internal/update/land.go. #1769 (fetch those small binaries from the feed) is not yet landed.
  • cache.idss.nz (ADR 0275, stood up by #1801 — also not landed) is a Nix binary cache (store paths / narinfo). vm-guest.tar is a plain tar, not a store path, so it does not fit the Nix-cache shape.
  • ADR 0275 pointedly routed large closures → object storage and small binaries → feed; the ~400 MB tar fits neither cleanly.

Question 1 — where, and what publishes it?

  • (a) get.idss.nz feed as a new artifact role — rides #1769's founding-time feed fetch, but a ~400 MB per-release artifact on a public surface is a new scale/cost, and the publish workflow lives under the protected .forgejo/ path (a #445 machinery change I cannot edit — it would need a separate ready-for-session ticket);
  • (b) cache.idss.nz object store as a plain signed object — matches ADR 0275's "large blobs → object storage", but needs its own signed-sha resolution separate from both the feed manifest and the Nix cache;
  • (c) something else.

Question 2 — ordering. Should #1770 wait on #1769 (the founding-time feed-fetch surface) and #1801 (the object store) landing first? The founding side already knows the pinned feed URL + release key + sequence (internal/founding/releasechannel.go), so the pinning exists — but no fetch-at-founding of a Mātou artifact is wired yet (that is #1769's core), and there is no published vm-guest.tar to fetch.

Why human (## Why human)

This is a new large public-artifact + publish-surface call of the same shape ADR 0275 reserved for Ben (like ADR 0269's storage.idss.nz): a new per-release ~400 MB artifact on a public surface, and possibly a protected-path (.forgejo/) publish step. It is not provable by a test I can run, and it is not revertible once a public surface + published artifacts exist.

Regression note for whoever re-arms this

Do not drop the payload slot (ask 2) before the chosen surface actually serves vm-guest.tar. Today the payload carries the tar and supply.go:seedGuestPayload copies it; drop it while the feed/cache serves nothing and every VM-mode device join regresses to fail-loud (/get?artifact=vm-guest 503 → device guest Create fails, ADR 0100) — not a degrade-to-today. The clean order is: decide the surface → add the publish step → wire the founding-time fetch+verify → then drop the slot.

What re-arms this

A ruling on Q1/Q2 (an ADR or an issue comment), the publish step for vm-guest.tar on the chosen surface, and #1769 landing the founding-time feed-fetch surface (if the answer is the feed). Then remove ready-for-human and add ready-for-agent.

## Blocked — ready-for-human (one-way door) **Asked in Mattermost, no reply within the window** (the question thread for #1770 is still open — a late reply resumes it). Routing this to `ready-for-human` per ADR 0174: the residue is a genuine one-way door, not mine to rule. ### The decision needed #1770 asks the gateway to **fetch** `vm-guest.tar` (~263–400 MB) from Mātou's signed cache/feed and to **drop the payload slot**. But neither ADR 0272 nor ADR 0275 decides **where a ~400 MB plain tar (not a Nix store path) is published**, and nothing builds or publishes it to any signed surface today: - The **get.idss.nz signed feed** (ADR 0248) carries only small Mātou binaries by role — `control-plane` / `control-panel` / `agent` / `idss-idp`. There is **no `vm-guest` role anywhere** in `internal/matourelease` (`Cut`/`Publish`), `internal/matouchannel`, or `internal/update/land.go`. #1769 (fetch those small binaries from the feed) is **not yet landed**. - **cache.idss.nz** (ADR 0275, stood up by #1801 — also **not landed**) is a **Nix binary cache** (store paths / narinfo). `vm-guest.tar` is a plain tar, **not a store path**, so it does not fit the Nix-cache shape. - ADR 0275 pointedly routed **large closures → object storage** and **small binaries → feed**; the ~400 MB tar fits neither cleanly. **Question 1 — where, and what publishes it?** - (a) get.idss.nz feed as a new artifact role — rides #1769's founding-time feed fetch, but a ~400 MB per-release artifact on a public surface is a new scale/cost, and the publish workflow lives under the **protected `.forgejo/` path** (a `#445` machinery change I cannot edit — it would need a separate `ready-for-session` ticket); - (b) cache.idss.nz object store as a plain signed object — matches ADR 0275's "large blobs → object storage", but needs its own signed-sha resolution separate from both the feed manifest and the Nix cache; - (c) something else. **Question 2 — ordering.** Should #1770 wait on **#1769** (the founding-time feed-fetch surface) and **#1801** (the object store) landing first? The founding side already knows the pinned feed URL + release key + sequence (`internal/founding/releasechannel.go`), so the *pinning* exists — but no fetch-at-founding of a Mātou artifact is wired yet (that is #1769's core), and there is no published `vm-guest.tar` to fetch. ### Why human (`## Why human`) This is a **new large public-artifact + publish-surface** call of the same shape ADR 0275 reserved for Ben (like ADR 0269's `storage.idss.nz`): a new per-release ~400 MB artifact on a public surface, and possibly a protected-path (`.forgejo/`) publish step. It is not provable by a test I can run, and it is not revertible once a public surface + published artifacts exist. ### Regression note for whoever re-arms this **Do not drop the payload slot (ask 2) before the chosen surface actually serves `vm-guest.tar`.** Today the payload carries the tar and `supply.go:seedGuestPayload` copies it; drop it while the feed/cache serves nothing and **every VM-mode device join regresses to fail-loud** (`/get?artifact=vm-guest` 503 → device guest Create fails, ADR 0100) — not a degrade-to-today. The clean order is: decide the surface → add the publish step → wire the founding-time fetch+verify → **then** drop the slot. ### What re-arms this A ruling on Q1/Q2 (an ADR or an issue comment), the publish step for `vm-guest.tar` on the chosen surface, and #1769 landing the founding-time feed-fetch surface (if the answer is the feed). Then remove `ready-for-human` and add `ready-for-agent`.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1770
No description provided.