Skip to content

feat(template): add uv validation contract via scripts/check.sh - #28

Merged
Andreas-Garcia merged 2 commits into
mainfrom
feat/uv-validation-contract
Dec 2, 2026
Merged

Andreas-Garcia merged 2 commits into
mainfrom
feat/uv-validation-contract

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

Adds a uv validation contract to the template: every repo validates with one command, bash scripts/check.sh, which installs from uv.lock and which CI runs unchanged. This is step 1 of the uv rollout; the pilot on the-music-tree-geography follows.

Issues

N/A

Changes

  • template/scripts/check.sh.jinja (new, Copier-managed, so copier update keeps it current): uv sync --frozen, then pre-commit, then pytest. --frozen fails on a missing or stale uv.lock instead of re-locking.
  • New Copier question uv_sync_args (default empty) for extras the checks need, e.g. --extra processing.
  • pyproject.toml.jinja: dev tools move to [dependency-groups] dev (PEP 735). Bootstrap-only file, merged by hand on migration.
  • Starter test.yml: astral-sh/setup-uv then bash scripts/check.sh. Starter AGENTS.md names the command.
  • Starter lint.yml now installs with uv and runs pre-commit through uv run, since the reusable workflow's default pip install -e ".[dev]" no longer finds the dev tools. check.sh stops with a uv lock hint when uv.lock is missing.
  • Docs: migration-guide.md §2 and development.md describe the contract.
  • scripts/tests/agent-template.sh checks that check.sh is rendered, executable, and interpolates uv_sync_args.

Test plan

  • bash scripts/tests/agent-template.sh <check-project-agents.py>: passes.
  • Test script also runs actionlint on the rendered lint.yml and checks uv_sync_args reaches it.
  • Rendered a default project and ran actionlint on its test.yml: clean.
  • Not run: check.sh end to end in a rendered project (needs a uv.lock); the pilot covers it.

Screenshots

N/A

Risk

Change, standard depth: template behavior that downstream repos adopt, no runtime code. Review: one fresh sonnet reviewer found two important issues (lint workflow install, missing-lock hint), both fixed; the fix delta was checked by the principal session only. Not fixed (pre-existing): pytest exits 5 when a repo has no tests. Existing repos are unaffected until they run copier update, which adds scripts/check.sh. pyproject.toml and test.yml stay bootstrap-only.

How to revert

Revert the merge commit; Release Please publishes the revert as the next release.

Deployment notes

Merging a feat PR starts a Release Please release (minor, 5.3.0). Target branch: main.

Post-deploy verification

N/A

Andreas-Garcia and others added 2 commits December 2, 2026 16:13
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Andreas-Garcia
Andreas-Garcia enabled auto-merge (squash) December 2, 2026 15:15
@Andreas-Garcia
Andreas-Garcia merged commit 99bb393 into main Dec 2, 2026
8 checks passed
@Andreas-Garcia
Andreas-Garcia deleted the feat/uv-validation-contract branch December 2, 2026 15:19
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