takeover: nothing stages the installer-base warm cache — wire build-installer-base-warm.sh into the publish rail + drive prep (staleness-keyed), or every takeover composes cold into the #1016 ceiling #1038

Closed
opened 2026-08-30 16:36:07 +00:00 by ben · 2 comments
Owner

Parent

#854 (rehearsal phase 5 standing drive). Follow-up to #1036 / #1016 / ADR 0133 Tier 3.

What broke

Drive 20260830T152228Z (elitebook-03, the first run with #1036 aboard) redded on deploy-takeover: the on-box kexec-installer compose for node-req-0003 found a cold gateway store and started building 303 derivations from source (linux modules, initrd, pkgsStatic bluez/CPython) until the #1016 20-minute ceiling killed it loud (exit 137). 26/27 legs green — this was the only red.

#1036 landed the whole mechanism (scripts/build-installer-base-warm.sh, the payload's installer-base-cache/ slot, fleetwire.Supply's seedInstallerBase) but nothing anywhere runs the warm-build script: no publish/release rail step, no drive-prep step. assemble-payload.sh prints installer-base cache: PENDING and ships the slot empty; seeding is best-effort by design, so it silently degrades to from-source on every takeover, forever. The rehearsal drive prep (scripts/rehearsal-cycle.sh) never even calls assemble-payload.sh — it patches three binaries into the standing $IDSS_PAYLOAD_DIR, so the slot on a drive host stays empty until someone stages it by hand.

What to build

Wire build-installer-base-warm.sh into the pipeline so the staged cache is a property of the release, not of a hand-warmed host:

  • The publish rail (the same chain that assembles the released payload) builds the installer base and passes PAYLOAD_INSTALLER_BASE_CACHE_SRC to assemble-payload.sh, so every released payload ships the closure — ADR 0133 Tier 3's actual promise.
  • The rehearsal drive prep stages/refreshes the cache into $IDSS_PAYLOAD_DIR when it is missing or stale (the base is per-release: key on the flake pin / installer-base.toplevel marker vs the checkout, the same shape as the payload-staleness gate). A flake bump with a stale cache must not silently drive cold again.
  • Keep the loud partial-cache check (narinfo count) on whatever path stages it.

Acceptance criteria

  • A released payload from the rail contains installer-base-cache/ + installer-base.toplevel, and assemble-payload.sh reports it staged (not PENDING).
  • The rehearsal drive prep on a host whose $IDSS_PAYLOAD_DIR lacks the cache (or holds a stale one for the current checkout) stages a fresh one before driving; a warm, current cache is a no-op.
  • Offline test covering the staleness key (marker vs current flake pin) — no live drive needed to prove the gate.

Interim (already done by hand, 2026-08-30)

build-installer-base-warm.sh was run manually on elitebook-03 and its output staged into /home/swarm/swarm/rehearsal-payload/ so the standing drive goes warm before this lands. That hand-warm is the thing this ticket makes unnecessary.

Blocked by

None — can start immediately.

## Parent #854 (rehearsal phase 5 standing drive). Follow-up to #1036 / #1016 / ADR 0133 Tier 3. ## What broke Drive `20260830T152228Z` (elitebook-03, the first run with #1036 aboard) redded on `deploy-takeover`: the on-box kexec-installer compose for node-req-0003 found a **cold gateway store** and started building **303 derivations from source** (linux modules, initrd, pkgsStatic bluez/CPython) until the #1016 20-minute ceiling killed it loud (exit 137). 26/27 legs green — this was the only red. #1036 landed the whole mechanism (`scripts/build-installer-base-warm.sh`, the payload's `installer-base-cache/` slot, `fleetwire.Supply`'s `seedInstallerBase`) but **nothing anywhere runs the warm-build script**: no publish/release rail step, no drive-prep step. `assemble-payload.sh` prints `installer-base cache: PENDING` and ships the slot empty; seeding is best-effort by design, so it silently degrades to from-source on every takeover, forever. The rehearsal drive prep (`scripts/rehearsal-cycle.sh`) never even calls `assemble-payload.sh` — it patches three binaries into the standing `$IDSS_PAYLOAD_DIR`, so the slot on a drive host stays empty until someone stages it by hand. ## What to build Wire `build-installer-base-warm.sh` into the pipeline so the staged cache is a property of the release, not of a hand-warmed host: - The publish rail (the same chain that assembles the released payload) builds the installer base and passes `PAYLOAD_INSTALLER_BASE_CACHE_SRC` to `assemble-payload.sh`, so every released payload ships the closure — ADR 0133 Tier 3's actual promise. - The rehearsal drive prep stages/refreshes the cache into `$IDSS_PAYLOAD_DIR` when it is missing **or stale** (the base is per-release: key on the flake pin / `installer-base.toplevel` marker vs the checkout, the same shape as the payload-staleness gate). A flake bump with a stale cache must not silently drive cold again. - Keep the loud partial-cache check (narinfo count) on whatever path stages it. ## Acceptance criteria - [ ] A released payload from the rail contains `installer-base-cache/` + `installer-base.toplevel`, and `assemble-payload.sh` reports it staged (not PENDING). - [ ] The rehearsal drive prep on a host whose `$IDSS_PAYLOAD_DIR` lacks the cache (or holds a stale one for the current checkout) stages a fresh one before driving; a warm, current cache is a no-op. - [ ] Offline test covering the staleness key (marker vs current flake pin) — no live drive needed to prove the gate. ## Interim (already done by hand, 2026-08-30) `build-installer-base-warm.sh` was run manually on elitebook-03 and its output staged into `/home/swarm/swarm/rehearsal-payload/` so the standing drive goes warm before this lands. That hand-warm is the thing this ticket makes unnecessary. ## Blocked by None — can start immediately.

swarm-claim host=matou-dev-server-01 run=14641
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=14641 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1038 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1038,
  "status": "success",
  "commits": [
    "ff2f04ea"
  ],
  "changed_files": [
    "scripts/assemble-payload.sh",
    "scripts/rehearsal-cycle.sh",
    "scripts/lib/installer-base-staleness-lib.sh",
    "scripts/tests/installer-base-staleness-test.sh",
    "docs/adr/0133-app-payload-carries-the-gateway-closure.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/installer-base-staleness-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/assemble-payload.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/rehearsal-cycle.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rehearsal-drive-exclusive-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rehearsal-release-nudge-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A released payload from the rail contains installer-base-cache/ + installer-base.toplevel, and assemble-payload.sh reports it staged (not PENDING)": "scripts/assemble-payload.sh now BUILDS the base via scripts/build-installer-base-warm.sh by default when no PAYLOAD_INSTALLER_BASE_CACHE_SRC is passed (nix present), then stages installer-base-cache/ + installer-base.toplevel and sets installer_base_status to 'staged (...), marker <path>' in PAYLOAD.txt — no longer PENDING. Opt-out PAYLOAD_SKIP_INSTALLER_BASE=1; graceful PENDING when nix absent (optional slot). commit ff2f04ea",
    "The rehearsal drive prep on a host whose $IDSS_PAYLOAD_DIR lacks the cache (or holds a stale one for the current checkout) stages a fresh one before driving; a warm, current cache is a no-op": "scripts/rehearsal-cycle.sh calls installer_base_refresh_cache after refreshing the tree-built artifacts; the function no-ops when installer_base_cache_is_fresh (marker == nix-eval'd base out path), and builds+stages via build-installer-base-warm.sh when missing/stale. commit ff2f04ea (scripts/lib/installer-base-staleness-lib.sh)",
    "Offline test covering the staleness key (marker vs current flake pin) — no live drive needed to prove the gate": "scripts/tests/installer-base-staleness-test.sh — 6 pure checks over installer_base_cache_is_fresh (missing / marker-match / flake-bump-differs / no-marker / unknowable-keeps-staged / unknowable-empty-stale); PASS; runs on the auto-discovered scripts/tests/ seam loop"
  },
  "summary": "Wired build-installer-base-warm.sh into both the publish rail (assemble-payload.sh build-by-default) and the rehearsal drive prep (staleness-keyed stage/refresh), with an offline test proving the marker-vs-checkout staleness gate.",
  "blockers": []
}
**close-report** for #1038 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1038, "status": "success", "commits": [ "ff2f04ea" ], "changed_files": [ "scripts/assemble-payload.sh", "scripts/rehearsal-cycle.sh", "scripts/lib/installer-base-staleness-lib.sh", "scripts/tests/installer-base-staleness-test.sh", "docs/adr/0133-app-payload-carries-the-gateway-closure.md", "STATUS.md" ], "tests": [ { "command": "bash scripts/tests/installer-base-staleness-test.sh", "exit_code": 0 }, { "command": "bash -n scripts/assemble-payload.sh", "exit_code": 0 }, { "command": "bash -n scripts/rehearsal-cycle.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rehearsal-drive-exclusive-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rehearsal-release-nudge-test.sh", "exit_code": 0 } ], "criteria": { "A released payload from the rail contains installer-base-cache/ + installer-base.toplevel, and assemble-payload.sh reports it staged (not PENDING)": "scripts/assemble-payload.sh now BUILDS the base via scripts/build-installer-base-warm.sh by default when no PAYLOAD_INSTALLER_BASE_CACHE_SRC is passed (nix present), then stages installer-base-cache/ + installer-base.toplevel and sets installer_base_status to 'staged (...), marker <path>' in PAYLOAD.txt — no longer PENDING. Opt-out PAYLOAD_SKIP_INSTALLER_BASE=1; graceful PENDING when nix absent (optional slot). commit ff2f04ea", "The rehearsal drive prep on a host whose $IDSS_PAYLOAD_DIR lacks the cache (or holds a stale one for the current checkout) stages a fresh one before driving; a warm, current cache is a no-op": "scripts/rehearsal-cycle.sh calls installer_base_refresh_cache after refreshing the tree-built artifacts; the function no-ops when installer_base_cache_is_fresh (marker == nix-eval'd base out path), and builds+stages via build-installer-base-warm.sh when missing/stale. commit ff2f04ea (scripts/lib/installer-base-staleness-lib.sh)", "Offline test covering the staleness key (marker vs current flake pin) — no live drive needed to prove the gate": "scripts/tests/installer-base-staleness-test.sh — 6 pure checks over installer_base_cache_is_fresh (missing / marker-match / flake-bump-differs / no-marker / unknowable-keeps-staged / unknowable-empty-stale); PASS; runs on the auto-discovered scripts/tests/ seam loop" }, "summary": "Wired build-installer-base-warm.sh into both the publish rail (assemble-payload.sh build-by-default) and the rehearsal drive prep (staleness-keyed stage/refresh), with an offline test proving the marker-vs-checkout staleness gate.", "blockers": [] } ``` </details>
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.

Reference
Matou/idss#1038
No description provided.