rehearsal-4: gateway image pre-warms the gateway closure in its Nix store — shorter rented deploy, image stays generic #655

Open
opened 2026-08-22 11:07:29 +00:00 by ben · 1 comment
Owner

Follow-up to #646, ruled in conversation with Ben 2026-08-22 (deferred until the rented drive #652 is green — a speed optimisation, not a correctness need).

The gateway image is deliberately minimal (ADR 0048): NixOS + sshd + cloud-init + idss-agent + the fleet disko layout. Netbird, Caddy, kanidm, acme-dns, control plane, dashboard all arrive at stand-up via seed/supply + a clan update (VMMode), so the rented deploy leg builds the whole gateway closure on a s-2vcpu-4gb box (spec ceiling 15 min).

Ask: at image build, copy the generic parts of the gateway closure into the image's Nix store (nix copy --to the build box before snapshot, or system.extraDependencies on a representative gateway eval) so deploy is mostly a switch, not a build. Constraints that must hold:

  • The image stays generic — a pre-warmed store holds only content-addressed derivations; no secrets, apex, brand, or per-community config may be baked (ADR 0048). The image-boot leg keeps asserting that.
  • Pin discipline: the warmed closure is for the image's own sha; a drive on a newer pin simply rebuilds (cache miss is correct, never wrong).
  • Measure: record deploy leg durations on #652 before/after; the spec ceiling tightens from green evidence like every leg.

Related: the private path's warm-proof / GC-root lessons (warm-arc review 2026-08-08 — elevatedPrime PATH scoping) — pin a GC root for the warmed closure or nix-collect-garbage on the build box will eat it before the snapshot.

Ruled: DEFERRED (Ben, 2026-08-22)

Parked, not rejected — a speed optimisation to the rented deploy leg, not a correctness need. #646 already proved the pre-warmed-closure pattern for the private/self-hosted path (scripts/build-gateway-warm.sh + system.extraDependencies, nix/guest/configuration.nix:117); this ticket extends the same technique to the rented gateway-image path once that path exists and is exercised for real.

Revisit when:

  1. #652 (the standing rented-drive rehearsal) is GREEN.

Labelled deferred per docs/agents/triage-labels.md: triage automation skips this issue; a human (or a session, once #652 fires) re-labels it when the criterion fires.

**Follow-up to #646, ruled in conversation with Ben 2026-08-22 (deferred until the rented drive #652 is green — a speed optimisation, not a correctness need).** The gateway image is deliberately minimal (ADR 0048): NixOS + sshd + cloud-init + `idss-agent` + the fleet disko layout. Netbird, Caddy, kanidm, acme-dns, control plane, dashboard all arrive at stand-up via seed/supply + a `clan update` (VMMode), so the rented `deploy` leg builds the whole gateway closure on a `s-2vcpu-4gb` box (spec ceiling 15 min). **Ask:** at image build, copy the *generic* parts of the gateway closure into the image's Nix store (`nix copy --to` the build box before snapshot, or `system.extraDependencies` on a representative gateway eval) so `deploy` is mostly a switch, not a build. Constraints that must hold: - The image stays **generic** — a pre-warmed store holds only content-addressed derivations; no secrets, apex, brand, or per-community config may be baked (ADR 0048). The `image-boot` leg keeps asserting that. - Pin discipline: the warmed closure is for the image's own sha; a drive on a newer pin simply rebuilds (cache miss is correct, never wrong). - Measure: record `deploy` leg durations on #652 before/after; the spec ceiling tightens from green evidence like every leg. Related: the private path's warm-proof / GC-root lessons (warm-arc review 2026-08-08 — `elevatedPrime` PATH scoping) — pin a GC root for the warmed closure or `nix-collect-garbage` on the build box will eat it before the snapshot. ## Ruled: DEFERRED (Ben, 2026-08-22) Parked, not rejected — a speed optimisation to the rented `deploy` leg, not a correctness need. #646 already proved the pre-warmed-closure pattern for the private/self-hosted path (`scripts/build-gateway-warm.sh` + `system.extraDependencies`, `nix/guest/configuration.nix:117`); this ticket extends the same technique to the rented gateway-image path once that path exists and is exercised for real. **Revisit when:** 1. #652 (the standing rented-drive rehearsal) is GREEN. Labelled `deferred` per `docs/agents/triage-labels.md`: triage automation skips this issue; a human (or a session, once #652 fires) re-labels it when the criterion fires.

This was generated by AI during triage.

Triaged deferred. This ticket's own body already records that Ben ruled it deferred in conversation (2026-08-22, follow-up to #646, gated on the rented drive #652 going green) — this pass formalises that ruling into the canonical ## Ruled: DEFERRED section (docs/agents/triage-labels.md) so triage automation and future agents skip it correctly, and applies the deferred label. No ADR 0174 agent ruling here; the human call was already made — this is a formatting/labelling pass, not a new decision.

Redundancy check: not already implemented. scripts/build-gateway-warm.sh + nix/guest/configuration.nix:117 (system.extraDependencies) already prove the pre-warmed-closure pattern for the private/self-hosted enroll path — this ticket asks for the same technique on the separate rented gateway-image deploy leg, which does not yet do this.

Revisit criterion: #652 (the standing rented-drive rehearsal) reaches GREEN.

> *This was generated by AI during triage.* Triaged `deferred`. This ticket's own body already records that Ben ruled it deferred in conversation (2026-08-22, follow-up to #646, gated on the rented drive #652 going green) — this pass formalises that ruling into the canonical `## Ruled: DEFERRED` section (`docs/agents/triage-labels.md`) so triage automation and future agents skip it correctly, and applies the `deferred` label. No ADR 0174 agent ruling here; the human call was already made — this is a formatting/labelling pass, not a new decision. Redundancy check: not already implemented. `scripts/build-gateway-warm.sh` + `nix/guest/configuration.nix:117` (`system.extraDependencies`) already prove the pre-warmed-closure pattern for the private/self-hosted enroll path — this ticket asks for the same technique on the separate rented gateway-image `deploy` leg, which does not yet do this. Revisit criterion: #652 (the standing rented-drive rehearsal) reaches GREEN.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#655
No description provided.