takeover: the payload carries kexec-installer-base and founding seeds the GATEWAY's store, so the installer compose is cheap on a warm box (ADR 0133 Tier 3, #1016 ruled carry-the-closure) #1036

Closed
opened 2026-08-30 14:53:16 +00:00 by ben · 2 comments
Owner

Parent

#1016 (ruled by Ben: carry-the-closure; ADR 0133 amendment Tier 3, commit b5552e40) · blocks #854.

What to build

The member-device takeover's installer image stops costing a from-source pkgsStatic build on the smallest box in the fleet:

  1. The release payload carries the packages.kexec-installer-base closure, staged with the same file:// binary-cache mechanism as ADR 0133 Tier 1 (scripts/build-gateway-warm.sh precedent).
  2. The founding seeds that closure into the gateway's own store — the box that composes the installer at takeover time (mirror of the Tier-1 import on the operator machine; the seed/supply leg is the natural carrier).
  3. The per-takeover compose (renderInstallerMesh baking the single-use setup key, #1012/#1014) is unchanged — it just runs against a warm store.
  4. NO third-party substituter appears on any fleet box (rejected in the amendment); NO build moves to the operator's machine (rejected).

Evidence base: drive 20260830T034644Z — 46+ CPU-min LTO of static CPython on the 2-vCPU gateway, memory pegged, build unbounded (ceiling since landed d4dd04a1, which stays as the loud backstop).

Acceptance criteria

  • On a fresh founding + takeover, the gateway's nix build .#installer...kexecInstallerTarball completes within the d4dd04a1 ceiling with no pkgsStatic derivation built from source (the base paths are substituted from the seeded cache).
  • The payload build stages the kexec-installer-base closure; a warm-cache CI/offline check proves the staged cache serves every path the installer flake's base closure needs (no silent partial cache).
  • No substituters/trusted-public-keys pointing off-box appear in any fleet image.
  • Offline: render/eval tests prove the seed leg imports the cache into the gateway store and the compose path prefers it.
## Parent #1016 (ruled by Ben: carry-the-closure; ADR 0133 amendment Tier 3, commit `b5552e40`) · blocks #854. ## What to build The member-device takeover's installer image stops costing a from-source `pkgsStatic` build on the smallest box in the fleet: 1. The release payload carries the `packages.kexec-installer-base` closure, staged with the same `file://` binary-cache mechanism as ADR 0133 Tier 1 (`scripts/build-gateway-warm.sh` precedent). 2. The founding **seeds that closure into the gateway's own store** — the box that composes the installer at takeover time (mirror of the Tier-1 import on the operator machine; the seed/supply leg is the natural carrier). 3. The per-takeover compose (`renderInstallerMesh` baking the single-use setup key, #1012/#1014) is unchanged — it just runs against a warm store. 4. NO third-party substituter appears on any fleet box (rejected in the amendment); NO build moves to the operator's machine (rejected). Evidence base: drive `20260830T034644Z` — 46+ CPU-min LTO of static CPython on the 2-vCPU gateway, memory pegged, build unbounded (ceiling since landed `d4dd04a1`, which stays as the loud backstop). ## Acceptance criteria - [ ] On a fresh founding + takeover, the gateway's `nix build .#installer...kexecInstallerTarball` completes within the `d4dd04a1` ceiling with no `pkgsStatic` derivation built from source (the base paths are substituted from the seeded cache). - [ ] The payload build stages the `kexec-installer-base` closure; a warm-cache CI/offline check proves the staged cache serves every path the installer flake's base closure needs (no silent partial cache). - [ ] No `substituters`/`trusted-public-keys` pointing off-box appear in any fleet image. - [ ] Offline: render/eval tests prove the seed leg imports the cache into the gateway store and the compose path prefers it.

swarm-claim host=matou-dev-server-01 run=14592
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=14592 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1036 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1036,
  "status": "success",
  "commits": [
    "e765e18e"
  ],
  "changed_files": [
    "scripts/build-installer-base-warm.sh",
    "scripts/assemble-payload.sh",
    "internal/fleetwire/supply.go",
    "internal/fleetwire/supply_test.go",
    "internal/clan/installer_image_test.go",
    "docs/architecture/11-update-supply-chain.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/fleetwire/ -run 'SupplySeed|InstallerBase' -count=1",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/ -run InstallerImage -count=1",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command gofmt -l internal/fleetwire/supply.go internal/fleetwire/supply_test.go internal/clan/installer_image_test.go",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/build-installer-base-warm.sh && bash -n scripts/assemble-payload.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "On a fresh founding + takeover, the gateway's nix build .#installer...kexecInstallerTarball completes within the d4dd04a1 ceiling with no pkgsStatic derivation built from source": "LIVE-DRIVE loop-closer (design-verify), not offline-provable in the sandbox — the mechanism that enables it is landed: build-installer-base-warm.sh stages the base build-closure outputs and fleetwire.seedInstallerBase imports them into the gateway store, so the compose substitutes the pkgsStatic paths instead of building them. Mirrors how ADR 0133 Tier 1's Primer shipped offline and was proven on drive 19.",
    "The payload build stages the kexec-installer-base closure; a warm-cache CI/offline check proves the staged cache serves every path the installer flake's base closure needs (no silent partial cache)": "scripts/build-installer-base-warm.sh stages the full valid build-closure outputs of .#kexec-installer-base as a file:// cache, and refuses a PARTIAL cache — it counts narinfos in the cache and fails loud unless it equals the number of staged paths. assemble-payload.sh gains the installer-base-cache/ slot.",
    "No substituters/trusted-public-keys pointing off-box appear in any fleet image": "TestInstallerImage_ComposingFlakeRegistersNoOffBoxSubstituter (clan) asserts the takeover's composing flake carries no substituters/trusted-public-keys/off-box cache; TestSupplySeed_ImportsInstallerBaseCacheWhenCold (fleetwire) asserts the seed command registers no off-box substituter (explicit nix copy import only). grep confirmed nix/ carries none.",
    "Offline: render/eval tests prove the seed leg imports the cache into the gateway store and the compose path prefers it": "fleetwire tests prove the seed leg imports (scp cache to the gateway + nix copy --no-check-sigs --from file://... --all + GC root, idempotent via a marker present-check, best-effort so founding never reds); TestInstallerImage_WarmBaseSharesTheComposeBase (clan) proves the warm cache and the takeover compose share the same nixos-images kexec-installer base on nixos-stable, so a seeded store lets the compose substitute the pkgsStatic paths."
  },
  "summary": "ADR 0133 Tier 3 landed: the payload carries the kexec-installer-base closure and founding seeds it into the gateway's own store on the supply leg, so the member-device takeover's on-box installer compose runs warm.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1036 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1036, "status": "success", "commits": [ "e765e18e" ], "changed_files": [ "scripts/build-installer-base-warm.sh", "scripts/assemble-payload.sh", "internal/fleetwire/supply.go", "internal/fleetwire/supply_test.go", "internal/clan/installer_image_test.go", "docs/architecture/11-update-supply-chain.md", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/fleetwire/ -run 'SupplySeed|InstallerBase' -count=1", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./internal/clan/ -run InstallerImage -count=1", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command gofmt -l internal/fleetwire/supply.go internal/fleetwire/supply_test.go internal/clan/installer_image_test.go", "exit_code": 0 }, { "command": "bash -n scripts/build-installer-base-warm.sh && bash -n scripts/assemble-payload.sh", "exit_code": 0 } ], "criteria": { "On a fresh founding + takeover, the gateway's nix build .#installer...kexecInstallerTarball completes within the d4dd04a1 ceiling with no pkgsStatic derivation built from source": "LIVE-DRIVE loop-closer (design-verify), not offline-provable in the sandbox — the mechanism that enables it is landed: build-installer-base-warm.sh stages the base build-closure outputs and fleetwire.seedInstallerBase imports them into the gateway store, so the compose substitutes the pkgsStatic paths instead of building them. Mirrors how ADR 0133 Tier 1's Primer shipped offline and was proven on drive 19.", "The payload build stages the kexec-installer-base closure; a warm-cache CI/offline check proves the staged cache serves every path the installer flake's base closure needs (no silent partial cache)": "scripts/build-installer-base-warm.sh stages the full valid build-closure outputs of .#kexec-installer-base as a file:// cache, and refuses a PARTIAL cache — it counts narinfos in the cache and fails loud unless it equals the number of staged paths. assemble-payload.sh gains the installer-base-cache/ slot.", "No substituters/trusted-public-keys pointing off-box appear in any fleet image": "TestInstallerImage_ComposingFlakeRegistersNoOffBoxSubstituter (clan) asserts the takeover's composing flake carries no substituters/trusted-public-keys/off-box cache; TestSupplySeed_ImportsInstallerBaseCacheWhenCold (fleetwire) asserts the seed command registers no off-box substituter (explicit nix copy import only). grep confirmed nix/ carries none.", "Offline: render/eval tests prove the seed leg imports the cache into the gateway store and the compose path prefers it": "fleetwire tests prove the seed leg imports (scp cache to the gateway + nix copy --no-check-sigs --from file://... --all + GC root, idempotent via a marker present-check, best-effort so founding never reds); TestInstallerImage_WarmBaseSharesTheComposeBase (clan) proves the warm cache and the takeover compose share the same nixos-images kexec-installer base on nixos-stable, so a seeded store lets the compose substitute the pkgsStatic paths." }, "summary": "ADR 0133 Tier 3 landed: the payload carries the kexec-installer-base closure and founding seeds it into the gateway's own store on the supply leg, so the member-device takeover's on-box installer compose runs warm.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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#1036
No description provided.