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
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1048
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Drive
20260830T190217Z(device target, commite54ad748) went red atstandingwithjourney 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.seedrunsseedInstallerBasesynchronously on the supply leg (internal/fleetwire/supply.go:268). Its copy stepscp -rs the payload's entireinstaller-base-cacheto 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.stagingstill present and never renamed to the landed path; itsnar/holds a 245,975,040-byte partial.nar.xzwith 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 understanding: 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 msdrive-device/20260830T162742Z— supply green, 60758 msdrive-device/20260830T190217Z— supply red, 600444 msBoth green drives' gateways show no
installer-base-cacheunder/var/lib/idss(theirlogs/gateway-journal.txt/var/lib/idsslistings hold onlyagent-cache,device.key,enroll.json). Those drives took thepayloadHasDirearly return atinternal/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:
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 forinitrdandsquashfs.imgboth carry an emptyReferencesline: they are leaf intermediates of the kexec-tarball's own build (squashfs → initrd → tarball, each embedding the previous), not inputs the gateway'srenderInstallerMeshcompose depends on. A gateway that already has the base tarball realised will not rebuild them. The--allcomment atinternal/fleetwire/supply.go:329-333justifies 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.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 ininternal/foundingwraps the seed in aWithTimeout. 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.mdpage snapshot), and the failure carried no— last activity:suffix, i.e.snap.detailwas 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:kexec-tarball/initrd/squashfs.imgintermediates if the compose does not need them realised. Cheapest if the analysis above holds.deployTakeover: 45 * 60_000(app/tests/e2e/journey.device.spec.ts:100).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:145should be re-sized from a measured green drive, not widened to fit the current copy — 65 minutes does not fit the 30-minutestandingceiling either way.drive
20260830T190217Zred atstanding:journey leg "supply" went red: budget of 600s elapsed at "supply"evidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260830T190217Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedBlocked — 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):
nix build .#installer.config.system.build.kexecInstallerTarballon 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).pkgsStaticinputs (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):
Referencesline), which I'd do via new flake eval attrs.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.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.
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 sharedpkgsStaticinputs, ~817 MB), not the base's own assembledkexec-tarball/initrd/squashfs.img(1.47 GB the compose provably rebuilds). Name the excluded outputs via flake eval attrs, not aReferencesheuristic (static CPython also has an emptyReferencesline).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:
scripts/build-installer-base-warm.shto the compose-substitutable set (drop the three assembled artifacts by named output); keep the loud partial-cache check.scripts/gateway-image/build.shrealises that set into the image's/nix/store(or a pre-landed/var/lib/idss/installer-base-cache+ marker, whicheverseedInstallerBase's marker short-circuit atsupply.go:301-309recognises 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.app/tests/e2e/fixtures/rentedPrefix.ts:145) from a measured green drive, not to fit a copy.docs/adr/0133-…md:94): the gateway image carries the static base; the payload seed is the fallback rail. Updatedocs/architecturediagram(s) touched (ADR 0042) and STATUS.md.deploy-takeovergreen on a gateway booted from the new snapshot). Rebuilding/pinning the snapshot the drive boots (idss-gateway-…) is part of this ticket — flipready-for-humanonly for the actual snapshot publish step if it needs Ben's DO hands.The Mattermost thread
wxbo186wzfraukjg63r8mn14uhis answered by this comment. Flipping toready-for-agent.Code landed on main (
a4252af4) — snapshot publish + proof drive is the residual human stepImplemented 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 ("flipready-for-humanonly for the actual snapshot publish step if it needs Ben's DO hands").What landed (
a4252af4):scripts/build-installer-base-warm.shnow 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 sharedpkgsStaticinputs it substitutes. Named by exact out path via three newflake.nixeval attrs (packages.kexec-installer-base{,-initrd,-squashfs}), not aReferencesheuristic. Verified live: the three attrs resolve to exactlykexec-tarball/initrd/squashfs.imgagainst the pinned nixos-images rev, and nothing kept References them (the narrowed cache stays a complete importable closure).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.shevals the same attr, so the staleness key never drifts.internal/fleetwire/supply.gois marker-agnostic (no Go change needed).scripts/gateway-image/build.shrealises 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.toplevelmarker +/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). Newscripts/lib/gateway-image-installer-base-lib.sh.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/clanflake-reading Go tests green.flake.nixparses 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:
build.sh(which now bakes the warm base) — Ben's!on DO.deploy-takeovergreen with nopkgsStaticfrom source and no per-founding installer-base copy (#854's loop-closer).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-agentonly if the code itself needs another pass; the snapshot publish + proof + ceiling resize are the human residue.Snapshot published — residue routed, closing to un-park #854
Ben ran
scripts/gateway-image/build.shon elitebook-03 (checkout ata4252af4, log/home/swarm/swarm/gateway-image-build.log, rc=0, 2026-08-31 ~03:35–04:16Z):==> 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 withnix copy, marker validated in the baked store — "the supply/standing seed will no-op on a gateway booted from it".243443521idss-gateway-a4252af41e5a, 5.87 GiB (priord49ece2b7e0cwas 2.40 GiB — the +3.5 GiB is the warm closure), build droplet596484976deleted.scripts/gateway-image/latest.sh→243443521 idss-gateway-a4252af41e5a.Residue from the landing comment:
ef5da70d).supplyno-op (marker hit) anddeploy-takeoverwith nopkgsStaticfrom source.Closing under ADR 0174 (two-way door:
d49ece2b7e0cstill exists to pin back to).cache.idss.nz: the Spaces bucket, the rail's access key, thecache.idss.nz-1signing key in matou-infra, and the sign-and-publish step (ADR 0275) #1801