Skip to content

Fail fast when the mutmut workflow's python-version is below 3.13#327

Merged
leynos merged 1 commit into
mainfrom
validate-mutmut-python-version
Jul 7, 2026
Merged

Fail fast when the mutmut workflow's python-version is below 3.13#327
leynos merged 1 commit into
mainfrom
validate-mutmut-python-version

Conversation

@leynos

@leynos leynos commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Review of agent-template-python#24 found that a python-version below 3.13 breaks the workflow before mutation testing starts: setup-uv exports it as UV_PYTHON job-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 (plain sort -V comparison, so it runs before any uv setup) and documents the floor on the input and in the caller guide.

Validation

  • YAML parse and actionlint: clean
  • make markdownlint: 0 errors

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.
@leynos leynos enabled auto-merge (squash) July 7, 2026 10:24

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 16af3dcf-9fad-419c-95a5-f32bace4574c

📥 Commits

Reviewing files that changed from the base of the PR and between bf19d93 and 429607a.

📒 Files selected for processing (2)
  • .github/workflows/mutation-mutmut.yml
  • docs/mutation-mutmut-workflow.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch validate-mutmut-python-version

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@leynos leynos merged commit 859416a into main Jul 7, 2026
27 checks passed
@leynos leynos deleted the validate-mutmut-python-version branch July 7, 2026 10:28
@leynos

leynos commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

@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: 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.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@leynos: Created the follow-up GitHub issue and assigned it to you.

Issue: #328

Included the summary, rationale, affected areas, acceptance criteria, and backlinks to PR #327 plus the originating comment.

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