Fail fast when the mutmut workflow's python-version is below 3.13#327
Conversation
Review of agent-template-python#24 found that passing a `python-version` below 3.13 breaks the workflow before any mutation testing runs: setup-uv exports the value as UV_PYTHON for the whole job, and the helper scripts' inline metadata requires Python >= 3.13, so the detection step fails with an interpreter-resolution error that does not name the real cause. Add a first-step guard that rejects sub-3.13 values with an explicit message (version-sorted comparison, no uv involvement), and document the floor on the input and in the caller guide, including the corollary that projects whose `requires-python` upper bound excludes 3.13 cannot use the workflow.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 18 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 429607a7ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| PYTHON_VERSION: ${{ inputs.python-version }} | ||
| run: | | ||
| set -euo pipefail | ||
| lowest=$(printf '%s\n' "3.13" "${PYTHON_VERSION}" | sort -V | head -n 1) |
There was a problem hiding this comment.
Reject prefixed Python requests
When callers use uv-supported request forms that don't start with a digit, this guard silently accepts sub-3.13 interpreters: printf '3.13\ncpython3.12\n' | sort -V | head -1 returns 3.13 (same for <3.13/pypy3.12). uv documents <version-specifier> and <implementation><version> as valid request formats, and setup-uv sets this input as UV_PYTHON for later steps, so uv run --script ...mutation_detect_changes.py still fails later on the script's requires-python >=3.13 instead of producing the intended fast error.
Useful? React with 👍 / 👎.
|
@coderabbitai please create a new GitHub issue for the following: Reject prefixed Python requests When callers use uv-supported request forms that don't start with a digit, this guard silently accepts sub-3.13 interpreters: |
|
Tip For best results, initiate chat on the files or code changes.
Issue: #328 Included the summary, rationale, affected areas, acceptance criteria, and backlinks to PR |
Summary
Review of agent-template-python#24 found that a
python-versionbelow 3.13 breaks the workflow before mutation testing starts: setup-uv exports it asUV_PYTHONjob-wide, and the helper scripts' inline metadata requires Python >= 3.13, so detection fails with an unhelpful interpreter-resolution error. This branch adds a first-step guard rejecting sub-3.13 values with an explicit message (plainsort -Vcomparison, so it runs before any uv setup) and documents the floor on the input and in the caller guide.Validation
actionlint: cleanmake markdownlint: 0 errors