ci(lint): accept an apm-cli bump in the bot-diff check
A Renovate pull request may now change pyproject.toml and uv.lock, but only together, so the pep621 manager can move the apm pin. In pyproject.toml only the version of a quoted name==version pin may change. uv.lock is parsed with tomllib in a module of its own, check_uv_lock.py, because uv installs whatever the lock names and a line-shape rule cannot tie a file to its package: a file of another package under apm-cli, an added package, a marker that drops a dependency and a downgrade all passed one. The parsed rule allows only apm-cli moving up to the pin in pyproject.toml, as plain releases compared as numbers, with the same kinds of file as before (an sdist if it had one, the same wheel tags), each on files.pythonhosted.org under /packages/ without dot segments or escapes, named for apm-cli at the pin, by sha256. Every other package, the root project beyond its apm-cli specifier and the top level beyond `revision` must stay as they are. Without the same file kinds, a lock could drop the wheels and make uv build apm-cli from its sdist with a build backend fetched at sync time. A bump that moves anything else is made by hand. Refs: #518 Assisted-by: Claude Code
This commit is contained in:
1 parent
535926b36e
commit
47641ae01d
7 files changed
+754
-10
No files matched your search
@@ -39,11 +39,14 @@ issue.
|
||||
while a content check must see the content it is given. *Held:* review (`CODEOWNERS`).
|
||||
- **A pull request from a `renovate/` branch changes only version, tag, digest and pin lines**
|
||||
(tool pins with their lock entries and hashes, hook `rev:` lines, Dockerfile `FROM` tags and
|
||||
digests, `job_image:` pins, consumer image pins).
|
||||
digests, `job_image:` pins, consumer image pins). In `pyproject.toml` only a pin's version
|
||||
moves; in `uv.lock` only apm-cli moves, to that pin, with its files from PyPI by sha256, and
|
||||
every other package stays as it is.
|
||||
*Why:* the bot's minor and patch pull requests automerge, so they must not be able to change
|
||||
anything else. *Held:* control: the Lint check's "Check a bot pull request only moves pins"
|
||||
step, `scripts/check_bot_pr_diff.py` run from `main`'s copy. The branch name is chosen by the
|
||||
pusher, so this constrains only the bot's own pull requests.
|
||||
anything else; uv installs whatever `uv.lock` names, so it is parsed, not read line by line.
|
||||
*Held:* control: the Lint check's "Check a bot pull request only moves pins" step,
|
||||
`scripts/check_bot_pr_diff.py` with `scripts/check_uv_lock.py`, run from `main`'s copy. The
|
||||
branch name is chosen by the pusher, so this constrains only the bot's own pull requests.
|
||||
- **Workflows never mention the image namespace this repository's CI must not use** (the string
|
||||
is in `scripts/check_image_versions.py`). *Why:* this repository's images are built and pulled
|
||||
only under its own organisation's namespace. *Held:* control: the Lint check's "Check image
|
||||
|
||||
Reference in new issue
Block a user