fix(pre-commit): use single pytest dependency specifier#39137
fix(pre-commit): use single pytest dependency specifier#39137deepujain wants to merge 2 commits into
Conversation
Greptile SummaryThis PR fixes a YAML parsing bug in
Confidence Score: 5/5
Last reviewed commit: 219f3fc |
|
This pull request has been automatically marked as stale due to inactivity. |
219f3fc to
8049eca
Compare
|
Rebased this onto current main and reran a focused YAML sanity check. additional_dependencies now loads as a single pytest>=8,<9 requirement, so this should be ready for another look. |
|
Refreshing this thread so stale does not close it out. This branch is already rebased on current main, the YAML sanity check looked good locally, and the GitHub checks are green. |
|
Swept this PR again after the stale ping. The branch is still current enough for the existing fix, CI is green, and I did not find any actionable review comments to address. |
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-24 04:16 UTC / May 24, 2026, 12:16 AM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
PR Surface View PR surface stats
Summary Reproducibility: yes. Current main parses the hook dependency as PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the one-line quoted dependency fix on a current merge ref after required checks pass or maintainers record that the failed jobs are unrelated. Do we have a high-confidence way to reproduce the issue? Yes. Current main parses the hook dependency as Is this the best way to solve the issue? Yes. Quoting the full version range as one YAML scalar is the narrow maintainable fix, with no need for a broader pre-commit refactor. Label justifications:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against d0751111a472. |
|
This assigned pull request has been marked as stale after being open for 27 days. |
|
Refreshing this after the latest stale ping. Current main still has the split pytest dependency entry, while this PR keeps it as one valid pytest>=8,<9 requirement string. CI is green, Greptile is 5/5, and the PR is clean/mergeable. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Refreshing this after the latest stale ping. Current upstream/main (05a93c1) still has the split |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Refreshing this after the latest stale ping. Current upstream/main (7b2b0d0) still has the split |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Refreshing this after the latest stale ping. Current upstream/main (2a7d83b) still has the split |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Signal Puff Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Closing due to inactivity. |
Summary
additional_dependencies: [pytest>=8, <9]. In YAML this is parsed as two list items (pytest>=8and<9), so pip tries to install a package named<9and fails withInvalid requirement: '<9': Expected package name at the start of dependency specifier.["pytest>=8,<9"]so pip receives a valid PEP 440 range.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None. Pre-commit hook env install succeeds; no runtime behavior change.
Security Impact (required)
Repro + Verification
Environment
Steps
pre-commit run --all-filesor trigger a commit that runs hooks.<9.Expected
Pre-commit installs the local hook env without error.
Actual
As expected after the fix.
Evidence
pytest>=8,<9as one specifier.Human Verification (required)
["pytest>=8,<9"]; confirmed YAML list has one element and pip install succeeds.Compatibility / Migration
Failure Recovery (if this breaks)
.pre-commit-config.yaml.Risks and Mitigations
None. One-string dependency spec; no behavior change beyond fixing install.
Real behavior proof
Behavior or issue addressed: The
skills-python-testspre-commit hook now carries one valid pytest dependency string instead of a YAML list that splits intopytest>=8and an invalid standalone<9.Real environment tested: Local checkout of the PR branch in a real terminal session.
Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: The hook definition on this branch loads as a single dependency entry, so pre-commit no longer forwards a bogus standalone
<9requirement to pip.What was not tested: A full end-to-end
pre-commit run --all-filesinstall in a fresh environment on every platform.