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
2.6 KiB
2.6 KiB
Script rules
Every rule for the scripts in scripts/ and their tests in tests/scripts/, in full. Each gives
its reason (Why) and how it is held (Held): a control names its hook or check; review means a
person other than the author sees the change before it merges; aspirational means nothing checks
it. "Until X (#N) lands" names a check that does not exist yet and its backlog issue. General
rules for scripts (prefer a standard tool, comment length) are in
code-style.md.
Scripts and their tests
- A script change comes with its test in
tests/scripts/(test_<script>.py), in the same pull request. Run them withpython3 -m unittest discover -s tests/scripts. Why: a script decides whether a pull request passes, so an untested change can wave through what it should stop. Held: control: the Lint check's "Test the repository scripts" step runs the tests; review for whether the change is tested at all. - A line added to
tests/sanity/ignore-common.txtis a last resort and carries its reason as a trailing# ...comment. Fix the finding first. A finding of one ansible-core version only goes in a committedignore-<MAJOR.MINOR>.txt, which the Build job appends. Why: an ignore silencesansible-test sanityfor good, and one without a reason cannot be reviewed or removed later. Held: review (tests/sanity/ignore-*.txtis underCODEOWNERS).
Pinned tools
- A pin in
requirements-dev.txtchanges together with its lockrequirements-dev.lock. Renovate does both; by hand, runscripts/lock-requirements.sh(--upgradealso moves transitive packages; it needs PyPI and the Python of.python-version) and commit the lock in the same pull request. Why: installs usepip install --require-hashes -r requirements-dev.lock -r requirements-dev.txt, which refuses an unhashed package and any disagreement between the two files. Held: control: the Lint and Build checks install that way when a pin file changes. - Hook repositories in
.pre-commit-config.yamlare pinned by commit SHA, with the release in a# frozen: vX.Y.Zcomment. Find the SHA withgit ls-remote <repo> "refs/tags/<tag>" "refs/tags/<tag>^{}"(the^{}line, when there is one). Why: a tag can be moved; a commit SHA cannot. Held: review (.pre-commit-config.yamlis underCODEOWNERS).
A pin file is also an input of the ci image: images/AGENTS.md has what
the merge publishes. Whether a workflow runs a script from main's copy or from the pull
request's is a rule of .gitea/workflows/AGENTS.md ("Judge scripts").