Remove ADR 0133's warm gateway closure carriage (Tier 1 + Tier 2) — destination substitution makes it moot (measured #1772) #1804
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#1804
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?
Symptom / finding
Measured on #1772 (2026-09-23, local, full closure via cache.nixos.org narinfo):
of the release's warm gateway closure (653 paths / 1483 MiB nar), 598 paths /
1255 MiB (84.6%) substitute directly from cache.nixos.org, and the must-build
set is 32 MiB of cheap config leaves + the initrd assembly once #1803's
nixpkgs
sourceis excluded — zero expensive compiles (nothing in thestatic-CPython/LTO class). Both pillars ADR 0133 stood on in 2026-08 ("~330 MiB
of downloads AND 49 derivations built") have evaporated: the build half is now
trivial, and the download half is served by cache.nixos.org — on the operator's
store directly (Tier 1) and, at the destination, by ADR 0272's
--substitute-on-destination(Tier 2).Full numbers: #1772.
Proposed fix
Remove the warm gateway closure carriage, both tiers, and amend ADR 0133 to
record why (the destination now substitutes) rather than reverting it wholesale
— its 2026-08 measurement was correct for its era.
internal/toolchainPrimer +PayloadCacheDir(
internal/toolchain/prime.go),internal/founding/toolchain.go, and thegateway-cache/+gateway-warm.toplevelstaging inscripts/build-gateway-warm.sh/scripts/assemble-payload.sh(
PAYLOAD_GATEWAY_CACHE_SRC).system.extraDependencies/IDSS_WARM_TOPLEVELbaked into theguest image (
scripts/build-guest-image.sh).cache.nixos.org substitution; keep the reasoning, retire the carriage. This is
the design residue and wants a session/human to sign the amendment.
verify-payload.mjsrequired-slot list and any payload-layout checksthat name
gateway-cache.Provable by a private-path founding drive staying green with the closure no
longer carried (every ADR 0133 failure path already degrades to "build/fetch as
today").
Origin
Found while working #1772 (re-measure ADR 0133's warm gateway closure). Foreseen
by ADR 0272 "What this does not decide": "Whether the gateway closure (ADR 0133
Tier 1/Tier 2) is worth publishing at all… Worth re-measuring." #1772 did the
measuring; this is the removal it asked to be filed.
Ruled by agent under ADR 0174 — veto anytime.
Ruling: category
enhancement, stateready-for-session(notready-for-agent, notready-for-human).Why a two-way door: removing the warm-closure carriage is revertible with a single
git revert, and the ticket's own safety argument holds — every ADR 0133 failure path already degrades to "build/fetch as today", so no cold founding loses a capability, only an optimisation. The proof is a private-path founding drive staying green (plus the payload-layout /verify-payload.mjsslot checks). None of this is on the one-way-door list (no credentials, no security widening, no member-facing trust accept, no data destruction, no non-routine spend).Why
ready-for-sessionand notready-for-agent: two of this ticket's markers put it out of swarm reach by construction (docs/agents/triage-labels.md, ADR 0174 §5):The true proof therefore needs an interactive session's standing, but it needs neither Ben's hands nor his eyes nor a one-way-door ruling, so it is not
ready-for-human. A session removes the carriage, signs the ADR amendment, and drives it.Agent Brief
Category: enhancement
Summary: Remove ADR 0133's warm gateway closure carriage (Tier 1 host-prime + Tier 2 baked-into-guest) now that destination substitution (ADR 0272) + cache.nixos.org make it moot, and amend ADR 0133 to record why rather than reverting it.
Current behavior:
The release payload carries the warm gateway closure two ways: Tier 1 primes the operator's host store with the closure (the
internal/toolchainPrimer +PayloadCacheDir, the founding toolchain wiring, and thegateway-cache/+gateway-warm.toplevelstaging in the payload build/assemble scripts, keyed byPAYLOAD_GATEWAY_CACHE_SRC); Tier 2 bakessystem.extraDependencies/IDSS_WARM_TOPLEVELinto the guest image. #1772 measured that 84.6% of the closure (598/653 paths, 1255/1483 MiB nar) now substitutes directly from cache.nixos.org, and once #1803's nixpkgssourceis excluded the must-build set is ~32 MiB of cheap config leaves + the initrd assembly with zero expensive compiles — so both pillars ADR 0133 stood on have evaporated.Desired behavior:
Neither tier carries the warm closure. A private-path founding still succeeds, substituting stock paths from cache.nixos.org on the operator's store (Tier 1's old job) and, at the destination, via ADR 0272's
--substitute-on-destination(Tier 2's old job); the small must-build set builds as today. ADR 0133 records that Tier 1/Tier 2 are superseded by ADR 0272 + cache.nixos.org substitution — the 2026-08 measurement kept as correct-for-its-era, the carriage retired.Key interfaces / surfaces to retire:
internal/toolchainPrimer +PayloadCacheDir, the founding toolchain wiring that consumes it, and thegateway-cache/+gateway-warm.toplevelstaging in the gateway-warm / assemble-payload build scripts (PAYLOAD_GATEWAY_CACHE_SRC).system.extraDependencies/IDSS_WARM_TOPLEVELbaked by the guest-image build script.gateway-cachefromverify-payload.mjs's required-slot list and any payload-layout check that names it, so an absent slot is the new expected shape rather than a failure.Acceptance criteria:
PAYLOAD_GATEWAY_CACHE_SRC/IDSS_WARM_TOPLEVELand thegateway-cache/slot no longer exist.verify-payload.mjsand payload-layout checks pass with nogateway-cacheslot present.Out of scope:
--substitute-on-destinationand the #1803 nixpkgs-sourceprefetch — already landed; this ticket only removes what they made redundant.Ruled by agent under ADR 0174 — veto anytime.
Removing the warm GATEWAY closure carriage (ADR 0133 Tier 1 + Tier 2) is a two-way door: revertible (a single commit), and proven by (a) #1772's re-measurement and (b) the degrade-to-today paths ADR 0133 already carried. It introduces no new failure mode — every ADR 0133 failure already "degrades to today's behaviour" (no cache staged / refused import / image built without warming), so removing the tiers is exactly that already-tested fallback made permanent. The amendment to ADR 0133 is a design-tier accept, which ADR 0174 delegates to a session. What it does NOT touch: Tier 3 (kexec-installer-base) is a different closure and stays carried; the ADR 0125 host-toolchain probe/install gate (a correctness gate living in the same files) is untouched.
Close report
Landed on
mainin9b01cef14fe81747cbe0e3152dfc076e9c238df0("#1804: retire ADR 0133's warm gateway closure carriage (Tier 1 + Tier 2)"). gofmt host-gate green on push.Why now (proof): #1772 measured 598/653 paths (1255/1483 MiB, 84.6%) substitute straight from cache.nixos.org; the must-build remainder is ~32 MiB of cheap config leaves + the initrd assembly — zero expensive compiles. ADR 0272's
--substitute-on-destination(#1764) has the gateway pull the stock closure itself, so both pillars ADR 0133 stood on in 2026-08 (~330 MiB downloads AND 49 built derivations) are gone.Tier 1 (host prime) removed:
internal/toolchain/prime.go(Primer/PrimeResult/PayloadCacheDir);cmd/warm-repo+internal/clan/warm_repo.go(RenderWarmCommunity) + their tests;scripts/build-gateway-warm.sh; thegateway-cache/+gateway-warm.toplevelstaging (PAYLOAD_GATEWAY_CACHE_SRC) inscripts/assemble-payload.sh;founding.StorePrimer/WithStorePrimer/primeWarmStore+ the prepare-this-machine prime call + its two tests; thestore-primerproduction-wiring adapter and its port test.Tier 2 (guest bake) removed:
system.extraDependencies←IDSS_WARM_TOPLEVELinnix/guest/configuration.nix; the--impurewarm path inscripts/build-guest-image.shandflake.nix'sguestImage.Slot/layout/docs:
app/scripts/verify-payload.mjsdrops the optionalgateway-cache/slot; prose fixed inscripts/package-app.sh,app/PACKAGING.md,scripts/smoke-private-path.sh;scripts/lib/rehearsal-deploy-pending-lib.shsnapshot-path set drops the deleted script; operator-appbuild-and-run.md/manual-testing-guide.mdupdated.ADR 0133 amended — Tier 1/Tier 2 marked superseded by ADR 0272 + cache.nixos.org substitution, the 2026-08 reasoning kept as correct-for-its-era (carriage retired, not reverted wholesale). STATUS.md updated in the same commit.
Proof run:
go build ./...,go vet,gofmtclean;internal/founding,internal/toolchain,internal/clan,internal/fleetwire,internal/vmandapp/helper/cmd/helpersuites all green;node --checkon verify-payload.mjs andbash -non all edited scripts pass. The live private-path founding green (closure no longer carried) is the rehearsal-executor's operator-spend job — nothing here needs it to land, since the removed path's absence was always the tested fallback.Advances #1804 — closing as done.