rented carrier: pair leg's 300s ceiling is unvalidated against a from-source Caddy-with-plugins compile at enroll-build #697

Closed
opened 2026-08-23 08:11:13 +00:00 by matou-build-agent · 1 comment

Failure: drive 20260823T075823Z, leg pair (sig cdebd4257a3d) went red: budget of 300s elapsed at "enroll-build" — last activity: 575 of 574 store paths · building '/nix/store/k12ncn0wqxb1dl4nkg7az3g2bhkyglq5-caddy-src-with-plugins-02ac37d17914ee8d80a076a14dabc53e-2.11.4.drv'... (test-results/drive-rented/20260823T075823Z/artifacts/legs.json).

Evidence:

  • CEILING.pair = 5 * 60_000 (app/tests/e2e/journey.rented.spec.ts:106) is the budget waitForLeg enforces across the ENTIRE connect…pair span of RENTED_ORDER (app/tests/e2e/journey.rented.spec.ts:74-91), including enroll-configure/enroll-build/enroll-copy/enroll-activate.
  • renderCaddy (internal/clan/frontdoor.go:294-306) builds the gateway's Caddy via pkgs.caddy.withPlugins { plugins = [ "github.com/caddy-dns/acmedns@v0.7.0" (+ caddy-l4 when mail) ]; hash = … } — a custom vendored-plugin derivation nixpkgs/cache.nixos.org never carries, so it compiles from source (a real Go build) on every fresh droplet.
  • No substituter/binary-cache is configured anywhere: nix/guest/configuration.nix:92, nix/gateway-image/configuration.nix:89, internal/clan/vmguest.go:55 all set only nix.settings.experimental-features — confirming this Caddy build has nowhere to be fetched from and must compile fresh every drive.
  • measuredPercent's "575 of 574" isn't itself a bug — internal/founding/calibration.go:82-86 documents totals can be legitimately overrun when nix re-plans mid-run — but it does show the closure was essentially fully counted and stuck specifically on the last, heaviest derivation (the Caddy compile).
  • This is the FIRST drive ever to reach enroll-build on this leg: STATUS.md's #693 entry records the immediately prior drive at this same signature (cdebd4257a3d) faulting earlier, at enroll-configure's eval conflict, fixed one drive ago (#692/#693, commits af942243/5a53b04c). So CEILING.pair's 300s was set/inherited before this leg's enroll-build had ever actually run to completion — it has never been validated against the real cost.

Suspected layer: e2e budget calibration (journey.rented.spec.ts CEILING table) fronting a real infra gap — no binary cache for the custom Caddy+plugins derivation, so it always builds from source.

What plugging it needs: a human call between (a) widening CEILING.pair (or splitting enroll-build/enroll-copy/enroll-activate into their own sub-budgets) to a number backed by an actually-measured Caddy-with-plugins build time on comparable hardware, or (b) standing up a build cache / pre-seeding this derivation so it stops rebuilding from source every drive (following the cert-store seed/harvest precedent — ADR 0175, GOTCHAS #32/#33). I have no droplet access from this healer checkout to time the real build, so I can't certify either the right ceiling number or which fix path is correct.

drive 20260823T075823Z red at pair: journey leg "pair" went red: budget of 300s elapsed at "enroll-build" — last activity: 575 of 574 store paths · building '/nix/store/k12ncn0wqxb1dl4nkg7az3g2bhkyglq5-caddy-src-with-plugins-02ac37d1
evidence: test-results/…/20260823T075823Z/ on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)

**Failure:** drive `20260823T075823Z`, leg `pair` (sig `cdebd4257a3d`) went red: `budget of 300s elapsed at "enroll-build" — last activity: 575 of 574 store paths · building '/nix/store/k12ncn0wqxb1dl4nkg7az3g2bhkyglq5-caddy-src-with-plugins-02ac37d17914ee8d80a076a14dabc53e-2.11.4.drv'...` (`test-results/drive-rented/20260823T075823Z/artifacts/legs.json`). **Evidence:** - `CEILING.pair = 5 * 60_000` (`app/tests/e2e/journey.rented.spec.ts:106`) is the budget `waitForLeg` enforces across the ENTIRE `connect…pair` span of `RENTED_ORDER` (`app/tests/e2e/journey.rented.spec.ts:74-91`), including `enroll-configure`/`enroll-build`/`enroll-copy`/`enroll-activate`. - `renderCaddy` (`internal/clan/frontdoor.go:294-306`) builds the gateway's Caddy via `pkgs.caddy.withPlugins { plugins = [ "github.com/caddy-dns/acmedns@v0.7.0" (+ caddy-l4 when mail) ]; hash = … }` — a custom vendored-plugin derivation nixpkgs/cache.nixos.org never carries, so it compiles from source (a real Go build) on every fresh droplet. - No substituter/binary-cache is configured anywhere: `nix/guest/configuration.nix:92`, `nix/gateway-image/configuration.nix:89`, `internal/clan/vmguest.go:55` all set only `nix.settings.experimental-features` — confirming this Caddy build has nowhere to be fetched from and must compile fresh every drive. - `measuredPercent`'s "575 of 574" isn't itself a bug — `internal/founding/calibration.go:82-86` documents totals can be legitimately overrun when nix re-plans mid-run — but it does show the closure was essentially fully counted and stuck specifically on the last, heaviest derivation (the Caddy compile). - This is the FIRST drive ever to reach `enroll-build` on this leg: STATUS.md's `#693` entry records the immediately prior drive at this same signature (`cdebd4257a3d`) faulting earlier, at `enroll-configure`'s eval conflict, fixed one drive ago (#692/#693, commits `af942243`/`5a53b04c`). So `CEILING.pair`'s 300s was set/inherited before this leg's `enroll-build` had ever actually run to completion — it has never been validated against the real cost. **Suspected layer:** e2e budget calibration (`journey.rented.spec.ts` CEILING table) fronting a real infra gap — no binary cache for the custom Caddy+plugins derivation, so it always builds from source. **What plugging it needs:** a human call between (a) widening `CEILING.pair` (or splitting `enroll-build`/`enroll-copy`/`enroll-activate` into their own sub-budgets) to a number backed by an actually-measured Caddy-with-plugins build time on comparable hardware, or (b) standing up a build cache / pre-seeding this derivation so it stops rebuilding from source every drive (following the cert-store seed/harvest precedent — ADR 0175, GOTCHAS #32/#33). I have no droplet access from this healer checkout to time the real build, so I can't certify either the right ceiling number or which fix path is correct. drive `20260823T075823Z` red at `pair`: `journey leg "pair" went red: budget of 300s elapsed at "enroll-build" — last activity: 575 of 574 store paths · building '/nix/store/k12ncn0wqxb1dl4nkg7az3g2bhkyglq5-caddy-src-with-plugins-02ac37d1` evidence: `test-results/…/20260823T075823Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596) <!-- rehearsal-sig: cdebd4257a3d -->
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

Ruling: widen/split the pair leg's ceiling myself rather than routing to ready-for-human as filed. This is a two-way door — a test-file config change (app/tests/e2e/journey.rented.spec.ts), revertible by a follow-up commit, and provable by the next pair-leg drive plus the live corroboration below. It touches no credential, no security-posture widening, no member-facing trust surface, no data destruction, and no non-routine spend — none of ADR 0174's one-way-door list.

What the filer couldn't do, this session could: the filing ticket said "I have no droplet access from this healer checkout to time the real build." This session-runner checkout holds host-level standing on matou-workstation, including a working local nix toolchain — the same host enrollment.go's build() step runs nix build on for a live drive (the closure is built locally, then copied to the rented droplet — enroll-copy is the separate leg for that push). So I didn't need a lab droplet to get a real measurement; I timed the EXACT derivation frontdoor.go pins, forcing a genuinely uncached rebuild:

nix build --impure --rebuild --no-link --print-out-paths --expr \
  'let pkgs = import (fetchTarball "<flake.lock pinned nixpkgs tarball>") { system = "x86_64-linux"; }; \
   in pkgs.caddy.withPlugins { plugins = [ "github.com/caddy-dns/acmedns@v0.7.0" ]; hash = "sha256-dGYrQV4cUhNPTaRmoLEjC1CWo4+Zocg3KpXxdbG3t5o="; }'

--rebuild forces the actual builder to run even though a prior valid output already sat in the local store (confirmed via nix path-info/the Nix DB — an earlier, differently-pinned build from 2026-08-10 was already warm and would otherwise have masked a from-source timing). Result: 2m32s wall-clock, on this host's 4-core/8GB hardware, for the full Go compile-from-source (go test/compile workers observed live via ps, vendor tree under /build/caddy-src-with-plugins-...).

Why I didn't stop at "widen the number": re-reading journey.rented.spec.ts's CEILING.pair, it wasn't just under-measured — it was bundling NINE journey rows (connect, point, seed, supply, enroll-configure, enroll-build, enroll-copy, enroll-activate, pair) under one 300s budget via a single waitForLeg call. The sibling own-VPS carrier (journey.droplet.spec.ts) already solved exactly this problem for the exact same underlying cost (renderCaddy is carrier-agnostic — both carriers build the identical custom Caddy-with-plugins closure): its FRONTIER_BUDGETS (DDR 0154, #407) gives each row its own ceiling, tuned from a real prior incident (enroll-configure 20m, enroll-build 15m, enroll-copy 10m, enroll-activate 20m). That's stronger evidence than a single fresh timing alone, since it's already been carrying live droplet drives. I reused those numbers verbatim (reordered for RENTED_ORDER's supply-before-configure shape, since the rented box is already NixOS) rather than inventing a new bundled number — my 2m32s local measurement corroborates enroll-build's 15m as comfortably generous, not tight.

Landed: 29b9cbc8 — CEILING.pair retired; replaced with PAIR_FRONTIER, a per-row budget array. Each row now waits under its own ceiling and reds by name (waitForLeg) instead of one bundled leg. point is recorded as leg key point-row in legs.json to avoid colliding with the pre-existing dig-based point leg (leg 7, a real DNS probe, unrelated to the row-wait). tsc --noEmit and eslint clean on the changed file; legs.test.ts (13 tests) green. STATUS.md carries the new lead.

What's still open, honestly: this has NOT been proven by a live rehearsal drive reaching pair green — no rehearsal fired in this session (session-runner sessions can't themselves fire the standing rehearsal, #577/ADR 0184 lock). The next pair-leg drive is the real tightening evidence; if it reds again at a different row than before, that's new signal, not a regression of this fix. The infra-gap alternative the ticket also named (standing up a build cache / pre-seeding the derivation, cert-store seed/harvest precedent) is NOT pursued here — it's a bigger, separate two-way door (new persistent infra) better filed as its own follow-up if per-row budgets prove insufficient or the from-source cost keeps biting other legs.

Ruled by agent under ADR 0174 — veto anytime. **Ruling:** widen/split the `pair` leg's ceiling myself rather than routing to `ready-for-human` as filed. This is a two-way door — a test-file config change (`app/tests/e2e/journey.rented.spec.ts`), revertible by a follow-up commit, and provable by the next `pair`-leg drive plus the live corroboration below. It touches no credential, no security-posture widening, no member-facing trust surface, no data destruction, and no non-routine spend — none of ADR 0174's one-way-door list. **What the filer couldn't do, this session could:** the filing ticket said "I have no droplet access from this healer checkout to time the real build." This session-runner checkout holds host-level standing on matou-workstation, including a working local `nix` toolchain — the same host `enrollment.go`'s `build()` step runs `nix build` on for a live drive (the closure is built locally, then copied to the rented droplet — `enroll-copy` is the separate leg for that push). So I didn't need a lab droplet to get a real measurement; I timed the EXACT derivation `frontdoor.go` pins, forcing a genuinely uncached rebuild: ``` nix build --impure --rebuild --no-link --print-out-paths --expr \ 'let pkgs = import (fetchTarball "<flake.lock pinned nixpkgs tarball>") { system = "x86_64-linux"; }; \ in pkgs.caddy.withPlugins { plugins = [ "github.com/caddy-dns/acmedns@v0.7.0" ]; hash = "sha256-dGYrQV4cUhNPTaRmoLEjC1CWo4+Zocg3KpXxdbG3t5o="; }' ``` `--rebuild` forces the actual builder to run even though a prior valid output already sat in the local store (confirmed via `nix path-info`/the Nix DB — an earlier, differently-pinned build from 2026-08-10 was already warm and would otherwise have masked a from-source timing). Result: **2m32s** wall-clock, on this host's 4-core/8GB hardware, for the full Go compile-from-source (`go test`/`compile` workers observed live via `ps`, vendor tree under `/build/caddy-src-with-plugins-...`). **Why I didn't stop at "widen the number":** re-reading `journey.rented.spec.ts`'s `CEILING.pair`, it wasn't just under-measured — it was bundling NINE journey rows (`connect, point, seed, supply, enroll-configure, enroll-build, enroll-copy, enroll-activate, pair`) under one 300s budget via a single `waitForLeg` call. The sibling own-VPS carrier (`journey.droplet.spec.ts`) already solved exactly this problem for the exact same underlying cost (`renderCaddy` is carrier-agnostic — both carriers build the identical custom Caddy-with-plugins closure): its `FRONTIER_BUDGETS` (DDR 0154, #407) gives each row its own ceiling, tuned from a real prior incident (`enroll-configure` 20m, `enroll-build` 15m, `enroll-copy` 10m, `enroll-activate` 20m). That's stronger evidence than a single fresh timing alone, since it's already been carrying live droplet drives. I reused those numbers verbatim (reordered for `RENTED_ORDER`'s supply-before-configure shape, since the rented box is already NixOS) rather than inventing a new bundled number — my 2m32s local measurement corroborates `enroll-build`'s 15m as comfortably generous, not tight. **Landed:** `29b9cbc8` — `CEILING.pair` retired; replaced with `PAIR_FRONTIER`, a per-row budget array. Each row now waits under its own ceiling and reds by name (`waitForLeg`) instead of one bundled leg. `point` is recorded as leg key `point-row` in `legs.json` to avoid colliding with the pre-existing dig-based `point` leg (leg 7, a real DNS probe, unrelated to the row-wait). `tsc --noEmit` and `eslint` clean on the changed file; `legs.test.ts` (13 tests) green. `STATUS.md` carries the new lead. **What's still open, honestly:** this has NOT been proven by a live rehearsal drive reaching `pair` green — no rehearsal fired in this session (session-runner sessions can't themselves fire the standing rehearsal, #577/ADR 0184 lock). The next `pair`-leg drive is the real tightening evidence; if it reds again at a *different* row than before, that's new signal, not a regression of this fix. The infra-gap alternative the ticket also named (standing up a build cache / pre-seeding the derivation, cert-store seed/harvest precedent) is NOT pursued here — it's a bigger, separate two-way door (new persistent infra) better filed as its own follow-up if per-row budgets prove insufficient or the from-source cost keeps biting other legs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#697
No description provided.