The tier-3 installer-base seed scp's 2.2 GB inside the supply leg's 600s budget, so every re-found drive reds at supply #1048

Closed
opened 2026-08-30 19:20:38 +00:00 by matou-build-agent · 4 comments

Drive 20260830T190217Z (device target, commit e54ad748) went red at standing with journey leg "supply" went red: budget of 600s elapsed at "supply" (artifacts/legs.json, artifacts/verdict.json). The supply leg was not wedged — it was mid-copy on a transfer that cannot fit its ceiling.

What happened

Supply.seed runs seedInstallerBase synchronously on the supply leg (internal/fleetwire/supply.go:268). Its copy step scp -rs the payload's entire installer-base-cache to the gateway (internal/fleetwire/supply.go:318). On this workstation that cache is 2,286,999,872 bytes (/home/swarm/swarm/rehearsal-payload/installer-base-cache/nar, staged Aug 30 16:39).

Measured wire rate for that copy, from the drive's own evidence:

  • logs/gateway-journal.txt:961 — sshd-session[1113] accepted from the drive host at 19:05:51 (the last operational session before harvest).
  • logs/gateway-stall.txt — that same session at 19:15:04: bytes_received:279336282, busy:473363ms → ~590 KB/s. 2.2 GB at that rate is ~65 minutes.
  • logs/gateway-journal.txt:2009 — /var/lib/idss/installer-base-cache.staging still present and never renamed to the landed path; its nar/ holds a 245,975,040-byte partial .nar.xz with mtime 19:15 while every other entry is 19:10–19:11.

The supply ceiling is ['supply', 10 * 60_000] (app/tests/e2e/fixtures/rentedPrefix.ts:145). Widening it cannot help: the whole re-found runs under standing: 30 * 60_000 (app/tests/e2e/journey.device.spec.ts:93), still less than half the copy.

It is a dated regression

Supply was green on the two preceding device drives, at roughly a minute:

  • drive-device/20260830T152228Z — supply green, 62541 ms
  • drive-device/20260830T162742Z — supply green, 60758 ms
  • drive-device/20260830T190217Z — supply red, 600444 ms

Both green drives' gateways show no installer-base-cache under /var/lib/idss (their logs/gateway-journal.txt /var/lib/idss listings hold only agent-cache, device.key, enroll.json). Those drives took the payloadHasDir early return at internal/fleetwire/supply.go:287 — the payload carried no cache, so the seed never copied. The payload's cache was staged at 16:39, between the 16:27 green drive and this 19:02 red one, so this is the first founding drive on which the tier-3 seed actually ran.

Suspected layer

Two independent contributors, both in the release-staging / supply rail:

  1. The staged set over-collects (scripts/build-installer-base-warm.sh:74). nix-store --query --requisites --include-outputs "$drv" names the base build's own intermediates alongside the pkgsStatic inputs. The three largest entries in the cache are /nix/store/…-kexec-tarball (508,035,712 B), /nix/store/…-initrd (494,050,480 B) and /nix/store/…-squashfs.img (467,667,696 B) — 1.47 GB of the 2.2 GB. The narinfos for initrd and squashfs.img both carry an empty References line: they are leaf intermediates of the kexec-tarball's own build (squashfs → initrd → tarball, each embedding the previous), not inputs the gateway's renderInstallerMesh compose depends on. A gateway that already has the base tarball realised will not rebuild them. The --all comment at internal/fleetwire/supply.go:329-333 justifies staging the pkgsStatic outputs (they live inside the compressed initrd and no runtime root names them) — it does not cover the three assembled artifacts. Needs confirming against the actual compose derivation before cutting them, but if it holds it removes ~2/3 of the wire time.

  2. The seed has no wall-clock bound. Its doc contract says it "NEVER fails the supply leg" and that every failure "degrades to today's behaviour" (internal/fleetwire/supply.go:272-283), and the loop swallows step errors (supply.go:355-362). But it bounds only errors, not duration: ExecRunner.Run (internal/fleetwire/fleetwire.go:44) inherits the caller's context and nothing in internal/founding wraps the seed in a WithTimeout. So an optimisation that is contractually allowed to lose instead consumes the leg's entire budget and reds it. The marker short-circuit (supply.go:301-309) cannot help here — a re-found drive rents a fresh droplet, so the first founding always pays full price.

A secondary observation, same root: the leg surfaced a bare 9% on "Seed the fleet software onto the server" for the full 600 s (artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md page snapshot), and the failure carried no — last activity: suffix, i.e. snap.detail was empty. A multi-gigabyte scp behind one opaque stage row is why this cost a paid drive to identify rather than being visible while it ran.

What plugging it needs

A ruling on ADR 0133 tier 3 (docs/adr/0133-app-payload-carries-the-gateway-closure.md:94), because each option changes what the amendment promises:

  • Narrow the staged closure to the paths the final compose actually rebuilds — drop the assembled kexec-tarball/initrd/squashfs.img intermediates if the compose does not need them realised. Cheapest if the analysis above holds.
  • Bound the seed with its own deadline so it degrades as documented instead of eating the leg. Necessary as a backstop regardless, but on its own it silently disables #1036/#1042 on every founding — the takeover then always builds from source into the #1016 ceiling, which must be confirmed to fit deployTakeover: 45 * 60_000 (app/tests/e2e/journey.device.spec.ts:100).
  • Move the closure off the founding wire — bake it into the gateway image (the drive already boots idss-gateway-d49ece2b7e0c), so the copy is not paid per founding at all.

Whichever lands, the supply ceiling in app/tests/e2e/fixtures/rentedPrefix.ts:145 should be re-sized from a measured green drive, not widened to fit the current copy — 65 minutes does not fit the 30-minute standing ceiling either way.

drive 20260830T190217Z red at standing: journey leg "supply" went red: budget of 600s elapsed at "supply"
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260830T190217Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

Drive `20260830T190217Z` (device target, commit `e54ad748`) went red at `standing` with `journey leg "supply" went red: budget of 600s elapsed at "supply"` (`artifacts/legs.json`, `artifacts/verdict.json`). The supply leg was not wedged — it was mid-copy on a transfer that cannot fit its ceiling. ## What happened `Supply.seed` runs `seedInstallerBase` synchronously on the supply leg (`internal/fleetwire/supply.go:268`). Its copy step `scp -r`s the payload's entire `installer-base-cache` to the gateway (`internal/fleetwire/supply.go:318`). On this workstation that cache is **2,286,999,872 bytes** (`/home/swarm/swarm/rehearsal-payload/installer-base-cache/nar`, staged Aug 30 16:39). Measured wire rate for that copy, from the drive's own evidence: - `logs/gateway-journal.txt:961` — `sshd-session[1113]` accepted from the drive host at **19:05:51** (the last operational session before harvest). - `logs/gateway-stall.txt` — that same session at 19:15:04: `bytes_received:279336282`, `busy:473363ms` → **~590 KB/s**. 2.2 GB at that rate is **~65 minutes**. - `logs/gateway-journal.txt:2009` — `/var/lib/idss/installer-base-cache.staging` still present and never renamed to the landed path; its `nar/` holds a 245,975,040-byte partial `.nar.xz` with mtime 19:15 while every other entry is 19:10–19:11. The supply ceiling is `['supply', 10 * 60_000]` (`app/tests/e2e/fixtures/rentedPrefix.ts:145`). Widening it cannot help: the whole re-found runs under `standing: 30 * 60_000` (`app/tests/e2e/journey.device.spec.ts:93`), still less than half the copy. ## It is a dated regression Supply was green on the two preceding device drives, at roughly a minute: - `drive-device/20260830T152228Z` — supply green, 62541 ms - `drive-device/20260830T162742Z` — supply green, 60758 ms - `drive-device/20260830T190217Z` — supply **red, 600444 ms** Both green drives' gateways show **no `installer-base-cache` under `/var/lib/idss`** (their `logs/gateway-journal.txt` `/var/lib/idss` listings hold only `agent-cache`, `device.key`, `enroll.json`). Those drives took the `payloadHasDir` early return at `internal/fleetwire/supply.go:287` — the payload carried no cache, so the seed never copied. The payload's cache was staged at 16:39, between the 16:27 green drive and this 19:02 red one, so this is the first founding drive on which the tier-3 seed actually ran. ## Suspected layer Two independent contributors, both in the release-staging / supply rail: 1. **The staged set over-collects (`scripts/build-installer-base-warm.sh:74`).** `nix-store --query --requisites --include-outputs "$drv"` names the base build's own intermediates alongside the pkgsStatic inputs. The three largest entries in the cache are `/nix/store/…-kexec-tarball` (508,035,712 B), `/nix/store/…-initrd` (494,050,480 B) and `/nix/store/…-squashfs.img` (467,667,696 B) — 1.47 GB of the 2.2 GB. The narinfos for `initrd` and `squashfs.img` both carry an **empty `References` line**: they are leaf intermediates of the kexec-tarball's own build (squashfs → initrd → tarball, each embedding the previous), not inputs the gateway's `renderInstallerMesh` compose depends on. A gateway that already has the base tarball realised will not rebuild them. The `--all` comment at `internal/fleetwire/supply.go:329-333` justifies staging the pkgsStatic outputs (they live inside the compressed initrd and no runtime root names them) — it does not cover the three assembled artifacts. **Needs confirming against the actual compose derivation before cutting them**, but if it holds it removes ~2/3 of the wire time. 2. **The seed has no wall-clock bound.** Its doc contract says it "NEVER fails the supply leg" and that every failure "degrades to today's behaviour" (`internal/fleetwire/supply.go:272-283`), and the loop swallows step *errors* (`supply.go:355-362`). But it bounds only errors, not duration: `ExecRunner.Run` (`internal/fleetwire/fleetwire.go:44`) inherits the caller's context and nothing in `internal/founding` wraps the seed in a `WithTimeout`. So an optimisation that is contractually allowed to lose instead consumes the leg's entire budget and reds it. The marker short-circuit (`supply.go:301-309`) cannot help here — a re-found drive rents a fresh droplet, so the first founding always pays full price. A secondary observation, same root: the leg surfaced a bare `9%` on "Seed the fleet software onto the server" for the full 600 s (`artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md` page snapshot), and the failure carried no `— last activity:` suffix, i.e. `snap.detail` was empty. A multi-gigabyte scp behind one opaque stage row is why this cost a paid drive to identify rather than being visible while it ran. ## What plugging it needs A ruling on ADR 0133 tier 3 (`docs/adr/0133-app-payload-carries-the-gateway-closure.md:94`), because each option changes what the amendment promises: - **Narrow the staged closure** to the paths the final compose actually rebuilds — drop the assembled `kexec-tarball`/`initrd`/`squashfs.img` intermediates if the compose does not need them realised. Cheapest if the analysis above holds. - **Bound the seed** with its own deadline so it degrades as documented instead of eating the leg. Necessary as a backstop regardless, but on its own it silently disables #1036/#1042 on every founding — the takeover then always builds from source into the #1016 ceiling, which must be confirmed to fit `deployTakeover: 45 * 60_000` (`app/tests/e2e/journey.device.spec.ts:100`). - **Move the closure off the founding wire** — bake it into the gateway image (the drive already boots `idss-gateway-d49ece2b7e0c`), so the copy is not paid per founding at all. Whichever lands, the supply ceiling in `app/tests/e2e/fixtures/rentedPrefix.ts:145` should be re-sized from a measured green drive, not widened to fit the current copy — 65 minutes does not fit the 30-minute `standing` ceiling either way. drive `20260830T190217Z` red at `standing`: `journey leg "supply" went red: budget of 600s elapsed at "supply"` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260830T190217Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 25304f657c24 -->
Author
Member

Blocked — needs a human ruling on ADR 0133 Tier 3

I asked in Mattermost (thread wxbo186wzfraukjg63r8mn14uh) and got no reply inside the wait window, so I'm parking this with the decision and my findings recorded here.

Context. #1049 already landed the seed's own wall-clock backstop (internal/fleetwire/supply.go, defaultSeedTimeout = 300s), so this leg now degrades to the from-source takeover instead of reding — main is green. This ticket is the permanent fix (which of ADR 0133 Tier 3's three options to take), and that is a design ruling on the amendment Ben personally made.

What I confirmed against the compose derivation (option 1's premise holds):

  • The on-gateway compose is nix build .#installer.config.system.build.kexecInstallerTarball on a throwaway flake = base kexec-installer + the mesh module (internal/clan/installer_image.go:126,145). It therefore builds its own initrd/squashfs/tarball (they embed netbird → different store hashes).
  • So the base's three assembled artifacts — kexec-tarball (508 MB) + initrd (494 MB) + squashfs (467 MB) = 1.47 GB of the 2.2 GB — are never substituted by the compose. Only the shared pkgsStatic inputs (static CPython etc.) are, and those remain in the closure after the assembled outputs are dropped.

Why option 1 alone does not close the red on this rig: on the drive's own measured syd1 uplink (~576 KB/s, from logs/gateway-stall.txt), even dropping all three assembled artifacts leaves ~817 MB ≈ 23 min — still over the 10-min supply budget and straining the 30-min standing budget. Narrowing is a strict improvement (fits a normal uplink, degrades safely via #1049), but on the slow rehearsal rig it would still degrade to from-source, defeating Tier 3's purpose there.

The fork (what a human/session must rule):

  • (A) Ship option 1 (narrow the staged closure to the paths the compose actually rebuilds) as a strict improvement, and file separate follow-ups for the supply-ceiling resize + the slow rig. Precise/safe exclusion needs naming the base's initrd/squashfs outputs (a References-heuristic is unsafe — static CPython also has an empty References line), which I'd do via new flake eval attrs.
  • (B) Option 3 — bake the closure into the gateway-image snapshot (scripts/gateway-image/build.sh, mirroring Tier 2's guest image) so the copy is never paid per-founding. Bigger change; needs a snapshot rebuild + a paid drive to prove.
  • (C) Accept #1049's degrade as the answer for the slow rig and close #1048 as fixed-by-#1049.

My lean: (A) + file (B) as a follow-up. I did not rule it myself because it changes what the Tier-3 amendment promises, the cheap option is provably insufficient on the measured uplink, and no test I can run in-sandbox proves any option (proof is a paid founding+takeover drive).

Why human

An architectural ruling on ADR 0133 Tier 3 (a Ben-ruled amendment) where the revertible/cheap option is provably insufficient on the measured uplink and no in-sandbox test proves the alternatives — not a two-way door I can rule under ADR 0174.

## Blocked — needs a human ruling on ADR 0133 Tier 3 I asked in Mattermost (thread `wxbo186wzfraukjg63r8mn14uh`) and got no reply inside the wait window, so I'm parking this with the decision and my findings recorded here. **Context.** #1049 already landed the seed's own wall-clock backstop (`internal/fleetwire/supply.go`, `defaultSeedTimeout = 300s`), so this leg now **degrades to the from-source takeover instead of reding** — main is green. This ticket is the *permanent* fix (which of ADR 0133 Tier 3's three options to take), and that is a design ruling on the amendment Ben personally made. **What I confirmed against the compose derivation (option 1's premise holds):** - The on-gateway compose is `nix build .#installer.config.system.build.kexecInstallerTarball` on a throwaway flake = base kexec-installer **+** the mesh module (`internal/clan/installer_image.go:126,145`). It therefore builds its **own** initrd/squashfs/tarball (they embed netbird → different store hashes). - So the base's three assembled artifacts — kexec-tarball (508 MB) + initrd (494 MB) + squashfs (467 MB) = **1.47 GB of the 2.2 GB** — are **never substituted** by the compose. Only the shared `pkgsStatic` **inputs** (static CPython etc.) are, and those remain in the closure after the assembled outputs are dropped. **Why option 1 alone does not close the red on this rig:** on the drive's own measured syd1 uplink (~576 KB/s, from `logs/gateway-stall.txt`), even dropping all three assembled artifacts leaves ~817 MB ≈ **23 min** — still over the 10-min supply budget and straining the 30-min standing budget. Narrowing is a strict improvement (fits a normal uplink, degrades safely via #1049), but on the slow rehearsal rig it would still degrade to from-source, defeating Tier 3's purpose there. **The fork (what a human/session must rule):** - **(A)** Ship option 1 (narrow the staged closure to the paths the compose actually rebuilds) as a strict improvement, and file separate follow-ups for the supply-ceiling resize + the slow rig. Precise/safe exclusion needs naming the base's initrd/squashfs **outputs** (a References-heuristic is unsafe — static CPython also has an empty `References` line), which I'd do via new flake eval attrs. - **(B)** Option 3 — bake the closure into the gateway-image snapshot (`scripts/gateway-image/build.sh`, mirroring Tier 2's guest image) so the copy is never paid per-founding. Bigger change; needs a snapshot rebuild + a paid drive to prove. - **(C)** Accept #1049's degrade as the answer for the slow rig and close #1048 as fixed-by-#1049. **My lean:** (A) + file (B) as a follow-up. I did not rule it myself because it changes what the Tier-3 amendment promises, the cheap option is provably insufficient on the measured uplink, and no test I can run in-sandbox proves any option (proof is a paid founding+takeover drive). ## Why human An architectural ruling on ADR 0133 Tier 3 (a Ben-ruled amendment) where the revertible/cheap option is provably insufficient on the measured uplink and no in-sandbox test proves the alternatives — not a two-way door I can rule under ADR 0174.
Owner

Ruled by Ben (via session, 2026-08-30) — option (B), with (A) folded in

Ruling. Take the installer-base closure off the founding wire: bake it into the gateway-image snapshot (scripts/gateway-image/build.sh, mirroring Tier 2's guest image), so the copy is never paid per founding. Narrow it first (option A) — stage only the paths the on-gateway compose actually substitutes (the shared pkgsStatic inputs, ~817 MB), not the base's own assembled kexec-tarball/initrd/squashfs.img (1.47 GB the compose provably rebuilds). Name the excluded outputs via flake eval attrs, not a References heuristic (static CPython also has an empty References line).

Why B, not A alone: the measured ~590 KB/s uplink is not a rig quirk — it is a realistic founder's home connection. A per-founding multi-hundred-MB upload fails real founders the same way it failed this drive; A alone still degrades to from-source on that uplink and reds at the #1016 ceiling. Not C: the #1049 degrade is a backstop, not the answer — it leaves the takeover permanently at the 20 m build wall.

Scope for the worker:

  1. Narrow scripts/build-installer-base-warm.sh to the compose-substitutable set (drop the three assembled artifacts by named output); keep the loud partial-cache check.
  2. Gateway image: scripts/gateway-image/build.sh realises that set into the image's /nix/store (or a pre-landed /var/lib/idss/installer-base-cache + marker, whichever seedInstallerBase's marker short-circuit at supply.go:301-309 recognises without a copy). The supply-leg seed must then no-op on a gateway booted from the new image — the marker path is the contract.
  3. Keep the payload-side seed (#1036/#1042/#1049) as the fallback for gateways booted from an older image; it now moves ≤ ~817 MB and degrades at 300 s as landed.
  4. Re-size the supply ceiling (app/tests/e2e/fixtures/rentedPrefix.ts:145) from a measured green drive, not to fit a copy.
  5. Amend ADR 0133 Tier 3 (docs/adr/0133-…md:94): the gateway image carries the static base; the payload seed is the fallback rail. Update docs/architecture diagram(s) touched (ADR 0042) and STATUS.md.
  6. Proof = a paid founding + takeover drive on #854 (deploy-takeover green on a gateway booted from the new snapshot). Rebuilding/pinning the snapshot the drive boots (idss-gateway-…) is part of this ticket — flip ready-for-human only for the actual snapshot publish step if it needs Ben's DO hands.

The Mattermost thread wxbo186wzfraukjg63r8mn14uh is answered by this comment. Flipping to ready-for-agent.

## Ruled by Ben (via session, 2026-08-30) — option **(B)**, with (A) folded in **Ruling.** Take the installer-base closure **off the founding wire**: bake it into the gateway-image snapshot (`scripts/gateway-image/build.sh`, mirroring Tier 2's guest image), so the copy is never paid per founding. **Narrow it first (option A)** — stage only the paths the on-gateway compose actually substitutes (the shared `pkgsStatic` inputs, ~817 MB), not the base's own assembled `kexec-tarball`/`initrd`/`squashfs.img` (1.47 GB the compose provably rebuilds). Name the excluded outputs via flake eval attrs, not a `References` heuristic (static CPython also has an empty `References` line). **Why B, not A alone:** the measured ~590 KB/s uplink is not a rig quirk — it is a realistic founder's home connection. A per-founding multi-hundred-MB upload fails real founders the same way it failed this drive; A alone still degrades to from-source on that uplink and reds at the #1016 ceiling. **Not C:** the #1049 degrade is a backstop, not the answer — it leaves the takeover permanently at the 20 m build wall. **Scope for the worker:** 1. Narrow `scripts/build-installer-base-warm.sh` to the compose-substitutable set (drop the three assembled artifacts by named output); keep the loud partial-cache check. 2. Gateway image: `scripts/gateway-image/build.sh` realises that set into the image's `/nix/store` (or a pre-landed `/var/lib/idss/installer-base-cache` + marker, whichever `seedInstallerBase`'s marker short-circuit at `supply.go:301-309` recognises without a copy). The supply-leg seed must then no-op on a gateway booted from the new image — the marker path is the contract. 3. Keep the payload-side seed (#1036/#1042/#1049) as the fallback for gateways booted from an older image; it now moves ≤ ~817 MB and degrades at 300 s as landed. 4. Re-size the supply ceiling (`app/tests/e2e/fixtures/rentedPrefix.ts:145`) from a measured green drive, not to fit a copy. 5. Amend ADR 0133 Tier 3 (`docs/adr/0133-…md:94`): the gateway image carries the static base; the payload seed is the fallback rail. Update `docs/architecture` diagram(s) touched (ADR 0042) and STATUS.md. 6. Proof = a paid founding + takeover drive on #854 (`deploy-takeover` green on a gateway booted from the new snapshot). Rebuilding/pinning the snapshot the drive boots (`idss-gateway-…`) is part of this ticket — flip `ready-for-human` only for the actual snapshot publish step if it needs Ben's DO hands. The Mattermost thread `wxbo186wzfraukjg63r8mn14uh` is answered by this comment. Flipping to `ready-for-agent`.
Author
Member

Code landed on main (a4252af4) — snapshot publish + proof drive is the residual human step

Implemented Ben's ruling (option B with A folded in). Everything provable in-sandbox is done and pushed to origin/main; what remains needs DO hands + a paid drive, exactly as the ruling's item 6 named ("flip ready-for-human only for the actual snapshot publish step if it needs Ben's DO hands").

What landed (a4252af4):

  1. Narrow the cache (A). scripts/build-installer-base-warm.sh now drops the base's three assembled artifacts — the kexec tarball (kexec-tarball, 508 MB), its initrd (netbootRamdisk → initrd, 494 MB) and its squashfs (squashfsStore → squashfs.img, 467 MB), 1.47 GB of 2.29 GB — which the on-gateway compose provably rebuilds (netbird-baked toplevel → different store hashes), leaving the ~817 MB of shared pkgsStatic inputs it substitutes. Named by exact out path via three new flake.nix eval attrs (packages.kexec-installer-base{,-initrd,-squashfs}), not a References heuristic. Verified live: the three attrs resolve to exactly kexec-tarball/initrd/squashfs.img against the pinned nixos-images rev, and nothing kept References them (the narrowed cache stays a complete importable closure).
  2. Marker migration. The dropped tarball can no longer be the marker, so it is now the base system toplevel (packages.kexec-installer-base-toplevel) — a path that stays in the narrowed set, so the seed's present-check/short-circuit and GC root still work. installer-base-staleness-lib.sh evals the same attr, so the staleness key never drifts. internal/fleetwire/supply.go is marker-agnostic (no Go change needed).
  3. Bake into the golden snapshot (B, primary rail). scripts/gateway-image/build.sh realises the narrowed cache into the snapshot's store and lands the same on-box layout founding does (/var/lib/idss/installer-base-cache + /var/lib/idss/installer-base.toplevel marker + /nix/var/nix/gcroots/idss-installer-base). A gateway booted from the new snapshot is warm at founding: the supply seed's marker present-check hits and it no-ops; the standing re-seed no-ops too. Fails loud (a golden image meant to be warm must not ship cold). New scripts/lib/gateway-image-installer-base-lib.sh.
  4. Payload seed stays the fallback rail (#1036/#1042/#1049) for older-snapshot gateways — now moving ≤ ~817 MB, bounded at 300 s.
  5. Docs: ADR 0133 Tier-3 amendment, docs/architecture/11-update-supply-chain.md, STATUS.md.

Tests: offline installer-base-narrow-test.sh (8) + gateway-image-installer-base-test.sh (6) green; installer-base-staleness-test.sh (6) + internal/clan flake-reading Go tests green. flake.nix parses and the new attrs eval.

Why human

The remaining work is not provable by any test I can run in-sandbox — it needs a DO account and a paid drive:

  1. Rebuild + publish the gateway snapshot with the new build.sh (which now bakes the warm base) — Ben's ! on DO.
  2. Prove it: a founding + member-device takeover drive on a gateway booted from the new snapshot — deploy-takeover green with no pkgsStatic from source and no per-founding installer-base copy (#854's loop-closer).
  3. Resize the supply ceiling (app/tests/e2e/fixtures/rentedPrefix.ts:145) from THAT measured green drive — deliberately NOT changed here, because sizing it to a guess is the exact thing the ruling forbids.

Re-arm with ready-for-agent only if the code itself needs another pass; the snapshot publish + proof + ceiling resize are the human residue.

## Code landed on main (`a4252af4`) — snapshot publish + proof drive is the residual human step Implemented Ben's ruling (option **B** with **A** folded in). Everything provable in-sandbox is done and pushed to `origin/main`; what remains needs DO hands + a paid drive, exactly as the ruling's item 6 named ("flip `ready-for-human` only for the actual snapshot publish step if it needs Ben's DO hands"). **What landed (`a4252af4`):** 1. **Narrow the cache (A).** `scripts/build-installer-base-warm.sh` now drops the base's three assembled artifacts — the kexec tarball (`kexec-tarball`, 508 MB), its initrd (`netbootRamdisk` → `initrd`, 494 MB) and its squashfs (`squashfsStore` → `squashfs.img`, 467 MB), **1.47 GB of 2.29 GB** — which the on-gateway compose provably rebuilds (netbird-baked toplevel → different store hashes), leaving the ~817 MB of shared `pkgsStatic` inputs it substitutes. Named by **exact out path via three new `flake.nix` eval attrs** (`packages.kexec-installer-base{,-initrd,-squashfs}`), not a `References` heuristic. Verified live: the three attrs resolve to exactly `kexec-tarball`/`initrd`/`squashfs.img` against the pinned nixos-images rev, and nothing kept References them (the narrowed cache stays a complete importable closure). 2. **Marker migration.** The dropped tarball can no longer be the marker, so it is now the base **system toplevel** (`packages.kexec-installer-base-toplevel`) — a path that stays *in* the narrowed set, so the seed's present-check/short-circuit and GC root still work. `installer-base-staleness-lib.sh` evals the same attr, so the staleness key never drifts. `internal/fleetwire/supply.go` is marker-agnostic (no Go change needed). 3. **Bake into the golden snapshot (B, primary rail).** `scripts/gateway-image/build.sh` realises the narrowed cache into the snapshot's store and lands the **same on-box layout founding does** (`/var/lib/idss/installer-base-cache` + `/var/lib/idss/installer-base.toplevel` marker + `/nix/var/nix/gcroots/idss-installer-base`). A gateway booted from the new snapshot is warm at founding: the supply seed's marker present-check hits and it **no-ops**; the standing re-seed no-ops too. Fails loud (a golden image meant to be warm must not ship cold). New `scripts/lib/gateway-image-installer-base-lib.sh`. 4. **Payload seed stays the fallback rail** (#1036/#1042/#1049) for older-snapshot gateways — now moving ≤ ~817 MB, bounded at 300 s. 5. **Docs:** ADR 0133 Tier-3 amendment, `docs/architecture/11-update-supply-chain.md`, `STATUS.md`. **Tests:** offline `installer-base-narrow-test.sh` (8) + `gateway-image-installer-base-test.sh` (6) green; `installer-base-staleness-test.sh` (6) + `internal/clan` flake-reading Go tests green. `flake.nix` parses and the new attrs eval. ## Why human The remaining work is not provable by any test I can run in-sandbox — it needs a DO account and a paid drive: 1. **Rebuild + publish the gateway snapshot** with the new `build.sh` (which now bakes the warm base) — Ben's `!` on DO. 2. **Prove it:** a founding + member-device takeover drive on a gateway booted from the new snapshot — `deploy-takeover` green with no `pkgsStatic` from source and no per-founding installer-base copy (#854's loop-closer). 3. **Resize the supply ceiling** (`app/tests/e2e/fixtures/rentedPrefix.ts:145`) from THAT measured green drive — deliberately NOT changed here, because sizing it to a guess is the exact thing the ruling forbids. Re-arm with `ready-for-agent` only if the code itself needs another pass; the snapshot publish + proof + ceiling resize are the human residue.
Owner

Snapshot published — residue routed, closing to un-park #854

Ben ran scripts/gateway-image/build.sh on elitebook-03 (checkout at a4252af4, log /home/swarm/swarm/gateway-image-build.log, rc=0, 2026-08-31 ~03:35–04:16Z):

  • bake step: ==> done: 1355 store paths cached (the 3 assembled artifacts dropped from 1,358), marker = /nix/store/g9z22mi6mjdgnd5wsb3ylx1dl6d3ax1m-nixos-system-nixos-installer-kexec-26.05pre-git, imported with nix copy, marker validated in the baked store — "the supply/standing seed will no-op on a gateway booted from it".
  • identity scrub: generic (no host key #707, no authorized_keys #744).
  • snapshot 243443521 idss-gateway-a4252af41e5a, 5.87 GiB (prior d49ece2b7e0c was 2.40 GiB — the +3.5 GiB is the warm closure), build droplet 596484976 deleted. scripts/gateway-image/latest.sh → 243443521 idss-gateway-a4252af41e5a.

Residue from the landing comment:

  1. snapshot publish — done (above); future rebuilds are automatic on the device target too (#1050, ef5da70d).
  2. proof drive — is the #854 re-fire this close triggers: watch supply no-op (marker hit) and deploy-takeover with no pkgsStatic from source.
  3. supply-ceiling resize — #1055, parked until that green drive gives the measurement.

Closing under ADR 0174 (two-way door: d49ece2b7e0c still exists to pin back to).

## Snapshot published — residue routed, closing to un-park #854 Ben ran `scripts/gateway-image/build.sh` on elitebook-03 (checkout at `a4252af4`, log `/home/swarm/swarm/gateway-image-build.log`, rc=0, 2026-08-31 ~03:35–04:16Z): - bake step: `==> done: 1355 store paths cached` (the 3 assembled artifacts dropped from 1,358), marker = `/nix/store/g9z22mi6mjdgnd5wsb3ylx1dl6d3ax1m-nixos-system-nixos-installer-kexec-26.05pre-git`, imported with `nix copy`, marker validated in the baked store — "the supply/standing seed will no-op on a gateway booted from it". - identity scrub: generic (no host key #707, no authorized_keys #744). - **snapshot `243443521` `idss-gateway-a4252af41e5a`, 5.87 GiB** (prior `d49ece2b7e0c` was 2.40 GiB — the +3.5 GiB is the warm closure), build droplet `596484976` deleted. `scripts/gateway-image/latest.sh` → `243443521 idss-gateway-a4252af41e5a`. Residue from the landing comment: 1. snapshot publish — **done** (above); future rebuilds are automatic on the device target too (#1050, `ef5da70d`). 2. proof drive — **is the #854 re-fire this close triggers**: watch `supply` no-op (marker hit) and `deploy-takeover` with no `pkgsStatic` from source. 3. supply-ceiling resize — **#1055**, parked until that green drive gives the measurement. Closing under ADR 0174 (two-way door: `d49ece2b7e0c` still exists to pin back to).
ben 2026-08-31 04:18:28 +00:00
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#1048
No description provided.