re-measure whether ADR 0133's warm gateway closure still buys anything once the destination substitutes #1772
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#1772
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?
Per ADR 0272 (
docs/adr/0272-the-target-fetches-its-own-bytes-the-installer-carries-only-the-pre-gateway-bootstrap.md, landed180b4975), "What this does not decide".ADR 0133 carried the release's gateway closure (
gateway-cache/+gateway-warm.toplevel, ~330 MiB) because a 2026-08-07 measurement found a cold store cost "490 paths will be fetched (328.9 MiB download, 779.4 MiB unpacked)" plus 49 derivations built, and none of it was per-community.The 2026-09-23 founding measured something that casts doubt on the remaining value: of the 347-path delta the deploy pushed, 255 paths / 4.15 GB were signed and substitutable from cache.nixos.org, and only 6 MB was genuinely local. If the destination substitutes, most of what Tier 1 warms may be reachable from the public cache anyway.
Ask
Measure, don't argue. For the current release's gateway closure:
nix path-info --jsonover the closure, splitting onsignatures, is what produced the 255/92 split above;nix build --dry-rungives the build-vs-fetch line directly.)internal/toolchain/prime.go:318-325,internal/founding/toolchain.go:166-190) still earn its ~330 MiB, now that it only helps the private path where the operator's machine is the builder? Does Tier 2 (the closure baked into the guest image,system.extraDependencies)?Report the numbers on this ticket. If the answer is that it no longer earns its place, say so and file the removal; if it does, say which parts and why, so ADR 0133 can be amended precisely rather than wholesale.
No production access needed — this is a local measurement against the flake.
--substitute-on-destination(#699) never reachedmachines update#1764swarm-claim host=matou-dev-server-01 run=30959
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=31006
(automated multi-host claim — lowest live claim id works this ticket)
Measurement — ADR 0133's warm gateway closure vs destination substitution
Local measurement against the flake, 2026-09-23, no production access. Method:
rendered the release's warm community repo (
go run ./cmd/warm-repo, nodegateway, the same rendererscripts/build-gateway-warm.shuses), built itssystem.build.toplevel, then queried cache.nixos.org narinfo for every oneof the 653 closure paths (the definitive substitutability test — see the note
on the signature method below).
Toplevel measured:
nixos-system-gateway-26.11.20260612.173d0ad(
/nix/store/9zdig1z7vidh9xhn0gs8szndd7qgn6f2-…), built in 2m03s on apartly-warm store.
Q1 — substitutable from cache.nixos.org vs must-build
(
nix build --dry-runon the same partly-warm store agreed on the direction:290 paths will be fetched (337.1 MiB), 281 derivations will be built— but adry-run only reports the delta from the current store, so the per-path
narinfo query above is the store-independent truth.)
Caveat on the signature method the ticket suggested: splitting the closure
on
signaturesgave 249 "unsigned" paths, not 55. That count is an artefactof this measurement re-building 281 derivations locally — a locally-built path
carries no
cache.nixos.orgsignature even when the exact same path isserved by the public cache. The 2026-09-23 founding's 255/92 split was measured
the same way on a machine that had just built the delta, so it over-counts
"local" for the same reason. The narinfo query above is not fooled by it.
Q2 — of the 55 must-build paths, expensive vs cheap
Top must-build paths by nar size:
…-sourcepkgs/,nixos/,lib/). Not a build; a source copy.initrd-linux-6.18.35system-pathnixos-system-gateway-…unit-*.service,etc-*,firewall-start,users-groups.json,hosts,nix.conf,system-units,tmpfiles.d, …There is no expensive build in the must-build set — nothing in the class of
the installer base's static CPython (46 CPU-min LTO). The single largest
must-build entry, the 196 MiB nixpkgs
source, is not a build at all, and it isalready handled: #1803 (
65ac06e2, "the target prefetches the pinned flakesources itself so the 205 MB nixpkgs
sourcestops pushing from the operator'slaptop") moved exactly this off the wire. Excluding it, the genuine local build
is 54 paths / 32 MiB — the initrd assembly,
system-path, and cheapconfig-derived leaves that build in seconds regardless of any warm cache.
Q3 — does Tier 1 / Tier 2 still earn its ~330 MiB?
ADR 0133 (2026-08-07) justified the ~330 MiB carriage on two things: "~330 MiB
of downloads AND 49 derivations built" being the bulk of the stand-up's wall
clock, none of it per-community. Both halves have since evaporated:
32 MiB of cheap assembly + config leaves, none expensive. The warm cache
spares the operator no meaningful compute.
the bytes) substitute directly from the public cache. Tier 1 pre-seeds into
the operator's store a closure that the operator's own
nix buildwillsubstitute from cache.nixos.org anyway — over the same link the 330 MiB
payload was itself downloaded over. On bytes it is roughly a wash; on compute
it now saves nothing.
Tier 1 (
internal/toolchainPrimer;internal/founding/toolchain.go) —per ADR 0272 it now helps only the private path where the operator's machine is
the builder. On that path it pre-seeds ~1255 MiB the operator would otherwise
fetch once from cache.nixos.org, and spares ~32 MiB of seconds-long assembly.
It no longer earns ~330 MiB of installer.
Tier 2 (
system.extraDependenciesbaked into the guest image) — ADR 0272gave the deploy leg
--substitute-on-destination, so the guest fetches stocknixpkgs from cache.nixos.org itself at datacentre speed. Baking the closure into
the image pre-seeds paths the guest now substitutes directly; only the ~32 MiB
of genuine local builds ever needed to cross from the operator. Tier 2's
premise — "push only the per-community delta because the guest is warm" — is
superseded by the guest substituting the delta's stock-nixpkgs 84.6% itself.
Verdict
Neither Tier 1 nor Tier 2 earns its ~330 MiB any longer. The expensive-build
justification is gone entirely (must-build is 32 MiB of cheap leaves once
#1803's nixpkgs
sourceis excluded); the download justification is answered bycache.nixos.org substitution (598/653 paths) on the operator's store and, at the
destination, by ADR 0272's
--substitute-on-destination. This confirms ADR0272's "What this does not decide" suspicion with hard numbers.
Filed the removal as #1804 (Tier 1 + Tier 2 plumbing + a precise ADR 0133 amendment), per the ask. This ticket is the measurement;
the removal is its own slice so ADR 0133 is amended precisely rather than
wholesale.
close-report for #1772 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope