Skip to content

Chore(pre-commit): Remove the pytest hook - #463

Merged
ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-461
Nov 23, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-461

Conversation

@lf-releng-code-monkey-bot

@lf-releng-code-monkey-bot lf-releng-code-monkey-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #461

Authored by an AI agent; human review required; changes the lint gate, .pre-commit-config.yaml
Command Exit
prek run --files CONTRIBUTING.md .pre-commit-config.yaml 0
prek run gitlint --hook-stage commit-msg --commit-msg-filename <commit message> 0
uv sync --extra dev 0
uv run pytest -q 0
git log --raw --format=%h 2389329bbce205924c0e9a99a56b0b1f8fa549f0..HEAD 0

The github-code-monkey-bot workflow 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 pytest hook from .pre-commit-config.yaml (issue #461), with its ci.skip entry and the comments that explained it. Every remaining ci.skip id names a defined hook, so the organisation linting workflow will not fail on it. pytest stays in the type checkers' additional_dependencies. Nothing under .github/workflows/, the tests or the pytest configuration changes.

CONTRIBUTING.md no longer lists pytest among the hooks. It says the hooks do not run the tests and tells contributors to run uv run pytest locally.

This round

The antagonistic review pointed out that build-test.yaml path filters skip pull requests that touch only .github/, root dotfiles or tox.ini, so "CI runs them on every pull request" was wrong. CONTRIBUTING.md now describes those filters and keeps the local pytest instruction. The commit body was corrected to match.

Antagonistic review

  • Body summary ("documentation overstates when CI runs the unit tests"): fixed in CONTRIBUTING.md; same finding as the inline thread.

Checks run

  • prek run --files CONTRIBUTING.md .pre-commit-config.yaml: passed (aislop included)
  • gitlint on the commit message: passed
  • uv run pytest -q: 114 passed, 2 skipped

For the reviewer

AGENTS.md Repository specifics still says plain uv sync leaves "the pytest pre-commit hook" failing. The issue asks to reword it to mention uv run pytest and ModuleNotFoundError, but this workflow cannot edit agent instruction files, so a maintainer needs to make that change by hand.

Copilot AI 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.

🟢 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.skip entry, 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 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.

Comment thread CONTRIBUTING.md Resolved
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>

Copilot AI 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.

🟢 Approval recommended

No active review issues block the change separating test execution from pre-commit linting.

No open issues 🎉

Review effort: Balanced

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 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.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit 8861e0e into lfreleng-actions:main Nov 23, 2026
31 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-461 branch November 23, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore(pre-commit): Remove the pytest hook

2 participants