From 4240b0c6b6cb9169bf9278ceb0eb9f9bef828fbd Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Mon, 26 Oct 2026 17:42:47 +0000 Subject: [PATCH] feat(renovate): follow our own image pins and automerge them The mortis/* pin rule was disabled until Phase 4. Enabled with automerge: the pin pull request's own Lint and Build run in the new image before the merge, the bot-diff gate allows only the pin lines, and check_image_versions pins rejects a pin ahead of the matrix. Majors stay manual. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm --- CLAUDE.md | 10 ++++++---- renovate.json | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 025c8db..36a7094 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -81,8 +81,10 @@ protection, or create tags: those are the operator's. `main`. PR 2 moves the consumers' `image:@sha256:` pins to that digest. `renovate.json` runs the script as a `postUpgradeTasks` command of a catch-all rule (matches every package, since only the first upgrade of a branch counts; branch mode, file filter `image.yml`; allowed by the one anchored regex in `RENOVATE_ALLOWED_COMMANDS` of `renovate.yml`), - so PR 1 carries the bump. PR 2 stays a hand edit until Phase 4 (pin-follow for - `git.rkdr.net/mortis/*` is `enabled: false`; it needs a dry run against the registry first). + so PR 1 carries the bump. PR 2 is Renovate's too: the pin-follow rule for + `git.rkdr.net/mortis/*` moves the `image:@sha256:` pins of `lint.yml`, `build.yml` + and `molecule.yml` to the newest published version and automerges after its own Lint and Build ran + in the new image (unverified until the first such PR; a major version stays manual). - **Bot-diff gate:** the `lint` workflow runs `scripts/check_bot_pr_diff.py` on pull requests. A head ref starting `renovate/` may only change version lines in `requirements-dev.txt`, `rev:` lines in `.pre-commit-config.yaml`, FROM tags/digests and the `uv==` pin in `images/*/Dockerfile`, @@ -134,8 +136,8 @@ protection, or create tags: those are the operator's. - **The workflow holds the runner's slot:** the `kamino-runner` host has a single slot (the label is `kamino-docker`), and the Renovate job may run up to 30 minutes (`timeout-minutes`) from 03:17 UTC, so Lint, Build and Molecule checks queue behind it. -- **Not enabled yet:** credentials for the `git.rkdr.net` registry (`hostRules`) and pin-follow. The - `pre-commit` manager is beta. +- **Not enabled:** credentials for the `git.rkdr.net` registry (`hostRules`; the tag and digest lookups + are anonymous). The `pre-commit` manager is beta. - **Hand edits on a bot branch:** a commit pushed by hand to a `renovate/` branch makes Renovate treat the branch as modified: it stops rebasing it, so merge that pull request by hand. - **The guard runs from `main`:** the lint step extracts `scripts/` from `origin/main` and runs the diff --git a/renovate.json b/renovate.json index a074215..50952e9 100644 --- a/renovate.json +++ b/renovate.json @@ -57,7 +57,7 @@ }, { "customType": "regex", - "description": "The MOLECULE_IMAGE value of molecule.yml is a multi-line `>-` scalar, which the github-actions manager does not read; matched here by its exact shape. Only used by the pin-follow rule below, which is disabled until Phase 4.", + "description": "The MOLECULE_IMAGE value of molecule.yml is a multi-line `>-` scalar, which the github-actions manager does not read; matched here by its exact shape. Used by the pin-follow rule below.", "managerFilePatterns": [ "/^\\.gitea/workflows/molecule\\.yml$/" ], @@ -149,11 +149,11 @@ "automerge": false }, { - "description": "Pin follow-up for our own images (git.rkdr.net/mortis/*): DISABLED. Phase 4, after a dry run against the registry; until then moving a pin is a reviewed hand edit (scripts/check_image_versions.py pins).", + "description": "Pin follow-up for our own images (git.rkdr.net/mortis/*): moves the image:@sha256: pins of lint.yml, build.yml and molecule.yml to the newest published version and its digest, and automerges (PR 2 of the update loop). The pull request's own Lint and Build run in the new image before the merge, scripts/check_bot_pr_diff.py allows only these pin lines, and scripts/check_image_versions.py pins fails a pin that is newer than the matrix. The registry lists tags and digests anonymously, so no hostRules are needed. A major version stays manual (rule above).", "matchPackageNames": [ "git.rkdr.net/mortis/**" ], - "enabled": false + "automerge": true } ] } -- 2.43.0