clan+founding: the rented gateway's deploy builds on the box — it pulls its own closure from the cache #1863
No reviewers
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss!1863
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "session/gateway-builds-own-system"
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?
This is part 2 of Ben's ruling to make the gateway pull its own software. It stacks on #1862, so the diff shrinks to one commit once #1862 merges.
Why. WKT-DEMO fire 3's Files deploy spent ~13 min realising the whole 3109 MiB system on bens-mac-04, at ~600 kB/s, before a single path moved. Yet 2771 MiB of it is signed on cache.nixos.org, including Nextcloud's 743 MiB. The rented box is a datacentre droplet with RAM to spare, so it can fetch that itself.
Change.
clan.DeployRequest.BuildOnTarget. When set, the apply leaves--build-host localhostoff, so clan evaluates and builds on the target. Enrollment's verify already runs that shape green on every rented box.substituteAheadthen skips its local build and copy, and keeps only the locked-input prefetch from #1862. It returns whether the node builds on its target.gatewayBuildsOnTarget(draft)for the rented path only. It applies to both the control-plane apply and the services apply.Enrollment is unchanged. #713 measured the target compiling the uncached set, mostly Caddy with plugins, at ~11 min on 2 vCPU. That's about what the operator's push of it costs once #1862 stops pushing the nixpkgs source.
Tests. Four new tests failed before the change and pass after it:
TestDeploy_BuildOnTargetLetsTheRentedGatewayFetchAndBuildItsOwnSystem,TestDeploy_WithoutBuildOnTargetKeepsTheLocalBuild,TestGatewayBuildsOnTarget_OnlyTheRentedPathandTestApplyControlPlane_CarriesBuildOnTargetToTheSeam.go test ./internal/...is green, and vet and golangci-lint are clean.Proof. The next Drive A fire. Its
activationleg should fall from about 30 min to a few.Refs #1855
🤖 Generated with Claude Code
https://claude.ai/code/session_013h5C35beyRQMAA1QjxZGk7