Skip to content

chore: add uv-lock --check pre-commit hook and dependency-update guidance#1408

Open
sd-db wants to merge 1 commit intomainfrom
sd-db/chore/pre-commit-uv-lock-check
Open

chore: add uv-lock --check pre-commit hook and dependency-update guidance#1408
sd-db wants to merge 1 commit intomainfrom
sd-db/chore/pre-commit-uv-lock-check

Conversation

@sd-db
Copy link
Copy Markdown
Collaborator

@sd-db sd-db commented Apr 20, 2026

Summary

  • Add uv-lock --check pre-commit hook — fails when pyproject.toml and uv.lock drift.
  • Add a dependency-update section to AGENTS.md covering a case --check doesn't catch.

Test plan

  • Clean tree → pre-commit run --all-files passes.
  • Mutate pyproject.toml without updating lockfile → hook fails.
  • Revert → passes.

…ance

Guards against the scenario where `pyproject.toml` version bounds are
changed but `uv.lock` is not re-resolved — CI then continues testing
against the previously pinned version, silently missing the bump.

- Adds `uv-lock --check` to `.pre-commit-config.yaml` so the hook fails
  when `pyproject.toml` and `uv.lock` are structurally inconsistent.
- Adds an "Updating Dependencies" section to `AGENTS.md` explaining
  that `--check` does not force pinned versions forward, and that
  bound changes must be paired with `uv lock --upgrade-package <name>`
  to actually pick up the newly allowed version.

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant