Skip to content

fix: require Python 3.11 and pass ruff 0.17 - #100

Merged
CybotTM merged 2 commits into
mainfrom
fix/py311-ruff-0.17
Oct 19, 2026
Merged

CybotTM merged 2 commits into
mainfrom
fix/py311-ruff-0.17

Conversation

@CybotTM

@CybotTM CybotTM commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

When merged, the Python lint step of the reusable validate.yml passes here under ruff 0.17.1 (netresearch/skill-repo-skill#390), and the benchmark docs name Python 3.11 as the minimum. The change also passes ruff 0.16.10, which validate.yml@main runs today, so this can merge before netresearch/skill-repo-skill#390.

Cause

ruff 0.17.0 checks a project that configures no Python version against 3.11 instead of 3.10. This repository configures none, so 0.17.1 reports one UP017 ("Use datetime.UTC alias") at benchmarks/cli_microbenchmark.py:215 on main at 2a0552c.

Changes

  • datetime.datetime.now(datetime.timezone.utc) → datetime.datetime.now(datetime.UTC), the same object.
  • Python 3.10 dropped: benchmarks/README.md, benchmarks/symbol-intent/README.md and benchmarks/agent-economics/efficiency/adapter/README.md say Python 3.11+ instead of 3.10+. The 3.10+ lines came in with the benchmark campaigns of 2026-09-06 (a0fddbe, 8ec140a); Python 3.10 reached end of life on 2026-10-01 (PEP 619), and datetime.UTC needs 3.11. The test-suite requirement in README.md ("Python 3 (standard library only)") names 3.11+ as well.
  • Left unchanged on purpose: benchmarks/agent-economics/results/2026-09-06-efficiency/README.md describes the verifier inside its archived evidence bundle and is listed in that directory's SHA256SUMS, so editing it would break sha256sum -c. The evidence-manifest.json hashes of the symbol-intent results describe archived snapshots (the live README already differs from them) and are not touched.

Testing done

  • uvx --no-build ruff@0.17.1 check --extend-exclude .skill-repo-tools . and format --check …: pass (main: 1 error)
  • The same two commands with ruff 0.16.10: pass
  • bash tests/run.sh --runtime-only after composer install: "OK: all checks passed." (run on both commits)
  • markdownlint-cli2 README.md with default settings: 75 MD013 findings, the same 75 as on main (the repository has no markdownlint config)
  • python3 benchmarks/cli_microbenchmark.py --help: exit 0

Assisted by claude-code:claude-opus-5-5 — Session f80546bb-48c5-4cd1-967d-f275a0a8f88d

The reusable validate.yml of netresearch/skill-repo-skill moves to
ruff 0.17.1, which checks an unconfigured project against Python 3.11
instead of 3.10. On main that yields one UP017 in
benchmarks/cli_microbenchmark.py: datetime.timezone.utc becomes
datetime.UTC, the same object.

Python 3.10 reached end of life on 2026-10-01 (PEP 619), and the alias
needs 3.11, so the three living benchmark READMEs now say Python 3.11+.
results/2026-09-06-efficiency/README.md keeps 3.10+: it describes the
archived verifier and is covered by that directory's SHA256SUMS.

Assisted-by: claude-code:claude-opus-5-5
Agent-Session: f80546bb-48c5-4cd1-967d-f275a0a8f88d
Agent-Host: 0493f0
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7d67ac1b-4c2b-42c5-ae0c-a872c8c37a50
📥 Commits

Reviewing files that changed from the base of the PR and between 2a0552c and 7ff462a.

📒 Files selected for processing: 5
  • README.md
  • benchmarks/README.md
  • benchmarks/agent-economics/efficiency/adapter/README.md
  • benchmarks/cli_microbenchmark.py
  • benchmarks/symbol-intent/README.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The documentation now specifies Python 3.11+ for the test suite and benchmark requirements. The benchmark timestamp now uses datetime.UTC instead of `datetime.timezone.utc.

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to 7ff46

The benchmark now uses a Python 3.11 feature, and the active test and benchmark instructions specify Python 3.11+. No concrete merge-blocking issue remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (4 skipped: 4 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main changes: requiring Python 3.11 and ensuring compatibility with Ruff 0.17.
Description check Passed The description directly explains the Ruff compatibility fix, Python version updates, intentional exclusions, and validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

README.md said the suite needs "Python 3 (standard library only)".
Python 3.10 reached end of life on 2026-10-01 and the benchmark
scripts now use datetime.UTC, so the requirement names 3.11+, like the
benchmark READMEs.

Assisted-by: claude-code:claude-opus-5-5
Agent-Session: f80546bb-48c5-4cd1-967d-f275a0a8f88d
Agent-Host: 0493f0
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@sonarqubecloud

Copy link
Copy Markdown

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 19, 2026
@CybotTM
CybotTM marked this pull request as ready for review October 19, 2026 06:16
@CybotTM
CybotTM merged commit b2840ac into main Oct 19, 2026
41 checks passed
@CybotTM
CybotTM deleted the fix/py311-ruff-0.17 branch October 19, 2026 06:32
CybotTM added a commit to netresearch/skill-repo-skill that referenced this pull request Oct 19, 2026
…390)

When merged, the Skill Validation job lints and format-checks with ruff
0.17.1 and passes, which makes #384
redundant (Renovate closes it), and the documented Python floor for this
repository's scripts is 3.11. **Merge this only after
netresearch/matrix-skill#177, netresearch/php-ast-edit-skill#100 and
netresearch/php-modernization-skill#160**: `validate.yml` is called at
`@main` by every skill repository, and without those three, their Python
lint step turns red the moment this lands.

## Cause

ruff 0.17.0 [raised its default Python version from 3.10 to
3.11](https://github.com/astral-sh/ruff/releases/tag/0.17.0) for
projects that configure none, and this repository configures none (no
`pyproject.toml`, `ruff.toml` or `requires-python`). At 3.11,
pyupgrade's UP017 fires twice in the #384 run:
`scripts/merge-ab-results.py:122:47` and
`skills/skill-repo/scripts/roll-changelog.py:121:39`, "Use
`datetime.UTC` alias", 2 errors, exit 1.

**Why 3.10 was there at all:** nobody chose it. No file in this
repository ever declared a Python version (`git log -S'3.10'`,
`-S'py310'`, `-S'requires-python'` and `-S'target-version'` over `main`
return nothing). The 3.10 was ruff's built-in default for an
unconfigured project, measured with `ruff check --show-settings`: 3.8 in
0.5–0.7, 3.9 in 0.8–0.13, 3.10 from
[0.14.0](https://github.com/astral-sh/ruff/releases/tag/0.14.0) ("Update
default and latest Python versions for 3.14"), 3.11 from 0.17.0. The
step ran unpinned `uvx ruff` until 7463f4b (2026-07-24) pinned 0.16.0,
whose default was already 3.10. After this PR the floor is still
implicit and moves with ruff's next default bump.

## Changes

- `.github/workflows/validate.yml`: ruff pin 0.16.10 → 0.17.1 for
`check` and `format --check` (the same change as #384).
- Both findings fixed in code with ruff's own fix; `datetime.UTC is
datetime.timezone.utc` is `True`, so the produced timestamps are
identical. `ruff format` then joins the `roll-changelog.py` call chain
onto one line.
- Python 3.10 is dropped (it reached end of life on 2026-10-01, [PEP
619](https://peps.python.org/pep-0619/)): `README.md` (requirements of
`validate-skill.sh`, of the test suite and of the scripts) and the
`compatibility` field of `skills/skill-repo/SKILL.md` said only "Python
3" / "python3" and now name 3.11+. `roll-changelog.py` needs 3.11 after
this change, and `dependency-audit.yml` already imports `tomllib`
(3.11+).
- Left unchanged on purpose: the `ci-python.yml` default matrix
(`["3.12", "3.13", "3.14"]`, already above the floor), the
`--python-version 3.12` compile comments for the hash-locked requirement
files, and the `ruff@0.16.8` string in the
`tests/renovate-custom-manager.py` fixture (test data for the Renovate
regex). No CHANGELOG.md exists in this repository. No ruff config is
added.
- No ignores added.

## Effect on consumers

Measured with the step's own two commands (`uvx --no-build ruff@<v>
check --extend-exclude .skill-repo-tools .` and `format --check …`),
user-level ruff config excluded, on a fresh shallow clone of each
repository's default branch. The population is the 40 repositories
GitHub code search returns for the workflow reference: all 39
non-archived `*-skill` repositories (counted independently with `gh repo
list --no-archived`, the two lists agree) plus `netresearch/.github`,
which holds it only in a template. 18 have no Python file, so the step
skips. Under 0.17.1 every repository passes `check` and `format --check`
except the three below and this one; each of those passes on its fix
branch under both 0.16.10 and 0.17.1.

| Repository | Default branch | 0.17.1 on default branch | Fix | 0.17.1
on fix |
|---|---|---|---|---|
| netresearch/matrix-skill | `main` 705aa7e | 6 × UP017, 1 × RUF100 |
netresearch/matrix-skill#177 (1f3a7d2) | pass |
| netresearch/php-ast-edit-skill | `main` 2a0552c | 1 × UP017 |
netresearch/php-ast-edit-skill#100 (7ff462a) | pass |
| netresearch/php-modernization-skill | `main` 60e138b | 3 × UP017 |
netresearch/php-modernization-skill#160 (21f8635) | pass |
| netresearch/skill-repo-skill | `main` 3eb1727 | 2 × UP017 | this PR
(03798f0) | pass |

Because the three fixes pass under 0.16.10 too, they can merge first
without breaking their own CI; this PR goes last.

## Testing done

- `uvx --no-build ruff@0.17.1 check --extend-exclude .skill-repo-tools
.`: All checks passed (the #384 run, whose only change is the pin: 2
UP017 errors)
- `uvx --no-build ruff@0.17.1 format --check --extend-exclude
.skill-repo-tools .`: 27 files already formatted
- `bash skills/skill-repo/scripts/validate-skill.sh`: exit 0;
`markdownlint-cli2` on the two changed Markdown files: exit 0
- The test suite as CI runs it (`tests/*.sh`, `tests/*.py`, Python
3.14): all pass. `tests/run-ab-evals.sh` failed once ("a majority over
three samples outvotes the flaky one") and passed on the rerun and on
`origin/main`; that test is flaky independently of this change.
- `pre-commit run --files` on the changed files: all hooks pass

_Assisted by claude-code:claude-opus-5-5 — Session
f80546bb-48c5-4cd1-967d-f275a0a8f88d_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant