Skip to content

feat: move Poetry version ownership to poetry-lock-update - #74

Merged
blink1073 merged 2 commits into
Calysto:mainfrom
blink1073:shared-poetry-fix
Sep 29, 2026
Merged

blink1073 merged 2 commits into
Calysto:mainfrom
blink1073:shared-poetry-fix

Conversation

@blink1073

Copy link
Copy Markdown
Contributor

What

Splits ownership of the Poetry version between the two bot actions:

  • pre-commit-autoupdate now leaves the poetry hook alone (new exclude-repos input, defaulting to the poetry repo).
  • poetry-lock-update now bumps the poetry hook in .pre-commit-config.yaml to the newest cooldown-eligible release (prek update --repo), reinstalls that Poetry, and regenerates poetry.lock with it. Both files land in the same PR, and the body gains a ## Poetry version section.

Why

base-setup derives CI's Poetry from the poetry hook rev. An autoupdate PR that bumped that rev silently upgraded the Poetry used to generate/check the lock, but only committed .pre-commit-config.yaml. Poetry stamps its own version into poetry.lock, so the poetry-lock hook then rewrote the lock and failed:

  • the static job (pre-commit-run) with "files were modified by this hook", and
  • the release dry-run, because just install runs pre-commit install and the release action's git commit tripped the same hook.

Reproduced locally; see Calysto/metakernel#495.

Notes

  • get_poetry_version.py gains --repo; tests extended.
  • Existing in-flight autoupdate PRs (e.g. metakernel#495) still predate this change and will stay red until the lock-update job regenerates the lock or they are recreated.

pre-commit-autoupdate now excludes the poetry hook, and
poetry-lock-update bumps it to the newest cooldown-eligible release and
regenerates poetry.lock with it, so the pinned toolchain and the lock
always move together in one PR.

Previously an autoupdate PR that bumped the poetry rev silently changed
the Poetry CI installs (base-setup reads the hook rev) without updating
poetry.lock, so the poetry-lock hook failed the static and release jobs.
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[High risk] Moves Poetry version management into the lock-update workflow.

The PR should not merge until autoupdate reliably excludes every Poetry hook form recognized by the version helper.

Findings

  1. P1 Poetry exclusion misses SSH URLs ▶
  2. P2 Joint update lacks a test ▶

Summary

The PR assigns Poetry-hook updates to poetry-lock-update, which reinstalls the selected Poetry version and commits its hook revision with the regenerated lock. It also adds a default Poetry exclusion to pre-commit-autoupdate and a --repo option to the version helper.

  • The default exclusion does not cover every Poetry URL form recognized by the helper.
  • The joint hook-and-lock update lacks an assertion in the action tests.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Poetry hook rev"] --> B["base-setup: install Poetry"]
  A --> C["poetry-lock-update: update hook"]
  C --> D["Reinstall selected Poetry"]
  D --> E["Regenerate poetry.lock"]
  C --> F["Commit hook and lock in one PR"]
  E --> F
  G["pre-commit-autoupdate"] --> H["Exclude Poetry hook"]
Loading

Reviews (1) · Last reviewed commit: "feat: move Poetry version ownership to p..."

Comment thread actions/pre-commit-autoupdate/action.yml Outdated
Comment thread actions/poetry-lock-update/action.yml
Addresses review feedback:

- pre-commit-autoupdate now derives the poetry exclusion from the actual
  configured hook URL via build_exclude_repos.sh, so ssh and .git forms are
  covered too, not just the hardcoded https URL.
- Extracts the lock-update staging/commit into stage_update.sh and adds
  focused tests: build_exclude_repos covers https/ssh/quoted/missing forms,
  and stage_update verifies the hook revision is committed together with
  the regenerated poetry.lock.
@blink1073
blink1073 merged commit 66c81eb into Calysto:main Sep 29, 2026
24 checks passed
@blink1073
blink1073 deleted the shared-poetry-fix branch September 29, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant