Each image.yml matrix entry has a base: "MAJOR.MINOR" instead of version:. A person edits base only for a minor or major.
On main, the new scripts/next_image_version.py checksums the image's inputs: its build context, or the files its Dockerfile copies from the repository root (reusing check_image_versions.inputs_of).
It compares that checksum with the net.rkdr.mortis.inputs-sha256 label of the newest published <base>.N and prints <base>.N+1, or nothing when they match.
The job publishes that version and latest, with the checksum as a label, or builds nothing.
The tag lookup with the push credential now fails the job on anything but 404, so a published tag is never moved.
Where the script runs. It runs inside the image job's prepare step, from this commit's source archive.
python3 is installed next to curl and purged by the existing pristine-filesystem logic. The script runs with env -u PAT_USER -u PAT_TOKEN -u JOB_TOKEN, so the registry credential never reaches it.
It reads the registry anonymously (the images are public).
A separate job in the ci image would have put a ci pin in image.yml and depended on per-matrix needs outputs, which are unverified on this Gitea.
The pin PR opens right after a push.renovate.yml runs on workflow_run of Images, live, and only when conclusion == 'success'.
I read the Gitea v28.3.0 source (the server runs 28.3.0) to check that this fires. notifier_helper.go drops an event only when its doer is the Actions user. For workflow_run, the doer is the trigger user of the finished run, and Images runs only on a push or dispatch by a person. ToActionWorkflowRun sets conclusion. So the dispatch fallback is not needed.
zizmor exception:workflow_run: # zizmor: ignore[dangerous-triggers], with its reason in the comment above it. Images never runs on a pull request, and this job reads nothing from the run except its conclusion.
Removed:bump_image_versions.py and its tests, check_image_versions.py bump, Lint's bump step, Renovate's postUpgradeTasks and RENOVATE_ALLOWED_COMMANDS, and the bot-diff allowance for matrix version: lines. The bot-diff gate now also refuses a change to base:, and it still refuses a job_image: line moved to another entry.
Docs updated to drop the bump: images/AGENTS.md, .gitea/workflows/AGENTS.md, scripts/AGENTS.md, code-style.md, making-a-change.md, the three docs/images/*.md, renovate.json descriptions, and comments in lock-requirements.sh and images/ci/Dockerfile. The root AGENTS.md had no line on it.
No changelog fragment: a consumer of the Collection sees no change.
Soft limits (code-style.md):
image.yml (about 350 lines), check_image_versions.py (714, down from 834) and check_bot_pr_diff.py (355) were already over 200 lines.
This change keeps to the smallest edit, as the issue asks. The script's rewrite is #169.
The prepare step's comment block grows by 4 lines for the version step.
Existing tool ruled out:skopeo and crane could read the registry, but neither computes the input set from the Dockerfile. They would also be one more pinned download in a job that must leave its container pristine.
On the first merge, all three images republish once:
molecule-ubuntu2404 0.1.10, molecule-ubuntu2604 0.1.6, ci 0.2.39.
No published version has the checksum label yet, so their content is unchanged apart from the ci Dockerfile's comment fix.
New: test_next_image_version.py, covering version choice and what counts as an input change, written test-first.
Changed: check_image_versions (base matrix, bump removed) and check_bot_pr_diff (version and base lines refused).
pre-commit run --all-files: all hooks pass, including zizmor, actionlint and REUSE.
ansible-test sanity (pre-push hook) passes.
I ran the script on a git archive of this tree against the live registry (read-only). It prints 0.1.10, 0.1.6 and 0.2.39, each with a checksum, so the anonymous tag and label reads work.
A code review (standards and spec, two separate reviews) was run. Its findings are fixed: stale bump text in the docs and the ci Dockerfile, and one comment that narrated the change.
Not verified
Molecule did not run locally; it runs in CI.
The Images job itself has not run. Not checked:
that installing, running and purging python3 passes the pristine-filesystem check on both job containers (Debian's py3compile/py3clean, and possibly tzdata). If anything is left behind, the job fails before building.
the source archive download with the job token.
that kaniko writes the label.
that a second run with unchanged inputs builds nothing.
That Gitea actually starts Renovate after Images. I only read the source.
How long the pin PR takes to open after the image push. The proposal is 15 minutes; the number is the maintainer's, observed after the merge.
If one matrix image fails, the Images run's conclusion is failure and Renovate does not start; images that did publish then wait for the daily schedule.
Automerge after one maintainer approval (#210 point 1) depends on CODEOWNERS and the protection setting; this change does not touch it.
I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.
Assisted-by: Claude Code:claude-opus-5-5
## What and why
Closes #165
- **Versions come from CI, not from a hand edit.**
- Each `image.yml` matrix entry has a `base: "MAJOR.MINOR"` instead of `version:`. A person edits `base` only for a minor or major.
- On `main`, the new `scripts/next_image_version.py` checksums the image's inputs: its build context, or the files its Dockerfile copies from the repository root (reusing `check_image_versions.inputs_of`).
- It compares that checksum with the `net.rkdr.mortis.inputs-sha256` label of the newest published `<base>.N` and prints `<base>.N+1`, or nothing when they match.
- The job publishes that version and `latest`, with the checksum as a label, or builds nothing.
- The tag lookup with the push credential now fails the job on anything but 404, so a published tag is never moved.
- **Where the script runs.** It runs inside the image job's prepare step, from this commit's source archive.
- `python3` is installed next to `curl` and purged by the existing pristine-filesystem logic. The script runs with `env -u PAT_USER -u PAT_TOKEN -u JOB_TOKEN`, so the registry credential never reaches it.
- It reads the registry anonymously (the images are public).
- A separate job in the `ci` image would have put a `ci` pin in `image.yml` and depended on per-matrix `needs` outputs, which are unverified on this Gitea.
- **The pin PR opens right after a push.** `renovate.yml` runs on `workflow_run` of Images, live, and only when `conclusion == 'success'`.
- I read the Gitea v28.3.0 source (the server runs 28.3.0) to check that this fires. `notifier_helper.go` drops an event only when its doer is the Actions user. For `workflow_run`, the doer is the trigger user of the finished run, and Images runs only on a push or dispatch by a person. `ToActionWorkflowRun` sets `conclusion`. So the dispatch fallback is not needed.
- **zizmor exception:** `workflow_run: # zizmor: ignore[dangerous-triggers]`, with its reason in the comment above it. Images never runs on a pull request, and this job reads nothing from the run except its conclusion.
- **Removed:** `bump_image_versions.py` and its tests, `check_image_versions.py bump`, Lint's bump step, Renovate's `postUpgradeTasks` and `RENOVATE_ALLOWED_COMMANDS`, and the bot-diff allowance for matrix `version:` lines. The bot-diff gate now also refuses a change to `base:`, and it still refuses a `job_image:` line moved to another entry.
- **Docs updated** to drop the bump: `images/AGENTS.md`, `.gitea/workflows/AGENTS.md`, `scripts/AGENTS.md`, `code-style.md`, `making-a-change.md`, the three `docs/images/*.md`, `renovate.json` descriptions, and comments in `lock-requirements.sh` and `images/ci/Dockerfile`. The root `AGENTS.md` had no line on it.
- **No changelog fragment:** a consumer of the Collection sees no change.
**Soft limits (code-style.md):**
- `image.yml` (about 350 lines), `check_image_versions.py` (714, down from 834) and `check_bot_pr_diff.py` (355) were already over 200 lines.
- This change keeps to the smallest edit, as the issue asks. The script's rewrite is #169.
- The prepare step's comment block grows by 4 lines for the version step.
- **Existing tool ruled out:** `skopeo` and `crane` could read the registry, but neither computes the input set from the Dockerfile. They would also be one more pinned download in a job that must leave its container pristine.
**On the first merge, all three images republish once:**
- molecule-ubuntu2404 0.1.10, molecule-ubuntu2604 0.1.6, ci 0.2.39.
- No published version has the checksum label yet, so their content is unchanged apart from the `ci` Dockerfile's comment fix.
- Renovate should then open the pin PR for them.
## Verified
- `python3 -m unittest discover -s tests/scripts`: 221 tests pass.
- New: `test_next_image_version.py`, covering version choice and what counts as an input change, written test-first.
- Changed: `check_image_versions` (base matrix, bump removed) and `check_bot_pr_diff` (version and base lines refused).
- `pre-commit run --all-files`: all hooks pass, including zizmor, actionlint and REUSE.
- `ansible-test sanity` (pre-push hook) passes.
- I ran the script on a `git archive` of this tree against the live registry (read-only). It prints `0.1.10`, `0.1.6` and `0.2.39`, each with a checksum, so the anonymous tag and label reads work.
- A code review (standards and spec, two separate reviews) was run. Its findings are fixed: stale bump text in the docs and the `ci` Dockerfile, and one comment that narrated the change.
## Not verified
- Molecule did not run locally; it runs in CI.
- The Images job itself has not run. Not checked:
- that installing, running and purging `python3` passes the pristine-filesystem check on both job containers (Debian's `py3compile`/`py3clean`, and possibly `tzdata`). If anything is left behind, the job fails before building.
- the source archive download with the job token.
- that kaniko writes the label.
- that a second run with unchanged inputs builds nothing.
- That Gitea actually starts Renovate after Images. I only read the source.
- How long the pin PR takes to open after the image push. The proposal is 15 minutes; the number is the maintainer's, observed after the merge.
- If one matrix image fails, the Images run's conclusion is failure and Renovate does not start; images that did publish then wait for the daily schedule.
- Automerge after one maintainer approval (#210 point 1) depends on CODEOWNERS and the protection setting; this change does not touch it.
---
- [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none.
Assisted-by: Claude Code:claude-opus-5-5
Claude
added this to the CI velocity (emergency) milestone 2026-11-23 21:16:05 +00:00
Defame1297
was assigned by Claude2026-11-23 21:16:05 +00:00
The image.yml matrix holds a hand-edited base (MAJOR.MINOR) per image instead
of a version. On main, scripts/next_image_version.py compares a checksum of the
image's inputs with the inputs-sha256 label of the newest published <base>.N
and the job publishes <base>.N+1 when they differ, or builds nothing when they
match. A published tag is still never moved.
renovate.yml runs live on the successful completion of Images (workflow_run),
so the pin pull request opens minutes after a push instead of on the schedule.
Removed: bump_image_versions.py and its tests, check_image_versions.py bump,
Lint's bump step, Renovate's postUpgradeTasks, and the bot-diff allowance for
matrix version lines.
Closes#165
Assisted-by: Claude Code:claude-opus-5-5
CODEOWNERS rules
requested review from Defame1297 2026-11-23 21:16:05 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What and why
Closes #165
image.ymlmatrix entry has abase: "MAJOR.MINOR"instead ofversion:. A person editsbaseonly for a minor or major.main, the newscripts/next_image_version.pychecksums the image's inputs: its build context, or the files its Dockerfile copies from the repository root (reusingcheck_image_versions.inputs_of).net.rkdr.mortis.inputs-sha256label of the newest published<base>.Nand prints<base>.N+1, or nothing when they match.latest, with the checksum as a label, or builds nothing.python3is installed next tocurland purged by the existing pristine-filesystem logic. The script runs withenv -u PAT_USER -u PAT_TOKEN -u JOB_TOKEN, so the registry credential never reaches it.ciimage would have put acipin inimage.ymland depended on per-matrixneedsoutputs, which are unverified on this Gitea.renovate.ymlruns onworkflow_runof Images, live, and only whenconclusion == 'success'.notifier_helper.godrops an event only when its doer is the Actions user. Forworkflow_run, the doer is the trigger user of the finished run, and Images runs only on a push or dispatch by a person.ToActionWorkflowRunsetsconclusion. So the dispatch fallback is not needed.workflow_run: # zizmor: ignore[dangerous-triggers], with its reason in the comment above it. Images never runs on a pull request, and this job reads nothing from the run except its conclusion.bump_image_versions.pyand its tests,check_image_versions.py bump, Lint's bump step, Renovate'spostUpgradeTasksandRENOVATE_ALLOWED_COMMANDS, and the bot-diff allowance for matrixversion:lines. The bot-diff gate now also refuses a change tobase:, and it still refuses ajob_image:line moved to another entry.images/AGENTS.md,.gitea/workflows/AGENTS.md,scripts/AGENTS.md,code-style.md,making-a-change.md, the threedocs/images/*.md,renovate.jsondescriptions, and comments inlock-requirements.shandimages/ci/Dockerfile. The rootAGENTS.mdhad no line on it.Soft limits (code-style.md):
image.yml(about 350 lines),check_image_versions.py(714, down from 834) andcheck_bot_pr_diff.py(355) were already over 200 lines.skopeoandcranecould read the registry, but neither computes the input set from the Dockerfile. They would also be one more pinned download in a job that must leave its container pristine.On the first merge, all three images republish once:
ciDockerfile's comment fix.Verified
python3 -m unittest discover -s tests/scripts: 221 tests pass.test_next_image_version.py, covering version choice and what counts as an input change, written test-first.check_image_versions(base matrix, bump removed) andcheck_bot_pr_diff(version and base lines refused).pre-commit run --all-files: all hooks pass, including zizmor, actionlint and REUSE.ansible-test sanity(pre-push hook) passes.git archiveof this tree against the live registry (read-only). It prints0.1.10,0.1.6and0.2.39, each with a checksum, so the anonymous tag and label reads work.ciDockerfile, and one comment that narrated the change.Not verified
python3passes the pristine-filesystem check on both job containers (Debian'spy3compile/py3clean, and possiblytzdata). If anything is left behind, the job fails before building.NOTICEandREUSE.toml, or there is none.Assisted-by: Claude Code:claude-opus-5-5