the gateway deploy uploads 4.15 GB of stock nixpkgs from the operator's laptop — the enrollment leg's --substitute-on-destination (#699) never reached machines update #1764
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1764
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?
What happened
A cold manual founding on 2026-09-23 (rented path,
whakatohea-demo, DigitalOcean syd1). The takeover finished, the gateway paired, and the deploy step began. Then nothing moved for the better part of an hour — the progress bar was full and the operator asked whether the app was stuck.It wasn't stuck. It was pushing 4.16 GB from the operator's laptop over a home wifi uplink to Sydney, at a measured 270 KB/s: about four hours, to deliver 6 MB of community content.
Measured on the live run (
ss -tin): 52,734,143 bytes sent in 190 s, RTT 331 ms.What is in those bytes
The delta between the system already on the box (the takeover copy, 903 paths) and the system the deploy is installing (1216 paths) is 347 paths, 4.16 GB of NAR. Split by whether the destination could fetch it itself:
system-path, the vendored Caddy pluginsThe gateway can fetch every one of those 255 signed paths from cache.nixos.org itself, in parallel, on a datacentre uplink. It fetches them from the operator's laptop instead.
Cause
The enrollment copy already knows this.
internal/clan/enrollment.go:1345:with a comment that spells out exactly this failure mode and cites #699 — "a ~55m transfer" without the flag.
The deploy leg gets none of that.
internal/clan/adapter.go:626shells out to the pinned clan CLI:and clan's own internal
nix copynever passes--substitute-on-destination. Confirmed against the running process on the live box:No
--substitute-on-destination. So the #699 lesson holds for the leg that copies the takeover system and is lost for the leg that copies the services, which is the bigger closure of the two — everything a community actually installs (Nextcloud alone is most of the 4 GB) rides the second leg.--build-host localhostis right and must stay (#1215: without it a VM-mode member builds on a 1 GB guest and nix is OOM-killed). Building here is not the problem. Shipping the result of the build byte-by-byte from here is.Asks
nix copy --substitute-on-destinationof the toplevel beforemachines update, so clan's own copy finds almost everything already present and pushes only the handful of unsigned paths.internal/clan/enrollment_test.go:1994, pinning it for the deploy leg too, so the two legs cannot drift apart again.Proof it is the flag
On the live run the deploy was stopped and the same toplevel copied by hand with
--substitute-on-destination, against the same gateway over the same wifi. The laptop's uplink use dropped from 270 KB/s saturated to ~82 KB/s of control traffic — the gateway was fetching the stock paths itself.Related: #699 (the enrollment leg's version of this), #1215 (why
--build-host localhoststays), #1760/#1761 (other cold-founding defects from the same run).Correction on which leg, and the measured proof.
Which leg. The 4.16 GB push is the services apply, not the control-plane apply. The control plane had already activated (
st.Activatedtrue), sointernal/founding/services.go:214re-entersapplyControlPlanefor the tip carrying the attached service modules. Both legs go through the sameupdateNodeatinternal/clan/adapter.go:626, so the missing flag is one fix — but it bites hardest here, because this is the closure that carries what a community actually installs. On this run the services placed were Files & documents, Document editing, Community archive and Data collections; Nextcloud alone is most of the 4 GB.Measured proof the flag is the whole story. The deploy was stopped and the identical toplevel copied by hand against the same gateway, over the same wifi, with
--substitute-on-destinationadded:ls -d /nix/store/bd49f30…on the box resolves).So: 4 hours → 7 minutes on a home connection, for one flag.
The operator-facing cost when it isn't fixed. The services apply is deliberately non-fatal (#1392, ADR 0100) — correct behaviour, and it worked honestly here: the deploy reported
liveand all four services landed as "the deploy did not hold — add … from the control panel". But stack that on top of a four-hour silent push and the realistic outcome is an operator who concludes the app has hung, kills it, and arrives at hand-off with a live community and zero services — having been given no way to tell "working" from "stuck". That is this run, exactly.See also the sibling ticket on the same step reporting no progress at all.
updateNodewires no progress sink, and 45 of 46 founding events are stamped 0001-01-01 #1765Sibling on the same step: #1765 — why the operator could not tell this was working.
This is now decision 1 of ADR 0272 (
docs/adr/0272-the-target-fetches-its-own-bytes-the-installer-carries-only-the-pre-gateway-bootstrap.md, landed180b4975) — the founding device sends a target only what the target cannot obtain itself. The measurement on this ticket is the ADR's central evidence.This ticket stays independent: it needs nothing from the rest of the slice (#1767, #1768, #1769, #1770, #1771, #1772) and is the one piece that helps every founding immediately.
vm-guest.tarrather than being handed 263 MB of it at founding (ADR 0272) #1770swarm-claim host=matou-dev-server-01 run=30954
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1764 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
/api/idss/submit, Coa serves/api/submit(live 404) #1774