Repository navigation
Chore(pre-commit): Remove the pytest hook - #463
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the local pytest-hook removal and related contributor guidance updates.
No open issues 🎉
What changed in this PR
Removes the local pytest pre-commit hook for issue #461, leaving test execution to the existing CI workflow and explicit local commands.
Changes:
- Removes the pytest hook, its
ci.skipentry, and related configuration comments. - Updates contributor guidance to distinguish lint hooks from CI and local test execution.
The CI test workflow remains unchanged. The PR identifies the stale AGENTS.md guidance as a manual follow-up.
| File | Description |
|---|---|
| CONTRIBUTING.md | Clarifies that tests run in CI and locally with uv run pytest, not through hooks. |
| .pre-commit-config.yaml | Removes the pytest hook and its skip entry while preserving other hooks. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 Antagonistic review by agent: 1 finding(s) for the human reviewer.
The hook and its skip entry are removed consistently. The replacement documentation overstates when CI runs the unit tests.
Antagonistic round 1 of 3. Revision requested from Code Monkey.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
The pytest hook was a stop-gap to keep local agent sessions from pushing code with failing tests. CI runs the suite through build-test.yaml, so the hook goes. Remove its ci.skip entry too: the organisation linting workflow fails any run whose ci.skip names a hook the configuration does not define. Drop the comments that explained the hook, and say in CONTRIBUTING.md that the hooks do not run the tests: run 'uv run pytest' locally. Review round 1: the antagonistic review noted that build-test.yaml skips pull requests touching only .github/, root dotfiles or tox.ini, so CI does not run the tests on every pull request. CONTRIBUTING.md now names those path filters and keeps the local pytest instruction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
5018f7a to
c02ee3c
Compare
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
The hook and skip entry are removed consistently, but AGENTS.md:37 still describes the now-nonexistent pytest pre-commit hook, leaving setup guidance inconsistent. Replace that reference with the explicit uv run pytest command while retaining the uv sync --extra dev prerequisite.
Antagonistic round 2 of 3. Revision requested from Code Monkey.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
8861e0e
into
lfreleng-actions:main
Closes #461
Authored by an AI agent; human review required; changes the lint gate, .pre-commit-config.yaml
claude-opus-5.5via GitHub Copilot CLI2389329bbce205924c0e9a99a56b0b1f8fa549f0.pre-commit-config.yaml, which decides the checks the repository runs; review every hook changeprek run --files CONTRIBUTING.md .pre-commit-config.yamlprek run gitlint --hook-stage commit-msg --commit-msg-filename <commit message>uv sync --extra devuv run pytest -qgit log --raw --format=%h 2389329bbce205924c0e9a99a56b0b1f8fa549f0..HEADThe
github-code-monkey-botworkflow opened this pull request.Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.
Round 1 of revision, on its base. It answers antagonistic review round 1: #463 (review).
Removes the local
pytesthook from.pre-commit-config.yaml(issue #461), with itsci.skipentry and the comments that explained it. Every remainingci.skipid names a defined hook, so the organisation linting workflow will not fail on it.pyteststays in the type checkers'additional_dependencies. Nothing under.github/workflows/, the tests or the pytest configuration changes.CONTRIBUTING.mdno longer lists pytest among the hooks. It says the hooks do not run the tests and tells contributors to runuv run pytestlocally.This round
The antagonistic review pointed out that
build-test.yamlpath filters skip pull requests that touch only.github/, root dotfiles ortox.ini, so "CI runs them on every pull request" was wrong.CONTRIBUTING.mdnow describes those filters and keeps the local pytest instruction. The commit body was corrected to match.Antagonistic review
CONTRIBUTING.md; same finding as the inline thread.Checks run
prek run --files CONTRIBUTING.md .pre-commit-config.yaml: passed (aislop included)uv run pytest -q: 114 passed, 2 skippedFor the reviewer
AGENTS.mdRepository specifics still says plainuv syncleaves "thepytestpre-commit hook" failing. The issue asks to reword it to mentionuv run pytestandModuleNotFoundError, but this workflow cannot edit agent instruction files, so a maintainer needs to make that change by hand.