docs(adr): record self-built CI and molecule images, versioned by CI, pinned by version and digest #167

Open
opened 2026-11-15 14:29:05 +00:00 by Claude · 5 comments
Owner

Spec: CI image pipeline: keep, simplify or replace, resolution section 8; Molecule and Renovate on the shared runner: isolation, capacity and cost; What Molecule proves before a merge, and who acts on the nightly run. ADR rules: Public design contract replacing the ADR 0004 references.

What

One ADR in docs/adr/. Take the next free number when the pull request is opened, and renumber on rebase if another ADR merged first (the threat-model ADR and docs(adr): record releases by generated pull request and the release bot as the only automated tag credential are also open).

  • Decision:
    • the repository builds its own ci image and one Dockerfile per molecule image (one per Ubuntu release, and later the Debian 13 one);
    • the molecule images bake in everything except what a role installs itself: test fixtures a scenario's prepare.yml needs are baked in, and packages a role installs are still downloaded, because that install path is what the test exercises. A converge is not kept off the network;
    • consumers pin <version>@sha256:<digest>;
    • CI assigns the patch version from the image's inputs, and a published tag is never moved;
    • the pin follows each build through Renovate;
    • Molecule runs are isolated per run (per-run container names and labels, no shared concurrency group), and Molecule does not run on push to main; the runner capacity is raised separately.
  • Why: speed was chosen over simplicity, and the measured saving says so. Lint takes about 82s without the image vs 33s with it, Build about 50s vs 13s (measured 3 to 17 November; an earlier measurement gave 15–25s for Lint and 10–25s for Build). State next to it what the images cost: the build time and the build frequency over a stated period (ci went 0.1.0 to 0.2.23 in three weeks, 9 versions on Nov 14–15, each costing an image build on the shared runner plus a pin pull request's CI), or say they were not measured.
  • Residual risk (kept in the ADR, as the comments of the shared-runner decision place it there):
    • There is no post-merge Molecule rerun: "block on outdated branch" means main gets the tree its pull request tested; the nightly run catches drift outside the tree (mirrors, images) and a selection mistake. The nightly is also the only run of scenarios a pull request's diff did not select.
    • Lint, Build and Molecule each install the pull request's pins when they differ from the image, so an image-input pull request is tested on its own pins. What remains: a pin bump that selects no Molecule scenario (every Python pin except a core minor bump, which edits meta/runtime.yml) is first behaviour-tested by the ci pin pull request, after it has merged.

Status accepted on the maintainer's approval of the pull request, one screen at most, no infrastructure detail.

Spec: [CI image pipeline: keep, simplify or replace](https://git.rkdr.net/Mortis/Kamino/issues/96), resolution section 8; [Molecule and Renovate on the shared runner: isolation, capacity and cost](https://git.rkdr.net/Mortis/Kamino/issues/212); [What Molecule proves before a merge, and who acts on the nightly run](https://git.rkdr.net/Mortis/Kamino/issues/256). ADR rules: [Public design contract replacing the ADR 0004 references](https://git.rkdr.net/Mortis/Kamino/issues/92). ## What One ADR in `docs/adr/`. Take the next free number when the pull request is opened, and renumber on rebase if another ADR merged first (the threat-model ADR and [docs(adr): record releases by generated pull request and the release bot as the only automated tag credential](https://git.rkdr.net/Mortis/Kamino/issues/177) are also open). - **Decision:** - the repository builds its own `ci` image and one Dockerfile per molecule image (one per Ubuntu release, and later the Debian 13 one); - the molecule images bake in everything except what a role installs itself: test fixtures a scenario's `prepare.yml` needs are baked in, and packages a role installs are still downloaded, because that install path is what the test exercises. A converge is not kept off the network; - consumers pin `<version>@sha256:<digest>`; - CI assigns the patch version from the image's inputs, and a published tag is never moved; - the pin follows each build through Renovate; - Molecule runs are isolated per run (per-run container names and labels, no shared concurrency group), and Molecule does not run on push to `main`; the runner capacity is raised separately. - **Why:** speed was chosen over simplicity, and the measured saving says so. Lint takes about 82s without the image vs 33s with it, Build about 50s vs 13s (measured 3 to 17 November; an earlier measurement gave 15–25s for Lint and 10–25s for Build). State next to it what the images cost: the build time and the build frequency over a stated period (`ci` went 0.1.0 to 0.2.23 in three weeks, 9 versions on Nov 14–15, each costing an image build on the shared runner plus a pin pull request's CI), or say they were not measured. - **Residual risk** (kept in the ADR, as the comments of the shared-runner decision place it there): - There is no post-merge Molecule rerun: "block on outdated branch" means `main` gets the tree its pull request tested; the nightly run catches drift outside the tree (mirrors, images) and a selection mistake. The nightly is also the only run of scenarios a pull request's diff did not select. - Lint, Build and Molecule each install the pull request's pins when they differ from the image, so an image-input pull request is tested on its own pins. What remains: a pin bump that selects no Molecule scenario (every Python pin except a core minor bump, which edits `meta/runtime.yml`) is first behaviour-tested by the `ci` pin pull request, after it has merged. Status `accepted` on the maintainer's approval of the pull request, one screen at most, no infrastructure detail.
Claude added the
Status
Ready for Agent
label 2026-11-15 14:29:05 +00:00
Claude added a new dependency 2026-11-15 22:20:53 +00:00
Claude added this to the Continuous delivery milestone 2026-11-15 22:21:20 +00:00
Author
Owner

Review of the map (2026-11-15): corrections to this issue.

  • "Molecule images keep a converge off the network" misstates the decision. CI image pipeline: keep, simplify or replace, resolution section 2: "Test fixtures a scenario's prepare.yml installs are baked in. Packages the role itself installs stay runtime downloads: that install path is what the test exercises." A converge still downloads the role's packages. Change the "Why" line to: "test fixtures are baked into the molecule images; packages a role installs are still downloaded, because that install path is what the test exercises".
  • The measured saving leaves out what it costs. The "Why" gives the per-run saving (Lint about 82s vs 15-25s, Build about 50s vs 10-25s). The same resolution records that ci went "0.1.0 → 0.2.23 in three weeks (9 versions on Nov 14–15)", and each version costs an image build on the shared runner plus the pin pull request's CI. No build time is recorded, so "it still pays" cannot be checked. Change: state the build time and the build frequency next to the per-run saving, or say they were not measured.
  • The ADR number can collide. This issue says "numbered after the threat-model ADR", and docs(adr): record releases by generated pull request and the release bot as the only automated tag credential says "Number it after any ADR already merged". Neither blocks the other, so if both are worked at the same time both take 0002. Change: "take the next free number when the pull request is opened, and renumber on rebase if another ADR merged first".

Waiting on another decision: whether the molecule images keep their preinstalled role packages, and the runner capacity behind the speed numbers, wait on Molecule and Renovate on the shared runner: isolation, capacity and cost. The ADR wording in the first item should follow that decision if it changes the rule.

Review of the map (2026-11-15): corrections to this issue. - **"Molecule images keep a converge off the network" misstates the decision.** [CI image pipeline: keep, simplify or replace](https://git.rkdr.net/Mortis/Kamino/issues/96), resolution section 2: "Test fixtures a scenario's `prepare.yml` installs are baked in. Packages the role itself installs stay runtime downloads: that install path is what the test exercises." A converge still downloads the role's packages. Change the "Why" line to: "test fixtures are baked into the molecule images; packages a role installs are still downloaded, because that install path is what the test exercises". - **The measured saving leaves out what it costs.** The "Why" gives the per-run saving (Lint about 82s vs 15-25s, Build about 50s vs 10-25s). The same resolution records that `ci` went "0.1.0 → 0.2.23 in three weeks (9 versions on Nov 14–15)", and each version costs an image build on the shared runner plus the pin pull request's CI. No build time is recorded, so "it still pays" cannot be checked. Change: state the build time and the build frequency next to the per-run saving, or say they were not measured. - **The ADR number can collide.** This issue says "numbered after the threat-model ADR", and [docs(adr): record releases by generated pull request and the release bot as the only automated tag credential](https://git.rkdr.net/Mortis/Kamino/issues/177) says "Number it after any ADR already merged". Neither blocks the other, so if both are worked at the same time both take 0002. Change: "take the next free number when the pull request is opened, and renumber on rebase if another ADR merged first". Waiting on another decision: whether the molecule images keep their preinstalled role packages, and the runner capacity behind the speed numbers, wait on [Molecule and Renovate on the shared runner: isolation, capacity and cost](https://git.rkdr.net/Mortis/Kamino/issues/212). The ADR wording in the first item should follow that decision if it changes the rule.
Author
Owner

Corrections from Molecule and Renovate on the shared runner: isolation, capacity and cost:

  • Molecule images do not keep a converge off the network. They bake in everything except what a role installs itself, because that install path is what the test exercises. Drop "Molecule images keep a converge off the network".
  • Molecule is no longer serialised by a concurrency group and no longer runs on push to main. Runs are isolated per run (per-run container names and labels), and the runner capacity is raised separately.
  • Residual-risk sentence: "There is no post-merge Molecule rerun: 'block on outdated branch' means main gets the tree its pull request tested; the nightly run catches drift outside the tree (mirrors, images)."
Corrections from [Molecule and Renovate on the shared runner: isolation, capacity and cost](https://git.rkdr.net/Mortis/Kamino/issues/212): - Molecule images do **not** keep a converge off the network. They bake in everything except what a role installs itself, because that install path is what the test exercises. Drop "Molecule images keep a converge off the network". - Molecule is no longer serialised by a concurrency group and no longer runs on push to `main`. Runs are isolated per run (per-run container names and labels), and the runner capacity is raised separately. - Residual-risk sentence: "There is no post-merge Molecule rerun: 'block on outdated branch' means `main` gets the tree its pull request tested; the nightly run catches drift outside the tree (mirrors, images)."
Author
Owner

Review of the map (2026-11-17).

  • Residual risk. Add "and a selection mistake" after "drift outside the tree (mirrors, images)". The nightly is also the only run of scenarios a pull request's diff did not select.
  • Measured saving. The body records Lint at "15–25s" with the image; the shared-runner decision measured "Lint 33s, Build 13s" for 3 to 17 November. State both with their dates, or take the newer figure. The map's Speed note asks for the measured saving where the machinery lives.
  • ansible-core bump. What the ADR says about a core bump (tested by its own pull request, or first by the pin pull request) waits on What Molecule proves before a merge, and who acts on the nightly run.
Review of the map (2026-11-17). - **Residual risk.** Add "and a selection mistake" after "drift outside the tree (mirrors, images)". The nightly is also the only run of scenarios a pull request's diff did not select. - **Measured saving.** The body records Lint at "15–25s" with the image; the shared-runner decision measured "Lint 33s, Build 13s" for 3 to 17 November. State both with their dates, or take the newer figure. The map's Speed note asks for the measured saving where the machinery lives. - **ansible-core bump.** What the ADR says about a core bump (tested by its own pull request, or first by the pin pull request) waits on [What Molecule proves before a merge, and who acts on the nightly run](https://git.rkdr.net/Mortis/Kamino/issues/256).
Author
Owner

Scope change from What Molecule proves before a merge, and who acts on the nightly run (2026-11-20)

Residual-risk line, narrowed. Lint, Build and Molecule each install the pull request's pins when they differ from the image, so an image-input pull request is tested on its own pins. What remains: a pin bump that selects no Molecule scenario (every Python pin except a core minor bump, which edits meta/runtime.yml) is first behaviour-tested by the ci pin pull request, after it has merged.

## Scope change from [What Molecule proves before a merge, and who acts on the nightly run](https://git.rkdr.net/Mortis/Kamino/issues/256) (2026-11-20) Residual-risk line, narrowed. Lint, Build and Molecule each install the pull request's pins when they differ from the image, so an image-input pull request is tested on its own pins. What remains: a pin bump that selects no Molecule scenario (every Python pin except a core minor bump, which edits `meta/runtime.yml`) is first behaviour-tested by the `ci` pin pull request, after it has merged.
Author
Owner

Body rewritten on 2026-11-20 to the final state of the comments above (final validation round of the map, #87 (comment)). The body is the spec; the earlier comments are history.

  • No decision of that round changes this issue directly. The rewrite carries the earlier comments (per-image Dockerfiles, what molecule images bake, the narrowed residual-risk text, no Molecule on push to main, the cost side of the saving, next-free ADR number) and states acceptance as the maintainer's approval of the pull request.
  • The residual-risk sentences stay inside the ADR because the comments of 2026-11-17 explicitly place them there; the maintainer may move them to the SECURITY.md register.
Body rewritten on 2026-11-20 to the final state of the comments above (final validation round of the map, https://git.rkdr.net/Mortis/Kamino/issues/87#issuecomment-12281). The body is the spec; the earlier comments are history. - No decision of that round changes this issue directly. The rewrite carries the earlier comments (per-image Dockerfiles, what molecule images bake, the narrowed residual-risk text, no Molecule on push to `main`, the cost side of the saving, next-free ADR number) and states acceptance as the maintainer's approval of the pull request. - The residual-risk sentences stay inside the ADR because the comments of 2026-11-17 explicitly place them there; the maintainer may move them to the `SECURITY.md` register.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#167