Repository navigation
fix(template): run check.sh tools through the uv venv with python -m - #31
Merged
Merged
Conversation
check.sh ran `uv run pre-commit`, which resolves through PATH and accepts a global binary. Run pre-commit and pytest with `python -m` so only the project venv counts, guard on pre-commit missing from dev dependencies, and document a first-adoption checklist. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Andreas-Garcia
enabled auto-merge (squash)
December 2, 2026 17:32
auto-merge was automatically disabled
December 2, 2026 17:34
Pull request was closed
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/check.shranuv run --frozen pre-commitandpytest, which resolve throughPATHand silently accept a global binary. They now run aspython -minside the uv venv, so the contract only passes when the tools are project dependencies.Issues
Closes #30
Changes
template/scripts/check.sh.jinja: guarduv run --frozen python -c 'import pre_commit'(hint to add pre-commit to[dependency-groups] dev), thenpython -m pre_commit run --all-filesandpython -m pytest.template/.github/workflows/lint.yml: samepython -m pre_commitcommand, so CI lint andcheck.shagree.docs/migration-guide.md: first-adoption checklist for repos without.copier-answers.yml.docs/development.md: link from "Validation contract" to the checklist.scripts/tests/agent-template.sh: asserts the renderedcheck.shcommands and guard.Test plan
bash scripts/tests/agent-template.sh <stub>: passes (copier render and actionlint). The CI invocation needs the externalcheck-project-agents.py, replaced by a no-op stub locally.lint.ymlaligned). Not fixed:python -m pytestputs the cwd onsys.path, which can mask a broken install in flat-layout repos.check.shitself was not executed against a consumer repo.Screenshots
N/A
Risk
Intent
change, depth standard: shell template behavior shipped to consumers. Consumers whose dev group lackspre-commitnow failcheck.shaftercopier update, which is the intended fix.How to revert
Revert the squash commit;
copier updaterestores the previouscheck.sh.Deployment notes
Merging a
fix:PR starts a release-please patch release automatically. Consumers pick it up withcopier update.Post-deploy verification
N/A
🤖 Generated with Claude Code